# Support for .csv when extracting Problems via api/v2

**URL:** <https://community.dynatrace.com/t/support-for-csv-when-extracting-problems-via-api-v2/32892>\
**Category:** Dynatrace API\
**Tags:** problems-classic, dynatrace-api\
**Created:** [October 4, 2021, 4:25pm UTC](https://community.dynatrace.com/t/support-for-csv-when-extracting-problems-via-api-v2/32892 "2021-10-04T16:25:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlanFoley](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@AlanFoley](https://community.dynatrace.com/u/AlanFoley)\
**Post date:** [October 4, 2021, 4:25pm UTC](https://community.dynatrace.com/t/support-for-csv-when-extracting-problems-via-api-v2/32892/1 "2021-10-04T16:25:24Z")

</div>

Hi

Currently Problems can only be extracted in .json format via the API

When will Problem export from API to .csv be supported

Thanks

Alan

---

<div class="post-metadata">

**Author:** ![monitoringteam1](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@monitoringteam1](https://community.dynatrace.com/u/monitoringteam1)\
**Post date:** [October 5, 2021, 2:53pm UTC](https://community.dynatrace.com/t/support-for-csv-when-extracting-problems-via-api-v2/32892/2 "2021-10-05T14:53:00Z")

</div>

Hello,

did you try to perform the API call forcing the “Accept” header to csv?

text/csv; header=present

---

<div class="post-metadata">

**Author:** ![ct\_27](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/ct_27/32/10499_2.png) [@ct\_27](https://community.dynatrace.com/u/ct_27)\
**Post date:** [October 5, 2021, 8:35pm UTC](https://community.dynatrace.com/t/support-for-csv-when-extracting-problems-via-api-v2/32892/3 "2021-10-05T20:35:58Z")

</div>

Any chance your company has Excel (some do not). Excel Power Query is a built in feature and very very good at converting a JSON to a table.&nbsp; &nbsp;I actually find that it’s better to receive JSON instead of CSV because some fields could contain multiple values (such as impacted and affected data).

With JSON you can choose if you want to expand out those data points or leave them compressed.&nbsp; If it output as CSV it would have to use a different delimiter between the commas to support that.

---

<div class="post-metadata">

**Author:** ![AlanFoley](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@AlanFoley](https://community.dynatrace.com/u/AlanFoley)\
**Post date:** [October 6, 2021, 3:36am UTC](https://community.dynatrace.com/t/support-for-csv-when-extracting-problems-via-api-v2/32892/4 "2021-10-06T03:36:18Z")

</div>

I did try that but header is npt supported:

I used the following:&nbsp; &nbsp;-H “accept: text/csv; header=present; charset=utf-8”

Gave this error:&nbsp;&nbsp;{“error”:{“code”:406,“message”:“Unsupported/Missing ‘Accept’ header.”}}

---

<div class="post-metadata">

**Author:** ![AlanFoley](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@AlanFoley](https://community.dynatrace.com/u/AlanFoley)\
**Post date:** [October 6, 2021, 3:44am UTC](https://community.dynatrace.com/t/support-for-csv-when-extracting-problems-via-api-v2/32892/5 "2021-10-06T03:44:59Z")

</div>

Yes I have used Power Query to convert to a table but you need to be M Code proficient to handle the next page loops and I have not mastered that yet - if you have some sample M Code that you are willing to share that handles the looping that would be great - thanks

---

<div class="post-metadata">

**Author:** ![Radoslaw\_Szulgo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radoslaw_szulgo/32/1977_2.png) [@Radoslaw\_Szulgo](https://community.dynatrace.com/u/Radoslaw_Szulgo)\
**Post date:** [October 6, 2021, 7:45am UTC](https://community.dynatrace.com/t/support-for-csv-when-extracting-problems-via-api-v2/32892/6 "2021-10-06T07:45:14Z")

</div>

Have you tried to use a converter JSON to CSV? Should do the trick. For instance:&nbsp;[https://data.page/json/csv](https://data.page/json/csv)

---

<div class="post-metadata">

**Author:** ![AlanFoley](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@AlanFoley](https://community.dynatrace.com/u/AlanFoley)\
**Post date:** [October 6, 2021, 3:40pm UTC](https://community.dynatrace.com/t/support-for-csv-when-extracting-problems-via-api-v2/32892/7 "2021-10-06T15:40:47Z")

</div>

Appreciate the reply but my requirement is to implement this in a batch process - It would be great if Monitored Entities could be extracted via API in the same way that Metrics are extracted - that would solve a lot of limitations with nextpage issues in json output - thanks
