跳到主要内容

getUserKeysForRoom

EncryptionKeyArrayWrapper getUserKeysForRoom(roomId)

GET /api/2.0/privacyroom/{roomId}/access

Get private room access keys

Returns the encryption keys that give access to a private room: one entry per key held by each of its members, which is what a client needs in order to encrypt a file key for everyone allowed to open the room's content. Only the caller's own entries carry privateKeyEnc; another member's entry carries the public half alone, and an entry with no public half is not reported as access at all. The room has to be a private one, a room created without private mode holds no access keys and the call is refused, and it has to still exist: an unknown room, or one already moved to Trash, is reported as missing, while an archived private room still answers. Access follows room membership and not portal role: any member from read access upwards receives the full set, whereas a DocSpace administrator who is not a member is refused, and so is a caller holding no key of their own, the room creator included once they delete their last key. The call is read-only. For the keys of a single file use GET api/2.0/files/file/{fileId}/publickeys.

Parameters​

NameInTypeDescriptionNotes
roomIdpathInteger (int32)The private room whose access keys are read. Take it from the id of the room returned by POST api/2.0/files/rooms or listed by GET api/2.0/files/rooms.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The encryption keys associated with the privacy roomEncryptionKeyArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The room is not a private room--
403The caller has no read access to the room or holds no encryption key of their own--
404The room is not found--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.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​

EncryptionKeyArrayWrapper

Authorization​

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

HTTP request headers​

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