This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

Hostgroup

Methods

Class containing methods for operations with Hosts.

Methods Description
get() Get host group details
exists() Check if host group exists
create() Create host groups
update() Update host group details
delete() Delete host groups
massAdd() Mass add templates, hosts to host groups
massUpdate() Mass update host group details, update list of templates, hosts
massRemove() Mass remove templates, hosts

Object details

The table contains complete list of Host attributes.

Parameter Type Description Details
groupid int Host ID
name string Host name.
internal integer HostGroup status, if equal to 1 - host group can't be deleted.

Common tasks

The table contains list of common host-related tasks and possible implementation using Zabbix API

Task HOWTO
Add a host group Use method hostgroup.create
Add a bunch of new host groups Use method hostgroup.create with array of Host group objects
Retrieve host group details by Group IDs Use method hostgroup.get with parameter groupids
Retrieve host group details by Host group name Use method hostgroup.get with parameter filter, specify "name":"<your hostgroup>"