• Home
  • Dynatrace API
  • Environment
  • Tokens v2
  • Tenant tokens
  • POST finish rotation

Tenant tokens API - POST finish rotation

Completes the rotation of the tenant token. The old token becomes invalid. Execute the request only when you have updated all OneAgents and ActiveGates as described in Rotate tenant token.

To avoid data loss, both old and new tokens are valid during the rotation process. During rotation, do not deploy any new OneAgents until all your ActiveGates are configured with the new tenant token.

The request produces an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v2/tenantTokenRotation/finish
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v2/tenantTokenRotation/finish
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v2/tenantTokenRotation/finish

Authentication

To execute this request, you need an access token with tenantTokenRotation.write scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

The request doesn't provide any configurable parameters.

Response

Response codes

CodeTypeDescription
200TenantTokenConfig

Success. The rotation process is completed. The active field of the response contains the new tenant token.

400ErrorEnvelope

No ongoing rotation process.

Response body objects

The TenantTokenConfig object

Configuration of a tenant token.

ElementTypeDescription
oldTenantToken

Tenant token

activeTenantToken

Tenant token

The TenantToken object

Tenant token

ElementTypeDescription
valuestring

The secret of the tenant token.

Response body JSON model

json
{ "old": { "value": "string" }, "active": {} }

Example

In this example, the request completes the rotation process started in start request example.

The response code of 200 indicates a successful request. The old token 1234567890qrstuvwxyz is no longer valid.

The API token is passed in the Authorization header.

Curl

bash
curl -X POST \ https://mySampleEnv.live.dynatrace.com/api/v2/tenantTokenRotation/finish \ -H 'Authorization: Api-Token dt0c01.abc123.abcdefjhij1234567890' \ -H 'Accept: application/json'

Response body

json
{ "active": { "value": "zyxwvutsrq0987654321" }, "old": { "value": "1234567890qrstuvwxyz" } }

Response code

200

Related topics
  • Tenant token

    Learn what a tenant token is and how to change it.