I feel like I’m missing something simple here, but I can’t seem to figure this out. I’m hitting the API, but it seems as soon as an incident gets resolved the assignment and acknowledged part of the json object goes blank, and I’m looking to build some graphs and data to show trends. What am I missing?
how to pull a list of incidents acknowledged by or assigned to a user - both open and resolved incidents
Once an incident is resolved, you can use the get incident log entries endpoint to get all updates made to an incident.
Hi all - apologies to jump in but I’m interested in something similar. Trying to build a simple script that gets all the incidents resolved by a user on a specific schedule to calculate how long in total the user has been dealing with incidents. The advanced report do not allow to filter easily and the API (https://api-reference.pagerduty.com/#!/Incidents/get_incidents) doesn’t return resolved incidents as those are not assigned to any user anymore… Any suggestions?
Obtaining incidents tied to a user’s schedule is not an endpoint we support via the web UI or API.
I’m thinking if you filter the /oncalls endpoint by including the user and schedule, it can help provide timeframes and the escalation policies/services they’re on-call for.
It would definitely be easier to gather incidents based on an escalation policy and a user via the incidents and log entry details.
The problem with this approach, is that I have no record of the users association with the incident at that level. Other than parsing ALL incidents log entries looking for the user/subset of users.