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

API : how to find the number of hosts (monitored and unmonitored)




how to get the exact same number of hosts detected by Dynatrace. The same number as the one displayed on the attached screenshot (/#settings/deployment/newhostslist)


I can't find an API that does this.


Thank You.



DynaMight Champion
DynaMight Champion

Hello @_Fabian_ 


If I understand well, i found the solution for you.

The only way that I see, is to use the API.

Using this call 'Gets the list of hosts with OneAgent deployment information for each host'


If your disabling was made since long time, don't forget to change the start time frame: and now with the integer as an entry (with a maximum of 92 days I think).


If you need more assistance not hesitate.

Sharing Knowledge

Thank you for the answer. 92 days is far too short. I would need to be able to get the information regardless of the time frame. In fact, I need to get all the hosts on which a watchdog is running.

DynaMight Legend
DynaMight Legend

What you can do is to list all the hosts in Dynatrace Via the API. and from that GET Command, you can also include or choose to exclude monitoring candidates that Dynatrace sees.




Unfortunately, it doesn't work.The API returns 1093 hosts when I expect 2060. This is not really surprising since the smartscape does not display known but unmonitored hosts (unless I'm mistaken). But thanks anyway.

You may need to increase the payload output as in my tests we get the full output of all hosts. with monitoring candidates excluded


I try through the Dynatrace interface. I don't put a limit in the size of the page. Is there any other way to increase the payload?


Ok, I think I've got it (1 year is enough and it returns more than 2000 hosts) :




Thank you for your help.

You're welcome. some people use postman as well as they can gain a larger output since the API UI in Dynatrace can crash and such. Glad to hear that its working as expected 🙂 :dancing_blob:


Featured Posts