• Home
  • Dynatrace API
  • Environment
  • Tokens v2
  • Access tokens
  • POST token lookup

Access tokens API - POST token lookup

Gets metadata of the API token by its secret.

The request consumes and produces an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v2/apiTokens/lookup
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/apiTokens/lookup
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/apiTokens/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
bodyApiTokenSecret

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

bodyrequired

Request body objects

The ApiTokenSecret object

ElementTypeDescriptionRequired
tokenstring

The API 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.

json
{ "token": "dt0c01.ST2EY72KQINMH574WMNVI7YN.G3DFPBEJYMODIDAEX454M7YWBUVEFOWKPRVMWFASS64NFH52PX6BNDVFFM572RZM" }

Response

Response codes

CodeTypeDescription
200ApiToken

Success

404

Failed. The requested resource doesn't exist.

Response body objects

The ApiToken object

Metadata of an API token.

ElementTypeDescription
lastUsedIpAddressstring

Token last used IP address.

modifiedDatestring

Token last modified date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z'). Updating scopes or name counts as modification, enabling or disabling a token does not.

additionalMetadataobject

Contains additional properties for specific kinds of token. Examples:

  • A dashboardId property for dashboard sharing tokens.
  • A reportId property for report sharing tokens
expirationDatestring

Token expiration date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z').

If not set, the token never expires.

personalAccessTokenboolean

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

lastUsedDatestring

Token last used date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

creationDatestring

Token creation date in ISO 8601 format (yyyy-MM-dd'T'HH:mm:ss.SSS'Z')

namestring

The name of the token.

idstring

The ID of the token, consisting of prefix and public part of the token.

ownerstring

The owner of the token.

enabledboolean

The token is enabled (true) or disabled (false).

scopesstring[]

A list of scopes assigned to the token.

The element can hold these values
  • 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
  • apiTokens.read
  • apiTokens.write
  • auditLogs.read
  • credentialVault.read
  • credentialVault.write
  • entities.read
  • entities.write
  • events.ingest
  • events.read
  • extensionConfigurations.read
  • extensionConfigurations.write
  • extensionEnvironment.read
  • extensionEnvironment.write
  • extensions.read
  • extensions.write
  • geographicRegions.read
  • hub.read
  • hub.write
  • logs.ingest
  • logs.read
  • metrics.ingest
  • metrics.read
  • metrics.write
  • networkZones.read
  • networkZones.write
  • oneAgents.read
  • oneAgents.write
  • openTelemetryTrace.ingest
  • problems.read
  • problems.write
  • releases.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

Response body JSON model

json
{ "lastUsedIpAddress": "34.197.2.44", "modifiedDate": "2020-11-12T08:15:30.144Z", "additionalMetadata": { "dashboardId": "82402bab-7370-4359-924d-88ed13c8919a" }, "expirationDate": "2020-11-12T08:15:30.144Z", "personalAccessToken": true, "lastUsedDate": "2020-11-12T08:15:30.144Z", "creationDate": "2020-11-05T08:15:30.144Z", "name": "myToken", "id": "dt0c01.ST2EY72KQINMH574WMNVI7YN", "owner": "john.smith", "enabled": true, "scopes": [ "metrics.read" ] }
Related topics
  • Access tokens

    Learn the concept of an access token and its scopes.