Move A File
Title |
Move a file to a different place |
URL Path |
vault_rest/move_files |
Method |
PUT |
HTTP return |
200, 400, 401, 403, 500 |
Table of Contents |
|
Last Updated |
15 Jul 2020 |
Summary
This API allows moving one or multiple files 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 |
{
"files"
: [
{
"file_id"
:
"de5ae8d09fa5478aad61b3451b04bf57"
,
"name"
:
"file1.pdf"
},
{
"file_id"
:
"ee870ff020564d88bb46cd421711c968"
,
"name"
:
"file2.txt"
},
{
"file_id"
:
"849137c80bd443cca3c49328f4a32fe9"
,
"name"
:
"file3.jpg"
}
],
"new_path"
:
"test"
}
Description of request body
Name |
Description |
file_id |
The GUID of the file uploaded |
name |
The name of the file |
new_path |
Path where to move the files |
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 files have been moved successfully.
Example of a failed request:
[
{
"message"
:
"Could not update file. Could not find file by given GUID."
,
"ui_message_key"
:
"API_FILE_UPDATE_NO_FILE_FOUND"
}
]
Descriptions of response:
message |
A message describing the error |
ui_message_key |
A message key that is useful for localization |