# The inner workings of the entity selector

**URL:** <https://community.dynatrace.com/t/the-inner-workings-of-the-entity-selector/50450>\
**Category:** Open Q&A\
**Tags:** entity-selector\
**Created:** [February 25, 2025, 3:05pm UTC](https://community.dynatrace.com/t/the-inner-workings-of-the-entity-selector/50450 "2025-02-25T15:05:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [February 25, 2025, 3:05pm UTC](https://community.dynatrace.com/t/the-inner-workings-of-the-entity-selector/50450/1 "2025-02-25T15:05:32Z")

</div>

Hello,

When using an entity selector in an API you can use an entity id ('s):

- ~~Entity type:&nbsp;type(“TYPE”)~~
- Dynatrace entity ID:&nbsp;entityId(“id”). You can specify several IDs, separated by a comma (entityId(“id-1”,“id-2”)). All requested entities must be of the same type.

And looking at DQL:

fetch dt.entity.host  
&nbsp; &nbsp;| filter id == “HOST-461FB6671E771234”

I assume all entities types have there own little bucket (=class in the Graph)

But now the question/remark:

When you want to use, in DQL, an entity id, you would need to look at the TYPE what can be found in the name before the ‘-’,&nbsp; and then you can execute the fetch dt.entity.TYPE

KR Henk

---

<div class="post-metadata">

**Author:** ![KeeganNelson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/keegannelson/32/20333_2.png) [@KeeganNelson](https://community.dynatrace.com/u/KeeganNelson)\
**Post date:** [February 25, 2025, 6:41pm UTC](https://community.dynatrace.com/t/the-inner-workings-of-the-entity-selector/50450/2 "2025-02-25T18:41:13Z")

</div>

Yes, Henk you’ve got the right idea here! Here’s a DQL query proving your point.

 ![KeeganNelson_0-1740508846515.png](https://global.discourse-cdn.com/dynatrace/original/3X/c/b/cbf649b93c98d7fad937bafb727d5e1ff9709743.png)
