deleteFileVersions
FileOperationArrayWrapper deleteFileVersions(DeleteVersionBatchRequestDto)
PUT /api/2.0/files/fileops/deleteversion
Delete file versions
Queues a background job that removes the listed versions from the history of one file, and answers with the caller's delete operations, including the one just started. Poll GET api/2.0/files/fileops until the operation reports finished; a failure met while the job runs is reported in its error rather than as a status code. Removal is permanent — deleted versions do not travel through Trash and cannot be restored, while the file itself stays in place with the versions that are left. Send the numbers that GET api/2.0/files/file/{fileId}/history reports, and send at least one: an empty list is not an empty request, it deletes the whole file instead. The number of the current version is refused before anything is queued, while numbers that no longer exist are passed over without a complaint. The caller needs the rights that deleting the file itself would need, so a member with read-only rights is refused, as are a file in an archived room and a file that is already in Trash, and a file that does not exist is answered as missing. To delete the file itself use PUT api/2.0/files/fileops/delete.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| DeleteVersionBatchRequestDto | body | DeleteVersionBatchRequestDto | [optional] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The delete operations of the caller, the one just queued included | FileOperationArrayWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | The request body cannot be read or has no fileId or versions | - | - |
| 403 | The caller cannot delete the file, the file is locked by another user, open for editing, in an archived room or in Trash, or versions includes the current version | - | - |
| 404 | The file does not exist | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: application/json
- Accept: application/json