API tokens
This chapter focuses on services for the personal API tokens.
Self-destroy a personal API token
A DELETE
to /tokens/self
permanently deletes the personal API token used to perform this request.
This endpoint aims at managing leaked tokens, allowing a person or a secret detection script to delete a token that may have been exposed in a Git repository, a document, or other locations. It does not consider read or read/write permissions; the token used for calling it will be deleted even if it is a read-only token.
It returns a 200 status code if the operation is successful. If no token is provided, the token is invalid, or basic authentication is used, it returns a 401 status code.
HTTP Request
DELETE /api/rest/latest/tokens/self HTTP/1.1
Accept: application/json
Host: localhost:8080