we need to know via the DMI Public REST API the values of the metrics: performance and availability of an application. I've tried something like this:
but shows the name of the metrics, but not the value.
Can someone help us?
Thanks in advance.
The API method that you actually want to use is the /rest/dmiquery/getDMIData3 method, which allows you to provide a POST payload body with parameters similar to a DMI query (method reference is at https://www.dynatrace.com/support/doc/nam/shortlink/id-dmi-service-method-reference#getdmidata3)
Some basic examples on how to set up the REST query are at https://www.dynatrace.com/support/doc/nam/shortlink/id-rest-examples. Since the REST queries need to include the internal dimension/metric IDs, I suggest using the "Export section data" option when viewing a DMI report - which outputs all the critical identifying information (appId, viewId, dimensionIds and metricIds:
# Application: NAM Server
# Application Id: CVENT
# Data View: Software service, operation, and site data
# Data View Id: ClientView
# Filters: none
# 6/18/2019 00:00 - 6/18/2019 19:59
# Software service,Application performance (%),Availability (total) (%),
# Column Ids: bgAppl,appl,appPerf,Avb,
A sample request payload with Application, Software service, Application performance (%) and Availability (total) (%) for the last 1 hour is:
"dimFilters": [ ],
You need to supply the Content-Type: application/json header, and also supply a valid Authorization header (API token is recommended). There's also an in-built REST client in the Admin console of the NAM Server (if you don't have an alternate REST client available).
Also check out if the RESTful interface can be of your service:
See also: https://answers.dynatrace.com/spaces/160/open-q-a_2/kbentry/138617/a-more-intuitive-restful-interfac...