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

mean time to resolve - API - Problems V2

bs43
Frequent Guest

In problems V2 we get the start and end time of a problem so from that i am trying to get the time taken to resolve the problem and i got it but as unix sec ,
made few calculation in grafana 

bs43_0-1743423704216.png

bs43_1-1743423716171.png


Now need to show whether and got as unixseconds now could not able to change it to min or hours, so is there any API i am missing out. 

2 REPLIES 2

mark_bley
Dynatrace Champion
Dynatrace Champion

no need for another API call, you already have the time in ms, just convert it to seconds, minutes or hours to your linking:

timestamp_s = timestamp_ms / 1000
timestamp_min = timestamp_ms / (1000 * 60)
timestamp_h = timestamp_ms / (1000 * 60 * 60)

 

Hi @mark_bley , Yes converted as follows and, now it is good

v2/problems?problemSelector=managementZones("MZNAME")&pagesize=500



Thanks

bs43_0-1744005449158.png

bs43_1-1744005468585.png

 

Featured Posts