このページで
iconmap.get
説明
integer/array iconmap.get(object parameters)
このメソッドは、指定された パラメータに従ってアイコンマップを取得できます。
このメソッドは、すべてのタイプのユーザーが利用できます。メソッドを呼び出す権限は、ユーザーロールの設定で取り消すことができます。詳細は、ユーザーロール を参照してください。
パラメータ
(object) 必要な出力を定義するパラメータ。
このメソッドは以下のパラメータをサポートしています。
| パラメータ | Type | 説明 |
|---|---|---|
| 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": "ホストタイプのアイコン",
"default_iconid": "2"
}
],
"id": 1
}
関連項目
ソース
CIconMap::get() in ui/include/classes/api/services/CIconMap.php.