Skip to main content
Solved

Fetching MTTA and MTTR from API

  • April 24, 2025
  • 1 reply
  • 108 views

Hi Everyone,

We are currently working on enhancing our incident management automation by incorporating Mean Time To Resolve (MTTR) and Mean Time To Acknowledge (MTTA) metrics into our email reports via Python.

Kindly suggest how we can  fetch the information of MTTA and MTTR through API

Best answer by mwalls

Hi ​@kabilanrajasekar_c!

You’ll find all of the API docs on our developer site: https://developer.pagerduty.com/api-reference/

 

For Analytics, there are a number of endpoints, depending on how you’d like to aggregate the data. You can also use a number of filters to select for characteristics like urgency, team, or date range. Note that analytics are not real time, they are aggregated periodically, and it can take up to 24 hours for new data to be processed and available.

https://developer.pagerduty.com/api-reference/25800c343e344-get-aggregated-incident-data should get you started.

I put up a Python example here: https://github.com/lnxchk/pdgarage-samples/blob/main/python/get_aggregate_analytics.py

 

HTH,

--mandi

1 reply

mwalls
Forum|alt.badge.img
  • Community Manager
  • 43 replies
  • Answer
  • April 24, 2025

Hi ​@kabilanrajasekar_c!

You’ll find all of the API docs on our developer site: https://developer.pagerduty.com/api-reference/

 

For Analytics, there are a number of endpoints, depending on how you’d like to aggregate the data. You can also use a number of filters to select for characteristics like urgency, team, or date range. Note that analytics are not real time, they are aggregated periodically, and it can take up to 24 hours for new data to be processed and available.

https://developer.pagerduty.com/api-reference/25800c343e344-get-aggregated-incident-data should get you started.

I put up a Python example here: https://github.com/lnxchk/pdgarage-samples/blob/main/python/get_aggregate_analytics.py

 

HTH,

--mandi