To get authenticated to use the Dynatrace API, you need a valid API token. Access to the API is fine-grained, meaning that you also need the proper permissions assigned to the token. See the description of each request to find out which permissions are required to use it.
Dynatrace version 1.205+ Token format
Dynatrace uses a unique token format consisting of three components separated by dots (
||Prefix to identify the token.|
||Public portion of token
A 24-character public identifier of the token. This value can be safely displayed in the UI and can be used for logging purposes.
||Secret portion of token
A 64-character secret portion of the token, which can be treated like a password and therefore doesn’t need to be displayed in the Dynatrace web UI (following initial creation) or stored in log files.
Generate a token
To generate an API token
- Select Settings in the navigation menu.
- Go to Integration > Dynatrace API.
- Select Generate token.
- Enter a name for your token.
- Select the required permissions for the token.
- Select Generate.
You can assign multiple permissions to a single token, or you can generate several tokens, each with different access levels and use them accordingly—check your organization's security policies for the best practice.
Alternatively you can use the POST a new token API call to generate a token. Some tokens are only available via API.
Dynatrace doesn't enforce unique token names. You can create multiple tokens with the same name. Be sure to provide a meaningful name for each token you generate. Proper naming helps you to efficiently manage your tokens and perhaps delete them when they're no longer needed.
Dynatrace provides the following permissions for API tokens. You can set them in the UI, as described above, or via Tokens API. Some scopes are only available via API.
|Access problems and event feed, metrics, and topology||
||Grants access to various calls of Environment API.|
|ActiveGate certificate management||
||Allows to configure certificate on private ActiveGates.|
|Anonymize user sessions for data privacy reasons||
||Grants access to Anonymization API.|
|AppMon integration for hybrid deployments||
||Allows to import monitoring data from AppMon.|
|Capture request data||
||Grants access to Request attributes API.|
|Change data privacy settings||
||Grants access to Data privacy API and data privacy calls of Web application configuration API.|
|Create and read synthetic monitors, locations, and nodes||
||Grants access to the Synthetic API.|
|Create support alerts||
||Allows creation of support alerts for crash analysis.
Part of PaaS token.
|Davis Assistant integration||
||Integration with Davis.|
|Download OneAgent and ActiveGate installers||
||Allows to download installers via Deployment API.
Part of PaaS token.
|Dynatrace NAM integration||
||Integration with NAM.|
|Import data and events from external sources||
||Allows to import data and events from external sources.|
||Allows to push data stream for storing without using OneAgent.|
|Mobile symbolication file management||
||Grants access to Mobile Symbolication API.|
|Read audit logs||
||Grants access to the audit log.|
||Grants access to GET calls of Configuration API.|
|Read log content||
||Grants access to Log Monitoring API.|
|Read synthetic monitors, locations, and nodes||
||Grants access to GET requests of Synthetic API.|
|REST request forwarding||
||Allows to fetch data from remote Dynatrace environments for multi-environment dashboarding.|
||Allows to create and delete tokens as well as view their metadata via Tokens API.|
||Grants access to User sessions API.|
||Grants access to POST, PUT, and DELETE calls of Configuration API.|
|Upload plugins using the command line||
||Allows to upload OneAgent extensions via command line tool.|
|Read entities using API V2||
||Grants access to GET requests of the Monitored entities and Custom tags APIs.|
|Write entities using API V2||
||Grants access to POST, PUT, and DELETE requests of the Monitored entities and Custom tags APIs.|
|Read network zones using API V2||
||Grants access to GET requests of the Network zones API.|
|Write network zones using API V2||
||Grants access to POST, PUT, and DELETE requests of the Network zones API.|
|Read Credential Vault entries||
||Grants access to GET requests of the Credential vault API.|
|Write Credential Vault entries||
||Grants access to POST, PUT, and DELETE requests of the Credential vault API.|
||Grants access to GET requests of the Metrics API v2.|
||Grants access to the POST ingest data points request of the Metrics v2 API.|
||Grants access to GET requests of the ActiveGates API.|
||Grants access to POST and DELETE requests of the ActiveGates API.|
|Read synthetic locations||
||Grants access to GET requests of the Synthetic nodes API v2.|
|Write synthetic locations||
||Grants access to POST, PUT, and DELETE requests of the Synthetic nodes API v2.|
||Grants access to GET requests of the Problems API v2.|
||Grants access to POST, PUT, and DELETE requests of the Problems API v2.|
You have two options to pass your API token: in the Authorization HTTP header or in the api-token query parameter.
We recommend that you use the Authorization header, as URLs (along with tokens passed within them) might be logged in various locations. Users might also bookmark the URLs or share them in plain text. Therefore, placing authentication tokens into the URL increases the risk that they will be captured by an attacker.
You can authenticate by attaching the token to the Authorization HTTP header preceding the Api-Token realm.
--header 'Authorization: Api-Token abcdefjhij1234567890'
The following example shows authentication via HTTP header.
curl --request GET \ --url https://mySampleEnv.live.dynatrace.com/api/v1/config/clusterversion \ --header 'Authorization: Api-Token abcdefjhij1234567890' \
You can authenticate by adding the token as the value of the api-token query parameter.
curl --request GET \ --url 'https://mySampleEnv.live.dynatrace.com/api/v1/config/clusterversion?api-token=abcdefjhij1234567890' \
Authentication in the API Explorer
Select the lock icon next to any end point to display information about the API tokens that secure that endpoint. Each endpoint requires a specific token type.
You can also unlock all endpoints by selecting Authorize. In the displayed dialog, you can then see which token permissions are necessary for each API endpoint. By entering your API token into the global Available authorizations dialog, you can unlock all related API endpoints.