Choose a connection method
For Dynatrace Managed, use
https://<managed-host>/e/<environment-id> with a
classic API token. ActiveGate URLs can include a port, for example
https://<activegate-host>:9999/e/<environment-id>. Serval must be able to reach
that HTTPS endpoint. Use a private worker when the endpoint is on your private
network. Do not include /api/v2 in the environment URL.
Create separate connections if your workflows need both classic and Platform
APIs. This integration does not expose the Platform bridge to classic APIs.
Create credentials
Classic API token
In Dynatrace, create an access token and grant only the scopes needed by your workflows. Copy the token when it is displayed, and store it securely.
Paste only the token in Serval’s Access token field. Serval supplies the
Api-Token authorization prefix.
Platform token
Create a Platform token in Dynatrace for a user or service user with access to the intended environment and data. Platform tokens begin withdt0s16.. Select
scopes for the operations you need, then paste the token in Access token.
Serval supplies the Bearer prefix.
For Grail, permissions depend on the DQL query: commonly storage:buckets:read
and the corresponding data scope such as storage:logs:read,
storage:metrics:read, storage:events:read, storage:entities:read, or
storage:spans:read. Bucket and record permissions can further restrict results.
Automation reads use automation:workflows:read; running and cancelling
executions use automation:workflows:run. The token cannot exceed its subject
user’s permissions.
OAuth client credentials
Create an OAuth client in Dynatrace Account Management. Give its subject user the required environment permissions and allow only the required scopes. Copy the Client ID, Client secret, and Account URN into Serval. The URN has the formurn:dtaccount:<account-UUID>.
Select the scopes your workflows need in OAuth scopes. Use the same Platform
scope guidance above, and ensure the OAuth client allows each selected scope.
Scopes are separate entries, not a comma-separated string. Serval obtains and
renews short-lived access tokens automatically. Do not paste the client secret
into the Access token field.
Connect in Serval
- Open Integrations, select Dynatrace, and add a connection.
- Choose the authentication method and enter the matching environment URL.
- Enter the token or OAuth client details and save the connection.
- Run the connection check. Classic connections need
problems.read. Platform connections validate a DQL query without reading your monitoring data. - Run the optional metrics, entities, or Automation access checks for the capabilities your workflows will use. Checks for a different API family are reported as not applicable; a connection check does not prove access to every endpoint or data bucket.
Request and response formats
- Most endpoints use JSON. Metric ingestion accepts a string of metric lines and sends it as plain text, with a JSON ingestion report returned.
- Classic list responses can include
nextPageKey. Follow the endpoint’s pagination instructions; subsequent calls commonly accept only that key. Automation responses retain theircount,next,previous, andresults. - Grail query execution may return a pending state and
requestToken. Poll withrequest-tokenuntil the query completes. Start polling promptly: completed query results are retained for at least one minute. Preserve type metadata alongside records when processing DQL results. - Rate limits return HTTP 429. Reduce concurrent requests and apply a bounded retry policy to safe reads. Writes are not retried automatically. Metric HTTP 400 can mean that valid lines were ingested while other lines failed; inspect the ingestion report before retrying.

