Tokens API v1 - POST token lookup

This API is deprecated. Use the Access tokens API instead.

Lists metadata of a Dynatrace API authentication token by the token itself.

Alternatively, you can retrieve metadata by submitting the ID of the token with the GET token metadata call.

The request consumes and produces an application/json payload.

POSTSaaShttps://{your-environment-id}.live.dynatrace.com/api/v1/tokens/lookup
Environment ActiveGatehttps://{your-activegate-domain}:9999/e/{your-environment-id}/api/v1/tokens/lookup

Authentication

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

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

Parameters

ParameterTypeDescriptionInRequired
bodyToken

The JSON body of the request. Contains the required token.

bodyrequired

Request body objects

The Token object

ElementTypeDescriptionRequired
tokenstring

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.

{
"token": "abcdefjhij1234567890"
}

Response

Response codes

CodeTypeDescription
200TokenMetadata

Success

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.

Response body objects

The TokenMetadata object

Metadata of a token.

ElementTypeDescription
createdinteger

The creation time as a unix timestamp in milliseconds.

expiresinteger

The expiration time as a unix timestamp in milliseconds.

idstring

The ID of the token.

lastUseinteger

The unix timestamp in milliseconds when the token was last used.

namestring

The name of the token.

personalAccessTokenboolean

The token is a personal access token (true) or an API token (false).

revokedboolean

Revocation status of the token. Revoked tokens are disabled.

scopesstring[]

A list of scopes assigned to the token.

  • ActiveGateCertManagement
  • AdvancedSyntheticIntegration
  • CaptureRequestData
  • DTAQLAccess
  • DataExport
  • DataImport
  • DataPrivacy
  • Davis
  • DiagnosticExport
  • DssFileManagement
  • ExternalSyntheticIntegration
  • InstallerDownload
  • LogExport
  • MemoryDump
  • Mobile
  • PluginUpload
  • ReadConfig
  • ReadSyntheticData
  • RestRequestForwarding
  • RumBrowserExtension
  • RumJavaScriptTagManagement
  • SupportAlert
  • TenantTokenManagement
  • UserSessionAnonymization
  • ViewDashboard
  • ViewReport
  • WriteConfig
  • WriteSyntheticData
  • activeGateTokenManagement.create
  • activeGateTokenManagement.read
  • activeGateTokenManagement.write
  • activeGates.read
  • activeGates.write
  • adaptiveTrafficManagement.read
  • analyzers.read
  • analyzers.write
  • apiTokens.read
  • apiTokens.write
  • attacks.read
  • attacks.write
  • auditLogs.read
  • bizevents.ingest
  • credentialVault.read
  • credentialVault.write
  • entities.read
  • entities.write
  • events.ingest
  • events.read
  • extensionConfigurationActions.write
  • extensionConfigurations.read
  • extensionConfigurations.write
  • extensionEnvironment.read
  • extensionEnvironment.write
  • extensions.read
  • extensions.write
  • geographicRegions.read
  • hub.install
  • hub.read
  • hub.write
  • javaScriptMappingFiles.read
  • javaScriptMappingFiles.write
  • logs.ingest
  • logs.read
  • metrics.ingest
  • metrics.read
  • metrics.write
  • networkZones.read
  • networkZones.write
  • oneAgents.read
  • oneAgents.write
  • openTelemetryTrace.ingest
  • openpipeline.events
  • openpipeline.events.custom
  • openpipeline.events_sdlc
  • openpipeline.events_sdlc.custom
  • openpipeline.events_security
  • openpipeline.events_security.custom
  • problems.read
  • problems.write
  • releases.read
  • rumCookieNames.read
  • securityProblems.read
  • securityProblems.write
  • settings.read
  • settings.write
  • slo.read
  • slo.write
  • syntheticExecutions.read
  • syntheticExecutions.write
  • syntheticLocations.read
  • syntheticLocations.write
  • tenantTokenRotation.write
  • traces.lookup
  • unifiedAnalysis.read
userIdstring

The owner of the token.

Response body JSON model

{
"created": 1554076800000,
"expires": 1585976400000,
"id": "acbed0c4-4ef1-4303-991f-102510a69322",
"lastUse": 1554354000000,
"name": "myToken",
"personalAccessToken": true,
"revoked": true,
"scopes": [
"DataExport",
"ReadConfig",
"WriteConfig"
],
"userId": "john.smith"
}

Example

In this example, the request queries the metadata of the abcdefjhij1234567890 token.

The API token is passed in the Authorization header.

The token, as displayed in the Dynatrace interface, has the following settings:

Dynatrace API authentication token

Curl

curl -X POST \
https://mySampleEnv.live.dynatrace.com/api/v1/tokens/lookup \
-H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \
-H 'Content-Type: application/json' \
-d '{
"token": "abcdefjhij1234567890"
}'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v1/tokens/lookup

Response body

{
"id": "d5836312-5790-4e80-afcf-09971954c3ea",
"name": "admin",
"userId": "admin@mysampleenv.com",
"created": "2019-03-13T09:45:40Z",
"lastUse": "2019-04-04T09:13:23Z",
"scopes": [
"ExternalSyntheticIntegration",
"DataPrivacy",
"WriteConfig",
"DssFileManagement",
"LogExport",
"DTAQLAccess",
"ReadConfig",
"CaptureRequestData",
"ReadSyntheticData",
"DataExport",
"UserSessionAnonymization",
"MaintenanceWindows",
"LogImport",
"TenantTokenManagement"
]
}

Response code

200