Delete Multiple Files
Title |
Delete multiple files in a single request |
URL Path |
vault_rest/files |
Method |
DELETE |
Http return |
200, 400, 401, 403, 500 |
Table of Contents |
|
Last Updated |
16 Jan 2019 |
Summary
Delete a group of files from the MetaDefender Vault storage. This API will only mark the files for deletion. The files will be physically removed by a background worker.
Permissions Restrictions
Administrators can delete any file, including other user's files.
Users can only delete their own files.
HTTP header parameters
Authorization |
The API key of the caller |
REQUIRED |
This header should have the following format: Example: Bearer Cp01BwnXAIOLZXxn7yogjKqIZnZpQD |
Method: DELETE
HTTP body |
json |
REQUIRED |
[
"05a89617d2e44c409654f516eab085a5"
,
"cadf2430773c44d9bbc49a516660382c"
]
Descriptions of body:
array |
Array of file IDs to remove |
Request Error
400 |
Bad Request |
Invalid HTTP request |
401 |
Invalid parameter |
One or more parameters are invalid |
403 |
Forbidden |
API key is incorrect |
500 |
Internal Server Error |
Server is temporarily unavailable |
Response
Example of a successful request:
{
"message"
:
null
,
"ui_message_key"
:
null
,
"final_result"
:
0
,
"results"
: [
{
"message"
:
null
,
"result"
:
"Success"
,
"ui_message_key"
:
null
,
"FolderName"
:
"testtt"
,
"Guid"
:
"f558715a1ab547639392b3fdc50cf886"
,
"Result"
:
4
},
{
"message"
:
null
,
"result"
:
"Success"
,
"ui_message_key"
:
null
,
"FolderName"
:
"testt"
,
"Guid"
:
"d48c9ce1719d4cedb1609c654fd3a52e"
,
"Result"
:
4
}
],
"success_counter"
:
2
}
Example of a failed request:
{
"results"
: [
{
"Key"
:
"82876039-12f4-4f7f-ae3c-6076c765a5f3"
,
"Value"
: {
"message"
:
null
,
"ui_message_key"
:
null
}
},
{
"Key"
:
"7d871b61-ea56-4b99-b779-e9fb35815706"
,
"Value"
: {
"message"
:
"One or more files were not found. No files were deleted."
,
"ui_message_key"
:
"API_CANNOTDELETEFILENOTFOUND"
}
}
],
"success_counter"
:
1
}
Descriptions of response:
results |
A collection of data containing relevant information for each file |
Key |
The ID of the file |
success_counter |
Number of files successfully flagged for deletion |
ui_message_key |
A message key that is useful for localization |
message |
A message describing the error |