01 Dec 2017 02:20 PM - last edited on 26 May 2021 12:49 PM by MaciejNeumann
Hello,
In the documentation
https://www.dynatrace.com/support/help/dynatrace-a...
, it is possible to tag a service using an API.
I tried to do so with host without success (same command).
Is there a way to tag a host, process, application using API ?
Regards,
Solved! Go to Solution.
01 Dec 2017 03:59 PM
Hi gautier,
You would have to use the api endpoint for the entity you want to assign the tag to.
So for host that would be: https://
{{Tenant}}.live.dynatrace.com/api/v1/entity/infrastructure/hosts/{entityid}
and then in the payload :
{
"tags": ["myTagthroughAPI", "secondTag"]
}
Hope this helps.
KR,
Kristof
04 Dec 2017 07:19 AM
Kris,
That's failing, I get this error message: "code":404,"message":"HTTP 404 Not Found"
Regards,
04 Dec 2017 07:23 AM
Sorry, I forgot the infrastructure word in the path. That's working fine.
04 Dec 2017 04:18 PM
Hello,
I tried for processes, no way to assign a tag.
api/v1/entity/infrastructure/processes/<proc_ID>
Not allowed HTTP method, expected one of [GET, OPTIONS]
Regards,