Zabbix Documentation 2.4

3.04.04.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.44.2Guidelines

User Tools

Site Tools


manual:api:reference:iconmap:get

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
manual:api:reference:iconmap:get [2016/09/28 07:26]
manual:api:reference:iconmap:get [2019/01/28 14:49] (current)
sasha <code js> => <code java>
Line 1: Line 1:
 +===== iconmap.get =====
  
 +==== Description ====
 +
 +''​integer/​array iconmap.get(object **parameters**)''​
 +
 +The method allows to retrieve icon maps according to the given parameters.
 +
 +==== Parameters ====
 +
 +''​(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 used icon mappings in the ''​mappings''​ property. |
 +^ |||
 +| sortfield | string/​array | Sort the result by the given properties. \\ \\ Possible values are: ''​iconmapid''​ and ''​name''​. ​ |
 +| countOutput |flag|These parameters being common for all ''​get''​ methods are described in detail in the [[manual:​api:​reference_commentary#​common_get_method_parameters|reference commentary]]. ​ |
 +| editable |boolean|:::​|
 +| excludeSearch |flag|:::|
 +| filter | object |:::|
 +| limit |integer|:::​|
 +| output |query|:::|
 +| preservekeys |flag|:::|
 +| search | object |:::|
 +| searchByAny |boolean|:::​|
 +| searchWildcardsEnabled |boolean|:::​|
 +| sortorder | string/​array | ::: |
 +| startSearch |flag|:::|
 +
 +==== Return values ====
 +
 +''​(integer/​array)''​ Returns either:
 +  * an array of objects;
 +  * the count of retrieved objects, if the ''​countOutput''​ parameter has been used.
 +
 +==== Examples ====
 +
 +=== Retrieve an icon map ===
 +
 +Retrieve all data about icon map "​3"​.
 +
 +Request:
 +<code java>
 +{
 +    "​jsonrpc":​ "​2.0",​
 +    "​method":​ "​iconmap.get",​
 +    "​params":​ {
 +        "​iconmapids":​ "​3",​
 +        "​output":​ "​extend",​
 +        "​selectMappings":​ "​extend"​
 +    },
 +    "​auth":​ "​038e1d7b1735c6a5436ee9eae095879e",​
 +    "​id":​ 1
 +}
 +</​code>​
 +
 +Response:
 +<code java>
 +{
 +    "​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
 +}
 +</​code>​
 +
 +==== See also ====
 +
 +  * [[object#​icon_mapping|Icon mapping]]
 +
 +==== Source ====
 +
 +CIconMap::​get() in //​frontends/​php/​include/​classes/​api/​services/​CIconMap.php//​.