14 Sep 2017 01:12 AM
Hi, Do we need to have terminal access to set up authication with the Dynatrace API
Solved! Go to Solution.
14 Sep 2017 08:11 AM
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).
14 Sep 2017 06:20 PM
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
14 Sep 2017 08:17 PM
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.
21 Sep 2017 01:21 AM
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.
21 Sep 2017 02:45 AM
Got it, seems to be working.
Thanks
15 Sep 2017 06:20 AM
You can even use your browser for the HTTP GET type of requests.
18 Jan 2018 05:05 PM
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