Incident duration



I need to provide the duration of Incidents. By duration, the time from the incident was created to it being resolved. I don’t see an obvious way to determine that based on the response from the various incident related methods.

Does anyone have any suggestions?

(John O'Donnell) #2

HI Casey,

The easiest way to do this would be to get the log entries for the incident in question and identify the triggered and resolved timestamps, you can read more about that here.

Let us know if you have any more questions.

(Waldo G) #3

@cscott952 if you hit the get-incident method of the API (/incidents/{incident_id}), you can get the time elapsed by subtracting the initial time (incident.created_at) from the last_status_change_at timestamp (incident.last_status_change_at). A caveat here is that this is not guaranteed to be a Resolve action.

(system) #4