Available since version: 1.8
This function allows you to retrieve Map details based on filtering options. All parameters are optional. If parameter is set in query this option counted as ON, except if parameter is equal to NULL.
Parameter | Type | Description | Details |
---|---|---|---|
nodeids | array | Node IDs | |
sysmapids | array | Map IDs | |
editable | integer | only with read-write permission. Ignored for SuperAdmins | |
filter | array | Optional filter by map fields | |
search | array | Return maps by any given object field pattern | |
startSearch | integer | Search maps field pattern only in start of the field | |
excludeSearch | integer | Exclude from result, maps by given field pattern | |
searchWildcardsEnabled | integer | Search pattern in whole field using wildcards | 1 - enable, 0 - disable |
output | string | Output options | Values: shorten, refer, extend |
select_selements | string | Select map items | Values: shorten, refer, extend |
select_links | string | Select map item links | Values: shorten, refer, extend |
countOutput | integer | Count maps, return the number of maps found | |
preservekeys | integer | Return hash instead of array | Keys of hash are object IDs |
sortfield | string | Sort by Map field | Values: name |
sortorder | string | Sort order | Values: ASC, DESC |
limit | integer | max number of map objects to return |
Parameter | Description |
---|---|
result | Operation successful. Result will contain array of Map objects. |
error | In case of any errors |
Get maps details by Map name "zabbix", with map elements and links:
{
"jsonrpc":"2.0",
"method":"Map.get",
"params":{
"filter": {"name": ["zabbix"]},
"select_selements": "extend",
"select_links": "extend",
"output": "extend"
},
"auth":"6f38cddc44cfbb6c1bd186f9a220b5a0",
"id":2
}
Retrieved Map details:
{
"jsonrpc":"2.0",
"result":[{
"sysmapid":"100100000000031",
"name":"Link Map",
"width":"800",
"height":"600",
"backgroundid":"0",
"label_type":"2",
"label_location":"0",
"highlight":1,
"expandproblem":1,
"markelements":0,
"show_unack":0,
"selements":[{
"selementid":"100100000000414",
"sysmapid":"100100000000031",
"elementid":"100100000037426",
"elementtype":"2",
"iconid_off":"100100000000001",
"iconid_on":"0",
"iconid_unknown":"0",
"label":"New Element",
"label_location":"0",
"x":"242",
"y":"267",
"url":"",
"iconid_disabled":"0",
"iconid_maintenance":"0"
},{
"selementid":"100100000000415",
"sysmapid":"100100000000031",
"elementid":"0",
"elementtype":"4",
"iconid_off":"100100000000001",
"iconid_on":"0",
"iconid_unknown":"0",
"label":"New Element",
"label_location":"0",
"x":"455",
"y":"279",
"url":"",
"iconid_disabled":"0",
"iconid_maintenance":"0"
},{
"selementid":"100100000000416",
"sysmapid":"100100000000031",
"elementid":"0",
"elementtype":"4",
"iconid_off":"100100000000001",
"iconid_on":"0",
"iconid_unknown":"0",
"label":"New Element",
"label_location":"0",
"x":"454",
"y":"111",
"url":"",
"iconid_disabled":"0",
"iconid_maintenance":"0"
},{
"selementid":"100100000000417",
"sysmapid":"100100000000031",
"elementid":"100100000037426",
"elementtype":"2",
"iconid_off":"100100000000001",
"iconid_on":"0",
"iconid_unknown":"0",
"label":"New Element",
"label_location":"-1",
"x":"222",
"y":"68",
"url":"",
"iconid_disabled":"0",
"iconid_maintenance":"0"
},{
"selementid":"100100000000418",
"sysmapid":"100100000000031",
"elementid":"0",
"elementtype":"4",
"iconid_off":"100100000000001",
"iconid_on":"0",
"iconid_unknown":"0",
"label":"New Element",
"label_location":"0",
"x":"103",
"y":"150",
"url":"",
"iconid_disabled":"0",
"iconid_maintenance":"0"
},{
"selementid":"100100000000422",
"sysmapid":"100100000000031",
"elementid":"100100000000006",
"elementtype":"1",
"iconid_off":"100100000000005",
"iconid_on":"100100000000013",
"iconid_unknown":"0",
"label":"{HOSTNAME}",
"label_location":"2",
"x":"570",
"y":"197",
"url":"",
"iconid_disabled":"0",
"iconid_maintenance":"0"
}],
"links":[{
"linkid":"100100000000232",
"sysmapid":"100100000000031",
"selementid1":"100100000000414",
"selementid2":"100100000000415",
"drawtype":"0",
"color":"0000CC",
"label":"",
"linktriggers":[{
"linktriggerid":"100100000000326",
"linkid":"100100000000232",
"triggerid":"100100000037426",
"drawtype":"0",
"color":"0"
}]
},{
"linkid":"100100000000233",
"sysmapid":"100100000000031",
"selementid1":"100100000000414",
"selementid2":"100100000000415",
"drawtype":"0",
"color":"0000CC",
"label":"",
"linktriggers":[]
},{
"linkid":"100100000000234",
"sysmapid":"100100000000031",
"selementid1":"100100000000416",
"selementid2":"100100000000417",
"drawtype":"0",
"color":"0000CC",
"label":"\u0414\u042b\u0424\u041e\u0414 \u041b\u042b\u041e\u0424\u0414\u041b \u042b\u041e\u0424",
"linktriggers":[]
},{
"linkid":"100100000000235",
"sysmapid":"100100000000031",
"selementid1":"100100000000416",
"selementid2":"100100000000417",
"drawtype":"0",
"color":"0000CC",
"label":"",
"linktriggers":[{
"linktriggerid":"100100000000327",
"linkid":"100100000000235",
"triggerid":"100100000037426",
"drawtype":"0",
"color":"0"
}]
},{
"linkid":"100100000000236",
"sysmapid":"100100000000031",
"selementid1":"100100000000414",
"selementid2":"100100000000415",
"drawtype":"0",
"color":"0000CC",
"label":"",
"linktriggers":[]
},{
"linkid":"100100000000237",
"sysmapid":"100100000000031",
"selementid1":"100100000000414",
"selementid2":"100100000000415",
"drawtype":"0",
"color":"0000CC",
"label":"",
"linktriggers":[]
},{
"linkid":"100100000000238",
"sysmapid":"100100000000031",
"selementid1":"100100000000414",
"selementid2":"100100000000415",
"drawtype":"0",
"color":"0000CC",
"label":"",
"linktriggers":[]
},{
"linkid":"100100000000239",
"sysmapid":"100100000000031",
"selementid1":"100100000000414",
"selementid2":"100100000000415",
"drawtype":"0",
"color":"0000CC",
"label":"",
"linktriggers":[]
},{
"linkid":"100100000000311",
"sysmapid":"100100000000031",
"selementid1":"100100000000422",
"selementid2":"100100000000415",
"drawtype":"3",
"color":"00AA00",
"label":"",
"linktriggers":[{
"linktriggerid":"100100000000323",
"linkid":"100100000000311",
"triggerid":"100100000012794",
"drawtype":"4",
"color":"DD0000"
},{
"linktriggerid":"100100000000324",
"linkid":"100100000000311",
"triggerid":"100100000012795",
"drawtype":"4",
"color":"DD0000"
},{
"linktriggerid":"100100000000325",
"linkid":"100100000000311",
"triggerid":"100100000012796",
"drawtype":"4",
"color":"DD0000"
}]
}]
}] ,
"id":2
}