Web API for Dashboards: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 14: Line 14:
GET api/dashboards/{id}
GET api/dashboards/{id}
</pre>
</pre>
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.
Gets a dashboard entity by the dashboard id. If dashboard doesn't exist, not found error is returned. If current user has no access to the dashboard, unauthorized error is returned.


<pre>
<pre>
POST api/dashboards
POST api/dashboards
</pre>
</pre>
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.
Creates a new empty dashboard. Takes the dashboard entity in the body (read-only properties are ignored). Returns the created dashboard entity. If current user has no rights to create dashboard, unauthorized error is returned.


<pre>
<pre>
PUT api/dashboards/{id}
PUT api/dashboards/{id}
</pre>
</pre>
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.
Updates properties of an existing dashboard with the given id. If dashboard doesn't exist, not found error is returned. If current user has no rights to modify the dashboard, unauthorized error is returned.


<pre>
<pre>
DELETE api/dashboards/{id}
DELETE api/dashboards/{id}
</pre>
</pre>
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.
Deletes a dashboard with given id. If the dashboard doesn't exist, not found error is returned. If current user has no rights to delete the dashboard, unauthorized error is returned.


<pre>
<pre>
GET api/dashboards/export/{id}
GET api/dashboards/export/{id}
</pre>
</pre>
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.
Exports the dashboard with given id as json format. Returns the dashboard content as a stream in the PACM format. If dashboard doesn't exist, not found error is returned. If current user has no access to the dashboard, unauthorized error is returned.


[[Category: QPR ProcessAnalyzer]]
[[Category: QPR ProcessAnalyzer]]

Latest revision as of 16:54, 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 dashboard entity by the dashboard id. If dashboard doesn't exist, not found error is returned. If current user has no access to the dashboard, unauthorized error is returned.

POST api/dashboards

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

PUT api/dashboards/{id}

Updates properties of an existing dashboard with the given id. If dashboard doesn't exist, not found error is returned. If current user has no rights to modify the dashboard, unauthorized error is returned.

DELETE api/dashboards/{id}

Deletes a dashboard with given id. If the dashboard doesn't exist, not found error is returned. If current user has no rights to delete the dashboard, unauthorized error is returned.

GET api/dashboards/export/{id}

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