Zabbix Documentation 1.8

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

api:host:massremove

massRemove()

Available since version: 1.8

Parameters

multidimensional array with Hosts data

ParameterTypeOptionalDescriptionDetails
hostidsarray Hostids to update
groupidsarray Yes Host groupids where hosts should be removed.
templateidsarray Yes Templateid which should be unlinked from hosts.
macrosarray Yes Macros which should be removed from hosts.

Returns

ParameterDescription
resultOperation successful. Result will contain array of updated Host IDs.
errorIn case of any errors

Example

Remove from host with ID “100100000010092” two macros {$TEST1},{$TEST2}

{
"jsonrpc":"2.0",
"method":"host.massRemove",
"params":{ 
	"hostids": ["100100000010092"],
	"macros": ["{$TEST1}","{$TEST2}"]
},
"auth":"f223adf833b2bf2ff38574a67bba6372",
"id":2
}

Hosts updated successfully:

{
"jsonrpc":"2.0",
"result":{
  "hostids":["100100000010092"]
},
"id":2
}