# Pulling V2 API Oracle Statistics - Anything Special Required?

**URL:** <https://community.dynatrace.com/t/pulling-v2-api-oracle-statistics-anything-special-required/31459>\
**Category:** Dynatrace API\
**Tags:** dynatrace-api\
**Created:** [May 13, 2021, 9:13pm UTC](https://community.dynatrace.com/t/pulling-v2-api-oracle-statistics-anything-special-required/31459 "2021-05-13T21:13:40Z")\
**Posts on this page:** 2\
**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:** [May 13, 2021, 9:13pm UTC](https://community.dynatrace.com/t/pulling-v2-api-oracle-statistics-anything-special-required/31459/1 "2021-05-13T21:13:40Z")

</div>

Is there anything special required for pulling Oracle statistics from the V2 API? (Token privs? Special parameters?) I can see the statistics in the UI, but when I try pulling them, I get no results. Regular generic statistics pull fine.

This works fine:

API call - [https://xxxxxxxx.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:host.cpu.usage&resolution=1m&from=now-1h&to=now&entitySelector=type(HOST),tag(“MyApplication:ora-rac”)](https://xxxxxxxx.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:host.cpu.usage&resolution=1m&from=now-1h&to=now&entitySelector=type(HOST),tag(%22MyApplication:ora-rac%22))

This one does not work:

API call - [https://xxxxxxxx.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:tech.oracleDb.pgi.wait.time&resolution=1m&from=now-1h&to=now&entitySelector=type(HOST),tag(“MyApplication:ora-rac”)](https://xxxxxxxx.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:tech.oracleDb.pgi.wait.time&resolution=1m&from=now-1h&to=now&entitySelector=type(HOST),tag(%22MyApplication:ora-rac%22))

Any help is appreciated.

Lou

---

<div class="post-metadata">

**Author:** ![piotr\_lugowski](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@piotr\_lugowski](https://community.dynatrace.com/u/piotr_lugowski)\
**Post date:** [July 15, 2021, 8:32am UTC](https://community.dynatrace.com/t/pulling-v2-api-oracle-statistics-anything-special-required/31459/2 "2021-07-15T08:32:12Z")

</div>

Hi, most likely you should use builtin:tech.oracleDb. **cd**.wait.time metric key, not the one with pgi in name.  
[https://xxxxxxx.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:tech.oracleDb.cd.wait.time&resolution=1m&from=now-1h&to=now&entitySelector=type(HOST),tag("CignaApplication:ora-rac")](https://xxxxxxx.live.dynatrace.com/api/v2/metrics/query?metricSelector=builtin:tech.oracleDb.cd.wait.time&resolution=1m&from=now-1h&to=now&entitySelector=type(HOST),tag(%22CignaApplication:ora-rac%22))
