Rename A File
Title |
Rename a file. |
URL Path |
vault_rest/rename_file |
Method |
PUT |
Http return |
200, 400, 401, 403, 500 |
Table of Contents |
|
Last Updated |
15 Jul 2020 |
Summary
This API allows renaming a file in MetaDefender Vault.
HTTP header parameters
Authorization |
The API key of the caller |
REQUIRED |
This header should have the following format: Example: Bearer Cp01BwnXAIOLZXxn7yogjKqIZnZpQD |
Method: PUT
HTTP body |
JSON formatted request |
REQUIRED |
{
"file_id"
:
"849137c80bd443cca3c49328f4a32fe9"
,
"new_file_name"
:
"test"
}
Description of request body
Name |
Description |
file_id |
The GUID of the file uploaded |
new_file_name |
The new name of the file |
Request Error
400 |
Bad Request |
Invalid HTTP request |
401 |
Unauthorized |
Authentication unauthorized |
403 |
Forbidden |
Permission denied |
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 renamed.
Example of a failed request:
{
"message"
:
"The specified file could not be found"
,
"ui_message_key"
:
"API_FILE_NOT_FOUND"
,
"status_code"
:
"BadRequest"
}
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 |