REST API how to add/delete hosts to/from a host group

Hi,

The ruleset should be host_groups, your folder should be ~folder (at least I had the best experience doing it like that) and the value_raw should be your Hostgroup like you did. I would recommend you to create a rule in the UI and then make a GET request, look at the JSON structure and compare it with yours and edit it to your needs.

1 Like