# Dynatrace V2 API - How do I call a custom device?

**URL:** <https://community.dynatrace.com/t/dynatrace-v2-api-how-do-i-call-a-custom-device/31747>\
**Category:** Dynatrace API\
**Tags:** custom-devices, dynatrace-api\
**Created:** [June 8, 2021, 8:46pm UTC](https://community.dynatrace.com/t/dynatrace-v2-api-how-do-i-call-a-custom-device/31747 "2021-06-08T20:46:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![louis\_gallo](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@louis\_gallo](https://community.dynatrace.com/u/louis_gallo)\
**Post date:** [June 8, 2021, 8:46pm UTC](https://community.dynatrace.com/t/dynatrace-v2-api-how-do-i-call-a-custom-device/31747/1 "2021-06-08T20:46:15Z")

</div>

Dynatrace V2 API - How do I call a custom device?

I have an Oracle custom device that I would like to pull Oracle database statistics for?

mydatabaseservername.example.com:1521/mydatabasename

entitySelector=type(HOST),tag(Custom~device:mydatabaseservername:1521/mydatabasename)

metricSelector=builtin:tech.oracleDb.cd.cpu.idle

I can see it in the UI and see this values. I am banging my head trying to figure out how to get that stat via the V2 API.

What am I doing wrong?

Help!!

Thanks,

Lou

---

<div class="post-metadata">

**Author:** ![Babar\_Qayyum](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/babar_qayyum/32/13620_2.png) [@Babar\_Qayyum](https://community.dynatrace.com/u/Babar_Qayyum)\
**Post date:** [June 9, 2021, 5:56am UTC](https://community.dynatrace.com/t/dynatrace-v2-api-how-do-i-call-a-custom-device/31747/2 "2021-06-09T05:56:21Z")

</div>

Hello&nbsp;[@louis\_gallo](https://community.dynatrace.com/user/34149)

It seems at the moment we can perform only the following to the custom device:

- Report custom device metrics via REST API.
- Creates or updates a custom device.
- Lists all the available logs on the specified custom device.
- Gets the filtered content of the specified log.

Regards,

Babar

---

<div class="post-metadata">

**Author:** ![louis\_gallo](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@louis\_gallo](https://community.dynatrace.com/u/louis_gallo)\
**Post date:** [June 9, 2021, 12:43pm UTC](https://community.dynatrace.com/t/dynatrace-v2-api-how-do-i-call-a-custom-device/31747/3 "2021-06-09T12:43:38Z")

</div>

I am able to do this and it gets all the custom devices.

entitySelector=type(CUSTOM\_DEVICE)

metricSelector=builtin:tech.oracleDb.cd.cpu.idle:names:merge(dt.entity.custom\_device)

This actually works but returns the data for all custom devices.

Can I create a tag for a custom device to help break it down further?

Lou

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [June 9, 2021, 12:59pm UTC](https://community.dynatrace.com/t/dynatrace-v2-api-how-do-i-call-a-custom-device/31747/4 "2021-06-09T12:59:15Z")

</div>

Yes you can also Tag custom devices, either in the GUI directly on the Entity under Technologies or via Settings → Tags → Manually applied Tags. Another option would be to use automated tagging rules or the tagging API.
