Hello
curl -XGET "https://servername/nagiosxi/api/v1/obje ... E&pretty=1"
This gets me specific hostgroup members and their name, is it possible to get also hostgroup member IP with same GET ?
Thank you.
API query hostgroup member IP addresses
Re: API query hostgroup member IP addresses
Hi elinagios,
You can find the API definitions in NagiosXI via help ( top of page ) -> API Docs (left hand side).
Looking at the definition for hostgroupmembers it doesn't look like you can pull the IP with this call and you will have to make a second call to config/host (under Config Reference in API Docs) with the hostname to config/host to get the IP.
You can find the API definitions in NagiosXI via help ( top of page ) -> API Docs (left hand side).
Looking at the definition for hostgroupmembers it doesn't look like you can pull the IP with this call and you will have to make a second call to config/host (under Config Reference in API Docs) with the hostname to config/host to get the IP.
Code: Select all
curl -ik -XGET "https://localhost/nagiosxi/api/v1/config/host?apikey=REDACTED&host_name=HOSTNAME&pretty=1"