Reporting: Using our API to create custom reports


(Gabriella Freda) #1

Our customers have created all kinds of reports using our REST API to drill down on metrics and data that are important to them. Here are some examples:


  • Incident details and body – This Python script exports all incident details for a specific incident or range of incidents and includes the incident body.


  • Graphite – This Ruby integration script collects PagerDuty incident metrics and sends them to Graphite, an open-source, scalable realtime graphing system. Users can collect numeric time-series data, send it to Graphite, and create monitors and charts to help your team visualize outage specifics.
  • Opsweekly – Etsy created this handy, multi-purpose tool with the premise that on-call time should be quantified. It generates a weekly report and lets on-call engineers track their notifications to assess the signal-to-noise ratio of the alerting system. Over time, your team can gather enough data to get in depth reports like, for example, what alerts wake people up the most, the average alert volume per day, and on-call improvements over the last year. Engineers can also integrate their Opsweekly to their Fitbits or Jawbone UPs to provide insight into how being on-call is affecting them. It tracks lost sleep time and Mean Time to get back to Sleep (MTTS), and provides data that could help teams determine what alerts really call for disrupting an engineer’s REM.
  • Zoho Reports – You can use Zoho Reports to query our API and build dashboards from the data. We published a blog about how to import PagerDuty data into Zoho Reports and run SQL queries against it to build out your reporting features and track which services and escalation policies had unusually high (or low) incident volumes and Mean Time to Repair (MTTR).
  • pager-hours – This script exports on-call hours for all users on all schedules within a PagerDuty account.
  • pagerduty-alert-volume – A quick command-line to get the incident volume assigned to an escalation policy broken down by week.
  • incident notes – This script exports incidents and their notes into a CSV file.
  • Pigeonhole – Pigeonhole takes data from PagerDuty and generates graphs based on this data over a configurable time period.

(Raghu Golla) #2

could you please share the code with for complete incident related data details

(Gabriella Freda) #3

Hi Raghu,

Thanks for reaching out. Could you tell me which code sample you are referring to? Right now all the links in the post above are pointing to the specific repos.


(Raghu Golla) #4

I need script to give information about incidents, services,team,status,time to acknowledge and time to resolve,opened on ,resolved on ,resolved by and duration ,please could give me the exact field names and scripts.Thanks in advance

(Gabriella Freda) #5

Hi Raghu,

Here are the API calls for incidents, services, escalation policies, etc. Is this what you’re looking for?


(Raghu Golla) #6

I am looking for specific team ,where can I find team ID ?

(Gabriella Freda) #7

Hi Raghu,

In the UI, you can find the specific team ID in the URL. If you go to Configuration>Teams> Choose specific team> the URL of that page will include the team ID.

You can also pull all the team ID’s from the API, by using the List Teams call.


(Hailey Hickman) #8