archiveRoom
FileOperationWrapper archiveRoom(id, ArchiveRoomRequest)
PUT /api/2.0/files/rooms/{id}/archive
Archive a room
Queues a background job that moves one room from the Rooms section to the Archive section, and returns the operation record of that job. An archived room stays readable to its members and becomes read only: files cannot be created, renamed or edited in it, and its settings, tags, logo and links can no longer be changed, which is why many other room operations answer an archived room with a refusal. The caller must be a manager of the room; administrators of the portal cannot archive a room they were not invited to, and a room template cannot be archived at all and is answered as missing. The room is not archived when the response arrives: poll GET api/2.0/files/fileops until finished is true. Archiving an already archived room is harmless. deleteAfter decides only how long the finished record survives, not what happens to the room. Use PUT api/2.0/files/rooms/{id}/unarchive to bring the room back.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| id | path | Integer (int32) | The room to move, named by the identifier that GET api/2.0/files/rooms reports for it. | [required] [example: 1] |
| ArchiveRoomRequest | body | ArchiveRoomRequest | The body of the request. It carries only the lifetime of the job record, so an empty object is a normal request. | [optional] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The queued archive 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 read or archive this room, the id names a folder that is not a room, or a file in the room is locked or being edited | - | - |
| 404 | The room does not exist or is a room template, 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 move, 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