OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/docs/api/apiv3/paths/work_package_relations.yml

110 lines
3.4 KiB

# /api/v3/work_packages/{id}/relations
---
get:
parameters:
- description: Work package id
example: '1'
in: path
name: id
required: true
schema:
type: integer
responses:
'302':
content:
text/plain:
examples:
response:
value: 'You are being redirected to /api/v3/relations?involved={work_package_id}'
description: Found
headers:
Location:
schema:
type: string
tags:
- Work Packages
description: Lists all relations this work package is involved in.
operationId: List_relations
summary: List relations
post:
parameters:
- description: Work package id
example: '1'
in: path
name: id
required: true
schema:
type: integer
responses:
'201':
description: Created
headers: {}
'400':
content:
application/hal+json:
examples:
response:
value:
_type: Error
errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody
message: The request body was not a single JSON object.
description: Occurs when the client did not send a valid JSON object in the
request body.
headers: {}
'403':
content:
application/hal+json:
examples:
response:
value:
_type: Error
errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission
message: You are not allowed to create a relation.
description: |-
Returned if the client does not have sufficient permissions.
**Required permission:** manage work package relations
headers: {}
'409':
content:
application/hal+json:
examples:
response:
value:
_type: Error
errorIdentifier: urn:openproject-org:api:v3:errors:UpdateConflict
message: Couldn't update the resource because of conflicting modifications.
description: |-
Returned if there already exists a relation between the given work packages of **any** type
or if the relation is not allowed.
headers: {}
'422':
content:
application/hal+json:
examples:
response:
value:
_embedded:
details:
attribute: delay
_type: Error
errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation
message: Delay must be a number greater than or equal to 0
description: |-
Returned if:
* the client tries to write a read-only property (`PropertyIsReadOnly`)
* a constraint for a property was violated (`PropertyConstraintViolation`)
* the client provides a link to an invalid resource (`ResourceTypeMismatch`)
headers: {}
tags:
- Work Packages
description: |-
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 Relation 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.
operationId: Create_Relation
summary: Create Relation