object hostgroup.massremove(object parameters)
This method allows to remove related objects from multiple host groups.
(object)
Parameters containing the IDs of the host groups to update and the objects that should be removed.
Parameter | Type | Description |
---|---|---|
groupids (required) |
string/array | IDs of the host groups to be updated. |
hostids | string/array | Hosts to remove from all host groups. |
templateids | string/array | Templates to remove from all host groups. |
(object)
Returns an object containing the IDs of the updated host groups under the groupids
property.
Remove two hosts from the given host groups.
Request:
{
"jsonrpc": "2.0",
"method": "hostgroup.massremove",
"params": {
"groupids": [
"5",
"6"
],
"hostids": [
"30050",
"30001"
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
CHostGroup::massRemove() in frontends/php/api/classes/CHostGroup.php.