# Filtering data based on application, host, service, process and Process Group

**URL:** <https://community.dynatrace.com/t/filtering-data-based-on-application-host-service-process-and-process-group/35608>\
**Category:** Dynatrace API\
**Tags:** filter, hosts-classic\
**Created:** [June 27, 2022, 10:19am UTC](https://community.dynatrace.com/t/filtering-data-based-on-application-host-service-process-and-process-group/35608 "2022-06-27T10:19:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manjunathcr22](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@manjunathcr22](https://community.dynatrace.com/u/manjunathcr22)\
**Post date:** [June 27, 2022, 10:19am UTC](https://community.dynatrace.com/t/filtering-data-based-on-application-host-service-process-and-process-group/35608/1 "2022-06-27T10:19:33Z")

</div>

We want to filter results from v2/metrics/query using process, host, process, processgroup or services etc using params present in dimensionMap.

We need filtering based on process, process group, services, hosts and applications.

So for host filtering this entitySelector worked

?metricSelector=builtin:host.cpu.gcpu.usage:names&entitySelector=type(“HOST”),entityName.equals(“ABCD”)

Where ABCD is dt.entity.host.name in dimensionMap.

So how can i filter all other types of elements monitored by dynatrace?

In below examples I want data of Real users only

“dimensionMap”: {  
“User type”: “Real users”,  
“dt.entity.application\_method”: “APPLICATION\_METHOD-B2F93E1A7FA2007E”  
},

To filter only above data I queried using api : /api/v2/metrics/query?metricSelector=builtin:apps.web.action.apdex:names&entitySelector=type(“APPLICATION”),entityName.equals(“Real users”)&from=1652853660000&to=1652940060000&resolution=60m

But getting no data.

So what and all allowed values for entitySelector=type()

---

<div class="post-metadata">

**Author:** ![Fin\_Ubels](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/fin_ubels/32/18008_2.png) [@Fin\_Ubels](https://community.dynatrace.com/u/Fin_Ubels)\
**Post date:** [June 28, 2022, 3:57am UTC](https://community.dynatrace.com/t/filtering-data-based-on-application-host-service-process-and-process-group/35608/2 "2022-06-28T03:57:36Z")

</div>

Hey manjunathcr,

First to answer your question you can find all available types by using the API which is detailed here&nbsp;[Monitored entities API - GET all entity types — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/get-all-entity-types)

Secondly, looking at your query the entity selector part is not where you would filter for real users as far as I know. I tried this out in my own environment and you would filter for real users in the metric selector portion of the query like so:

builtin:apps.web.action.apdex:filter(eq(“User type”,“Real users”))

Lastly the correct type for this would be:

type(“APPLICATION\_METHOD”)

You can tell by looking at the dimension map where we have dt.entity.application\_method. What comes after dt.entity should be the entity type which can be used for the entity selector.
