Automations
Warning
MASV Transfer Agent is a legacy version of the current MASV Agent. We recommend all users install the latest MASV Agent. End of life (EOL) for the legacy agent is November 7th, 2025. Support until EOL is limited to major security updates only.
MASV agent allows you to automate certain tasks to save time and support more robust workflows.
Creating an automation returns an automation_id, which can be used to query, update and delete the automation.
To list all managed automations, call:
curl -X GET http://localhost:8080/api/v1/automations
Portal Download Automations
Portal download automations are used to automatically download packages uploaded to portals.
There are currently 2 kinds of portal download automations,
Portal Download: polls a single portal for available packagesAll Portals Download: polls all portals associated with a giventeam_id
Portal Download
This automation automatically picks up new packages uploaded to the specified portal and queues them up as a new download. The downloads can be managed in the same way as other user-initiated downloads are handled, and they go through the same state transitions.
To create a portal download automation, simply call:
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/portal_download -d '{
"name": "AUTOMATION_NAME",
"portal_subdomain": "PORTAL_SUBDOMAIN",
"dst_folder": "DESTINATION_FOLDER",
"create_package_folder": true,
"effective_time": "2010-12-12T23:59:59-05:00",
"enabled": true,
"download_priority": 3,
}'
Where:
create_package_folderindicates whether package contents should be placed straight into the dst_folder, or if they should be placed within dedicated package directoriesdownload_prioritythe transfer priority to assign to all created downloadsdst_folderis the destination folder where all packages will be downloaded to.effective_timeis a string date/time in RFC333 format which indicates the start date/time after which uploaded packages will be downloaded. Setting it to a date/time in the past will cause the agent to download all packages uploaded after that point in the past until now, and subsequently, any future packages.enabledindicates whether the automation will be enabled immediately or notnameis a custom automation name.portal_subdomainis the subdomain of the portal from which uploaded packages will be automatically downloaded. The portal has to be owned by the team of the signed-in user.
To update a portal download automation, call:
curl -X PUT -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/portal_download/{automation_id} -d '{
"name": "NEW_AUTOMATION_NAME",
"enabled": false
}`
The following Portal Download automation fields can be updated:
create_package_folderdst_folderdownload_priorityeffective_timeenablednameportal_subdomain
To delete a Portal Download automation, call:
curl -X DELETE http://localhost:8080/api/v1/automations/portal_download/{automation_id}
All Portals Download
This automation polls all portals associated with the specified team_id for available packages. These packages are queued up as new downloads. The downloads can be managed in the same way as other user-initiated downloads are handled, and they go through the same state transitions.
To create an all portals download automation, simply call:
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/all_portals_download -d '{
"name": "AUTOMATION_NAME",
"team_id": "TEAM_ID",
"dst_folder": "DESTINATION_FOLDER",
"create_portal_subfolder": true,
"effective_time": "2010-12-12T23:59:59-05:00",
"enabled": true,
"download_priority": 3,
}'
Where:
create_portal_subfolderindicates whether package folders will be placed directly into thedst_folder, or if they should be placed within directories based off of the originating portal name.download_prioritythe transfer priority to assign to all created downloads.dst_folderis the destination folder where all packages will be downloaded to.effective_timeis a string date/time in RFC333 format which indicates the start date/time after which uploaded packages will be downloaded. Setting it to a date/time in the past will cause the agent to download all packages uploaded after that point in the past until now, and subsequently, any future packages.enabledindicates whether the automation will be enabled immediately or not.nameis a custom automation name.team_idis the Team ID to poll for portal packages. The signed-in user must belong to this team.
To update an all portals download automation, call:
curl -X PUT -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/all_portals_download/{automation_id} -d '{
"name": "NEW_AUTOMATION_NAME",
"enabled": false
}`
The following All Portals Download automation fields can be updated:
create_portal_subfolderdst_folderdownload_priorityeffective_timeenablednameteam_id
To delete an All Portals Download automation, call:
curl -X DELETE http://localhost:8080/api/v1/automations/all_portals_download/{automation_id}
Watch Folder automations
A watch folder is a type of upload automation that uploads subfolders within the watched directory. After a timeout has passed without detecting any file modifications, the subfolder is sent as a package, delivered according to the type of upload automation.
Attention
Top level files in the watch folder will be ignored. Ensure that the files you want delivered are properly placed in their appropriate package subfolder.
There are two types of watch folder automations:
- Send (Team) Upload: sends all subfolders within the watch folder to the configured recipient(s).
- Portal Upload: sends all subfolders to the configured portal.
Note
Transfer Agent cannot upload to a Portal that requires metadata.
Send (Team) Upload
To create a Send automation, call:
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/team_upload -d '{
"name":"send automation 1",
"path":"/path/to/watch/folder",
"timeout":5,
"enabled":true,
"team_id":"TEAM_ID",
"recipient_emails":["[email protected]"]
}'
Where
nameis the name of the automation, used for identification.enabledis the enabled/disabled state of the automation.pathis the directory to be watched. After the timeout window of inactivity, subfolders within this path will be sent as packages.recipient_emailsis an array of emails to send the packages to.team_idis the TeamID from which to send the package(s).timeoutis the filesystem inactivity timeout in minutes. If no changes are observed after this duration, the packages are sent.
Optional parameters can be provided when creating a Send automation, where
blacklistis an array of glob patterns to ignore when scanning files in the watch folder.delete_after: Integer value, specifying the number of days to keep the package(s) in storage.delete_files_after_uploadis a boolean value, indicating whether to clean up the source package subfolder once the package upload has completed.download_limitis an override for the team's maximum downloads available for the sent package(s)download_password: Optional password that all downloaders must enter before being granted access to the package(s).messageis an optional message that will be sent to recipients along with the package(s).package_name_suffixis an optional suffix that is added as a suffix after the subfolder name, combining to form the name of the package(s).send_loose_filesis a boolean value that, if true, directs the automation to send individual top level loose files in the watch folder as individual packages.tagis a tag object of the form{"name":"my_tag_name","id":"my_tag_id"}that will be passed to all created uploads.unlimited storageis a boolean value that forwards the flag to all created uploadsupload_priorityis an integer value that is assigned as the transfer priority for all created uploads
To update a Send automation, call:
curl -X PUT -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/team_upload/{automation_id} -d '{
"name":"send automation 2"
}'
The following Send automation fields can be updated:
blacklistdelete_afterdelete_files_after_uploaddownload_limitdownload_passwordenabledmessagenamepathpackage_name_suffixrecipient_emailssend_loose_filesteam_idtimeouttagunlimited_storageupload_priority
To delete a Send automation, call:
curl -X DELETE http://localhost:8080/api/v1/automations/team_upload/{automation_id}
Portal Upload
To create a Portal Upload automation, call:
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/portal_upload -d '{
"name":"portal upload automation 1",
"path":"/path/to/watch/folder",
"timeout":5,
"enabled":true,
"portal_subdomain":"PORTAL_SUBDOMAIN",
"sender_email":"[email protected]"
}'
Where:
enabledis the enabled/disabled state of the automation.nameis the name of the automation, used for identification.pathis the directory to be watched. After the timeout window of inactivity, subfolders within this path will be sent as packages.portal_subdomainis the portal subdomain of the portal the package(s) will be sent to.sender_emailis the sender email that the recipient will see when they receive the package(s).timeoutis the filesystem inactivity timeout in minutes. If no changes are observed after this duration, the packages are sent.
Optional parameters can be provided when creating a Portal Upload automation, where:
blacklistis an array of glob patterns to ignore when scanning files in the watch folder.delete_files_after_uploadis a boolean value indicating whether or not to clean up the source subfolder once the package upload has completed.messageis an optional message that will be sent along with the package(s).package_name_suffixis an optional suffix that is added as a suffix after the subfolder name, combining to form the name of the package(s).portal_passwordis the password required to upload to the configured portal. If the portal requires no password, leave this blank.send_loose_filesis a boolean value that, if true, directs the automation to send individual top level loose files in the watch folder as individual packages.upload_priorityis an integer value that is assigned as the transfer priority for all created uploads.
To update a Portal Upload automation, call:
curl -X PUT -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/portal_upload/{automation_id} -d '{
"name":"portal upload automation 2"
}'
The following Portal Upload automation fields can be updated:
blacklistdelete_files_after_uploadenabledmessagenamepackage_name_suffixpathportal_passwordportal_subdomainsend_loose_filessender_emailtimeoutupload_priority
To delete a Portal Upload automation, call:
curl -X DELETE http://localhost:8080/api/v1/automations/portal_upload/{automation_id}
Stream Upload Automations
A stream upload automation is used to upload growing files to the desired recipient. Each stream automation has a path to a stream folder, where the automation will scan for new files to stream. After a timeout has passed without detecting any file size changes, the growing file upload is finalized.
Attention
Stream Upload automations will only work with supported file formats and codecs that append to the end of a given file. File chunk modifications that are made to already streamed chunks will not be synced with the resulting package.
Attention
Any directories within the stream folder will be ignored. Ensure that the growing files you want delivered are properly placed directly in the stream folder.
There are two types of watch folder automations:
- Send (Team): sends the growing files within the stream folder to the configured recipient(s).
- Portal Upload: sends the growing files to the configured portal.
Note
Transfer Agent cannot upload a stream to a Portal that requires metadata.
Send (Team) Stream
To create a Send Stream automation, call:
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/team_stream -d '{
"name":"team stream automation 1",
"team_id":"TEAM_ID",
"path":"/path/to/stream/folder",
"timeout":60,
"recipient_emails":["[email protected]"],
"enabled":true,
"delete_after":1,
"whitelist":["*.mxf"]
}'
Where:
nameis the name of the automation, used for identification.enabledis the enabled/disabled state of the automation.pathis the directory to be watched. Uploads will be created immediately after a new top-level files are detected within the stream directory.recipient_emailsis an array of emails to send the packages to.team_idis the TeamID from which to send the package(s).timeoutis the filesystem inactivity timeout in seconds. If no changes are observed after this duration, any ongoing stream is finalized.
Optional parameters can be provided when creating a Send automation, where
whitelistis an array of glob patterns to stream. If empty, all files will be streamed.delete_after: Integer value, specifying the number of days to keep the package(s) in storage.download_limitis an override for the team's maximum downloads available for the sent package(s)download_password: Optional password that all downloaders must enter before being granted access to the package(s).messageis an optional message that will be sent to recipients along with the package(s).tagis a tag object of the form{"name":"my_tag_name","id":"my_tag_id"}that will be passed to all created uploads.unlimited storageis a boolean value that forwards the flag to all created uploadsupload_priorityis an integer value that is assigned as the transfer priority for all created uploads
To update a Send automation, call:
curl -X PUT -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/team_stream/{automation_id} -d '{
"name":"team stream automation 2"
}'
The following Send automation fields can be updated:
whitelistdelete_afterdownload_limitdownload_passwordenabledmessagenamepathrecipient_emailsteam_idtimeouttagunlimited_storageupload_priority
To delete a Send automation, call:
curl -X DELETE http://localhost:8080/api/v1/automations/team_stream/{automation_id}
Portal Stream
To create a Portal Stream automation, call:
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/portal_stream -d '{
"name":"portal stream automation 1",
"path":"/path/to/stream/folder",
"timeout":60,
"enabled":true,
"portal_subdomain":"PORTAL_SUBDOMAIN",
"sender_email":"[email protected]"
}'
Where:
enabledis the enabled/disabled state of the automation.nameis the name of the automation, used for identification.pathis the directory to be watched. Uploads will be created immediately after a new top-level files are detected within the stream directory.portal_subdomainis the portal subdomain of the portal the package(s) will be sent to.sender_emailis the sender email that the recipient will see when they receive the package(s).timeoutis the filesystem inactivity timeout in seconds. If no changes are observed after this duration, the ongoing stream is finalized.
Optional parameters can be provided when creating a Portal Upload automation, where:
whitelistis an array of glob patterns to stream. If empty, all files will be streamed.messageis an optional message that will be sent along with the package(s).portal_passwordis the password required to upload to the configured portal. If the portal requires no password, leave this blank.upload_priorityis an integer value that is assigned as the transfer priority for all created uploads.
To update a Portal Upload automation, call:
curl -X PUT -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/portal_stream/{automation_id} -d '{
"name":"portal stream automation 2"
}'
The following Portal Upload automation fields can be updated:
whitelistenabledmessagenamepathportal_passwordportal_subdomainsender_emailtimeoutupload_priority
To delete a Portal Upload automation, call:
curl -X DELETE http://localhost:8080/api/v1/automations/portal_stream/{automation_id}
Export & Import
Automation can be exported to a base64 string, which can then be imported by the transfer-agent or desktop-app. This can be used to share automations between transfer-agents or desktop-apps, or duplicate automations if need be.
To export an automation, use one of the following endpoints depending on the automation type:
Portal Download:
curl http://localhost:8080/api/v1/automations/portal_download/{automation_id}/export
Portal Upload:
curl http://localhost:8080/api/v1/automations/portal_upload/{automation_id}/export
Team Upload:
curl http://localhost:8080/api/v1/automations/team_upload/{automation_id}/export
Team Stream:
curl http://localhost:8080/api/v1/automations/team_stream/{automation_id}/export
Portal Stream:
curl http://localhost:8080/api/v1/automations/portal_stream/{automation_id}/export
The response for this request will be a json payload, with a single data field.
{"data":"base64_data_field"}
This data field can then be used with the import automation endpoint
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/automations/import -d '{"data":"base64_data_field"}'