Skip to main content

deleteApiKey

BooleanWrapper deleteApiKey(keyId)

DELETE /api/2.0/keys/{keyId}

Delete an API key

Deletes the API key with the ID given in the route, so that it stops authenticating requests immediately. The caller may delete a key they created themselves, and a DocSpace administrator may delete any key of the portal. The removal is permanent and cannot be undone: the secret was only ever readable at creation time, so a deleted key cannot be restored and a new one has to be issued through POST api/2.0/keys. To stop a key temporarily instead, set isActive to false through PUT api/2.0/keys/{keyId}. The answer is a plain boolean reporting whether the key was removed.

Parameters​

NameInTypeDescriptionNotes
keyIdpathUUID (uuid)The ID of the key to delete, taken from the route. Read it from the id of an entry of GET api/2.0/keys - it is not the secret and not the keyPostfix.[required] [example: 00000000-0000-0000-0000-000000000000]

Responses​

Status codeDescriptionTypeResponse headers
200True if the key was removedBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The key belongs to another member and the caller is not a DocSpace admin--
500The portal has no key with this ID--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
400Bad Request.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​

BooleanWrapper

Authorization​

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

HTTP request headers​

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