POST /files/delete-multiple
This resource is used to delete multiple files in one request. If the request succeeds, the result will be a 204 No Content otherwise the result will be a 207 Multi-Status with a body message that explains the error.
The 207 Multi-Status will show only the files that were unsuccessfully deleted.
Example
if you try to delete 'file1' and 'file2', it is possible that 'file1' was deleted but not 'file2'; in this case 'file2' will be listed in the 207 Multi-Status body message.
More details about the files delete multiple error.
You must add the path to all the files you wish to remove.
The path you need to specify is the same as the path in the URL when you are viewing a file.
Example:
For the file :
https://0.0.0.0/api/rest/v1/folder1/folder2/file.xml
you just need to specify :
/folder1/folder2/file.xml
If this parameter is not in the request, the Application/Json will be chosen by default. JSON and XML are the most commonly used values.
There are multiple possible values (according the resource):
Located in : Header
Example values : accept:application/json
There are multiple possible values according the resource:
If this parameter is not present during the request, and error 415 Unsupported Media Type will be thrown.
Located in : Header
Example values : content-type:application/json
The Content-Length entity-header field indicates the size of the entity-body.
Located in : Header
Example values : content-length:526
URL Example: https://0.0.0.0/api/rest/v1/files/delete-multiple
[
"/folder1/folder2/file1.xml",
"/folder1/folder2/folder3/file2.xml",
"/file3.xml",
"/folder1/folder2/file4.xml"
]
URL Example: https://0.0.0.0/api/rest/v1/files/delete-multiple
<?xml version="1.0" encoding="utf-8"?>
<Files>
<Path>/folder1/folder2/file1.xml</Path>
<Path>/folder1/folder2/folder3/file2.xml</Path>
<Path>/file3.xml</Path>
<Path>/folder1/folder2/file4.xml</Path>
</Files>
URL Example: https://0.0.0.0/api/rest/v1/files/delete-multiple
[
{
"href": "/folder1/folder2/file1.xml",
"status": 404,
"action": "delete",
"errorMessage": "File or directory does not exists",
"errorCode": 14,
"detail": "File or directory does not exists"
},
{
"href": "/file3.xml",
"status": 404,
"action": "delete",
"errorMessage": "File or directory does not exists",
"errorCode": 14,
"detail": "File or directory does not exists"
}
]
URL Example: https://0.0.0.0/api/rest/v1/files/delete-multiple
<?xml version="1.0" encoding="utf-8"?>
<Multistatus>
<Response>
<Href>/folder1/folder2/file1.xml</Href>
<Status>404</Status>
<Action>delete</Action>
<ErrorMessage>File or directory does not exists </ErrorMessage>
<ErrorCode>14</ErrorCode>
<Detail>File or directory does not exists</Detail>
</Response>
<Response>
<Href>/file3.xml</Href>
<Status>404</Status>
<Action>delete</Action>
<ErrorMessage>File or directory does not exists </ErrorMessage>
<ErrorCode>14</ErrorCode>
<Detail>File or directory does not exists</Detail>
</Response>
</Multistatus>