Hostgroup hosts REST API

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
madis.luik
Posts: 1
Joined: Mon Oct 16, 2017 2:00 am

Hostgroup hosts REST API

Post by madis.luik »

Hello
How can I can get all hosts from specific hostgroup using REST API
dwasswa

Re: Hostgroup hosts REST API

Post by dwasswa »

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.

Code: Select all

http://<>YOUR SERVER IP/nagiosxi/backend/?cmd=gethostgroups&username=nagiosadmin&ticket=uiV5saH2
XML OUTPUT:

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>
Locked