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:mediatype

Mediatype

Methods

Class containing methods for operations with Media types.

MethodsDescription
get() Get media type details
create() Create media types
update() Update media type details
delete() Delete media types

Object details

Media_type

The table contains complete list of Media types attributes.

ParameterTypeDescriptionDetails
mediatypeidinteger Media type ID
descriptionstring Name
typeinteger Media type 0 - Email, 1 - External script, 2 - SMS, 3 - Jabber, 100 - EzTexting
smtp_serverstring SMTP server name
smtp_helostring HELO value for SMTP server
smtp_emailstring Email address of Zabbix server
exec_pathstring Name of external script
gsm_modemstring Serial device name of GSM modem
usernamestring User name Jabber user name used by Zabbix server
passwdstring User password Jabber password used by Zabbix server

Common tasks

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

TaskHOWTO
Add a media type Use method mediatype.create
Add a bunch of new media types Use method mediatype.create with array of User group objects
Update media type Use method mediatype.update with media type IDs
Retrieve media type details by Group IDs Use method mediatype.get with parameter mediatypeids
Retrieve media type details by User group name Use method mediatype.get with parameter filter, specify “description”:“<your mediatype>“