Web API for Dashboards: Difference between revisions
| (One intermediate revision by the same user not shown) | |||
| Line 12: | Line 12: | ||
Gets a list of dashboard objects accessible to the current user matching the specified ''identifierPath''. | Gets a list of dashboard objects accessible to the current user matching the specified ''identifierPath''. | ||
The ''includeProjectPath'' query parameter is optional and defaults to ''true''. When it is ''true'', the | The ''includeProjectPath'' query parameter is optional and defaults to ''true''. When it is ''true'', returns also the project path where the dashboard is located. | ||
The ''projectId'' query parameter is optional. If it is specified and ''identifierPath'' is a relative path, only dashboards belonging to that project are returned. | The ''projectId'' query parameter is optional. If it is specified and ''identifierPath'' is a relative path, only dashboards belonging to that project are returned. | ||
| Line 38: | Line 38: | ||
Modifies an existing dashboard in the database. The request body is a Dashboard object. The method does not return content. | Modifies an existing dashboard in the database. The request body is a Dashboard object. The method does not return content. | ||
When a dashboard is saved, the relevant | When a dashboard is saved, the relevant dashboard is the first item in the dashboard object's ''Views'' property. For an existing element, the saved properties include ''Name'', ''Description'', and ''Identifier''. | ||
Latest revision as of 21:03, 8 June 2026
Dashboards API provides functions for accessing dashboard objects: finding dashboards by identifier path, getting a dashboard by id, creating dashboards, and modifying existing dashboards.
Note that the Workspace Elements API also operates on dashboards as UiElements of type View. Dashboard deletion is handled through the Workspace Elements API.
Methods
The dashboards API has the following methods.
Get dashboard by identifier
GET api/dashboards?identifierPath={identifierPath}&includeProjectPath={includeProjectPath}&projectId={projectId}
Gets a list of dashboard objects accessible to the current user matching the specified identifierPath.
The includeProjectPath query parameter is optional and defaults to true. When it is true, returns also the project path where the dashboard is located.
The projectId query parameter is optional. If it is specified and identifierPath is a relative path, only dashboards belonging to that project are returned.
Get dashboard by ID
GET api/dashboards/{dashboardId}
Gets a dashboard object by ID. The dashboardId is the database IDof the dashboard.
The returned Dashboard object's Views property contains only dashboards identified by dashboardId.
Get dashboards in project
POST api/dashboards/?projectId={projectId}
Creates a new dashboard in the database. The request body is a Dashboard object. The projectId query parameter specifies the project into which the dashboard is created.
Returns a dashboard creation result object, not the created Dashboard object. The result contains the saved dashboard's Id andName.
Modify dashboard
PUT api/dashboards/{dashboardId}
Modifies an existing dashboard in the database. The request body is a Dashboard object. The method does not return content.
When a dashboard is saved, the relevant dashboard is the first item in the dashboard object's Views property. For an existing element, the saved properties include Name, Description, and Identifier.