I am interested in a report or list of all of my incident resolution notes, this will be used to train a new hire on the types of afterhours calls I get and how I resolved them so she can start taking call. Is there anything available with the actual resolution notes on a list that I can pull (not ONE at a time, but like a report spreadsheet). Any ideas or suggestions welcome.
Hi
There isn’t a way to aggregate and pull these from the UI, but you can get them in the API. All resolution notes are available as notes
. I knew I’d seen these somewhere, I had to dig them out.
There’s two ways to get at this info. One by querying the incidents
and one by querying the log_entries
endpoint. Using incidents
is probably better if your incidents go back a long time; you’ll get more of the resolution notes you want with less fiddling around. The log_entries
endpoint has everything in it, so has more volume in real time.
Depending on the volume of incidents in your environment, you’ll probably want to either narrow your query to specific teams or services. You may need some pagination as well.
To get the Resolution Note
, using /incidents
, you’ll need the incident id. The easiest way to get incident ids is to throw a query to /incidents
and loop through the responses. That’s where your query or pagination would come in.
For each incident, you can then send a request to /incidents/{ID}/notes
, which will return all notes for the incident, and you can dump the resolution note for the incident. They don’t have a special type, but they will start with Resolution Note:
I put some python sample code here.
Using log_entries
is similar, except that each entry in the log is a large object. The notes show up as their own channel
type
subkey, and then the summary is included. Resolution notes will still start with Resolution Note:
.
Some python for this one here.
I’d go with /incidents and use the query parameters as noted in the docs to pare down the response to the teams or services you’re interested in.
HTH,
--mandi
Reply
Login to PagerDuty Commons
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.