# Delete a tag via Rest API with no value

**URL:** <https://community.dynatrace.com/t/delete-a-tag-via-rest-api-with-no-value/38369>\
**Category:** Dynatrace API\
**Tags:** tagging, dynatrace-api\
**Created:** [February 10, 2023, 12:27am UTC](https://community.dynatrace.com/t/delete-a-tag-via-rest-api-with-no-value/38369 "2023-02-10T00:27:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![quilleo](https://avatars.discourse-cdn.com/v4/letter/q/6a8cbe/32.png) [@quilleo](https://community.dynatrace.com/u/quilleo)\
**Post date:** [February 10, 2023, 12:27am UTC](https://community.dynatrace.com/t/delete-a-tag-via-rest-api-with-no-value/38369/1 "2023-02-10T00:27:25Z")

</div>

I have tags that look like this:

tags":&nbsp;[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“context”:&nbsp;“CONTEXTLESS”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“key”:&nbsp;“[VMware]Application:”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“stringRepresentation”:&nbsp;“[VMware]Application:”&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},NOTE the : at the end of the keyWhen I try to delete it with this entitySelector I get the below error:entityId(%22HOST-037D9E43BDBCD7DA%22)&tag=%5BVMware%5DApplication%3A&nbsp;“error”:&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“code”:&nbsp;400,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“message”:&nbsp;“Constraints&nbsp;violated.”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“constraintViolations”:&nbsp;[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“path”:&nbsp;“key”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“message”:&nbsp;“may&nbsp;not&nbsp;be&nbsp;empty”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“parameterLocation”:&nbsp;“QUERY”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“location”:&nbsp;null&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“path”:&nbsp;“entitySelector”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“message”:&nbsp;“Parsing&nbsp;error&nbsp;in&nbsp;entitySelector&nbsp;near&nbsp;1-based&nbsp;column&nbsp;range&nbsp;[34,59)&nbsp;:&nbsp;’&tag=[VMware]Application:’”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“parameterLocation”:&nbsp;“QUERY”,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“location”:&nbsp;null&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]&nbsp;&nbsp;&nbsp;&nbsp;}I have tried a bunch of combinations based on the documumenation and I get getting similar errors.What am I doing wrong?ThanksEd

---

<div class="post-metadata">

**Author:** ![Ana.Kuzmenchuk](https://avatars.discourse-cdn.com/v4/letter/a/c37758/32.png) [@Ana.Kuzmenchuk](https://community.dynatrace.com/u/Ana.Kuzmenchuk)\
**Post date:** [February 10, 2023, 9:06am UTC](https://community.dynatrace.com/t/delete-a-tag-via-rest-api-with-no-value/38369/2 "2023-02-10T09:06:23Z")

</div>

Hi&nbsp;[@quilleo](https://community.dynatrace.com/user/7545), I’ve moved this question from the “Community discussions” sub-forum, as that space is reserved for Community-related questions 🙂 here your question has a higher chance of getting a solution!

---

<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:** [March 27, 2023, 4:51am UTC](https://community.dynatrace.com/t/delete-a-tag-via-rest-api-with-no-value/38369/3 "2023-03-27T04:51:45Z")

</div>

Hi, I had no issues deleting this tag.

1. Created a manual tag to match yours **[VMware]Application:**
2. Use the environment API v2 **DELETE /tags** endpoint to target my a single service (you probably want to target many services rather than just one).
3. Set the **key** to&nbsp;**[VMware]Application:**
4. The tag is deleted

 ![adam_gardner_0-1679892575874.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/f/afc53fa9c981813b1b6eb167ecef3cd3fe5fc1cc.png)
