integer/array iconmap.get(object parameters)
このメソッドは、指定されたパラメータに従ってアイコンマップを取得することができます。
このメソッドは、すべての種類のユーザーが利用できます。メソッドの呼び出し権限はユーザーロールの設定で取り消すことができます。詳細はユーザーロールを参照してください。
(object) 望ましい出力を定義するパラメーター。
このメソッドは以下のパラメーターをサポートします。
| パラメーター | 型 | 説明 |
|---|---|---|
| iconmapids | ID/array | 指定したIDのアイコンマップのみを返します。 |
| sysmapids | ID/array | 指定したマップで使用されているアイコンマップのみを返します。 |
| selectMappings | query | 使用されているアイコンマッピングを持つmappingsプロパティを返します。 |
| sortfield | string/array | 指定したプロパティで結果をソートします。 可能な値: iconmapid, name。 |
| countOutput | boolean | これらのパラメーターはリファレンス解説で説明されています。 |
| 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) 次のいずれかを返します:
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.