The method allows to retrieve maps according to the given parameters. 这个方法允许根据给定参数检索出符合条件的拓扑图。

    Parameters 参数

    (object) Parameters defining the desired output. (object) 定义所需输出的参数。

    The method supports the following parameters. 此方法支持一下参数。

    (integer/array) Returns either: (整数/数组)回报:

    • an array of objects 一个数组对象;

    Examples 举例

    Retrieve a map 检索一个拓扑图

    Retrieve all data about map “3”. 检索关于拓扑图id为3的所有数据。

    Request:

    Response:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": [
    4. {
    5. "selements": [
    6. {
    7. "selementid": "10",
    8. "sysmapid": "3",
    9. "elementtype": "4",
    10. "iconid_off": "1",
    11. "iconid_on": "0",
    12. "label": "Zabbix server",
    13. "label_location": "3",
    14. "x": "11",
    15. "y": "141",
    16. "iconid_disabled": "0",
    17. "iconid_maintenance": "0",
    18. "elementsubtype": "0",
    19. "areatype": "0",
    20. "width": "200",
    21. "height": "200",
    22. "viewtype": "0",
    23. "use_iconmap": "1",
    24. "application": "",
    25. "urls": [],
    26. "elements": []
    27. },
    28. {
    29. "selementid": "11",
    30. "sysmapid": "3",
    31. "elementtype": "4",
    32. "iconid_off": "1",
    33. "iconid_on": "0",
    34. "label": "Web server",
    35. "label_location": "3",
    36. "x": "211",
    37. "y": "191",
    38. "iconid_disabled": "0",
    39. "iconid_maintenance": "0",
    40. "elementsubtype": "0",
    41. "areatype": "0",
    42. "width": "200",
    43. "height": "200",
    44. "viewtype": "0",
    45. "application": "",
    46. "urls": [],
    47. "elements": []
    48. },
    49. {
    50. "selementid": "12",
    51. "sysmapid": "3",
    52. "iconid_off": "185",
    53. "iconid_on": "0",
    54. "label": "{HOST.NAME}\r\n{HOST.CONN}",
    55. "label_location": "0",
    56. "x": "111",
    57. "y": "61",
    58. "iconid_disabled": "0",
    59. "iconid_maintenance": "0",
    60. "elementsubtype": "0",
    61. "areatype": "0",
    62. "width": "200",
    63. "height": "200",
    64. "viewtype": "0",
    65. "use_iconmap": "0",
    66. "application": "",
    67. "urls": [],
    68. "elements": [
    69. {
    70. "hostid": "10084"
    71. }
    72. ]
    73. }
    74. ],
    75. "links": [
    76. {
    77. "linkid": "23",
    78. "sysmapid": "3",
    79. "selementid1": "10",
    80. "selementid2": "11",
    81. "drawtype": "0",
    82. "color": "00CC00",
    83. "label": "",
    84. "linktriggers": []
    85. }
    86. ],
    87. "users": [
    88. {
    89. "sysmapuserid": "1",
    90. "userid": "2",
    91. "permission": "2"
    92. }
    93. ],
    94. "userGroups": [
    95. {
    96. "sysmapusrgrpid": "1",
    97. "usrgrpid": "7",
    98. "permission": "2"
    99. }
    100. ],
    101. "shapes":[
    102. {
    103. "sysmap_shapeid":"1",
    104. "type":"0",
    105. "x":"0",
    106. "width":"680",
    107. "height":"15",
    108. "text":"{MAP.NAME}",
    109. "font":"9",
    110. "font_size":"11",
    111. "font_color":"000000",
    112. "text_valign":"0",
    113. "border_type":"0",
    114. "border_width":"0",
    115. "border_color":"000000",
    116. "background_color":"",
    117. "zindex":"0"
    118. }
    119. ],
    120. "lines":[
    121. {
    122. "sysmap_shapeid":"2",
    123. "x1": 30,
    124. "y1": 10,
    125. "x2": 100,
    126. "y2": 50,
    127. "line_type": 1,
    128. "line_width": 10,
    129. "line_color": "009900",
    130. "zindex":"1"
    131. }
    132. ],
    133. "sysmapid": "3",
    134. "name": "Local nerwork",
    135. "width": "400",
    136. "height": "400",
    137. "backgroundid": "0",
    138. "label_type": "2",
    139. "label_location": "3",
    140. "highlight": "1",
    141. "expandproblem": "1",
    142. "markelements": "0",
    143. "show_unack": "0",
    144. "grid_size": "50",
    145. "grid_show": "1",
    146. "grid_align": "1",
    147. "label_format": "0",
    148. "label_type_host": "2",
    149. "label_type_hostgroup": "2",
    150. "label_type_trigger": "2",
    151. "label_type_map": "2",
    152. "label_type_image": "2",
    153. "label_string_host": "",
    154. "label_string_hostgroup": "",
    155. "label_string_trigger": "",
    156. "label_string_map": "",
    157. "label_string_image": "",
    158. "iconmapid": "0",
    159. "expand_macros": "0",
    160. "severity_min": "0",
    161. "userid": "1",
    162. "private": "1"
    163. }
    164. ],
    165. "id": 1
    166. }

    Source