integer/array iconmap.get(object parameters)
此方法允许根据指定的参数获取图标拓扑图。
(object) 定义要输出的参数。
该方法支持以下参数:
| 参数 [ | 型](/zh/manual/api/reference_commentary#data_types) 描述 | |
|---|---|---|
| iconmapids | 字符串/数组 返回指定 | D的图标拓扑图。 |
| sysmapids | 字符串/数组 返回在指 | 拓扑图中使用的图标拓扑图。 |
| selectMappings | 查询 返 | 在mappings属性中使用的图标映射。 |
| sortfield | 字符串/数组 根据指定 | 属性将结果排序。 可能的值: iconmapid 和 name。 |
| countOutput | 布尔值 这些 | 数对于所有get方法都是通用的,详情可参考reference commentary。 |
| editable | 布尔值 :: | |
| excludeSearch | 布尔值 :: | |
| filter | 对象 : | : |
| limit | integer | |
| output | 查询 : | : |
| preservekeys | 布尔值 :: | |
| search | 对象 : | : |
| searchByAny | 布尔值 :: | |
| searchWildcardsEnabled | 布尔值 :: | |
| sortorder | 字符串/数组 ::: | |
| startSearch | 布尔值 :: | |
(integer/array) 返回:
countOutput参数,则返回对象数量。获取所有关于ID为3的图标拓扑图数据。
请求:
{ "jsonrpc": "2.0", "method": "iconmap.get", "params": { "iconmapids": "3", "output": "extend", "selectMappings": "extend" }, "auth": "038e1d7b1735c6a5436ee9eae095879e", "id": 1 }响应:
{ "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 ui/include/classes/api/services/CIconMap.php.