Nagios XI API Hostgroup members configuration.
Posted: Thu Mar 18, 2021 7:53 am
Hello and good day,
As per the documentation in the API Docs - Config Reference, we can use a PUT request to modify the alias of an existing Hostgroup
Sample cURL Request:
We would like to edit the members list property but the correct way to implement the request is not described in the documentation.
We have tryed the following requests to no success:
We have also tried PUT requests to the objects/hostgroupmembers endpoint without success.
As per the documentation in the API Docs - Config Reference, we can use a PUT request to modify the alias of an existing Hostgroup
Sample cURL Request:
Code: Select all
curl -XPUT "https://.../nagiosxi/api/v1/config/hostgroup/testapihostgroup?apikey=...&pretty=1&alias=New Alias&applyconfig=1"We have tryed the following requests to no success:
Code: Select all
curl -XPUT "https://.../nagiosxi/api/v1/config/hostgroup/testapihostgroup?apikey=...&pretty=1&members=member1&applyconfig=1"Code: Select all
curl -XPUT "https://.../nagiosxi/api/v1/config/hostgroup/testapihostgroup?apikey=...&pretty=1&members=[member1]&applyconfig=1"Code: Select all
curl -XPUT "https://.../nagiosxi/api/v1/config/hostgroup/testapihostgroup?apikey=...&pretty=1&members[]=member1&applyconfig=1"Code: Select all
curl -XPUT "https://.../nagiosxi/api/v1/config/hostgroup/testapihostgroup?apikey=...&pretty=1&members[]=[member1]&applyconfig=1"