28 Mar 2023
08:33 AM
- last edited on
29 Mar 2023
12:24 AM
by
MaciejNeumann
I am fairly new to DT and need help on API token mentioned in environment.yaml file, I am trying to configure Monaco and would like to know how to generate this please
Solved! Go to Solution.
Hi,
You have more than one way to do it but one example would be:
---------------------------------------------------------------
name_environment:
- name: "name"
- env-url: "https://{environmentid}.live.dynatrace.com "
- env-token-name: "API_TOKEN"
---------------------------------------------------------------
And you can execute "monaco download -e environments.yaml" to download entire environment configuration or "monaco download -e environments.yaml --specific-api some_api" to download specific API.
Best regards
Hi @Tanveer,
For token generation, yellow roles are the minimum, red is a wider sope.
Some documentaiton about the required token roles:
Deploy your first configuration | Dynatrace Docs
Configuration types and token permissions | Monaco (dynatrace.github.io)
I hope it helps.
Best regards,
Mizső
Many thanks Mizso, this is what I was looking for
I have followed this https://www.dynatrace.com/support/help/manage/configuration-as-code/installation#tabgroup--configura... and getting below error while running monaco.exe
@Tanveer I am not sure if you referred this documentation
https://dynatrace.github.io/dynatrace-configuration-as-code/commands/downloading-configuration
export NEW_CLI=1
I think this should solve your problem
Hi,
Or "$env:NEW_CLI=1" if you are in powershell / Windows.
Best regards
Hi @Tanveer,
Instead v1 use the v2 and you do not need to deal with CLI configuration. (and v2 has an official support comapared v1).
Then you can run this command:
monaco download manifest manifest.yaml your_environment
I hope it helps.
Best regards,
Mizső