# Get data straight into a CSV or Excel file utilizing rest API

**URL:** <https://community.dynatrace.com/t/get-data-straight-into-a-csv-or-excel-file-utilizing-rest-api/37877>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [January 4, 2023, 5:41pm UTC](https://community.dynatrace.com/t/get-data-straight-into-a-csv-or-excel-file-utilizing-rest-api/37877 "2023-01-04T17:41:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohitk](https://avatars.discourse-cdn.com/v4/letter/r/a698b9/32.png) [@Rohitk](https://community.dynatrace.com/u/Rohitk)\
**Post date:** [January 4, 2023, 5:41pm UTC](https://community.dynatrace.com/t/get-data-straight-into-a-csv-or-excel-file-utilizing-rest-api/37877/1 "2023-01-04T17:41:10Z")

</div>

Can we get data straight into a csv or excel file utilizing&nbsp;a rest API?

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [January 4, 2023, 6:35pm UTC](https://community.dynatrace.com/t/get-data-straight-into-a-csv-or-excel-file-utilizing-rest-api/37877/2 "2023-01-04T18:35:10Z")

</div>

It depends on the endpoint.

The [metrics API](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/get-data-points#parameters) can return CSV data if you specify the proper Accept request header. But the [monitored entities API](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-entities-list) can only return JSON data.

Mostly it’s metrics that you can get in CSV, but you can check the [doc page for the specific API](https://www.dynatrace.com/support/help/dynatrace-api) endpoint to know for sure and see how it request it. Otherwise that processing would need to be done client-side.

---

<div class="post-metadata">

**Author:** ![tibebe\_m\_digafe](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@tibebe\_m\_digafe](https://community.dynatrace.com/u/tibebe_m_digafe)\
**Post date:** [January 4, 2023, 6:38pm UTC](https://community.dynatrace.com/t/get-data-straight-into-a-csv-or-excel-file-utilizing-rest-api/37877/3 "2023-01-04T18:38:58Z")

</div>

Hi,

I do not think you can do that directly. I assume you already have looked at using external tools to covert form json to csv.

Thanks. Tibebe
