object dashboard.update(object/array dashboards)
This method allows to update existing dashboards.
(object/array)
Dashboard properties to be updated.
The dashboardid
property must be defined for each dashboard, all other properties are optional. Only the passed properties will be updated, all others will remain unchanged.
Additionally to the standard dashboard properties, the method accepts the following parameters.
Parameter | Type | Description |
---|---|---|
widgets | array | Dashboard widgets to replace existing dashboard widgets. Dashboard widgets are updated by widgetid property. Widgets without widgetid property will be created. |
users | array | Dashboard user shares to replace the existing elements. |
userGroups | array | Dashboard user group shares to replace the existing elements. |
(object)
Returns an object containing the IDs of the updated dashboards under the dashboardids
property.
Rename a dashboard to "SQL server status".
Request:
{
"jsonrpc": "2.0",
"method": "dashboard.update",
"params": {
"dashboardid": "2",
"name": "SQL server status"
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
Available only for admins and super admins.
Request:
{
"jsonrpc": "2.0",
"method": "dashboard.update",
"params": {
"dashboardid": "2",
"userid": "1"
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 2
}
Response:
CDashboard::update() in frontends/php/include/classes/api/services/CDashboard.php.