• Home
  • Dynatrace API
  • Environment
  • Tokens v2
  • Access tokens
  • GET a token

Access tokens API - GET a token

Gets metadata of the API token by its ID.

The request produces an application/json payload.

GETManaged https://{your-domain}/e/{your-environment-id}/api/v2/apiTokens/{id}
SaaS https://{your-environment-id}.live.dynatrace.com/api/v2/apiTokens/{id}
Environment ActiveGate https://{your-activegate-domain}/e/{your-environment-id}/api/v2/apiTokens/{id}

Authentication

To execute this request, you need an access token with Read API tokens (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.

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.