Class containing methods for operations with Maps.

get() Get map details
exists() Check if map exists
create() Create maps
update() Update map details
delete() Delete maps

Object details

The table contains complete list of Map attributes.


sysmapidinteger Map ID
namestring Name
widthinteger Width
heightinteger Height
backgroundidinteger Background image ID
label_typeinteger Icon label type Label, Element Name, IP, Status only
label_locationinteger Icon label location Top, Bottom, Right, Left
highlightinteger Icon highlight
expandprobleminteger Expanding single problem
markelementsinteger Extended icon highlighting in case of status changes
show_unackinteger Unacknowledged problem viewing All problems, Separate, Only unacknowledged

Map item

selementidinteger Map element ID
sysmapidinteger Map ID
elementidinteger Resource ID
elementtypeinteger Resource type 0 - host, 1 - map, 2 - trigger, 3 - host group, 4 - image
iconid_offinteger OK status icon ID
iconid_oninteger PROBLEM status icon ID
iconid_unknowninteger UNKNOWN status icon ID
iconid_disabledinteger Disabled status icon ID
iconid_maintenanceinteger Maintenance status icon ID
labelinteger Description
label_locationinteger Description location
xinteger X axis position
yinteger Y axis position
urlinteger Page to open on element click
linkidinteger Map link ID
sysmapidinteger Map ID
selementid1integer First linked map element ID
selementid2integer Second linked map element ID
drawtypeinteger Link draw type Line, Bold line, Dot, Dashed line
colorstring Link default color Hex presentation
labelstring Link description
linktriggeridinteger Map link Indicator ID
linkidinteger Map link ID
triggeridinteger Trigger ID
drawtypeinteger Draw type Line, Bold line, Dot, Dashed line
colorstring Color Hex presentation

Common tasks

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

Add a map Use method map.create
Add a bunch of new maps Use method map.create with array of Map objects
Remove map by Map IDs Use method map.delete array of Map IDs
Retrieve map details by Map IDs Use method map.get with parameter sysmapids
Retrieve map details by Map name Use method map.get with parameter filter, specify “name”:“<your map>“