Preserve incident acknowledgements list after it has been resolved/triggered

Hi, in the get incidents api the list of acknowledgements gets cleared after it has been resolved/triggered, why is that?

Can we please preserve the list of acknowledgements, we need this data for our reporting

1 Like

The acknowledgment on the incident object itself is representative of who is currently working on an incident. When an incident is resolved, or when it is in the triggered state, it is assumed that no one is. This can change over the course of an incident’s lifecycle.

The historical data for an incident including who acknowledged it are available as log entries via the list log entries for an incident endpoint.

What you can do to get specifically the list of users who have acknowledged an incident is filter the results after fetching the full list down with the criteria:

  • type property is acknowledge_log_entry
  • agent.type property is user_reference

The property is then the ID of the user who acknowledged it.

A python example that results in a list of 2-tuples with the time stamp and user ID that acknowledged:

# >>> session.__class__
# <class 'pdpyras.APISession'>
log_entries = filter(
    lambda ile: ile['type'] == 'acknowledge_log_entry' and ile['agent']['type'] == 'user_reference',
ack_users_times = [(ile['created_at'], ile['agent']['id']) for ile in log_entries]
# >>> ack_users_times
# [('2023-05-18T15:45:00Z', 'PZES9245'), ... ]