# API to find "context" of a tag without any entities

**URL:** <https://community.dynatrace.com/t/api-to-find-context-of-a-tag-without-any-entities/30723>\
**Category:** Dynatrace API\
**Tags:** tagging, dynatrace-api\
**Created:** [March 8, 2021, 7:47pm UTC](https://community.dynatrace.com/t/api-to-find-context-of-a-tag-without-any-entities/30723 "2021-03-08T19:47:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BHA5472](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@BHA5472](https://community.dynatrace.com/u/BHA5472)\
**Post date:** [March 8, 2021, 7:47pm UTC](https://community.dynatrace.com/t/api-to-find-context-of-a-tag-without-any-entities/30723/1 "2021-03-08T19:47:55Z")

</div>

Is there an API to find the “context” of a tag just by giving a tag…without any entities? Or if not, then is there any way by which entity related to a particular tag can be found?

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [March 9, 2021, 3:37pm UTC](https://community.dynatrace.com/t/api-to-find-context-of-a-tag-without-any-entities/30723/2 "2021-03-09T15:37:12Z")

</div>

[@BHA5472](https://community.dynatrace.com/user/40750)&nbsp;&nbsp;If this is an automatic tag, you can also go into the UI and look that tag up to see what rules are defined for it. Additionally, you can also search for tag values in Dynatrace. If this is a Manual tag that was created, the same applies by searching for all manually applied tags via settings\>Tags\>Manually Applied.

There also is the API:

 ![ChadTurner_0-1615304445411.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/ba61304c078a277950fb65530a3daee006afd06c.png)

---

<div class="post-metadata">

**Author:** ![Dallas](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dallas/32/31233_2.png) [@Dallas](https://community.dynatrace.com/u/Dallas)\
**Post date:** [March 9, 2021, 3:38pm UTC](https://community.dynatrace.com/t/api-to-find-context-of-a-tag-without-any-entities/30723/3 "2021-03-09T15:38:48Z")

</div>

Hey&nbsp;[@BHA5472](https://community.dynatrace.com/user/40750), Could you provide some more info? When you say you are looking for the “context” what exactly are you looking to find?

Thanks

-Dallas

---

<div class="post-metadata">

**Author:** ![BHA5472](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@BHA5472](https://community.dynatrace.com/u/BHA5472)\
**Post date:** [March 17, 2021, 7:04pm UTC](https://community.dynatrace.com/t/api-to-find-context-of-a-tag-without-any-entities/30723/4 "2021-03-17T19:04:43Z")

</div>

Hey Chad, these API doesn’t tell you that information. Nd there is no API which can give you a list of manually applied tags without giving any entity.

---

<div class="post-metadata">

**Author:** ![BHA5472](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@BHA5472](https://community.dynatrace.com/u/BHA5472)\
**Post date:** [March 17, 2021, 7:07pm UTC](https://community.dynatrace.com/t/api-to-find-context-of-a-tag-without-any-entities/30723/5 "2021-03-17T19:07:57Z")

</div>

Hey Dallas,

Context of tag means if a tag is automatically detected by Dynatrace say AWS tag, then context for that tag is AWS. If it is being discovered as Kubernetes, it’s context will be kuberetes. There are tags which don’t have any particular context, their context value is “CONTEXTLESS”.

So, is there any way by which context of a particular tag could be found using API?

---

<div class="post-metadata">

**Author:** ![adam\_gardner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/adam_gardner/32/20087_2.png) [@adam\_gardner](https://community.dynatrace.com/u/adam_gardner)\
**Post date:** [May 10, 2021, 4:02am UTC](https://community.dynatrace.com/t/api-to-find-context-of-a-tag-without-any-entities/30723/6 "2021-05-10T04:02:40Z")

</div>

All manual and tags applied via autotag rule will be **CONTEXTLESS**. All AWS tags will have a context value of **AWS** and other technologies will follow similar conventions like **KUBERNETES** as Dallas mentioned above.

I’m assuming you want to search for manual tags, which is possible with the **/api/v2/tags** endpoint:

```markup
curl -x GET https://abc123.live.dynatrace.com/v2/api/tags?entitySelector=type("HOST"),tag("manualtag:value")

```

Retrieves this (if you actually have a host manually tagged with \<pre\>manualtag:value\</pre\>):

```markup
{
"totalCount": 1,
"tags": [{
"context": "CONTEXTLESS",
"key": "manualtag",
"value": "value",
"stringRepresentation": "manualtag:value"
}]
}

```

If this is not what you’re asking, please elaborate on the usecase a bit more and I’ll try to assist.
