List Cluster token metadata with request
This page will soon be available only on the dedicated Dynatrace Managed Documentation site. Update your bookmarks.
This API call lists the metadata of a Dynatrace Cluster token by the token value. The request consumes and produces an application/json
payload.
Authentication
To execute this request, you need the Cluster token management (ClusterTokenManagement
) permission assigned to your API token. Generate your API token via Cluster Management Console (CMC). To learn how to obtain and use it, see Cluster API - Authentication.
Endpoint
/api/cluster/v2/tokens/lookup
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | Token | The JSON body of the request. Contains the required token. | body | required |
Request body objects
The Token
object
Element | Type | Description | Required |
---|---|---|---|
token | string | Dynatrace API authentication token. | required |
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
1{2 "token": "abcdefjhij1234567890"3}
Response
Response codes
Code | Type | Description |
---|---|---|
200 | TokenMetadata | Success |
Response body objects
The TokenMetadata
object
Metadata of a token.
Element | Type | Description |
---|---|---|
id | string | The ID of the token. |
name | string | The name of the token. |
userId | string | The owner of the token. |
revoked | boolean | Revocation status of the token. Revoked tokens are disabled. |
created | integer | The creation time as a unix timestamp in milliseconds. |
expires | integer | The expiration time as a unix timestamp in milliseconds. |
lastUse | integer | The unix timestamp in milliseconds when the token was last used. |
scopes | string[] | A list of scopes assigned to the token.
|
personalAccessToken | boolean | The token is a personal access token ( |
Response body JSON model
1{2 "id": "acbed0c4-4ef1-4303-991f-102510a69322",3 "name": "myToken",4 "userId": "john.smith",5 "revoked": true,6 "created": 1554076800000,7 "expires": 1585976400000,8 "lastUse": 1554354000000,9 "personalAccessToken": true,10 "scopes": [11 "DataExport",12 "ReadConfig",13 "WriteConfig"14 ]15}
Example
In this example, the request queries the metadata of the 4e9f128e-04f9-4795-pj319-8b7c-3c14a5e885e4
token.
Curl
1curl -X POST "https://myManaged.cluster.com/api/cluster/v2/tokens/lookup"2 -H "accept: application/json; charset=utf-8"3 -H "Content-Type: application/json; charset=utf-8"4 -d "{ \"token\": \"abcdefjhij1234567890\"}"
Request URL
1https://myManaged.cluster.com/api/cluster/v2/tokens/lookup
Response body
1{2 "id": "4e9f128e-04f9-4795-pj319-8b7c-3c14a5e885e4",3 "name": "myToken",4 "userId": "john.smith",5 "revoked": true,6 "created": 1554076800000,7 "expires": 1585976400000,8 "lastUse": 1554354000000,9 "scopes": [10 "DataExport",11 "ReadConfig",12 "WriteConfig"13 ]14}
Response code
200