# API v2 results returned in JSON format. Are there options for CSV?

**URL:** <https://community.dynatrace.com/t/api-v2-results-returned-in-json-format-are-there-options-for-csv/47197>\
**Category:** Open Q&A\
**Tags:** azure, mssql, dynatrace-api\
**Created:** [August 19, 2024, 12:27pm UTC](https://community.dynatrace.com/t/api-v2-results-returned-in-json-format-are-there-options-for-csv/47197 "2024-08-19T12:27:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![runatyr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/runatyr/32/11396_2.png) [@runatyr](https://community.dynatrace.com/u/runatyr)\
**Post date:** [August 19, 2024, 12:27pm UTC](https://community.dynatrace.com/t/api-v2-results-returned-in-json-format-are-there-options-for-csv/47197/1 "2024-08-19T12:27:09Z")

</div>

Hello:

Is it possible to get API results in the API v2 returned as CSV results?

At the end of the day. I am trying to find a way to take the data returned in a file and import it into

a MSSQL database.

I could go down the path of figuring out how to import JSON into MSSQL, but if CSV/txt files are an option then

this may expedite the learning time.

Thanks!

-runatyr

---

<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:** [August 19, 2024, 1:16pm UTC](https://community.dynatrace.com/t/api-v2-results-returned-in-json-format-are-there-options-for-csv/47197/2 "2024-08-19T13:16:36Z")

</div>

Hi,

It depends, for example, you can get CSV value if your metric is in Data Explorer.

 ![AntonPineiro_0-1724073347470.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/1/71454d90c94ff9a7a580df10c8a26404a38e24ec.png)

 ![AntonPineiro_1-1724073360222.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/8/38941d18b124d69e2d5cb5b126987f1941b00180.png)

I think this depends of API as well. Some of them are only available in JSON format.

Best regards

---

<div class="post-metadata">

**Author:** ![paulo\_calaxa](https://avatars.discourse-cdn.com/v4/letter/p/9e8a1a/32.png) [@paulo\_calaxa](https://community.dynatrace.com/u/paulo_calaxa)\
**Post date:** [August 19, 2024, 1:42pm UTC](https://community.dynatrace.com/t/api-v2-results-returned-in-json-format-are-there-options-for-csv/47197/3 "2024-08-19T13:42:31Z")

</div>

Hi&nbsp;[@runatyr](https://community.dynatrace.com/user/29954)&nbsp;  
You might check each endpoint definition… For instance, it’s a yes for the Metrics data

 ![paulo_calaxa_0-1724074593450.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/370ca74ee71b289003b8afe352d1a9c7ef115ec6.png)

 ![paulo_calaxa_1-1724074747148.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/0/0054cfa48fe8970fefc38d7b2c8f080237ba2b4c.png)

So, if in your call you change/add the Accept header parameter to “text/csv…”

 ![paulo_calaxa_2-1724074837250.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/8/08161a4e59dd7af86ebb5cdac76eb76f175d29ad.png)

you’ll get the requested data in a csv format.

Kind regards,  
Paulo
