# Can I pull the current DEM Usage via API?

**URL:** <https://community.dynatrace.com/t/can-i-pull-the-current-dem-usage-via-api/34997>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic\
**Created:** [April 29, 2022, 3:18pm UTC](https://community.dynatrace.com/t/can-i-pull-the-current-dem-usage-via-api/34997 "2022-04-29T15:18:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![darrenchurch](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@darrenchurch](https://community.dynatrace.com/u/darrenchurch)\
**Post date:** [April 29, 2022, 3:18pm UTC](https://community.dynatrace.com/t/can-i-pull-the-current-dem-usage-via-api/34997/1 "2022-04-29T15:18:31Z")

</div>

We are working to pull Dynatrace usage via API to report to our ServiceNow Software Asset Management module. We are able to pull DDU via the&nbsp;builtin:billing.ddu.metrics.total metric. Is there a way i can get the DEM value? I am a ServiceNow developer and not very familiar with the Dynatrace License reporting capabilities so any help is appreciated.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [April 29, 2022, 6:39pm UTC](https://community.dynatrace.com/t/can-i-pull-the-current-dem-usage-via-api/34997/2 "2022-04-29T18:39:25Z")

</div>

I don’t know of a direct way to get DEM consumption directly.

But we are using the billing.\* metrics to get it’s components (synthetic, sessions, …) and than calculate the overall DEM consumption, but with every detail. It works well and numbers match 😀

---

<div class="post-metadata">

**Author:** ![darrenchurch](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@darrenchurch](https://community.dynatrace.com/u/darrenchurch)\
**Post date:** [April 29, 2022, 7:08pm UTC](https://community.dynatrace.com/t/can-i-pull-the-current-dem-usage-via-api/34997/3 "2022-04-29T19:08:19Z")

</div>

I see Antonio.  
I do similar for host units metric by querying oneagent for monitored hosts and adding up their

consumedHostUnits amount.&nbsp;  
can you suggest what my query should look like to get what you have?

Any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [April 30, 2022, 9:51am UTC](https://community.dynatrace.com/t/can-i-pull-the-current-dem-usage-via-api/34997/4 "2022-04-30T09:51:53Z")

</div>

You should start first in Data Explorer, with the billing.\* metrics (eg. billing.apps.web.sessionsWithoutReplayByApplication). Once you get what you need, you just have to make the equivalent API calls.
