Access tokens API - DELETE a token

  • Reference
  • Published Mar 15, 2021

Deletes the specified Dynatrace API authentication token.

  • If you're using a personal access token to authenticate the call, you can delete only your own tokens.
  • If you're using an API token to authenticate the call, you can delete any token.
DELETEManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v2/apiTokens/{id}
Environment and Cluster ActiveGate (default port 9999)https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/apiTokens/{id}

Authentication

To execute this request, you need an access token with apiTokens.write scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
idstring

The ID of the token to be deleted.

You can specify either the ID or the secret of the token.

You can't delete the token you're using for authentication of the request.

pathRequired

Response

Response codes

CodeTypeDescription
204-

Success. Response doesn't have a body.

400ErrorEnvelope

Failed. You can't delete the token you're using for authentication of the request.

404-

Failed. The requested resource doesn't exist.

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.

Response body objects

The ErrorEnvelope object

ElementTypeDescription
errorError-

The Error object

ElementTypeDescription
codeinteger

The HTTP status code

constraintViolationsConstraintViolation[]

A list of constraint violations

messagestring

The error message

The ConstraintViolation object

A list of constraint violations

ElementTypeDescription
locationstring-
messagestring-
parameterLocationstring-
The element can hold these values
  • HEADER
  • PATH
  • PAYLOAD_BODY
  • QUERY
pathstring-

Response body JSON models

{
"error": {
"code": 1,
"constraintViolations": [
{
"location": "string",
"message": "string",
"parameterLocation": "HEADER",
"path": "string"
}
],
"message": "string"
}
}