Web API for Projects: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
(Created blank page)
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Projects API is used to create projects, delete projects and edit project properties.


Note that the [[Web API for Workspace Elements|Workspace Elements API]] supports also projects.
==Methods==
The projects API has the following methods.
<pre>
GET api/projects GET
</pre>
Gets a list of all projects in the system (if no parameter is provided). Supports optional query parameter ''projectId'' which is project id where to get projects from.
<pre>
GET api/projects/{id}
</pre>
Gets a project entity by the project id. If project doesn't exist, not found error is returned. If current user has no access to the project, unauthorized error is returned.
<pre>
POST api/projects
Body:
{
  "identifier": "New project name"
}
</pre>
Creates a new empty project. Takes the project entity in the body (read-only properties are ignored). Returns the created project entity. If current user has no rights to create project, unauthorized error is returned.
<pre>
PUT api/projects/{id}
Body:
{
  "identifier": "Project name"
}
</pre>
Updates properties of an existing project with the given id. If project doesn't exist, not found error is returned. If current user has no rights to modify the project, unauthorized error is returned.
<pre>
DELETE api/projects/{id}
</pre>
Deletes a project with given id. If the project doesn't exist, not found error is returned. If current user has no rights to delete the project, unauthorized error is returned.
[[Category: QPR ProcessAnalyzer]]

Latest revision as of 09:02, 29 April 2022

Projects API is used to create projects, delete projects and edit project properties.

Note that the Workspace Elements API supports also projects.

Methods

The projects API has the following methods.

GET api/projects GET

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

GET api/projects/{id}

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

POST api/projects
Body:
{
  "identifier": "New project name"
}

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

PUT api/projects/{id}
Body:
{
  "identifier": "Project name"
}

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

DELETE api/projects/{id}

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