Create Archive
Title |
Create an archive to be downloaded |
URL Path |
vault_rest/create_archive_download |
Method |
POST |
HTTP return |
200, 400, 401, 403, 500 |
Table of Contents |
|
Last Updated |
09 Mar 2021 |
Summary
This API allows creating an archive containing multiple folders and files from MetaDefender Vault. This API will only initiate the archiving process, you need to use Get Archive Status to obtain the status of the archiving process and then download it.
HTTP header parameters
Authorization |
The API key of the caller |
REQUIRED |
This header should have the following format: Example: Bearer Cp01BwnXAIOLZXxn7yogjKqIZnZpQD |
Method: POST
HTTP body |
JSON formatted request |
REQUIRED |
{
"file_ids"
:[
"83018a5dd3164c65a5f75aaad073d7fb"
,
"1887462f7bd4492092ff55381cf03421"
],
"folder_ids"
:[
"a8132e0e01d34ee187ba85017fc413c7"
,
"048c5e1e939c4c388554d81809af09cd"
]
}
Description of the request body
Name |
Description |
file_ids |
The IDs of the files that will be contained in the archive |
folder_ids |
The IDs of the folders that will be contained in the archive |
Request Error
400 |
Bad Request |
Invalid HTTP request |
401 |
Unauthorized |
Authentication unauthorized |
403 |
Forbidden |
Permission denied |
500 |
Internal Server Error |
The server is temporarily unavailable |
Response
In case of a successful request status code, 200 will be returned and the body will contain the ID of the newly created archive together with the total count of the files in the archive. This means that the archive was successfully created.
Example of a successful request:
{
"archive"
: {
"guid"
:
"9b0e005b063a4e71b2c1531f15f1a361"
,
"total_file_count"
:
11
}
}
Descriptions of response:
archive.guid |
The ID of the created archive |
Use this ID when calling other REST APIs related to the archive |
archive.total_file_count |
The total file count |
The total number of files that was added to the archive |