Skip to main content

getApiKeys

ApiKeyResponseArrayWrapper getApiKeys()

GET /api/2.0/keys

Get the API keys

Returns the API keys the caller is allowed to see, which is not the same set for everybody: a DocSpace administrator gets every key of the portal, while any other member gets only the keys they created themselves. Any portal member except a guest may call it, and the call is read-only. The secrets are not returned - each entry identifies its key by id and by the last four characters in keyPostfix, and a secret can only be read once, at the moment POST api/2.0/keys creates it. Expired and deactivated keys stay in the list, so check expiresAt against the current time and read isActive before treating an entry as usable. An empty list means the caller has created no keys, not that the portal has none.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200Every key of the portal for a DocSpace admin, or the keys created by the caller for anybody elseApiKeyResponseArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller is a guest--
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​

ApiKeyResponseArrayWrapper

Authorization​

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

HTTP request headers​

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