# V2 API for OpenShift Statistics - pulling by tag

**URL:** <https://community.dynatrace.com/t/v2-api-for-openshift-statistics-pulling-by-tag/38418>\
**Category:** Dynatrace API\
**Tags:** openshift, dynatrace-api\
**Created:** [February 13, 2023, 2:52pm UTC](https://community.dynatrace.com/t/v2-api-for-openshift-statistics-pulling-by-tag/38418 "2023-02-13T14:52:44Z")\
**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:** [February 13, 2023, 2:52pm UTC](https://community.dynatrace.com/t/v2-api-for-openshift-statistics-pulling-by-tag/38418/1 "2023-02-13T14:52:44Z")

</div>

Greetings Community,

I have become quite good at pulling server statistics in the V2 Metrics API by tag, but now I am adventuring into pulling OpenShift statistics and having some difficulty.

If I wanted let’s say to pull **“builtin:containers.cpu.usageMilliCores”** , can I pull that by tag?

I can do it by entityName (which I know is inefficient).

For a tag, what would I use?

type(??),tag(“mytagname”)

Any advise on how to get started would be greatly appreciated.

Thanks,

Lou

---

<div class="post-metadata">

**Author:** ![nickvogt](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/nickvogt/32/22782_2.png) [@nickvogt](https://community.dynatrace.com/u/nickvogt)\
**Post date:** [February 16, 2023, 10:55am UTC](https://community.dynatrace.com/t/v2-api-for-openshift-statistics-pulling-by-tag/38418/2 "2023-02-16T10:55:57Z")

</div>

Hi Lou,

I would try type( **container\_group\_instance** ),tag(“mytagname”).

For example,

builtin:containers.cpu.usageMilliCores:filter(and(or(in(“dt.entity.container\_group\_instance”,entitySelector(“type(container\_group\_instance),tag(~“mytagname~”)”))))):auto

Let me know if that doesn’t quite answer your question.

Take care,

Nick
