# Server Terminal access for API authorization?

**URL:** <https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [September 14, 2017, 12:12am UTC](https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838 "2017-09-14T00:12:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpanchal](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@dpanchal](https://community.dynatrace.com/u/dpanchal)\
**Post date:** [September 14, 2017, 12:12am UTC](https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838/1 "2017-09-14T00:12:05Z")

</div>

Hi, Do we need to have terminal access to set up authication with the Dynatrace API

---

<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:** [September 14, 2017, 7:11am UTC](https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838/2 "2017-09-14T07:11:00Z")

</div>

Can you please further explain what you mean with server terminal access? The authentication with Dynatrace API is done with an Api-Token that you can create within the Dynatrace Web UI (you need environment admin role).

---

<div class="post-metadata">

**Author:** ![dpanchal](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@dpanchal](https://community.dynatrace.com/u/dpanchal)\
**Post date:** [September 14, 2017, 5:20pm UTC](https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838/3 "2017-09-14T17:20:34Z")

</div>

Basically, Command line prompt. Also, do you need root access (via sudo, of course).

I have created the token in the Web UI. Looks like the next step is run the authorization and curl commands via a command prompt.

As per the 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/)

Thanks

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [September 14, 2017, 7:17pm UTC](https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838/4 "2017-09-14T19:17:42Z")

</div>

No the curl commands are just an example how to use the API. You can use any tool / programming language to call the API.

Token must be sent with each API request. Typically as a custom header and server as authentication. In fact you don’t do any further authentication using Dynatrace API, you just need to pass the token using custom header or as request parameter.

---

<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:** [September 15, 2017, 5:20am UTC](https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838/5 "2017-09-15T05:20:21Z")

</div>

You can even use your browser for the HTTP GET type of requests.

---

<div class="post-metadata">

**Author:** ![dpanchal](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@dpanchal](https://community.dynatrace.com/u/dpanchal)\
**Post date:** [September 21, 2017, 12:21am UTC](https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838/6 "2017-09-21T00:21:31Z")

</div>

If you get a dump of all the possible parameters that you can use does that mean you are authenticated ?

I ran the following:

curl -L -H “Authorization: Api-Token \<My\_token\>” “[https://owndomain/e/{id}/api/v1/timeseries](https://owndomain/e/%7Bid%7D/api/v1/timeseries)”

I got this

[{“timeseriesId”:“ruxit.jmx.Hadoop.HDFS:BlocksRead”,“displayName”:“Blocks”,“dimensions”:[“PROCESS\_GROUP\_INSTANCE”,“rx\_pid”,“name”],“aggregationTypes”:[“AVG”,“SUM”,“MIN”,“MAX”],“unit”:"count  
",“filter”:“PLUGIN”,“types”:[]},{“timeseriesId”:“ruxit.jmx.Hadoop.HDFS:BlocksRemoved”,“displayName”:“Removed”,“dimensions”:[“PROCESS\_GROUP\_INSTANCE”,“rx\_pid”,“name”],“aggregationTypes”:[“AV  
G”,“SUM”,“MIN”,“MAX”],“unit”:“count”,“filter”:“PLUGIN”,“types”:[]},

I am trying to extract all nodes their dependencies via the API.

---

<div class="post-metadata">

**Author:** ![dpanchal](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@dpanchal](https://community.dynatrace.com/u/dpanchal)\
**Post date:** [September 21, 2017, 1:45am UTC](https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838/7 "2017-09-21T01:45:32Z")

</div>

Got it, seems to be working.

Thanks

---

<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:** [January 18, 2018, 5:05pm UTC](https://community.dynatrace.com/t/server-terminal-access-for-api-authorization/7838/8 "2018-01-18T17:05:05Z")

</div>

I know this is question was asked quite a while ago, but Postman is a great client to attempt and test API calls: [https://www.getpostman.com/](https://www.getpostman.com/)

It has a friendly interface, and nice ways to add parameters to any call, with many other features.

HTH,

Hayden
