cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Retrieving host instances from Host Classics

tylerv
Frequent Guest

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.

 

5 REPLIES 5

p_devulapalli
Leader

@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

 

Phani Devulapalli

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!

Hi @tylerv 
You can try this in the entitySelector  : type("HOST"),isMonitoringCandidate("false")

to exclude "monitoring candidate" from host list

Gerard

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.

I've tried this on a tenant :

GerardJ_1-1752754025498.png

Got 672 hosts in result :

GerardJ_2-1752754125859.png

Same result in default view in hosts classic :

GerardJ_0-1752754008781.png

 

Gerard

Featured Posts