Delete A File
Title |
Delete a file from Vault |
URL Path |
vault_rest/file/{file_id} |
Method |
DELETE |
HTTP return codes |
200, 400, 401, 403, 500 |
Table of Contents |
|
Last Updated |
15 Jan 2019 |
Summary
Delete a file from the MetaDefender Vault storage. This API will only mark the file for deletion. The file will be physically deleted by the 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
file_id |
ID of file to delete |
REQUIRED |
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
In case of a successful request status code 200 will be returned and the body of the response can be ignored. This means that the file has been marked for deletion and it will be removed.
Example of a failed request:
{
"message"
:
"One or more files were not found. No files were deleted."
,
"ui_message_key"
:
"API_CANNOTDELETEFILENOTFOUND"
,
"status_code"
:
"NotFound"
}
Descriptions of response:
status_code |
HTTP status code |
message |
A message describing the error |
ui_message_key |
A message key that is useful for localization |