Delete Multiple Folders

Title

Delete multiple folders in a single request

URL Path

vault_rest/folders

Method

DELETE

Summary

Delete a group of folders from the MetaDefender Vault storage. This API will only mark the folders for deletion. The folders will be physically removed by a background worker.

Permissions Restrictions

Administrators can delete any folder, including other user's folders.
Users can only delete their own folders.

HTTP header parameters

Authorization

The API key of the caller

REQUIRED

This header should have the following format: Bearer [

Example: Bearer Cp01BwnXAIOLZXxn7yogjKqIZnZpQD

Method: DELETE

HTTP body

json

REQUIRED

Sample HTTP body
[
"c4254a3e4fe247198d681565ad376466",
"2abd8f9b37a64cdcbf249c6b6b7ff6f2"
]

Descriptions of body:

array

Array of folders 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:

{"successful_results":{"entities":[{"message":null,"ui_message_key":null,"result":"Success"},{"message":null,"ui_message_key":null,"result":"Success"}],"success_counter":2},"failed_results":{"entities":[],"failed_counter":0},"total_count":2}

Example of a failed request:

{"successful_results":{"entities":[],"success_counter":0},"failed_results":{"entities":[{"message":"One or more folders were not found. No folders were deleted.","ui_message_key":"API_FOLDER_CAN_NOT_DELETE_FOLDER_NOT_FOUND"},{"message":"One or more folders were not found. No folders were deleted.","ui_message_key":"API_FOLDER_CAN_NOT_DELETE_FOLDER_NOT_FOUND"}],"failed_counter":2},"total_count":2}

Descriptions of response:

results

A collection of data containing relevant information for each folder

Key

The ID of the folder

success_counter

Number of folders successfully flagged for deletion

ui_message_key

A message key that is useful for localization

message

A message describing the error