Downloads
MASV Agent can download any MASV package provided that you have a valid download URL in the format https://get.massive.app/{ID}?secret={SECRET}
. For password-protected downloads, you also need to provide the password. MASV Agent rebuilds the directory structure of the package as sent by the sender. Initiating and managing downloads does not require a user session.
Please note that special characters in file names for cross-platform downloads might result in modified file names. MASV Agent removes any special characters from file names to conform to the receiving platform's file name requirements.
Similar to uploads, downloads transition through different states throughout their lifecycle, with the exception that downloads do not go through an idle
state, but transition to complete
immediately once all data is transferred. Downloads can be in one of the following states:
transferring
: the download is currently transferring (downloading) data.paused
: the download is paused by the user.complete
: the download has been completed.error
: a fatal error was encountered and the download had to stop. This might be recoverable, depending on the type of error.
Download a package
To initiate a package download, simply supply the full download link URL to the MASV Agent along with a destination folder in your computer to store the downloaded files:
masv download start \
--url 'https://get.massive.app/LINK_ID?secret=LINK_SECRET' \
--destination /destination/folder \
--password 'optional_password'
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/downloads -d '{
"url":"https://get.massive.app/LINK_ID?secret=LINK_SECRET",
"dst_folder":"/destination/folder",
"password": "optional_password"
}'
Parameters
Name | Type | Required | Description |
---|---|---|---|
bypass-package-quarantine |
Boolean | No | Ignore malware warnings and only download unaffected files (default true) |
chunk-size |
Integer | No | Target chunk size for the download |
create-package-folder |
Boolean | No | Download files inside of a package folder (default true) |
destination |
String | Yes | Path to download destination directory |
file-ids |
String | Yes | Comma-separated list of package file IDs to include in the download e.g: '01FDFQW6Y9CWHK8365RKBBS0S4,01HZMN7V9059GMX71TYX04841T' |
password |
String | No | Download password that may be required by the link |
priority |
Integer | No | Download priority. Higher values mean higher priority. |
url |
String | Yes | The full download link sent to you by the sender or obtained from the Web App |
Name | Type | Required | Description |
---|---|---|---|
bypass_package_quarantine |
Boolean | No | Ignore malware warnings and only download unaffected files (default true) |
chunk_size |
Integer | No | Target chunk size for the download |
create_package_folder |
Boolean | No | Download files inside of a package folder (default true) |
dst_folder |
String | Yes | Path to download destination directory |
file_ids |
Array | Yes | Array of package file IDs to include in the download e.g: ['01FDFQW6Y9CWHK8365RKBBS0S4','01HZMN7V9059GMX71TYX04841T'] |
password |
String | No | Download password that may be required by the link |
priority |
Integer | No | Download priority. Higher values mean higher priority. |
url |
String | Yes | The full download link sent to you by the sender or obtained from the Web App |
If successful, the MASV Agent will respond with a JSON object that indicates the newly created download_id
that can be used to query or modify the download state:
{
"download_id": "f98b1e92-1c67-48e4-9b9c-f2bb27a33375"
}
View download status
To list all downloads managed by the MASV Agent:
masv download ls
curl -X GET http://localhost:8080/api/v1/downloads
To view the full details for a specific download (including individual file states), use the following:
masv download status {DOWNLOAD_ID}
curl -X GET http://localhost:8080/api/v1/downloads/{DOWNLOAD_ID}
Manage downloads
To pause a download, use:
masv download pause {DOWNLOAD_ID}
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/downloads/{DOWNLOAD_ID}/pause
To pause all active downloads, use:
masv download pause all
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/downloads/pause
To resume a download:
masv download resume {DOWNLOAD_ID}
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/downloads/{DOWNLOAD_ID}/resume
To resume all paused downloads:
masv download resume all
curl -X POST -H "Content-Type: application/json" http://localhost:8080/api/v1/downloads/resume
To delete a download, use:
masv download rm {DOWNLOAD_ID}
curl -X DELETE http://localhost:8080/api/v1/downloads/{DOWNLOAD_ID}
Warning
Please note that deleting a download this way does not automatically delete the completed files from the file system.
If you want to delete a download record and delete all files from the filesystem at the same time, you can do so by calling:
curl -X DELETE http://localhost:8080/api/v1/downloads/{DOWNLOAD_ID}?remove_files=true
To delete all downloads:
masv download rm all
curl -X DELETE http://localhost:8080/api/v1/downloads
To delete all downloads of a particular state, specify the states using the states
flag
curl -X DELETE http://localhost:8080/api/v1/downloads?states=complete,error
Parameters
Name | Type | Required | Description |
---|---|---|---|
states |
Array | No | Comma-separated list of states to target. Valid states: paused , transferring , complete , error |
remove_files |
Boolean | No | Whether to also remove the downloaded files when the download is deleted |