# Using Dynatrace API

**URL:** <https://community.dynatrace.com/t/using-dynatrace-api/9678>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [December 7, 2017, 5:52pm UTC](https://community.dynatrace.com/t/using-dynatrace-api/9678 "2017-12-07T17:52:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thierry\_chea1](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@thierry\_chea1](https://community.dynatrace.com/u/thierry_chea1)\
**Post date:** [December 7, 2017, 5:52pm UTC](https://community.dynatrace.com/t/using-dynatrace-api/9678/1 "2017-12-07T17:52:09Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![hayden\_miedema](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hayden_miedema/32/29357_2.png) [@hayden\_miedema](https://community.dynatrace.com/u/hayden_miedema)\
**Post date:** [December 7, 2017, 7:10pm UTC](https://community.dynatrace.com/t/using-dynatrace-api/9678/2 "2017-12-07T19:10:22Z")

</div>

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](https://epw504.live.dynatrace.com/api/v1/problem/status). Can you verify that it is following this standard?

Thanks,

Hayden

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [December 8, 2017, 7:47am UTC](https://community.dynatrace.com/t/using-dynatrace-api/9678/3 "2017-12-08T07:47:11Z")

</div>

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://www.dynatrace.com/support/help/dynatrace-api/introduction/what-do-i-need-to-know-to-get-started/)

#### Dynatrace Managed URL Prefix

```auto
https://owndomain/e/{id}/api/v1/

```

---

<div class="post-metadata">

**Author:** ![thierry\_chea1](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@thierry\_chea1](https://community.dynatrace.com/u/thierry_chea1)\
**Post date:** [December 8, 2017, 1:04pm UTC](https://community.dynatrace.com/t/using-dynatrace-api/9678/4 "2017-12-08T13:04:56Z")

</div>

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 ?

 ![15108-capture.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/b/ab0cb179b0629f10e0b00b601acb299f5e11e256.png)

Regards,

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [December 8, 2017, 1:14pm UTC](https://community.dynatrace.com/t/using-dynatrace-api/9678/5 "2017-12-08T13:14:28Z")

</div>

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:

> **[What is a monitoring environment?](https://docs.dynatrace.com/docs/discover-dynatrace/get-started/monitoring-environment)**
>
> Understand and learn how to work with monitoring environments.

---

<div class="post-metadata">

**Author:** ![steve\_caron](https://avatars.discourse-cdn.com/v4/letter/s/2bfe46/32.png) [@steve\_caron](https://community.dynatrace.com/u/steve_caron)\
**Post date:** [December 8, 2017, 9:19pm UTC](https://community.dynatrace.com/t/using-dynatrace-api/9678/6 "2017-12-08T21:19:25Z")

</div>

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}/](https://owndomain/e/%7BenvironmentID%7D/)

---

<div class="post-metadata">

**Author:** ![thierry\_chea1](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@thierry\_chea1](https://community.dynatrace.com/u/thierry_chea1)\
**Post date:** [December 11, 2017, 5:23pm UTC](https://community.dynatrace.com/t/using-dynatrace-api/9678/7 "2017-12-11T17:23:10Z")

</div>

Thanks, I have followed your steps and have found the environmentID
