> 对象

The following objects are directly related to the map API. 以下内容是关于拓扑图接口。

Map 拓扑图

拓扑图对象具有以下属性 The map object has the following properties.

PropertyTypeDescription
sysmapidstring(readonly) ID of the map. 拓扑图id
height
(required)
integerHeight of the map in pixels. 拓扑图画布高度
name
(required)
stringName of the map. 拓扑图名称
width
(required)
integerWidth of the map in pixels.拓扑图宽度
backgroundidstringID of the image used as the background for the map.拓扑图背景图像id
expand_macrosintegerWhether to expand macros in labels when configuring the map.

Possible values:
0 - (default) do not expand macros;
1 - expand macros. 配置拓扑图时是否展开标签中的宏

可能的值:
0 - (默认) 不展开;
1 - 展开.
expandproblemintegerWhether the 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. 如果只有一个触发器告警是否显示详情,
\可能的值:
0是只显示数目,\1是显示触发器详情
grid_alignintegerWhether to enable grid aligning.

Possible values:
0 - disable grid aligning;
1 - (default) enable grid aligning. 是否启用网格对齐
\可能的值:
0是不用
1是使用
grid_showintegerWhether to show the grid on the map.

Possible values:
0 - do not show the grid;
1 - (default) show the grid. 是否显示拓扑图网格
\可能的值:
0是不显示
1是显示
grid_sizeintegerSize of the map grid in pixels.

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

Default: 50. 拓扑图网格的大小(以像素为单位)

支持20, 40, 50, 75,100像素,
\默认是50
highlightintegerWhether icon highlighting is enabled.

Possible values:
0 - highlighting disabled;
1 - (default) highlighting enabled. 是否启用图标高亮显示,
\可能的值:
0是不用
1是使用
iconmapidstringID of the icon map used on the map. 拓扑图使用图表的ID
label_formatintegerWhether to enable advanced labels.

Possible values:
0 - (default) disable advanced labels;
1 - enable advanced labels. 是否启用高级标签
\可能的值:
0是不用
1是使用
label_locationintegerLocation of the map element label.

Possible values:
0 - (default) bottom;
1 - left;
2 - right;
3 - top. 拓扑图标签的位置
\可能的值:
0是底部
1是左边
2是右边
3是顶部
label_string_hoststringCustom label for host elements.

Required for maps with custom host label type. 主机元素自定义标签 ;需要拓扑图中的主机自定义标签类型
label_string_hostgroupstringCustom label for host group elements.

Required for maps with custom host group label type. 主机组元素自定义标签 ;需要拓扑图中的主机组自定义标签类型
label_string_imagestringCustom label for image elements.

Required for maps with custom image label type. 图像元素的自定义标签。
label_string_mapstringCustom label for map elements.

Required for maps with custom map label type. 拓扑图元素自定义标签
label_string_triggerstringCustom label for trigger elements.

Required for maps with custom trigger label type. 触发器元素自定义标签
label_typeintegerMap element label type.

Possible values:
0 - label;
1 - IP address;
2 - (default) element name;
3 - status only;
4 - nothing. 拓扑图元素的标签类型 可能的类型:0:标签 1:IP地址 2:元素名称(默认) 3:状态 4:没有
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. 主机元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义
label_type_hostgroupintegerLabel type for host group elements.

Possible values:
0 - label;
2 - (default) element name;
3 - status only;
4 - nothing;
5 - custom. 主机组元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义
label_type_imageintegerLabel type for host group elements.

Possible values:
0 - label;
2 - (default) element name;
4 - nothing;
5 - custom. 图像元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义
label_type_mapintegerLabel type for map elements.

Possible values:
0 - label;
2 - (default) element name;
3 - status only;
4 - nothing;
5 - custom. 拓扑图元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义
label_type_triggerintegerLabel type for trigger elements.

Possible values:
0 - label;
2 - (default) element name;
3 - status only;
4 - nothing;
5 - custom. 触发器元素的标签类型 可能的值:0:标签 1:ip地址 2:元素名称(默认)3:状态 4:没有 5:自定义
markelementsintegerWhether to highlight map elements that have recently changed their status.

Possible values:
0 - (default) do not highlight elements;
1 - highlight elements. 是否突出显示最近更改其状态的拓扑图元素 可能的值:0:不高亮 1:显示高亮
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. 显示在拓扑图上的严重程度最小触发器。参考trigger “severity” property,获取支持的触发器严重程度列表。
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. 如何显示问题, 可能的值: 0:显示所有问题的总数 1:仅显示未确认问题的总数 2:分别显示已确认和未确认的数目
useridstringMap owner user ID. 拓扑图所有用户的id
privateintegerType of map sharing.

Possible values:
0 - public map;
1 - (default) private map. 拓扑图的共享类型 可能的值:0:公共的拓扑图 1:私有的拓扑图

Map element 拓扑图元素

The map element object defines an object displayed on a map. It has the following properties. 拓扑图元素对象定义显示在拓扑图上的对象。它具有以下属性。

PropertyTypeDescription
selementidstring(readonly) ID of the map element. 拓扑图元素的id
elements
(required)
arrayElement data object. Required for host, host group, trigger and map type elements.元素数据对象。需要主机、主机组、触发器和拓扑图类型元素。
elementtype
(required)
integerType of map element.

Possible values:
0 - host;
1 - map;
2 - trigger;
3 - host group;
4 - image. 拓扑图元素类型

可能的值:\0-主机 1-拓扑图 2-触发器 3-主机组 4-图像
iconid_off
(required)
stringID of the image used to display the element in default state. 用于在默认状态下显示元素的图像的ID。
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. 应该如何显示独立的主机组主机。 \可能的值
0-主机组元素占用整个拓扑图 1-主机组元素的大小是固定的
applicationstringName of the application to display problems from. Used only for host and host group map elements. 显示问题的应用程序的名称。只用于主机和主机组映射元素。
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. 一个主机组元素如何显示在拓扑图上

可能的值:
0- 显示主机组作为一个单独的元素 1-分别显示组中的每个主机
heightintegerHeight of the fixed size host group element in pixels.

Default: 200. 固定大小的主机组元素的高度(以像素为单位)。

默认是:200
iconid_disabledstringID of the image used to display disabled map elements. Unused for image elements. 用于显示禁用映射元素的图像的ID。未使用的图像元素。
iconid_maintenancestringID of the image used to display map elements in maintenance. Unused for image elements. 用于显示维护中的拓扑图元素的图像的ID。未使用的图像元素。
iconid_onstringID of the image used to display map elements with problems. Unused for image elements. 用于显示有问题的拓扑图元素的图像的ID。未使用的图像元素。
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. 映射元素标签的位置
\可能的值:
-1: 默认的位置 0-底部 1-左边 2-右边 3-上边
permissionintegerType of permission level.

Possible values:
-1 - none;
2 - read only;
3 - read-write. 类型的权限级别

可能的值: -1:-没有权限 2-只读权限 3-读写权限
sysmapidstring(readonly) ID of the map that the element belongs to. 元素所述拓扑图的ID
urlsarrayMap element URLs.

The map element URL object is described in detail below. 拓扑图元素的URLS
\
use_iconmapintegerWhether icon mapping must be used for host elements.

Possible values:
0 - do not use icon mapping;
1 - (default) use icon mapping. 是否必须为主机元素使用图标映射。
\可能的值:
0-不使用图标映射 1-使用图表映射(默认的)
viewtypeintegerHost group element placing algorithm.

Possible values:
0 - (default) grid. 主机组元素放置算法
\可能的值:
0-网格
widthintegerWidth of the fixed size host group element in pixels.

Default: 200. 主机组元素固定的像素宽度。

默认是:200
xintegerX-coordinates of the element in pixels.

Default: 0. 元素的x坐标,单位为像素。

默认是:0
yintegerY-coordinates of the element in pixels.

Default: 0. 元素的y坐标,单位为像素。

默认是: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 URL拓扑图元素中的URL

The map element URL object defines a clickable link that will be available for a specific map element. It has the following properties: 拓扑图元素URL对象定义了一个可单击的链接,该链接将对特定的map元素可用。它具有以下特性:

PropertyTypeDescription
sysmapelementurlidstring(readonly) ID of the map element URL.
name
(required)
stringLink caption.
url
(required)
stringLink URL.
selementidstringID of the map element that the URL belongs to.

Map link 拓扑图关联

The map link object defines a link between two map elements. It has the following properties. 拓扑图链接对象定义两个映射元素之间的链接。它具有以下属性。

PropertyTypeDescription
linkidstring(readonly) ID of the map link.
selementid1
(required)
stringID of the first map element linked on one end. 在一端连接的第一个拓扑图元素的ID。
selementid2
(required)
stringID of the first map element linked on the other end. 另一端连接的第一个拓扑图元素的ID。
colorstringLine color as a hexadecimal color code.

Default: 000000. 行颜色作为十六进制颜色代码。

默认是:“000000”
drawtypeintegerLink line draw style.

Possible values:
0 - (default) line;
2 - bold line;
3 - dotted line;
4 - dashed line. 链接线画的风格。

可能的值:0-线(默认)2-粗线 3-点线 4-虚线
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. 权限等级类型
\可能的值: -1-没有 2-只读 3-可读可写
sysmapidstringID of the map the link belongs to. 该关联所属拓扑图ID

Map link trigger 拓扑图关联触发器

The map link trigger object defines a map link status indicator based on the state of a trigger. It has the following properties: 拓扑图链接触发器对象根据触发器的状态定义一个拓扑图链接状态指示器。它具有以下特性:

PropertyTypeDescription
linktriggeridstring(readonly) ID of the map link trigger.
triggerid
(reqiuired)
stringID of the trigger used as a link indicator.
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. 指标画的风格
\可能的值: 0-线(默认)2-粗线 3-点线 4-虚线
linkidstringID of the map link that the link trigger belongs to.关联触发器所属拓扑图ID

Map URL 拓扑图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: 拓扑图URL对象定义了一个可单击的链接,该链接可用于映射上特定类型的所有元素。它具有以下特性:

PropertyTypeDescription
sysmapurlidstring(readonly) ID of the map URL. 拓扑图URL ID
name
(required)
stringLink caption. 链接标题。
url
(required)
stringLink URL. 链接URL
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. 拓扑图元素可用URL类型

默认:0
sysmapidstringID of the map that the URL belongs to. 所属URL的拓扑图ID

Map user 拓扑图用户

List of map permissions based on users. It has the following properties: 基于用户的拓扑图权限列表。它具有以下特性:

PropertyTypeDescription
sysmapuseridstring(readonly) ID of the map user. 拓扑图用户ID
userid
(required)
stringUser ID.
permission
(required)
integerType of permission level.

Possible values:
2 - read only;
3 - read-write; 权限等级类型
\可能的值: -1-没有 2-只读 3-可读可写

Map user group 拓扑图用户组

List of map permissions based on user groups. It has the following properties: 基于用户组的拓扑图权限列表。它具有以下特性:

PropertyTypeDescription
sysmapusrgrpidstring(readonly) ID of the map user group. 拓扑图用户组的ID
usrgrpid
(required)
stringUser group ID.
permission
(required)
integerType of permission level.

Possible values:
2 - read only;
3 - read-write;权限等级类型
\可能的值: -1-没有 2-只读 3-可读可写

Map shapes 地图形状

The map shape object defines an geometric shape (with or without text) displayed on a map. It has the following properties: 拓扑图形状对象定义了显示在拓扑图上的几何形状(包含或不包含文本)。它具有以下特性:

PropertyTypeDescription
sysmap_shapeidstring(readonly) ID of the map shape element. 拓扑图形状元素的ID
type (required)integerType of map shape element.

Possible values:
0 - rectangle;
1 - ellipse.

Property is required when new shapes are created. 拓扑图形状元素的类型

可能的值:
0-矩形 1-椭圆

创建新形状时需要属性。
xintegerX-coordinates of the shape in pixels.

Default: 0. 元素的x坐标,单位为像素。

默认是:0
yintegerY-coordinates of the shape in pixels.

Default: 0. 元素的y坐标,单位为像素。

默认是:0
widthintegerWidth of the shape in pixels.

Default: 200. 以像素为单位的形状宽度。
\默认是:200
heightintegerHeight of the shape in pixels.

Default: 200. 以像素为单位的形状高度。
\默认是: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 of the text within shape.

可能的值:
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 默认是:9
font_sizeintegerFont size in pixels.

Default: 11. 字体大小,单位是像素

默认:11
font_colorstringFont color.

Default: ‘000000’. 字体颜色

默认是:“000000”
text_halignintegerHorizontal alignment of text.

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

Default: 0. 水平对齐的文本
\可能的值:
0-中间(默认) 1-左边 2-右边
text_valignintegerVertical alignment of text.

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

Default: 0. 垂直对齐文本
\可能的值:
0-中间(默认) 1-顶部 2-底部
border_typeintegerType of the border.

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

Default: 0. 边界类型

可能的值:
0-没有(默认) 1 - ————— 2 - ····· 3 - - - -
border_widthintegerWidth of the border in pixels.

Default: 0. 边框的宽度,以像素为单位
\默认:0
border_colorstringBorder color.

Default: ‘000000’. 边界的颜色
\默认:‘000000’
background_colorstringBackground color (fill color).

Default: (empty). 背景颜色(填充颜色)

默认是:无
zindexintegerValue used to order shapes (z-index).

Default: 0. 用于定制形状的值(z-index)。

默认是:0

Map lines 拓扑图线

The map line object defines an line displayed on a map. It has the following properties: 拓扑图线对象定义显示在拓扑图上的行。它具有以下特性:

PropertyTypeDescription
sysmap_shapeidstring(readonly) ID of the map shape element. 拓扑图形状元素的ID
x1integerX-coordinates of the line point 1 in pixels.

Default: 0. 以像素为单位的直线点1的x坐标。
\默认是:0
y1integerY-coordinates of the line point 1 in pixels.

Default: 0. 以像素为单位的直线点1的y坐标。
\默认是:0
x2integerX-coordinates of the line point 2 in pixels.

Default: 200. 以像素为单位的直线点2的x坐标。
\默认是:200
y2integerY-coordinates of the line point 2 in pixels.

Default: 200. 以像素为单位的直线点2的x坐标。
\默认是:200
line_typeintegerType of the border.

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

Default: 0. 边界类型

可能的值:
0-没有(默认) 1 - ————— 2 - ····· 3 - - - -
line_widthintegerWidth of the border in pixels.

Default: 0. 边框的宽度,以像素为单位
\默认:0
line_colorstringBorder color.

Default: ‘000000’. 边界的颜色
\默认:‘000000’
zindexintegerValue used to order shapes (z-index).

Default: 0. 用于定制形状的值(z-index)。

默认是:0