Trash or restore a folder
PATCH/api/v1/buckets/:bucketId/folders/:folderId
Requires contributor role or above on this bucket. status: "deleted" moves the folder to trash; status: "created" restores it (restoring parent folders as needed).
Request
Responses
- 204
- 400
- 401
- 403
- 404
- 409
- 410
Folder status transitioned
Invalid status value (INVALID_STATUS)
Not authenticated. Note: a missing or invalid token is rejected with 403 FORBIDDEN (not 401); 401 is returned when the token's session has been revoked (SESSION_REVOKED).
Missing/invalid token, or the caller's role/group is below the required minimum (FORBIDDEN)
Folder not found (FOLDER_NOT_FOUND)
Invalid transition for the folder's current state (FOLDER_ALREADY_TRASHED, FOLDER_RESTORE_IN_PROGRESS, FOLDER_NAME_CONFLICT if a folder with the same name already exists at the restore destination)
Trash retention period has expired; the folder can no longer be restored (FOLDER_TRASH_EXPIRED)