# Exposing Dynatrace saas API

**URL:** <https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [June 9, 2017, 7:39am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526 "2017-06-09T07:39:57Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [June 9, 2017, 7:39am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/1 "2017-06-09T07:39:57Z")

</div>

Hi,

While testing API with Postman getting below error, please help. I am using token also(generated from Dynatrace Saas).

The end point I am using is ---

https://{xxx}.live.dynatrace.com/api/v1/timeseries/?apitoken=123456789

```auto
{"error":{"code":401,"message":"Unsupported authentication mechanism -> 'Basic', could not be used as fallback."}}

```

---

<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:** [June 9, 2017, 8:40am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/2 "2017-06-09T08:40:03Z")

</div>

Did you try it with Api‐Token=

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [June 9, 2017, 11:58am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/3 "2017-06-09T11:58:14Z")

</div>

Hi Wolgang,

I tried with ‘Api-Token=’ as well but now I am getting Authorization is required for access to this proxy.

I specify the proxy with authorization still showing proxy problem.

Do I need to allow access to dynatrace server instance.

---

<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:** [June 9, 2017, 12:54pm UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/4 "2017-06-09T12:54:50Z")

</div>

By the way I hope you did not post the real token here?

https://{xxx}.live.dynatrace.com/api/v1/timeseries/?Api-Token=

Should be the correct and full request, that returns the list of defined metrics.

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [June 9, 2017, 1:17pm UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/5 "2017-06-09T13:17:02Z")

</div>

After applying the token I am getting below xml

\<HEAD\>  
\<TITLE\>Proxy Authorization Required\</TITLE\>  
\</HEAD\>  
\<BODY BGCOLOR=“white” FGCOLOR=“black”\>  
\<H1\>Proxy Authorization Required\</H1\>  
\<HR\>  
\<FONT FACE=“Helvetica,Arial”\>  
\<B\>  
Description: Authorization is required for access to this proxy\</B\>  
\</FONT\>  
\<HR\>  
\<!-- default “Proxy Authorization Required” response (407) --\>  
\</BODY\>

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [June 12, 2017, 7:36am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/6 "2017-06-12T07:36:48Z")

</div>

Hi Wolfgang,

I got the desired response after accessing from my personal laptop.

While accessing from my client network I am not getting desired response as there are Firewall.

Do I need access to Dynatrace saas server instance to get the response.

---

<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:** [June 12, 2017, 7:44am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/7 "2017-06-12T07:44:27Z")

</div>

Hi,

I do not really understand your set up. You are running a Dynatrace SaaS environment, at least the domain you provided suggests that?

So your company firewall is blocking the access to Dynatrace SaaS server? How do you access Dynatrace SaaS Web UI then?

best,

Wolfgang

---

<div class="post-metadata">

**Author:** ![suresh230591](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/suresh230591/32/280_2.png) [@suresh230591](https://community.dynatrace.com/u/suresh230591)\
**Post date:** [June 12, 2017, 9:25am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/8 "2017-06-12T09:25:45Z")

</div>

hi,

Yes this is dynatrace saas environment ,I am able to access the Web UI, but if a do a ping on https://{xxx}.live.dynatrace.com&nbsp; request time out . After ping to https://{xxx}.live.dynatrace.com&nbsp; it resolve to 2 IP Addresses which are dynatrace server IP. I tried telnet to those IP address which show connection failed. Does it mean that I don’t have connectivity to dynatrace server.

---

<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:** [June 12, 2017, 10:17am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/9 "2017-06-12T10:17:59Z")

</div>

I fear thats a firewall issue on your side, from our perspective there is not much difference between the Dynatrace Web UI and REST API except the additional /api/ subpath. Can you ask your firewall admin what they defined as rules to access Dynatrace SaaS domain?

---

<div class="post-metadata">

**Author:** ![rravindran](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rravindran](https://community.dynatrace.com/u/rravindran)\
**Post date:** [July 13, 2017, 12:01am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/10 "2017-07-13T00:01:07Z")

</div>

I am getting the same error - Unsupported authentication mechanism → ‘Basic’, could not be used as fallback !! In my case no firewall involved

Here is the URL I am trying

[https://xxxxxxxxx.live.dynatrace.com/api/v1/timeseries/?Api‐Token=XXXXXXXXx&\_ga=2.171675877.41959668.1548055338-1975423614.1546843806](https://xxxxxxxxx.live.dynatrace.com/api/v1/timeseries/?Api%E2%80%90Token=XXXXXXXXx&%5C_ga=2.171675877.41959668.1548055338-1975423614.1546843806)

[https://xxxxxxxxx.live.dynatrace.com/api/v1/problem/feed?Api‐Token=XXXXXXXX&\_ga=2.171675877.41959668.1548055338-1975423614.1546843806](https://xxxxxxxxx.live.dynatrace.com/api/v1/problem/feed?Api%E2%80%90Token=XXXXXXXX&%5C_ga=2.171675877.41959668.1548055338-1975423614.1546843806)

---

<div class="post-metadata">

**Author:** ![rravindran](https://avatars.discourse-cdn.com/v4/letter/r/df705f/32.png) [@rravindran](https://community.dynatrace.com/u/rravindran)\
**Post date:** [July 17, 2017, 3:36am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/11 "2017-07-17T03:36:16Z")

</div>

Issue was with the special character added in the URL while copy pasting

---

<div class="post-metadata">

**Author:** ![timothy\_d\_krupi](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@timothy\_d\_krupi](https://community.dynatrace.com/u/timothy_d_krupi)\
**Post date:** [October 26, 2017, 10:36am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/12 "2017-10-26T10:36:07Z")

</div>

Seems like you’re selecting ‘Basic’ under the authorization tab. In postman you want to leave this blank -- instead, add a header with the value for Key equal to ‘Authorization’, and the Value equal to your API string - e.g. “Api-Token your\_token”. If you click on the code option, you should see something similar to this:

```auto
GET /api/v1/timeseries?relativeTime=hour&aggregationType=AVG&timeseriesId=com.dynatrace.builtin:host.disk.freespacepercentage HTTP/1.1
Host: somehost.live.dynatrace.com
Authorization: Api-Token <redacted>
Cache-Control: no-cache
Postman-Token: 123456abcdef

```

---

<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:** [October 27, 2017, 6:14am UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/13 "2017-10-27T06:14:47Z")

</div>

See documentation:

[https://help.dynatrace.com/dynatrace-api/authentic…](https://help.dynatrace.com/dynatrace-api/authentication/how-do-i-set-up-authentication-to-use-the-api/)

The HTTP GET parameter is called ‘Api-Token’ not ‘apitoken’.

---

<div class="post-metadata">

**Author:** ![piyush\_ajmera](https://avatars.discourse-cdn.com/v4/letter/p/9dc877/32.png) [@piyush\_ajmera](https://community.dynatrace.com/u/piyush_ajmera)\
**Post date:** [March 28, 2018, 2:48pm UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/14 "2018-03-28T14:48:46Z")

</div>

Hi I am unable to access my tenant either . I am getting error as “error”:{“code”:401,“message”:“Unsupported authentication mechanism → ‘Basic’, could not be used as fallback.”}}

I am trying to use DTCLI to config my localhost and to fetch back the data for further processing . I am using the code present in DTCLI github.

---

<div class="post-metadata">

**Author:** ![Shiv\_Pati](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@Shiv\_Pati](https://community.dynatrace.com/u/Shiv_Pati)\
**Post date:** [March 28, 2018, 3:12pm UTC](https://community.dynatrace.com/t/exposing-dynatrace-saas-api/6526/15 "2018-03-28T15:12:39Z")

</div>

You should check with your security/network team if they allow such connections.
