Available since version: 1.8
==== Parameters ==== multidimensional array with Hosts data
| Parameter | Type | Optional | Description | Details |
|---|---|---|---|---|
| groups | array | HostGroup objects to update. | ||
| hosts | array | Yes | Host objects that should be added to host groups, others will be removed. | |
| templates | array | Yes | Template objects that should be added to host groups, others will be removed. | |
| Parameter | Description |
|---|---|
| result | Operation successful. Result will contain array of updated Host group IDs. |
| error | In case of any errors |
Add host with ID "100100000010092" to host group with ID "100100000000042" others hosts in host group will be removed:
{
"jsonrpc":"2.0",
"method":"hostgroup.massUpdate",
"params":{
"groups": [
{"groupid": "100100000000042"},
],
"hosts": [
{"hostid": "100100000010092"},
]
},
"auth":"f223adf833b2bf2ff38574a67bba6372",
"id":2
}Host groups updated successfully: