07 Dec 2017 05:52 PM
Hello,
According to the documentation, I was trying to make a simple call to the Dynatrace API, but i got the following error :
{"error":{"code":404,"message":"failed to resolve tenant <epw504>"}}
Here was the curl I have made :
curl -L -H "Authorization: Api-Token tokenID" "https://myDomain.com/api/v1/problem/status"
Of course, I have previously generated a token id from the Dynatrace Managed web interface.
Is there a step I have missed ?
Regards,
Solved! Go to Solution.
07 Dec 2017 07:10 PM
Hi Thierry,
This seems like an issue with the domain based on the error message. You have above that you are using "https://myDomain.com/api/v1/problem/status". This should follow the format: https://{id}.live.dynatrace.com
So your URL for the call should be https://epw504.live.dynatrace.com/api/v1/problem/status. Can you verify that it is following this standard?
Thanks,
Hayden
08 Dec 2017 07:47 AM
Is it a Dynatrace SaaS or Managed installation? For your own Managed installation you have to use a different URL scheme as it is described within that help page:
https://www.dynatrace.com/support/help/dynatrace-a...
https://owndomain/e/{id}/api/v1/
08 Dec 2017 01:04 PM
Hello,
Sorry, I didn't mentionned what type of Dynatrace I used, it is a Managed installation.
Where can I find the id ? Is it from the Interface at Home --> Settings --> Public Endpoints ?
Regards,
08 Dec 2017 01:14 PM
The environment id is the unique id part within the Webbrowser URL when you login into one of your environments. You find the id after the /e/ part within your web browser.
See help page here:
https://www.dynatrace.com/support/help/get-started/introduction/why-do-i-need-an-access-token-and-an-environment-id/
08 Dec 2017 09:19 PM
Thierry, if you click on Environments, in the menu on the left, you will have your Environments listed. Click on the environment where your problem was reported (the one you want to export details using the API). Click on Go to Environment button. Once you are in your environment home dashboard, look at the URL box of your browser and you will have the formate described by Wolfgang, including the environment ID, ie https://owndomain/e/{environmentID}/
11 Dec 2017 05:23 PM
Thanks, I have followed your steps and have found the environmentID