integer/array iconmap.get(object parameters)
The method allows to retrieve icon maps according to the given parameters.此方法允许根据指定的参数获取图标拓扑图。
(object) Parameters defining the desired output.定义期望输出值的参数。
The method supports the following parameters.该方法支持以下参数。
| 参数 类 | 描述 | |
|---|---|---|
| iconmapids | string/array | Return only icon maps with the given IDs. 仅返回指定ID的图标拓扑图。 |
| sysmapids | string/array | Return only icon maps that are used in the given maps. 仅返回在指定拓扑图中使用的图标拓扑图。 |
| selectMappings | query | Return used icon mappings in the mappings property. 返回在mappings属性中使用的图标映射。 |
| sortfield | string/array | Sort the result by the given properties. 以指定的属性将结果排序。 Possible values are: iconmapid and name. 可能的值为:iconmapid和name。 |
| countOutput | flag | These parameters being common for all get methods are described in detail in the reference commentary. 在reference commentary中详细描述了所有“get”方法的共同参数. |
| editable | boolean | |
| excludeSearch | flag | |
| filter | object | |
| limit | integer | |
| output | query | |
| preservekeys | flag | |
| search | object | |
| searchByAny | boolean | |
| searchWildcardsEnabled | boolean | |
| sortorder | string/array | |
| startSearch | flag | |
(integer/array) Returns either:返回其中任一:
countOutput parameter has been used.如果已经使用了“countOutput”参数,则检索对象的计数.Retrieve all data about icon map "3".获取所有关于ID为3的图标拓扑图数据。
Request:
{ "jsonrpc": "2.0", "method": "iconmap.get", "params": { "iconmapids": "3", "output": "extend", "selectMappings": "extend" }, "auth": "038e1d7b1735c6a5436ee9eae095879e", "id": 1 }Response:
{ "jsonrpc": "2.0", "result": [ { "mappings": [ { "iconmappingid": "3", "iconmapid": "3", "iconid": "6", "inventory_link": "1", "expression": "server", "sortorder": "0" }, { "iconmappingid": "4", "iconmapid": "3", "iconid": "10", "inventory_link": "1", "expression": "switch", "sortorder": "1" } ], "iconmapid": "3", "name": "Host type icons", "default_iconid": "2" } ], "id": 1 }CIconMap::get() in frontends/php/include/classes/api/services/CIconMap.php.