07 Mar 2021
05:57 PM
- last edited on
10 Mar 2021
06:59 AM
by
Karolina_Linda
Still don't understand much after reading documentation.
What is/are the difference between them?
Best Regards,
Wai Keat
Solved! Go to Solution.
Hello @waikeat_chan
Environment API tokens are specific to a particular environment, whereas, the cluster API tokens manage the cluster even containing more than one environment especially in the case of Dynatrace Managed.
Regards,
Babar
Thank you very much for your post! Indeed we need to extend and update our documentation page:
In particular:
Is there a way to get to the same functionality as the Environment token management token, but something that does not invalidate after 24hrs?
We would like to have a job which runs every 24 hours and syncs all 350 environment tokens for other automation.
Yes, you can override that 24h expiration time by using AP. If you use "0" days it doesn't expire:
curl -X POST "https://cluster-host/api/cluster/v2/tokens" -H "accept: application/json; charset=utf-8" -H "Authorization: Api-Token dt0c01.token" -H "Content-Type: application/json; charset=utf-8" -d "{\"name\":\"my-token-name\",\"expiresIn\":{\"value\":0,\"unit\":\"DAYS\"},\"scopes\":[\"EnvironmentTokenManagement\"]}"
Hi!
Is this documented anywhere? Which access rights does the api user performing this require?
Yes - see available scopes: