Zabbix Documentation 1.8

Sidebar

massRemove()

Available since version: 1.8

Parameters

multidimensional array with Hosts data

Parameter Type Optional Description Details
groupids array Host groupids to update.
hostids array Yes Hostids to remove from host groups.
templateids array Yes Templateids to remove from host groups.

Returns

Parameter Description
result Operation successful. Result will contain array of updated Host group IDs.
error In case of any errors

Example

Remove two hosts with ID "100100000010092", "100100000010086" from two host groups with ID "100100000000042", "100100000000013"

{
       "jsonrpc":"2.0",
       "method":"hostgroup.massRemove",
       "params":{ 
           "groupids": ["100100000000042","100100000000013"],
           "hostids": ["100100000010092","100100000010086"]
       },
       "auth":"f223adf833b2bf2ff38574a67bba6372",
       "id":2
       }

Host groups updated successfully:

{
       "jsonrpc":"2.0",
       "result":{
           "groupids":["100100000000042","100100000000013"]
       },
       "id":2
       }