> Map object

The following objects are directly related to the map API.

Map

The map object has the following properties.

PropertyTypeDescription
sysmapidstringID of the map.

Property behavior:
- read-only
- required for update operations
heightintegerHeight of the map in pixels.

Property behavior:
- required for create operations
namestringName of the map.

Property behavior:
- required for create operations
widthintegerWidth of the map in pixels.

Property behavior:
- required for create operations
backgroundidstringID of the image used as the background for the map.
expand_macrosintegerWhether to expand macros in labels when configuring the map.

Possible values:
0 - (default) do not expand macros;
1 - expand macros.
expandproblemintegerWhether the problem trigger will be displayed for elements with a single problem.

Possible values:
0 - always display the number of problems;
1 - (default) display the problem trigger if there’s only one problem.
grid_alignintegerWhether to enable grid aligning.

Possible values:
0 - disable grid aligning;
1 - (default) enable grid aligning.
grid_showintegerWhether to show the grid on the map.

Possible values:
0 - do not show the grid;
1 - (default) show the grid.
grid_sizeintegerSize of the map grid in pixels.

Supported values: 20, 40, 50, 75 and 100.

Default: 50.
highlightintegerWhether icon highlighting is enabled.

Possible values:
0 - highlighting disabled;
1 - (default) highlighting enabled.
iconmapidstringID of the icon map used on the map.
label_formatintegerWhether to enable advanced labels.

Possible values:
0 - (default) disable advanced labels;
1 - enable advanced labels.
label_locationintegerLocation of the map element label.

Possible values:
0 - (default) bottom;
1 - left;
2 - right;
3 - top.
label_string_hoststringCustom label for host elements.

Property behavior:
- required if label_type_host is set to “custom”
label_string_hostgroupstringCustom label for host group elements.

Property behavior:
- required if label_type_hostgroup is set to “custom”
label_string_imagestringCustom label for image elements.

Property behavior:
- required if label_type_image is set to “custom”
label_string_mapstringCustom label for map elements.

Property behavior:
- required if label_type_map is set to “custom”
label_string_triggerstringCustom label for trigger elements.

Property behavior:
- required if label_type_trigger is set to “custom”
label_typeintegerMap element label type.

Possible values:
0 - label;
1 - IP address;
2 - (default) element name;
3 - status only;
4 - nothing.
label_type_hostintegerLabel type for host elements.

Possible values:
0 - label;
1 - IP address;
2 - (default) element name;
3 - status only;
4 - nothing;
5 - custom.
label_type_hostgroupintegerLabel type for host group elements.

Possible values:
0 - label;
2 - (default) element name;
3 - status only;
4 - nothing;
5 - custom.
label_type_imageintegerLabel type for host group elements.

Possible values:
0 - label;
2 - (default) element name;
4 - nothing;
5 - custom.
label_type_mapintegerLabel type for map elements.

Possible values:
0 - label;
2 - (default) element name;
3 - status only;
4 - nothing;
5 - custom.
label_type_triggerintegerLabel type for trigger elements.

Possible values:
0 - label;
2 - (default) element name;
3 - status only;
4 - nothing;
5 - custom.
markelementsintegerWhether to highlight map elements that have recently changed their status.

Possible values:
0 - (default) do not highlight elements;
1 - highlight elements.
severity_minintegerMinimum severity of the triggers that will be displayed on the map.

Refer to the trigger severity property for a list of supported trigger severities.
show_unackintegerHow problems should be displayed.

Possible values:
0 - (default) display the count of all problems;
1 - display only the count of unacknowledged problems;
2 - display the count of acknowledged and unacknowledged problems separately.
useridstringMap owner user ID.
privateintegerType of map sharing.

Possible values:
0 - public map;
1 - (default) private map.
show_suppressedintegerWhether suppressed problems are shown.

Possible values:
0 - (default) hide suppressed problems;
1 - show suppressed problems.

Map element

The map element object defines an object displayed on a map. It has the following properties.

PropertyTypeDescription
selementidstringID of the map element.

Property behavior:
- read-only
elementsarrayElement data object.

Property behavior:
- required if elementtype is set to “host”, “map”, “trigger” or “host group”
elementtypeintegerType of map element.

Possible values:
0 - host;
1 - map;
2 - trigger;
3 - host group;
4 - image.

Property behavior:
- required
iconid_offstringID of the image used to display the element in default state.

Property behavior:
- required
areatypeintegerHow separate host group hosts should be displayed.

Possible values:
0 - (default) the host group element will take up the whole map;
1 - the host group element will have a fixed size.
elementsubtypeintegerHow a host group element should be displayed on a map.

Possible values:
0 - (default) display the host group as a single element;
1 - display each host in the group separately.
evaltypeintegerMap element tag filtering condition evaluation method.

Possible values:
0 - (default) AND / OR;
2 - OR.
heightintegerHeight of the fixed size host group element in pixels.

Default: 200.
iconid_disabledstringID of the image used to display disabled map elements.

Property behavior:
- supported if elementtype is set to “host”, “map”, “trigger”, or “host group”
iconid_maintenancestringID of the image used to display map elements in maintenance.

Property behavior:
- supported if elementtype is set to “host”, “map”, “trigger”, or “host group”
iconid_onstringID of the image used to display map elements with problems.

Property behavior:
- supported if elementtype is set to “host”, “map”, “trigger”, or “host group”
labelstringLabel of the element.
label_locationintegerLocation of the map element label.

Possible values:
-1 - (default) default location;
0 - bottom;
1 - left;
2 - right;
3 - top.
permissionintegerType of permission level.

Possible values:
-1 - none;
2 - read only;
3 - read-write.
sysmapidstringID of the map that the element belongs to.

Property behavior:
- read-only
urlsarrayMap element URLs.

The map element URL object is described in detail below.
use_iconmapintegerWhether icon mapping must be used for host elements.

Possible values:
0 - do not use icon mapping;
1 - (default) use icon mapping.
viewtypeintegerHost group element placing algorithm.

Possible values:
0 - (default) grid.
widthintegerWidth of the fixed size host group element in pixels.

Default: 200.
xintegerX-coordinates of the element in pixels.

Default: 0.
yintegerY-coordinates of the element in pixels.

Default: 0.

Map element Host

The map element Host object defines one host element.

PropertyTypeDescription
hostidstringHost ID

Map element Host group

The map element Host group object defines one host group element.

PropertyTypeDescription
groupidstringHost group ID

Map element Map

The map element Map object defines one map element.

PropertyTypeDescription
sysmapidstringMap ID

Map element Trigger

The map element Trigger object defines one or more trigger elements.

PropertyTypeDescription
triggeridstringTrigger ID

Map element tag

The map element tag object has the following properties.

PropertyTypeDescription
tagstringMap element tag name.

Property behavior:
- required
operatorstringMap element tag condition operator.

Possible values:
0 - (default) Contains;
1 - Equals;
2 - Does not contain;
3 - Does not equal;
4 - Exists;
5 - Does not exist.
valuestringMap element tag value.

Map element URL

The map element URL object defines a clickable link that will be available for a specific map element. It has the following properties:

PropertyTypeDescription
sysmapelementurlidstringID of the map element URL.

Property behavior:
- read-only
namestringLink caption.

Property behavior:
- required
urlstringLink URL.

Property behavior:
- required
selementidstringID of the map element that the URL belongs to.

The map link object defines a link between two map elements. It has the following properties.

PropertyTypeDescription
linkidstringID of the map link.

Property behavior:
- read-only
selementid1stringID of the first map element linked on one end.

Property behavior:
- required
selementid2stringID of the first map element linked on the other end.

Property behavior:
- required
colorstringLine color as a hexadecimal color code.

Default: 000000.
drawtypeintegerLink line draw style.

Possible values:
0 - (default) line;
2 - bold line;
3 - dotted line;
4 - dashed line.
labelstringLink label.
linktriggersarrayMap link triggers to use as link status indicators.

The map link trigger object is described in detail below.
permissionintegerType of permission level.

Possible values:
-1 - none;
2 - read only;
3 - read-write.
sysmapidstringID of the map the link belongs to.

The map link trigger object defines a map link status indicator based on the state of a trigger. It has the following properties:

PropertyTypeDescription
linktriggeridstringID of the map link trigger.

Property behavior:
- read-only
triggeridstringID of the trigger used as a link indicator.

Property behavior:
- required
colorstringIndicator color as a hexadecimal color code.

Default: DD0000.
drawtypeintegerIndicator draw style.

Possible values:
0 - (default) line;
2 - bold line;
3 - dotted line;
4 - dashed line.
linkidstringID of the map link that the link trigger belongs to.

Map URL

The map URL object defines a clickable link that will be available for all elements of a specific type on the map. It has the following properties:

PropertyTypeDescription
sysmapurlidstringID of the map URL.

Property behavior:
- read-only
namestringLink caption.

Property behavior:
- required
urlstringLink URL.

Property behavior:
- required
elementtypeintegerType of map element for which the URL will be available.

Refer to the map element type property for a list of supported types.

Default: 0.
sysmapidstringID of the map that the URL belongs to.

Map user

List of map permissions based on users. It has the following properties:

PropertyTypeDescription
sysmapuseridstringID of the map user.

Property behavior:
- read-only
useridstringUser ID.

Property behavior:
- required
permissionintegerType of permission level.

Possible values:
2 - read only;
3 - read-write.

Property behavior:
- required

Map user group

List of map permissions based on user groups. It has the following properties:

PropertyTypeDescription
sysmapusrgrpidstringID of the map user group.

Property behavior:
- read-only
usrgrpidstringUser group ID.

Property behavior:
- required
permissionintegerType of permission level.

Possible values:
2 - read only;
3 - read-write.

Property behavior:
- required

Map shapes

The map shape object defines a geometric shape (with or without text) displayed on a map. It has the following properties:

PropertyTypeDescription
sysmap_shapeidstringID of the map shape element.

Property behavior:
- read-only
typeintegerType of map shape element.

Possible values:
0 - rectangle;
1 - ellipse.

Property is required when new shapes are created.

Property behavior:
- required
xintegerX-coordinates of the shape in pixels.

Default: 0.
yintegerY-coordinates of the shape in pixels.

Default: 0.
widthintegerWidth of the shape in pixels.

Default: 200.
heightintegerHeight of the shape in pixels.

Default: 200.
textstringText of the shape.
fontintegerFont of the text within shape.

Possible values:
0 - Georgia, serif
1 - “Palatino Linotype”, “Book Antiqua”, Palatino, serif
2 - “Times New Roman”, Times, serif
3 - Arial, Helvetica, sans-serif
4 - “Arial Black”, Gadget, sans-serif
5 - “Comic Sans MS”, cursive, sans-serif
6 - Impact, Charcoal, sans-serif
7 - “Lucida Sans Unicode”, “Lucida Grande”, sans-serif
8 - Tahoma, Geneva, sans-serif
9 - “Trebuchet MS”, Helvetica, sans-serif
10 - Verdana, Geneva, sans-serif
11 - “Courier New”, Courier, monospace
12 - “Lucida Console”, Monaco, monospace

Default: 9.
font_sizeintegerFont size in pixels.

Default: 11.
font_colorstringFont color.

Default: 000000.
text_halignintegerHorizontal alignment of text.

Possible values:
0 - center;
1 - left;
2 - right.

Default: 0.
text_valignintegerVertical alignment of text.

Possible values:
0 - middle;
1 - top;
2 - bottom.

Default: 0.
border_typeintegerType of the border.

Possible values:
0 - none;
1 - —————;
2 - ·····;
3 - - - -.

Default: 0.
border_widthintegerWidth of the border in pixels.

Default: 0.
border_colorstringBorder color.

Default: 000000.
background_colorstringBackground color (fill color).

Default: (empty).
zindexintegerValue used to order all shapes and lines (z-index).

Default: 0.

Map lines

The map line object defines a line displayed on a map. It has the following properties:

PropertyTypeDescription
sysmap_shapeidstringID of the map shape element.

Property behavior:
- read-only
x1integerX-coordinates of the line point 1 in pixels.

Default: 0.
y1integerY-coordinates of the line point 1 in pixels.

Default: 0.
x2integerX-coordinates of the line point 2 in pixels.

Default: 200.
y2integerY-coordinates of the line point 2 in pixels.

Default: 200.
line_typeintegerType of the lines.

Possible values:
0 - none;
1 - —————;
2 - ·····;
3 - - - -.

Default: 0.
line_widthintegerWidth of the lines in pixels.

Default: 0.
line_colorstringLine color.

Default: 000000.
zindexintegerValue used to order all shapes and lines (z-index).

Default: 0.