Web API for Projects: Difference between revisions
Line 29: | Line 29: | ||
Body: | Body: | ||
{ | { | ||
"identifier": "Project name" | |||
"identifier | |||
} | } | ||
</pre> | </pre> |
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.