List Cluster token metadata with request
Lists metadata of a Dynatrace Cluster token by the token value.
The request consumes and produces an application/json
payload.
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 | optional |
Body format
The Token object
Element | Type | Description | Required |
---|---|---|---|
token | string |
Dynatrace API authentication token. |
required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"token": "abcdefjhij1234567890"
}
Response
Response codes
Code | Description |
---|---|
200 | Success |
Response body
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[] | The list of permissions, assigned to the token. |
{
"id": "acbed0c4-4ef1-4303-991f-102510a69322",
"name": "myToken",
"userId": "john.smith",
"revoked": true,
"created": 1554076800000,
"expires": 1585976400000,
"lastUse": 1554354000000,
"scopes": [
"DataExport",
"ReadConfig",
"WriteConfig"
]
}
Example
In this example, the request queries the metadata of the 4e9f128e-04f9-4795-pj319-8b7c-3c14a5e885e4
token.
Curl
curl -X POST "https://myManaged.cluster.com/api/cluster/v2/tokens/lookup"
-H "accept: application/json; charset=utf-8"
-H "Content-Type: application/json; charset=utf-8"
-d "{ \"token\": \"abcdefjhij1234567890\"}"
Request URL
https://myManaged.cluster.com/api/cluster/v2/tokens/lookup
Response body
{
"id": "4e9f128e-04f9-4795-pj319-8b7c-3c14a5e885e4",
"name": "myToken",
"userId": "john.smith",
"revoked": true,
"created": 1554076800000,
"expires": 1585976400000,
"lastUse": 1554354000000,
"scopes": [
"DataExport",
"ReadConfig",
"WriteConfig"
]
}
Response code
200