跳到主要内容

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​

NameInTypeDescriptionNotes
idpathInteger (int32)The room to move, named by the identifier that GET api/2.0/files/rooms reports for it.[required] [example: 1]
ArchiveRoomRequestbodyArchiveRoomRequestThe body of the request. It carries only the lifetime of the job record, so an empty object is a normal request.[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The queued archive 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 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--
404The 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--
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 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