So far I have only worked with the WebAPI, which has to be adapted before switching to REST-API.
My task is quite simple. I need all hosts with a defined user defined attribute. For processing, I only need the host name and the IPv4 address. This was done in the previous solution with 2 lines of code.
I don’t know which version exactly you are using. But since 2.0 you can go inside the navigation bar, select Help and then open up the interactive GUI of the REST API.
I just took a look and I would use /objects/host_config/{host_name}
The problem with this is that with almost 5000 hosts, I don’t want to query all hosts individually, which would also be a time problem.
I thought that I could simply filter the list with the RESTAPI.
your call is not that efficient as you are getting data and then showing it away.
just call a normal view with output_format instead, or create a view that have only the columns you need
you can also do this with live status and is perhaps the most efficient solution.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.