Transition a file's status (confirm upload, trash, or restore)
PATCH/api/v1/buckets/:bucketId/files/:fileId
Requires contributor role or above on this bucket. status: "uploaded" confirms a pending upload, or restores the file if it was trashed. status: "deleted" moves the file to trash.
Request
Responses
- 204
- 400
- 401
- 403
- 404
- 409
File 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).
File has expired (FILE_EXPIRED)
File not found (FILE_NOT_FOUND), or, when confirming an upload, the object is missing from storage (FILE_NOT_IN_STORAGE)
Invalid transition for the file's current state (INVALID_FILE_STATUS_TRANSITION, FILE_ALREADY_TRASHED, FILE_RESTORE_IN_PROGRESS, FILE_NAME_CONFLICT)