Update a file
The change is rejected when:
- the file has active retention,
- the file’s bucket has active retention,
- the caller lacks
file:write, - the body contains an unknown key.
data. Treat the HTTP status as the success signal, then re-read the file if you need the new state.
Move a file
Cross-bucket moves are allowed only within the same company. A destination folder must belong to the destination bucket.
Response:
destinationBucketId is omitted when the move stays in the same bucket.
Copy a file
(copy) suffix.
Response:
402. The original is not modified.
Soft-delete and hard-delete
The query value is case-insensitive. A soft delete:
- blocks when the file has active retention,
- blocks when the bucket has active retention,
- blocks when a legal hold applies,
- keeps the bytes stored and billed until purge.
- blocks while retention is active,
- blocks while a legal hold applies,
- removes all versions,
- returns
410if the item was already purged after the display window.
Restore from trash
200 when the controller returns a service result. The real outcome is in data.status:
Read
data.data.fileId on success, and branch on data.status for failures. Errors thrown before the service result — permission failures, for example — use normal HTTP error codes.
Retention and legal hold
Before showing destructive actions, read the file’s retention state from a list response or folder content:isRetention: truemeans an active lock.retentionPeriodshows the configured period.- Bucket retention is visible on bucket records.
403, a legal hold may be the cause.
Lifecycle checklist
Renames use
PUT /files/update/{fileId} with only allowed fields.Moves and copies validate the destination bucket and folder before the request.
Soft delete is the default; hard delete requires explicit confirmation.
Retention and legal hold are checked before offering delete.
Restore handles
400, 404, and 410 distinctly.Copy operations account for storage capacity.