object templatedashboard.create(object/array templateDashboards)
该方法允许create新的模板仪表板.
此方法仅适用于Admin和Super admin 用户类型. 调用该方法的权限可在用户角色 设置中撤销. 更多信息请参阅User roles
(object/array)
模板仪表盘以create。
除了模板仪表盘之外,该方法还接受以下参数。
(object)
返回一个包含所创建模板仪表板ID的object,这些ID存储在dashboardids
属性下。返回的ID顺序与传入的模板仪表板顺序一致。
创建一个名为"Graphs"的模板仪表板,在单个仪表板页面上包含一个图形小部件。
请求:
{
"jsonrpc": "2.0",
"method": "templatedashboard.create",
"params": {
"templateid": "10318",
"name": "Graphs",
"pages": [
{
"widgets": [
{
"type": "graph",
"x": 0,
"y": 0,
"width": 12,
"height": 5,
"view_mode": 0,
"fields": [
{
"type": 6,
"name": "graphid",
"value": "1123"
}
]
}
]
}
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
响应:
CTemplateDashboard::create() 位于 ui/include/classes/api/services/CTemplateDashboard.php 文件中.