Access tokens API - GET a token

  • Reference

Gets metadata of the API token by its ID.

The request produces an application/json payload.

GETSaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/apiTokens/{id}
Environment ActiveGateCluster ActiveGatehttps://{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

ParameterTypeDescriptionInRequired
idstring

The ID of the token.

pathrequired

Response

Response codes

CodeTypeDescription
200ApiToken

Success

400ErrorEnvelope

Failed. The input is invalid.

404-

Failed. The requested resource doesn't exist.

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.

Response body objects

The ApiToken object

Metadata of an API token.

ElementTypeDescription
additionalMetadataobject

Contains additional properties for specific kinds of token. Examples:

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

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

enabledboolean

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

expirationDatestring

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

If not set, the token never expires.

idstring

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

lastUsedDatestring

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

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.

namestring

The name of the token.

ownerstring

The owner of the token.

personalAccessTokenboolean

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

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

Response body JSON model

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