templatedashboard.update

Description

object templatedashboard.update(object/array **templateDashboards**)

This method allows to update existing template dashboards.

This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Parameters

(object/array) Template dashbaord 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 template dashboard properties, the method accepts the following parameters.

ParameterTypeDescription
widgetsobject/arrayTemplate dashboard widgets to replace existing widgets.

Widgets are updated by widgetid property. Widgets without widgetid property will be created.

Return values

(object) Returns an object containing the IDs of the updated template dashboards under the dashboardids property.

Examples

Renaming a template dashboard

Rename a template dashboard to “Performance graphs”.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "templatedashboard.update",
  4. "params": {
  5. "dashboardid": "23",
  6. "name": "Performance graphs"
  7. },
  8. "auth": "038e1d7b1735c6a5436ee9eae095879e",
  9. "id": 1
  10. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "dashboardids": [
  5. "23"
  6. ]
  7. },
  8. "id": 1
  9. }

See also

Source

CTemplateDashboard::update() in ui/include/classes/api/services/CTemplateDashboard.php.