22 Nov 2019 12:53 PM
I need a way to query for a host by discoveredName, in order to retrieve the EntityID. Upon examining the api/v1/entity/infrastructure/hosts endpoint documentation, I don't see a way to specify discoveredName as a filter criteria. I'm pretty new to this API, so I may be missing something.
If this is the incorrect forum, please direct me to a proper destination.
Thank you for any assistance!
Solved! Go to Solution.
23 Nov 2019 06:53 AM
You have to options in my opinion. First would be downloading full list of hosts, and look through whole list. In such case you can create local cache of pairs hostName : hostID in system that is fetching data from API.
Second option you can consider is creating tag rule, that will assign to all hosts tag with DetectedHostName as value.
https://www.dynatrace.com/support/help/shortlink/tagging#how-to-define-an-automatically-applied-tag
Than you will be able to filter list of hosts by tag:
Sebastian