integer/array iconmap.get(object parameters)
此方法允许根据给定参数来获取图标映射。
此方法仅允许超级管理员类型的用户使用。调用此方法的权限可以在用户角色设置里撤销。更多信息请参见用户角色。
(object)
定义所需输出的参数。
该方法支持以下参数。
参数 | 类型 | 描述 |
---|---|---|
iconmapids | ID/数组 | 仅返回具有给定ID的图标映射。 |
sysmapids | ID/数组 | 仅返回在给定地图中使用的图标映射。 |
selectMappings | 查询 | 返回一个mappings 属性,包含所使用的图标映射。 |
sortfield | 字符串/数组 | 根据给定属性对结果进行排序。 可能的值: iconmapid ,name 。 |
countOutput | 布尔值 | 这些参数在参考说明中描述。 |
editable | 布尔值 | |
excludeSearch | 布尔值 | |
filter | 对象 | |
limit | 整数 | |
output | 查询 | |
preservekeys | 布尔值 | |
search | 对象 | |
searchByAny | 布尔值 | |
searchWildcardsEnabled | 布尔值 | |
sortorder | 字符串/数组 | |
startSearch | 布尔值 |
(integer/array)
返回任一:
countOutput
参数,则检索对象的计数。检索所有关于图标映射 "3"的数据。
请求:
{
"jsonrpc": "2.0",
"method": "iconmap.get",
"params": {
"iconmapids": "3",
"output": "extend",
"selectMappings": "extend"
},
"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.