cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

WorkFlows get current environment url

Jingyi
Observer

Hi,

I am currently working on WorkFlows, and try to get current environment URL by getEnvironmentUrl() from '@dynatrace-sdk/app-environment'. But when I execute it, it gives me the error shows as the screenshot.

An error occurred: {"code": 541, "message": "Execution crashed.", "details": {"type": "BAD_REQUEST", "message": "<stripped secret anyhow::Error>"}}

Does this mean in WorkFlows it is not allowed use this way to get current environment URL? And is there any other way/function I can use to get the current environment URL?


Jingyi_0-1690556796661.png

 

1 REPLY 1

michal_zawislak
Dynatrace Advisor
Dynatrace Advisor

Hi @Jingyi,

At the moment, it's not possible to get environment detail with the @dynatrace-sdk/app-environment SDK. However, support for that is planned for later this year.

In the meantime, you can use  globalThis.environmentUrl to get the current environment URL.

michal_zawislak_0-1690787398561.png

 

 

Your AutomationEngine ally!

Featured Posts