Access tokens API - GET a token
Gets metadata of the API token by its ID.
The request produces an application/json
payload.
GET | ManagedDynatrace for Government | https://{your-domain}/e/{your-environment-id}/api/v2/apiTokens/{id} |
SaaS | https://{your-environment-id}.live.dynatrace.com/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.read
scope.
To learn how to obtain and use it, see Tokens and authentication.
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
id | string | The ID of the token. | path | required |
Response
Response codes
Code | Type | Description |
---|---|---|
200 | ApiToken | Success |
400 | ErrorEnvelope | Failed. The input is invalid. |
404 | - | Failed. The requested resource doesn't exist. |
Response body objects
The ApiToken
object
Metadata of an API token.
Element | Type | Description |
---|---|---|
additionalMetadata | object | Contains additional properties for specific kinds of token. Examples:
|
creationDate | string | Token creation date in ISO 8601 format ( |
enabled | boolean | The token is enabled ( |
expirationDate | string | Token expiration date in ISO 8601 format ( If not set, the token never expires. |
id | string | The ID of the token, consisting of prefix and public part of the token. |
lastUsedDate | string | Token last used date in ISO 8601 format ( |
lastUsedIpAddress | string | Token last used IP address. |
modifiedDate | string | Token last modified date in ISO 8601 format ( |
name | string | The name of the token. |
owner | string | The owner of the token. |
personalAccessToken | boolean | The token is a personal access token ( |
scopes | string[] | A list of scopes assigned to the token.
|
Response body JSON model
1{2 "additionalMetadata": {3 "dashboardId": "82402bab-7370-4359-924d-88ed13c8919a"4 },5 "creationDate": "2020-11-05T08:15:30.144Z",6 "enabled": true,7 "expirationDate": "2020-11-12T08:15:30.144Z",8 "id": "dt0c01.ST2EY72KQINMH574WMNVI7YN",9 "lastUsedDate": "2020-11-12T08:15:30.144Z",10 "lastUsedIpAddress": "34.197.2.44",11 "modifiedDate": "2020-11-12T08:15:30.144Z",12 "name": "myToken",13 "owner": "john.smith",14 "personalAccessToken": true,15 "scopes": [16 "metrics.read"17 ]18}