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"