Hello
How can I can get all hosts from specific hostgroup using REST API
Hostgroup hosts REST API
-
dwasswa
Re: Hostgroup hosts REST API
Hi @ madis.luik,
Here is a guide that will help you achieve that:
Accessing_The_XI_Backend_API
When you test API access by visiting one of the backend URLs in a web browser.
XML OUTPUT:
Here is a guide that will help you achieve that:
Accessing_The_XI_Backend_API
When you test API access by visiting one of the backend URLs in a web browser.
Code: Select all
http://<>YOUR SERVER IP/nagiosxi/backend/?cmd=gethostgroups&username=nagiosadmin&ticket=uiV5saH2
Code: Select all
<hostgrouplist>
<recordcount>1</recordcount>
<hostgroup id="144">
<instance_id>1</instance_id>
<hostgroup_name>linux-servers</hostgroup_name>
<is_active>1</is_active>
<config_type>1</config_type>
<alias>Linux Servers</alias>
</hostgroup>
</hostgrouplist>