Web API for Dashboards: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:


Note that the [[Web API for Workspace Elements|Workspace Elements API]] supports also dashboards.
Note that the [[Web API for Workspace Elements|Workspace Elements API]] supports also dashboards.


==Methods==
==Methods==

Revision as of 16:52, 27 September 2021

Dashboards API is used to create dashboards, delete dashboards and edit dashboards properties.

Note that the Workspace Elements API supports also dashboards.

Methods

The dashboards API has the following methods.

GET api/dashboards GET

Gets a list of all dashboards in the system (if no parameter is provided). Supports optional query parameter projectId which is project id where to get dashboards from.

GET api/dashboards/{id}

Gets a model entity by the model id. If model doesn't exist, not found error is returned. If current user has no access to the model, unauthorized error is returned.

POST api/dashboards

Creates a new empty model. Takes the model entity in the body (read-only properties are ignored). Returns the created model entity. If current user has no rights to create model, unauthorized error is returned.

PUT api/dashboards/{id}

Updates properties of an existing model with the given id. Supports optional query parameter moveLinkedDatatables (boolean, true by default), which indicates whether to move linked data tables to the new project if model itself is moved. The method takes the model entity in the body (model id in the entity should match the model id given in url). If model doesn't exist, not found error is returned. If current user has no rights to modify the model, unauthorized error is returned.

DELETE api/dashboards/{id}

Deletes a model with given id. Supports optional query parameter deletePermanently (boolean, false by default), which indicates whether to delete the model permanently. If the model doesn't exist, not found error is returned. If current user has no rights to delete the model, unauthorized error is returned.

GET api/dashboards/export/{id}

Exports the model with given id as PACM format. Returns the model content as a stream in the PACM format. If model doesn't exist, not found error is returned. If current user has no access to the model, unauthorized error is returned.