The method allows to retrieve maps according to the given parameters.
Parameters
(object)
Parameters defining the desired output.
The method supports the following parameters.
Returns either:
the count of retrieved objects, if the
countOutput
parameter has been used.
Examples
Retrieve a map
Retrieve all data about map “3”.
Request:
Response:
- {
- "jsonrpc": "2.0",
- "result": [
- {
- "selements": [
- {
- "selementid": "10",
- "sysmapid": "3",
- "elementid": "0",
- "elementtype": "4",
- "iconid_off": "1",
- "iconid_on": "0",
- "label": "Zabbix server",
- "label_location": "3",
- "x": "11",
- "y": "141",
- "iconid_disabled": "0",
- "iconid_maintenance": "0",
- "elementsubtype": "0",
- "areatype": "0",
- "width": "200",
- "height": "200",
- "viewtype": "0",
- "use_iconmap": "1",
- "application": "",
- "urls": []
- },
- {
- "selementid": "11",
- "sysmapid": "3",
- "elementid": "0",
- "elementtype": "4",
- "iconid_on": "0",
- "label": "Web server",
- "label_location": "3",
- "x": "211",
- "y": "191",
- "iconid_disabled": "0",
- "iconid_maintenance": "0",
- "elementsubtype": "0",
- "areatype": "0",
- "width": "200",
- "height": "200",
- "viewtype": "0",
- "use_iconmap": "1",
- "application": "",
- "urls": []
- }
- ],
- "links": [
- {
- "linkid": "23",
- "sysmapid": "3",
- "selementid1": "10",
- "selementid2": "11",
- "drawtype": "0",
- "color": "00CC00",
- "label": "",
- "linktriggers": []
- }
- ],
- "users": [
- {
- "sysmapuserid": "1",
- "userid": "2",
- "permission": "2"
- }
- ],
- "userGroups": [
- {
- "sysmapusrgrpid": "1",
- "usrgrpid": "7",
- "permission": "2"
- ],
- "sysmapid": "3",
- "name": "Local nerwork",
- "width": "400",
- "height": "400",
- "backgroundid": "0",
- "label_type": "2",
- "label_location": "3",
- "highlight": "1",
- "expandproblem": "1",
- "markelements": "0",
- "show_unack": "0",
- "grid_size": "50",
- "grid_show": "1",
- "grid_align": "1",
- "label_format": "0",
- "label_type_host": "2",
- "label_type_hostgroup": "2",
- "label_type_trigger": "2",
- "label_type_map": "2",
- "label_type_image": "2",
- "label_string_host": "",
- "label_string_hostgroup": "",
- "label_string_trigger": "",
- "label_string_map": "",
- "label_string_image": "",
- "iconmapid": "0",
- "expand_macros": "0",
- "severity_min": "0",
- "userid": "1",
- "private": "1"
- }
- ],
- "id": 1
- }
Source
CMap::get() in frontends/php/include/classes/api/services/CMap.php.