14 Jul 2025
08:42 PM
- last edited on
15 Jul 2025
03:54 PM
by
AgataWlodarczyk
Good day,
is there perhaps an API endpoint that could help with retrieving only hosts in the "Host Classics" app? Running a GET entities and selecting type HOST seems to return more objects than shown in Classic.
I've also tried adding parameters to "scope" it properly, such as time and monitoring modes, but the counts do not match. Maybe there is an exposed parameter I am not aware of?
Thank you.
Solved! Go to Solution.
15 Jul 2025 06:21 AM
@tylerv Please try the below API, make sure you set the entitySelector as type("HOST")
https://docs.dynatrace.com/docs/shortlink/api-entities-v2-get-all-entities-list
15 Jul 2025 02:12 PM
Hi, Thank you for your reply.
I have tried that, but the number of hosts returned from that request is more than what is shown in hosts classic. For example, running the GETwith entityselector=HOST returns 700 entities of type HOST, but only 500 are shown in host classic. Is there an endpoint that can be used to return exactly the host entities only shown on host classic?
Thank you!
15 Jul 2025 03:43 PM
Hi @tylerv
You can try this in the entitySelector : type("HOST"),isMonitoringCandidate("false")
to exclude "monitoring candidate" from host list
16 Jul 2025 04:04 PM
hello, thank you for your answer.
It was something I did not consider, but the amount provided from the request still does not match compared to the amount of hosts in hosts classic. These are the parameters I have tested: isMonitoringCandidate(false), monitoringmode(FULLSTACK), entitySelector=type(HOST),from now-some time. I guess the question would be what the internal filters are for hosts classic.
Thank you.
17 Jul 2025 01:09 PM - edited 17 Jul 2025 01:10 PM
I've tried this on a tenant :
Got 672 hosts in result :
Same result in default view in hosts classic :