• 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.

POSTManaged https://{your-domain}/e/{your-environment-id}/api/v2/apiTokens/lookup
SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/apiTokens/lookup
Environment ActiveGate https://{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

ElementTypeDescription
tokenstring

The API token.

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.

Can be null.

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.

Can be null.

additionalMetadataobject

Contains additional properties for specific kinds of token. Examples:

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

Can be null.

expirationDatestring

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

If not set, the token never expires.

Can be null.

lastUsedDatestring

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

Can be null.

personalAccessTokenboolean

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

Can be null.

creationDatestring

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

Can be null.

namestring

The name of the token.

Can be null.

idstring

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

Can be null.

ownerstring

The owner of the token.

Can be null.

enabledboolean

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

Can be null.

scopesstring[]

A list of scopes assigned to the token.

The element can hold these values
  • ActiveGateCertManagement
  • AdvancedSyntheticIntegration
  • AppMonIntegration
  • 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
  • logs.ingest
  • logs.read
  • metrics.ingest
  • metrics.read
  • metrics.write
  • networkZones.read
  • networkZones.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

Can be null.

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", "lastUsedDate": "2020-11-12T08:15:30.144Z", "personalAccessToken": true, "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.