DELETE /tokens/<token>

Use this endpoint to revoke a single token, ensuring that it can no longer be used with RBAC. Authentication is required.

Request format

Only admins or API users can use this endpoint.

When Forming RBAC API requests to this endpoint, the request is a basic call with authentication and a single token specified in the URI path. For example:

curl -X DELETE "https://$(puppet config print server):4433/rbac-api/v2/tokens/<TOKEN>" \
-H "X-Authentication:$(puppet-access show)"

This endpoint is equivalent to using the DELETE /tokens endpoint with the revoke_tokens parameter and a single token value. If you're not an admin, try the DELETE /tokens route for revoking tokens.

Response format

The server returns 204 No Content if the revocation was successful.

Error responses

Error response are similar to DELETE /tokens error responses, except that only one token is processed.