28 Mar 2023 04:33 PM - last edited on 29 Mar 2023 08: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.
28 Mar 2023 05:03 PM - edited 28 Mar 2023 05:07 PM
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
28 Mar 2023 06:49 PM
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ő
28 Mar 2023 10:32 PM
Many thanks Mizso, this is what I was looking for
28 Mar 2023 11:03 PM - edited 28 Mar 2023 11:07 PM
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
29 Mar 2023 05:26 AM
@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
29 Mar 2023 08:12 AM
Hi,
Or "$env:NEW_CLI=1" if you are in powershell / Windows.
Best regards
29 Mar 2023 12:16 PM
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ő