Empty fields in response from API for /incidents

rest-api

#1

Hi,

I’m currently developping an exporter from PagerDuty (API) to ElasticSearch. I would like to index incidents and have nice dashboards + reports (canvas) in Kibana. All is working well except I can’t figure out why the response for a resolved incident has some its fields empty. For example, (two fields I want the most) :

  "assignments": [],
  "acknowledgements": [],

I get that was made with purpose, but why?

Regards,


(Chiedu Uraih) #2

@thomas,

The reason is that an Incident that has been resolved will not be assigned to any user
nor is it being acknowledged. So if you go to the Web UI and navigate to Incidents->Resolved tab,
you will notice that the Incidents there are not assigned to any user. That essentially is
the date you want pulled.

I hope that helps


#3

Hi,

Thanks for your answer. I understand why Assignment is empty, it makes sense but why acknowledgement date is missing too? It’s interesting to get the time between triggering and ACK (and know compliance with Guaranteed Response Time).

Regards,


(Simon Fiddaman) #4

Hi @Thomas,

You will probably need to traverse the Log Entries to get that data.

Internally, I’d assume that the presence or absence of assignments, acknowledgements determines the Incident state - Triggered, Acknowledged, Resolved and hence it would need to be removed in order to maintain internal consistency. All of those actions feature in the Log Entries though.

Cheers,
@simonfiddaman


#5

Thanks.

I was afraid of that. It will be a little bit harder but I will try to do with.