Skip to main content

deleteRoom

FileOperationWrapper deleteRoom(id, DeleteRoomRequest)

DELETE /api/2.0/files/rooms/{id}

Remove a room

Queues a background job that deletes one room with everything inside it, and returns the operation record of that job. Deleting a room is destructive and has no trash step: the room and its files are gone once the job finishes, unlike a file or a folder, which is moved to the trash first. The right to delete is checked before the job is queued, so a caller who may not delete the room is refused straight away and an unknown room is answered as missing; the same checks run again when the job starts, which is why the error of the finished operation still has to be read. Poll GET api/2.0/files/fileops until finished is true, or read the returned record again by its id. The record is kept until it is read once, so one poll after completion still sees it. deleteAfter in the body is required by the contract but has no effect on the job. An archived room is deleted the same way, and a second delete of the same id reports that the room is missing.

Parameters​

NameInTypeDescriptionNotes
idpathInteger (int32)The room to delete, named by the identifier that GET api/2.0/files/rooms reports for it.[required] [example: 10]
DeleteRoomRequestbodyDeleteRoomRequestThe body of the request. It is required even though the deletion does not depend on what it holds.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The queued delete operation to pollFileOperationWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400A third-party identifier refers to a storage account that is not connected--
403The caller may not delete this room--
404The room does not exist, or the id is neither a 32-bit number nor a third-party identifier of a known storage type--
500A third-party identifier carries a storage account number beyond the 32-bit range--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
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​

FileOperationWrapper

Third-party storage​

For a file or folder in a connected third-party storage the identifier is a string such as sbox-42, and the call differs in these parts only:

NameInTypeDescriptionNotes
idpathStringThe room to delete, named by the identifier that `GET api/2.0/files/rooms` reports for it.[required] [example: sbox-42]

Authorization​

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

HTTP request headers​

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