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

Server Terminal access for API authorization?

dpanchal
Newcomer

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

7 REPLIES 7

wolfgang_beer
Dynatrace Leader
Dynatrace Leader

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).

dpanchal
Newcomer

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...

Thanks

Julius_Loman
DynaMight Legend
DynaMight Legend

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.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

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"

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.

Got it, seems to be working.

Thanks

wolfgang_beer
Dynatrace Leader
Dynatrace Leader

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

hayden_miedema
Inactive

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/

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

HTH,

Hayden

Featured Posts