integer/array iconmap.get(object parameters)
The method allows to retrieve icon maps according to the given parameters.
This method is available to users of any type. Permissions to call the method can be revoked in user role settings. See User roles for more information.
(object)
Parameters defining the desired output.
The method supports the following parameters.
Parameter | Type | Description |
---|---|---|
iconmapids | string/array | Return only icon maps with the given IDs. |
sysmapids | string/array | Return only icon maps that are used in the given maps. |
selectMappings | query | Return a mappings property with the icon mappings used. |
sortfield | string/array | Sort the result by the given properties. Possible values: iconmapid , name . |
countOutput | boolean | These parameters being common for all get methods are described in detail in the reference commentary. |
editable | boolean | |
excludeSearch | boolean | |
filter | object | |
limit | integer | |
output | query | |
preservekeys | boolean | |
search | object | |
searchByAny | boolean | |
searchWildcardsEnabled | boolean | |
sortorder | string/array | |
startSearch | boolean |
(integer/array)
Returns either:
countOutput
parameter has been used.Retrieve all data about icon map "3".
{
"jsonrpc": "2.0",
"method": "iconmap.get",
"params": {
"iconmapids": "3",
"output": "extend",
"selectMappings": "extend"
},
"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 ui/include/classes/api/services/CIconMap.php.