# How to get Problem Duration a alert in JSON file

**URL:** <https://community.dynatrace.com/t/how-to-get-problem-duration-a-alert-in-json-file/37613>\
**Category:** Alerting\
**Tags:** problem-notification\
**Created:** [December 8, 2022, 3:08am UTC](https://community.dynatrace.com/t/how-to-get-problem-duration-a-alert-in-json-file/37613 "2022-12-08T03:08:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Koteswar](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Koteswar](https://community.dynatrace.com/u/Koteswar)\
**Post date:** [December 8, 2022, 3:08am UTC](https://community.dynatrace.com/t/how-to-get-problem-duration-a-alert-in-json-file/37613/1 "2022-12-08T03:08:32Z")

</div>

Hi, I am retrieving problem notification data in JSON file using Dynatrace API. When I&nbsp; verified data in json file, noticed that duration field (column)of problem is not showing in the data list. Please advise is there possibilities to get duration field in JSON file?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [December 8, 2022, 8:56am UTC](https://community.dynatrace.com/t/how-to-get-problem-duration-a-alert-in-json-file/37613/2 "2022-12-08T08:56:46Z")

</div>

What API are you using? The Environment v2 _/Problems_ endpoint contains the&nbsp;_startTime_&nbsp;and&nbsp;_endTime_&nbsp;of the Problem which you can use to calculate the duration.

---

<div class="post-metadata">

**Author:** ![Koteswar](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@Koteswar](https://community.dynatrace.com/u/Koteswar)\
**Post date:** [December 8, 2022, 9:09am UTC](https://community.dynatrace.com/t/how-to-get-problem-duration-a-alert-in-json-file/37613/3 "2022-12-08T09:09:08Z")

</div>

Thanks&nbsp;for your reply&nbsp;[@pahofmann](https://community.dynatrace.com/user/22796)&nbsp;. Yes I am using Environment API V2 only and retrieving duration time in my code using startTime and endTime externally but my question is there any possibilities to include duration parameter in API while getting data in JSON file.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [December 8, 2022, 11:17am UTC](https://community.dynatrace.com/t/how-to-get-problem-duration-a-alert-in-json-file/37613/4 "2022-12-08T11:17:52Z")

</div>

No it’s not possible to include that you have to calculate it. You could open a product idea not have the duration included.

---

<div class="post-metadata">

**Author:** ![Ana.Kuzmenchuk](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@Ana.Kuzmenchuk](https://community.dynatrace.com/u/Ana.Kuzmenchuk)\
**Post date:** [December 8, 2022, 3:26pm UTC](https://community.dynatrace.com/t/how-to-get-problem-duration-a-alert-in-json-file/37613/5 "2022-12-08T15:26:13Z")

</div>

Hey&nbsp;[@Koteswar](https://community.dynatrace.com/user/57254), in case you decide on raising a product idea for this you can do it [here](https://community.dynatrace.com/category/DynatraceProductIdeas). Just make sure to follow the widget to provide as much detail as possible so our Product Managers could help you. Cheers!
