files.trash

API: Experimental/Beta Auth: Users

Moves a file to the trash

Request Response Error
BulkRequest<FindByPath> BulkResponse<LongRunningTask> CommonErrorMessage

This operation acts as a non-permanent delete for users. Users will be able to restore the file from trash later, if needed. It is up to the provider to determine if the trash should be automatically deleted and where this trash should be stored.

Not all providers supports this endpoint. You can query files.collections.browse or files.collections.retrieve with the includeSupport flag.

This is a long running task. As a result, this operation might respond with a status code which indicate that it will continue in the background. Progress of this job can be followed using the task API.

Errors:

Status Code Description
HttpStatusCode(value=404, description=Not Found) Either the oldPath or newPath exists or you lack permissions
HttpStatusCode(value=403, description=Forbidden) You lack permissions to perform this operation
HttpStatusCode(value=400, description=Bad Request) This operation is not supported by the provider

Examples:

Example
Moving files to trash