object hostgroup.delete(array hostGroupIds)
This method allows to delete host groups.此方法允许删除主机组。
A host group can not be deleted if:如果主机组有以下情况,则不能被删除:
(array)
IDs of the host groups to delete.要删除的主机组的ID。
(object)
Returns an object containing the IDs of the deleted host groups under the groupids
property.返回包含“groupids”属性下删除的主机组的ID的对象。
Delete two host groups.删除两个主机组
Request:
{
"jsonrpc": "2.0",
"method": "hostgroup.delete",
"params": [
"107824",
"107825"
],
"auth": "3a57200802b24cda67c4e4010b50c065",
"id": 1
}
Response:
CHostGroup::delete() in frontends/php/include/classes/api/services/CHostGroup.php.