跳到主要内容

deleteBatchItems

FileOperationArrayWrapper deleteBatchItems(DeleteBatchRequestDto)

PUT /api/2.0/files/fileops/delete

Delete files and folders

Queues a background job that deletes the requested files and folders, 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, and read its error: a failure on a single item is reported there rather than as a status code. With immediately=false the items are moved to the caller's Trash and can be restored from it, while immediately=true removes them at once and for good; deleting a folder takes everything inside it either way. The call is destructive and it is not a no-op on repetition — a second call with the same ids deletes whatever has been restored in the meantime. Access is checked before the job is queued: deleting from a room requires room manager or content-creator rights, editing or read rights are refused with 403, and an id that resolves to nothing is answered as missing. An empty selection queues nothing and answers with the operations that are already there. To clear the Trash itself use PUT api/2.0/files/fileops/emptytrash.

Parameters​

NameInTypeDescriptionNotes
DeleteBatchRequestDtobodyDeleteBatchRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The delete operations of the caller, the one just queued includedFileOperationArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller does not have the rights to delete one of the listed items, one of them is locked by another user or open for editing, or a room is sent to Trash without immediately--
404A listed file or folder does not exist--
500An id is a number that is not a 32-bit integer--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

FileOperationArrayWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json