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

Synthetic monitoring Availability - Metrics API response


Hi Team,


I am trying to get monthwise availaibity metrics of synthetics monitors using Synthetic API, but in response, am getting timestamps in UNIX format. Is there is way to get it in DD-MM-YY format or human understandable format?


Dynatrace Mentor
Dynatrace Mentor

Hey Balamurugesh,

If you request the data in CSV format you will get get a date/time format as seen in my screenshot below.



My example query looks like the following.




The docs for querying metrics can be found below with an example for the CSV format at the bottom.


Unfortunately I can't see a way to request the time in a date/time format when getting a response in json.

thanks for the details. When i query metrics API, am getting monitor Id's in response. Is there a way to get monitorName instead of monitorId in response?

If you have a look at the screenshots I posted you can get the name by adding :names to your metric query. As you can see in the CSV response for my query the name of my http monitor is Recipe API.

hi Fin, I have tied each synthetic monitor with respective application. Am looking for application name as well in response. Is there a way to get the tied Application name in response? 


If you tied the application name to the synthetic with tags, as far as I can tell that isn't possible without making another request to get the details on the synthetic in question. Using the returned synthetic ID you can query the synthetic API to get all details including tags.


Below is an example



Is there any possibility to get the application details in metrics API call?


Not that I can find unfortunately unless you used a synthetic naming scheme that used the applications name since the synthetic name is provided in the query response.

Dynatrace Champion
Dynatrace Champion

No! currently there is no way you can get that response change from api. You can use a post processor script.

Also check this solution if helps

RFE in place RFE - Dynatrace API can specific timezone using relative timeframe parameters - Dynatrace Community