# Dynatrace API to get application downtime

**URL:** <https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401>\
**Category:** Dynatrace API\
**Tags:** dynatrace-managed\
**Created:** [December 28, 2023, 11:50pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401 "2023-12-28T23:50:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balamurugesh](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@Balamurugesh](https://community.dynatrace.com/u/Balamurugesh)\
**Post date:** [December 28, 2023, 11:50pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401/1 "2023-12-28T23:50:16Z")

</div>

hi,

I am looking for an api which will&nbsp;returns total number of minutes or hours applications are down.

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [December 29, 2023, 7:55am UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401/2 "2023-12-29T07:55:44Z")

</div>

Hi,

I would say that API does not exist but wait for others answers.

You can always raise a [product idea](https://community.dynatrace.com/category/DynatraceProductIdeas) about it.

Best regards

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [December 29, 2023, 6:11pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401/3 "2023-12-29T18:11:57Z")

</div>

Hello&nbsp;[@Balamurugesh](https://community.dynatrace.com/user/51242)&nbsp;as&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)&nbsp;says there’s no especific API for that, but what you can define is an SLO for an application and use the [API](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/service-level-objectives/get-slo) to get the error budget. Is the difference between the calculated and target values. A positive number means all is good; a negative number means trouble. Or you can get the percentage.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [December 29, 2023, 7:36pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401/4 "2023-12-29T19:36:08Z")

</div>

You can have this but its only derived via Synthetics. So if your App EasyTravel had a synthetic running, Dynatrace would provide an application availability metric from the synthetic(s) and you could then query the data via API.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [December 29, 2023, 7:49pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401/5 "2023-12-29T19:49:19Z")

</div>

Also you can use the metric API to then gain the availability rate for the applicable underlying infrastructure of the app when applicable. Granted it will be an availability percentage and not down time hours/mins. There use to be synthetic reports that had all that data but thats deprecated

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [December 30, 2023, 11:45am UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401/6 "2023-12-30T11:45:42Z")

</div>

[@Balamurugesh](https://community.dynatrace.com/user/51242),

If you don’t have synthetics, as [@ChadTurner](https://community.dynatrace.com/user/14877) as suggested, I would say from my experience that Apdex is a good proxy metric for what you are trying to achieve. You would have to control the amount of requests though, and using an SLO might be interesting in this case.

---

<div class="post-metadata">

**Author:** ![Balamurugesh](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@Balamurugesh](https://community.dynatrace.com/u/Balamurugesh)\
**Post date:** [December 30, 2023, 11:06pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401/7 "2023-12-30T23:06:43Z")

</div>

could you please provide more details about Apdex related metrics?

---

<div class="post-metadata">

**Author:** ![Balamurugesh](https://avatars.discourse-cdn.com/v4/letter/b/f475e1/32.png) [@Balamurugesh](https://community.dynatrace.com/u/Balamurugesh)\
**Post date:** [December 30, 2023, 11:15pm UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401/8 "2023-12-30T23:15:30Z")

</div>

hi Chad, we are already consuming&nbsp;&nbsp;metric API to get availability % details. I am looking for an alternate API which will provide downtime details directly.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [December 31, 2023, 10:55am UTC](https://community.dynatrace.com/t/dynatrace-api-to-get-application-downtime/43401/9 "2023-12-31T10:55:23Z")

</div>

[@Balamurugesh](https://community.dynatrace.com/user/51242),

There are several documentation pages about Apdex, namely

- [Apdex ratings in RUM Classic — Dynatrace Docs](https://docs.dynatrace.com/docs/platform-modules/digital-experience/rum-concepts/scores-and-ratings/apdex-ratings)
- [Context-based Apdex analysis in RUM Classic — Dynatrace Docs](https://docs.dynatrace.com/docs/platform-modules/digital-experience/session-segmentation/apdex-analysis)

Apdex values are available through metrics, so you should use the metrics API.

Don’t forget what I said above. This is a proxy metric, and you should combine it with others. SLOs are good for that, as also referenced by [@DanielS](https://community.dynatrace.com/user/35788)
