integer/array templatedashboard.get(object parameters)
このメソッドで、指定されたパラメーターに従ってテンプレート ダッシュボードを取得できます。
このメソッドはどのタイプのユーザーでも利用可能です。このメソッドを呼び出す権限は、ユーザーロール設定で取り消すことができます。詳しくはユーザーの役割を参照してください。
(object) 目的の出力を定義するパラメーター
このメソッドは、次のパラメーターをサポートしています
| パラメータ | タイプ | 説明 | 
|---|---|---|
| dashboardids | string/array | 指定された ID を持つテンプレート ダッシュボードのみを返します | 
| templateids | string/arary | 指定されたテンプレートに属するテンプレート ダッシュボードのみを返します | 
| selectPages | query | テンプレート ダッシュボード ページを正しく並べたページプロパティを返します。 | 
| sortfield | string/array | 指定されたプロパティで結果を並べ替えます。 可能な値は次のとおりです: dashboardid,name | 
| countOutput | boolean | すべての getメソッドに共通するこれらのパラメーターについてはリファレンス解説ページで詳しく説明されています。 | 
| 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パラメータが使用されている場合、取得されたオブジェクトの数指定されたテンプレートのウィジェットを含むすべてのテンプレート ダッシュボードを取得します
Request:
{
           "jsonrpc": "2.0",
           "method": "templatedashboard.get",
           "params": {
               "output": "extend",
               "selectPages": "extend",
               "templateids": "10001"
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }Response:
{
           "jsonrpc": "2.0",
           "result": [
               {
                   "dashboardid": "23",
                   "name": "Docker overview",
                   "templateid": "10001",
                   "display_period": "30",
                   "auto_start": "1",
                   "uuid": "6dfcbe0bc5ad400ea9c1c2dd7649282f",
                   "pages": [
                       {
                           "dashboard_pageid": "1",
                           "name": "",
                           "display_period": "0",
                           "widgets": [
                               {
                                   "widgetid": "220",
                                   "type": "graph",
                                   "name": "",
                                   "x": "0",
                                   "y": "0",
                                   "width": "12",
                                   "height": "5",
                                   "view_mode": "0",
                                   "fields": [
                                       {
                                           "type": "6",
                                           "name": "graphid",
                                           "value": "1125"
                                       }
                                   ]
                               },
                               {
                                   "widgetid": "221",
                                   "type": "graph",
                                   "name": "",
                                   "x": "12",
                                   "y": "0",
                                   "width": "12",
                                   "height": "5",
                                   "view_mode": "0",
                                   "fields": [
                                       {
                                           "type": "6",
                                           "name": "graphid",
                                           "value": "1129"
                                       }
                                   ]
                               },
                               {
                                   "widgetid": "222",
                                   "type": "graph",
                                   "name": "",
                                   "x": "0",
                                   "y": "5",
                                   "width": "12",
                                   "height": "5",
                                   "view_mode": "0",
                                   "fields": [
                                       {
                                           "type": "6",
                                           "name": "graphid",
                                           "value": "1128"
                                       }
                                   ]
                               },
                               {
                                   "widgetid": "223",
                                   "type": "graph",
                                   "name": "",
                                   "x": "12",
                                   "y": "5",
                                   "width": "12",
                                   "height": "5",
                                   "view_mode": "0",
                                   "fields": [
                                       {
                                           "type": "6",
                                           "name": "graphid",
                                           "value": "1126"
                                       }
                                   ]
                               },
                               {
                                   "widgetid": "224",
                                   "type": "graph",
                                   "name": "",
                                   "x": "0",
                                   "y": "10",
                                   "width": "12",
                                   "height": "5",
                                   "view_mode": "0",
                                   "fields": [
                                       {
                                           "type": "6",
                                           "name": "graphid",
                                           "value": "1127"
                                       }
                                   ]
                               }
                           ]
                       }
                   ]
               }
           ],
           "id": 1
       }CTemplateDashboard::get() in ui/include/classes/api/services/CTemplateDashboard.php.