Zabbix Documentation 1.8

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


Sidebar

api:hostgroup:massremove

massRemove()

Available since version: 1.8

Parameters

multidimensional array with Hosts data

ParameterTypeOptionalDescriptionDetails
groupidsarray Host groupids to update.
hostidsarray Yes Hostids to remove from host groups.
templateidsarray Yes Templateids to remove from host groups.

Returns

ParameterDescription
resultOperation successful. Result will contain array of updated Host group IDs.
errorIn 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
}