Update Cluster token

Updates the specified Dynatrace Cluster token. You can:

  • Change the token name.
  • Revoke the token.
    A revoked token still exists in the environment, but it can't be used.
  • Change the scope of a token.

Endpoint

/api/cluster/v1/tokens

Parameters

Parameter Type Description In Required
id string

id of the token

path required
body UpdateClusterToken body optional

The UpdateClusterToken object

Element Type Description Required
revoked boolean

The token is revoked (true) or active (false).

optional
name string

The name of the token.

optional
scopes string[]

The list of permissions, assigned to the token.

The scopes element can hold these values.
optional

Possible values

Possible values for the scopes element in the UpdateClusterToken object:

  • ClusterTokenManagement
  • ControlManagement
  • DiagnosticExport
  • ExternalSyntheticIntegration
  • Nodekeeper
  • ReadSyntheticData
  • ServiceProviderAPI
  • UnattendedInstall

Response format

A successful request doesn't return any content.

Response code

Code Description
204 Success. Token was updated.
400 Failed. Cannot revoke token currently in use
404 Failed. Token not found or not assigned to customer

Example

In this example, the request queries the metadata of the specific token, which has the ID of 4e9f128e-04f9-4795-pj319-8b7c-3c14a5e885e4. It changes the token scope by updating the token metadata. The name and validity of the token remain intact. The response code of 204 indicates that the update was successful.

Curl

curl -X PUT "https://myManaged.cluster.com/api/cluster/v1/tokens/4e9f128e-04f9-4795-pj319-8b7c-3c14a5e885e4" 
        -H  "accept: application/json; charset=utf-8" 
        -H  "Content-Type: application/json; charset=utf-8" 
        -d  "{  \"revoked\": \"true\",  \"name\": \"updated token\",  \"scopes\": [    \"UnattendedInstall\"  ]}"

Request URL

https://myManaged.cluster.com/api/cluster/v1/tokens/4e9f128e-04f9-4795-pj319-8b7c-3c14a5e885e4

Request body

api-examples/cluster/token/put-cluster-token.json
Download
{
  "revoked": "true",
  "name": "updated token",
  "scopes": [
    "UnattendedInstall"
  ]
}

Response code

204