I need to be able to GET the apdex score of a specific application/entity, but can’t figure out how to do it via api. In Postman I’m using the following, which I found online:
and it’s returning a lot (everything?) including what I believe is the apdex score I’m looking for (please correct me if I’m wrong?).
Ex (0.57 and 0.95
{ “result”: { “dataPoints”: { “APPLICATION-70271671F7DA1232”: [ [ 1652268060000, 0.57 ] ], “APPLICATION-2104433A851141A1”: [ [ 1652268060000, 0.95 ] ], [clipped]as well as: “entities”: { “APPLICATION-70271671F7DA1232”: “[app1].[domain].com” “APPLICATION-2104433A851141A1”: “[app2].[domain].com”, [clipped]and much much more.Is there a way to request just the apdex score for a single application - i.e. the 0.57 from APPLICATION-70271671F7DA1232? What about the entity name along with that specific 0.57 value?An additional ask would be how to retrieve them all, but in a format similar to:[entity] [apdex score][app1].[domain].com 0.57[app2].[domain].com 0.95The goal is to simply “dashboard” the value(s) in an external application.I’m new to APIs and Dynatrace, so if you can please explain it like I’m 5?Thank you
This will retrieve the metric, split it by the application (so you have numbers for each app) and it uses the :name transformation to add the entity (application) name in the result. The data points in a bucket are average.
There are plenty of metric selector transformations you can use.
To filter it for a specific entity, you can use the either the entitySelector query parameter for the API or the :filter parameter in the metric selector. For example the entitySelector in your case will be :
Thank you for the reply. The curl statement returns much, but I’m not sure how I’d format the uri for use with Postman, and subsequently the api call in the external app’s interface. Can you please provide a full example? of both the curl and Postman GET including the entityId entitySelector you mention - I’ve tried using entityId before, but it always errors out, so where/how to use it isn’t clear to me.
Thanks, again. that latest curl statement still seems to be pulling everything, for every APPLICATION-*.
I have been able to get a little closer using Postman using your suggestions, it’s still retrieving every APPLICATION, but the format’s a little easier to read, and the apdex I’m looking for appears to be the 1st value in a list of dozens/hundreds. Just need to pare that down a bit.
The Patrick Hofman collections look promising, but there seems to be lorem ipsum throughout, and I don’t know what to replace with what.
I’ll keep digging - thank you again for your help.