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.


Class containing methods for operations with Templates


Class containing methods for operations with Templates.

Methods Description
get() Get template details
exists() Check if template exists
create() Create templates
update() Update template details
delete() Delete templates
massAdd() Mass add template linkage, hosts, macros, host groups
massUpdate() Mass update template details, link templates, hosts, add host groups
massRemove() Mass remove template linkage, hosts, macros, host groups

Object details

The table contains complete list of Template attributes.

Parameter Type Description Details
templateid int Template ID
host string Template name.
groupids array HostGroup IDs add Template to.

Common tasks

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

Add a template Use method template.create
Add a bunch of new templates Use method template.create with array of Template objects
Link template to hosts Use method template.massAdd with parameters templates, hosts
Unlink template from hosts Use method template.massRemove with parameters templates, hosts