# Fetch "Consumed Host Units" for a given Host using the "Monitored Entities API" (API V2)

**URL:** <https://community.dynatrace.com/t/fetch-consumed-host-units-for-a-given-host-using-the-monitored-entities-api-api-v2/40486>\
**Category:** Dynatrace API\
**Tags:** dynatrace-managed, monitoring-consumption, licensing, dynatrace-api\
**Created:** [July 3, 2023, 4:21am UTC](https://community.dynatrace.com/t/fetch-consumed-host-units-for-a-given-host-using-the-monitored-entities-api-api-v2/40486 "2023-07-03T04:21:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alfred-Le](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Alfred-Le](https://community.dynatrace.com/u/Alfred-Le)\
**Post date:** [July 3, 2023, 4:21am UTC](https://community.dynatrace.com/t/fetch-consumed-host-units-for-a-given-host-using-the-monitored-entities-api-api-v2/40486/1 "2023-07-03T04:21:18Z")

</div>

Hello!

Does anyone know how to fetch&nbsp; **Consumed Host Units** for a given host, using the&nbsp; **Monitored Entities API**?  
I have a script which uses the&nbsp; **Environment API V1** to grab **Consumed Host Units** for my hosts, but am looking to migrate to V2.

My script has been working fine for a while now, but I’m concerned it might stop working one day seeing as it utilises the&nbsp; **Topology and Smartscape API**.  
_\*\*According to [this link](https://www.dynatrace.com/support/help/shortlink/api-migration-entities), this API was **Deprecated in v1.263**. Given the API hasn’t yet broken (as of writing this **03JULY2023** ), my script is working on borrowed time._

The [Official Dynatrace DOC](https://www.dynatrace.com/support/help/shortlink/api-migration-entities) has a page to help with migrating from the&nbsp; **Topology and Smartscape API** &nbsp;to the&nbsp; **Monitored Entities API**.&nbsp;  
[As can be seen here on the Page,](https://www.dynatrace.com/support/help/dynatrace-api/basics/deprecation-migration-guides/topology-v1-to-entity-v2#tabgroup--example-create--topology-and-smartscape-api)&nbsp; **Host Unit Consumption** is definitely reported on with&nbsp; **Topology and Smartscape API** , but I’m struggling to see the same value reported with the&nbsp; **Monitored Entities API**.

 ![AlfredLe_0-1688357684262.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/0/30b655e34eefc2a5720067c0461e66b7e66c1872.png)

Does anyone know where I can find&nbsp; **Host Unit Consumption** using the new **Monitored Entities&nbsp;API**?

Thanks!

---

<div class="post-metadata">

**Author:** ![chakrit](https://avatars.discourse-cdn.com/v4/letter/c/96bed5/32.png) [@chakrit](https://community.dynatrace.com/u/chakrit)\
**Post date:** [July 18, 2023, 3:11am UTC](https://community.dynatrace.com/t/fetch-consumed-host-units-for-a-given-host-using-the-monitored-entities-api-api-v2/40486/2 "2023-07-18T03:11:54Z")

</div>

https://{environmentid}.live.dynatrace.com/api/v1/entity/infrastructure/hosts?relativeTime=2hours&includeDetails=true&API-TOKEN=

Try again

---

<div class="post-metadata">

**Author:** ![Alfred-Le](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Alfred-Le](https://community.dynatrace.com/u/Alfred-Le)\
**Post date:** [July 18, 2023, 3:38am UTC](https://community.dynatrace.com/t/fetch-consumed-host-units-for-a-given-host-using-the-monitored-entities-api-api-v2/40486/3 "2023-07-18T03:38:38Z")

</div>

Hi&nbsp;[@chakrit](https://community.dynatrace.com/user/42673),  
That’s the exact API I am looking to pivot away from due to its&nbsp;_Deprecated Status_.

I have found however, that I can get all the same information provided by _ **v1/entity/infrastructure/hosts** _&nbsp;in&nbsp; **V1** &nbsp; **Oneagents on a**  **host**.

So am using that instead 😄

---

<div class="post-metadata">

**Author:** ![karanidnani6](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@karanidnani6](https://community.dynatrace.com/u/karanidnani6)\
**Post date:** [May 6, 2025, 5:13pm UTC](https://community.dynatrace.com/t/fetch-consumed-host-units-for-a-given-host-using-the-monitored-entities-api-api-v2/40486/4 "2025-05-06T17:13:26Z")

</div>

hello&nbsp;[@Alfred-Le](https://community.dynatrace.com/user/57429)

i m using the same api v1 oneagents , i have question how to fetch for all host the consumed host units since it giving larger response file
