26 Jun 2021 07:58 PM - last edited on 28 Jun 2021 11:20 AM by MaciejNeumann
Hello,
We have a need to find out auto-applied tags separate from custom tags to determine if there're any duplicate tags. We heavily rely on custom tagging to accomplish the basic monitoring functions - access and alerting in multi-tenant environment -, and at times the custom tagging is ahead of the auto-tagging processing causing duplicate custom tags to be created.
We would like to regularly and programmatically check for duplicates and delete the duplicate custom tags.
The current API endpoints (monitored entity details) do not allow to filter by type: e.g. return auto-applied tags only, and they do seem to filter out duplicates even though the duplicates are shown on UI.
Thanks
Solved! Go to Solution.
01 Jul 2021 10:02 PM
Hi, you can get a list of all auto tags defined in your environment https://www.dynatrace.com/support/help/shortlink/api-config-auto-tags-get-all.
You can also get a list of all custom tags assigned to the specified monitored entities https://www.dynatrace.com/support/help/shortlink/api-custom-tags-get. Automatically applied tags and imported tags are not included in the custom tags api.
12 Aug 2021 02:00 PM
Thanks Moe.
What I was looking for was the auto-applied tags to monitored entities, like the API for listing custom tags applied to monitored entities.
/api/config/v1/autoTags returns the auto-tag "definitions", the config.
Thanks. Tibebe
05 Jan 2022 03:46 PM
I do not think the suggested solution answers my main concern:
"The current API endpoints (monitored entity details) do not allow to filter by type: e.g. return auto-applied tags only, and they do seem to filter out duplicates even though the duplicates are shown on UI."
It's correct that the custom tags API does return the "custom tags" only... but the concerns is related to ALL tags returned by the "/entities/{entityId}" not including ALL (duplicates one can find on UI are not returned by the API).