|
|
|
@ -1223,6 +1223,13 @@ The request body is the actual string that shall be rendered as HTML string. |
|
|
|
|
|
|
|
|
|
# Group Projects |
|
|
|
|
|
|
|
|
|
## Actions: |
|
|
|
|
|
|
|
|
|
| Link | Description | Condition | |
|
|
|
|
|:--------------------------:|----------------------------------------------------------------------| --------------------------------- | |
|
|
|
|
| createWorkPackage | Form endpoint that aids in preparing and creating a work package | **Permission**: add work packages | |
|
|
|
|
| createWorkPackageImmediate | Directly creates a work package in the project | **Permission**: add work packages | |
|
|
|
|
|
|
|
|
|
## Linked Properties: |
|
|
|
|
| Link | Description | Type | Constraints | Supported operations | |
|
|
|
|
| :------: | ------------- | ---- | ----------- | -------------------- | |
|
|
|
@ -1276,6 +1283,24 @@ The request body is the actual string that shall be rendered as HTML string. |
|
|
|
|
|
|
|
|
|
[Project][] |
|
|
|
|
|
|
|
|
|
+ Response 404 (application/hal+json) |
|
|
|
|
|
|
|
|
|
Returned if the project does not exist or the client does not have sufficient permissions |
|
|
|
|
to see it. |
|
|
|
|
|
|
|
|
|
**Required permission:** view project |
|
|
|
|
|
|
|
|
|
*Note: A client without sufficient permissions shall not be able to test for the existence of a project. |
|
|
|
|
That's why a 404 is returned here, even if a 403 might be more appropriate.* |
|
|
|
|
|
|
|
|
|
+ Body |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
"_type": "Error", |
|
|
|
|
"errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound", |
|
|
|
|
"message": "The specified project does not exist." |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
## Projects by version [/api/v3/versions/{id}/projects] |
|
|
|
|
|
|
|
|
|
+ Model |
|
|
|
@ -1349,6 +1374,106 @@ but are also limited to the projects that the current user is allowed to see. |
|
|
|
|
"message": "The specified version does not exist." |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
## WorkPackages [/api/v3/projects/{id}/work_packages{?notify}] |
|
|
|
|
|
|
|
|
|
## Create WorkPackage in project [POST] |
|
|
|
|
|
|
|
|
|
When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body. |
|
|
|
|
The required fields of a WorkPackage can be found in its schema, which is embedded in the respective form. |
|
|
|
|
Note that it is only allowed to provide properties or links supporting the write operation. |
|
|
|
|
|
|
|
|
|
+ Parameters |
|
|
|
|
+ id (required, integer, `1`) ... Project id |
|
|
|
|
|
|
|
|
|
+ notify = `true` (optional, boolean, `false`) ... Indicates whether change notifications (e.g. via E-Mail) should be sent. |
|
|
|
|
Note that this controls notifications for all users interested in changes to the work package (e.g. watchers, author and assignee), |
|
|
|
|
not just the current user. |
|
|
|
|
|
|
|
|
|
+ Response 200 (application/hal+json) |
|
|
|
|
|
|
|
|
|
[WorkPackage][] |
|
|
|
|
|
|
|
|
|
+ Response 400 (application/hal+json) |
|
|
|
|
|
|
|
|
|
Occurs when the client did not send a valid JSON object in the request body. |
|
|
|
|
|
|
|
|
|
+ Body |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
"_type": "Error", |
|
|
|
|
"errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody", |
|
|
|
|
"message": "The request body was not a single JSON object." |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
+ Response 403 (application/hal+json) |
|
|
|
|
|
|
|
|
|
Returned if the client does not have sufficient permissions. |
|
|
|
|
|
|
|
|
|
**Required permission:** add work packages |
|
|
|
|
|
|
|
|
|
*Note that you will only receive this error, if you are at least allowed to see the corresponding project.* |
|
|
|
|
|
|
|
|
|
+ Body |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
"_type": "Error", |
|
|
|
|
"errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission", |
|
|
|
|
"message": "You are not allowed to add work packages to this project." |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
+ Response 404 (application/hal+json) |
|
|
|
|
|
|
|
|
|
Returned if the project does not exist or the client does not have sufficient permissions |
|
|
|
|
to see it. |
|
|
|
|
|
|
|
|
|
**Required permissions:** view project |
|
|
|
|
|
|
|
|
|
*Note: A client without sufficient permissions shall not be able to test for the existence of a project. |
|
|
|
|
That's why a 404 is returned here, even if a 403 might be more appropriate.* |
|
|
|
|
|
|
|
|
|
+ Body |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
"_type": "Error", |
|
|
|
|
"errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound", |
|
|
|
|
"message": "The specified project does not exist." |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
+ Response 422 (application/hal+json) |
|
|
|
|
|
|
|
|
|
Returned if: |
|
|
|
|
* the client tries to write a read-only property |
|
|
|
|
* a constraint for a property was violated |
|
|
|
|
* a property was provided in an unreadable format |
|
|
|
|
|
|
|
|
|
+ Body |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
"_type": "Error", |
|
|
|
|
"errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation", |
|
|
|
|
"message": "The subject might not be blank.", |
|
|
|
|
"_embedded": { |
|
|
|
|
"details": { |
|
|
|
|
"attribute": "Subject" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
## Work Package Create Form [/api/v3/projects/{id}/work_packages/form] |
|
|
|
|
|
|
|
|
|
This endpoint returns a form to allow a guided creation of a new work package. |
|
|
|
|
|
|
|
|
|
For more details and all possible responses see the general specification of [Forms](#forms). |
|
|
|
|
|
|
|
|
|
## WorkPackage Create Form [POST] |
|
|
|
|
|
|
|
|
|
+ Parameters |
|
|
|
|
+ id (required, integer, `1`) ... ID of the project in which the work package will be created |
|
|
|
|
|
|
|
|
|
+ Response 200 (application/hal+json) |
|
|
|
|
|
|
|
|
|
[Example Form][] |
|
|
|
|
|
|
|
|
|
# Group Queries |
|
|
|
|
|
|
|
|
|
## Properties: |
|
|
|
|