跳到主要内容

getAllPermissions

StringArrayWrapper getAllPermissions()

GET /api/2.0/keys/permissions

Get API key permissions

Returns every scope value the portal accepts in the permissions array of an API key. Read it before POST api/2.0/keys or PUT api/2.0/keys/{keyId}, because any other value is rejected with 400. Any portal member except a guest may call it, and the call is read-only. The answer is a flat list sorted alphabetically, holding the per-area scopes such as accounts:read, files:write and rooms:write, the portal-wide *:read and *:write, and * which stands for a key without scope restrictions. The list is fixed for the portal and identical for every caller, so it can be cached by the client.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The scope values accepted in the permissions array of an API keyStringArrayWrapperX-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​

StringArrayWrapper

Authorization​

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

HTTP request headers​

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