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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | Integer (int32) | The room to delete, named by the identifier that GET api/2.0/files/rooms reports for it. | [required] [example: 10] |
| DeleteRoomRequest | body | DeleteRoomRequest | The body of the request. It is required even though the deletion does not depend on what it holds. | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The queued delete operation to poll | FileOperationWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 400 | A third-party identifier refers to a storage account that is not connected | - | - |
| 403 | The caller may not delete this room | - | - |
| 404 | The room does not exist, or the id is neither a 32-bit number nor a third-party identifier of a known storage type | - | - |
| 500 | A third-party identifier carries a storage account number beyond the 32-bit range | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 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
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:
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | String | The 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