01 Dec 2017
06:20 AM
- last edited on
26 May 2021
04:49 AM
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.
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
Kris,
That's failing, I get this error message: "code":404,"message":"HTTP 404 Not Found"
Regards,
Sorry, I forgot the infrastructure word in the path. That's working fine.
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,
Featured Posts