# Dynatrace API CPU utilization to excel

**URL:** <https://community.dynatrace.com/t/dynatrace-api-cpu-utilization-to-excel/19871>\
**Category:** Dynatrace API\
**Tags:** linux, reports, profiling-and-optimization, dynatrace-api\
**Created:** [July 23, 2020, 11:43am UTC](https://community.dynatrace.com/t/dynatrace-api-cpu-utilization-to-excel/19871 "2020-07-23T11:43:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas\_sood](https://avatars.discourse-cdn.com/v4/letter/v/8dc957/32.png) [@vikas\_sood](https://community.dynatrace.com/u/vikas_sood)\
**Post date:** [July 23, 2020, 11:43am UTC](https://community.dynatrace.com/t/dynatrace-api-cpu-utilization-to-excel/19871/1 "2020-07-23T11:43:31Z")

</div>

Hi,

Does dynatrace have an api to extract cpu usage and ram usage details for all hosts for last 2 months? We would like to use curl to fetch the data.

We are on version 1.188.104.20200323-145140.

---

<div class="post-metadata">

**Author:** ![michael\_oxendin](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@michael\_oxendin](https://community.dynatrace.com/u/michael_oxendin)\
**Post date:** [July 23, 2020, 12:51pm UTC](https://community.dynatrace.com/t/dynatrace-api-cpu-utilization-to-excel/19871/2 "2020-07-23T12:51:02Z")

</div>

Hi Vikas,

Take a look in [https://xXxXxXx.live.dynatrace.com/rest-api-doc/index.jsp?urls.primaryName=Environment%20API%20v1#/](https://xXxXxXx.live.dynatrace.com/rest-api-doc/index.jsp?urls.primaryName=Environment%20API%20v1#/)&nbsp; for the API page (replacing the x’s with your tenant ID). This is an interact-able page to build the API calls you would be interested in; I would focus in on timeseries section. Also, once you have built your API calls, you can make it into a fully formed URL and take advantage of the “from web” data option in excel to automatically pull your information and format it into an excel chart

 ![25827-1595508460010.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/a/3a0074e032746a0eb0b284ead39127d74bf5f4b9.png)

Thanks,

Michael Oxendine

---

<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:** [July 23, 2020, 12:58pm UTC](https://community.dynatrace.com/t/dynatrace-api-cpu-utilization-to-excel/19871/3 "2020-07-23T12:58:52Z")

</div>

I have done this many times myself and found it to work wonders. You can also download a json each time and import it into Excel but that inquires a bit more manual work.

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [July 23, 2020, 2:35pm UTC](https://community.dynatrace.com/t/dynatrace-api-cpu-utilization-to-excel/19871/4 "2020-07-23T14:35:58Z")

</div>

Hi [@Michael O.](https://answers.dynatrace.com/users/19498/view.html)

That’s is really great way to utilize dynatrace rest api.

The only question I do have here is if you managed to utilize the v2 metric with csv output? I didn’t succeed to create the accept-type to be send as a url query parameter

Yos

---

<div class="post-metadata">

**Author:** ![bill\_scheuernst](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/bill_scheuernst/32/2211_2.png) [@bill\_scheuernst](https://community.dynatrace.com/u/bill_scheuernst)\
**Post date:** [January 28, 2021, 8:29pm UTC](https://community.dynatrace.com/t/dynatrace-api-cpu-utilization-to-excel/19871/5 "2021-01-28T20:29:31Z")

</div>

I am working on a similar report using the Metrics API. We have had some luck with building the API request, but I’m curious if there’s a way to extract the request URL or if someone has knowledge to what the API request is for the XLS export from a dashboard. The XLS report download shows all data points for the time frame. How would you condense the data points down to one (as shown in the snippet)? The report request I have is to have Max CPU and Max Memory for a specific time period. I’m guessing the one number is an average of all the data points. Can this be built into the request?

 ![28050-metrics.jpg](https://global.discourse-cdn.com/dynatrace/original/3X/f/0/f04e54470bfffa3f0eb2858632ea2951d2118473.jpeg)
