1 Title: WATO Web-API: new functions to manage host, service and contactgroups
10 A few new functions to manage host, service and contact groups have been introduced.
18 You can get all groups of a specific type with the action get_all_{groupname}<br>
19 curl http://localhost/heute/check_mk/webapi.py?action=get_all_hostgroups&_username=automation&_secret=1122<br>
21 curl http://localhost/heute/check_mk/webapi.py?action=get_all_servicegroups&_username=automation&_secret=1122<br>
23 curl http://localhost/heute/check_mk/webapi.py?action=get_all_contactgroups&_username=automation&_secret=1122<br>
26 Furthermore you can add, edit and delete these groups
30 # All group types can be managed with similar requests
33 curl "http://localhost/heute/check_mk/webapi.py?action=add_hostgroup&_username=automation&_secret=1122" -d 'request={"groupname": "hostgroup1", "alias": "the hg alias"}'<br>
35 curl "http://localhost/heute/check_mk/webapi.py?action=add_servicegroup&_username=automation&_secret=1122" -d 'request={"groupname": "servicegroup1", "alias": "the sg alias"}'<br>
37 curl "http://localhost/heute/check_mk/webapi.py?action=add_contactgroup&_username=automation&_secret=1122" -d 'request={"groupname": "contactgroup1", "alias": "the cg alias"}'<br>
40 curl "http://localhost/heute/check_mk/webapi.py?action=edit_hostgroup&_username=automation&_secret=1122" -d 'request={"groupname": "hostgroup1", "alias": "the hg alias"}'<br>
42 curl "http://localhost/heute/check_mk/webapi.py?action=edit_servicegroup&_username=automation&_secret=1122" -d 'request={"groupname": "servicegroup1", "alias": "the sg alias"}'<br>
44 curl "http://localhost/heute/check_mk/webapi.py?action=edit_contactgroup&_username=automation&_secret=1122" -d 'request={"groupname": "contactgroup1", "alias": "the cg alias"}'<br>
47 curl "http://localhost/heute/check_mk/webapi.py?action=delete_hostgroup&_username=automation&_secret=1122" -d 'request={"groupname": "hostgroup1"}'<br>
49 curl "http://localhost/heute/check_mk/webapi.py?action=delete_servicegroup&_username=automation&_secret=1122" -d 'request={"groupname": "servicegroup1"}'<br>
51 curl "http://localhost/heute/check_mk/webapi.py?action=delete_contactgroup&_username=automation&_secret=1122" -d 'request={"groupname": "contactgroup1"}'<br>
54 # For contact groups you may also specify a list of nagvis maps in the extra attribute nagivs_maps<br>
55 curl "http://localhost/heute/check_mk/webapi.py?action=add_contactgroup&_username=automation&_secret=1122" -d 'request={"groupname": "newgroup2", "alias": "the alias", "nagvis_maps": ["dfdf"]}'
59 Please note: A more elaborate version of these new web api calls will be added to our manual soon. :)