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/components/schemas/relation_model.yml

136 lines
3.1 KiB

# Schema: RelationModel
---
type: object
properties:
id:
type: integer
description: Relation ID
readOnly: true
minimum: 0
exclusiveMinimum: true
name:
type: string
description: The internationalized name of this kind of relation
type:
type: string
description: Which kind of relation (blocks, precedes, etc.)
reverseType:
type: string
description: The kind of relation from the other WP's perspective
readOnly: true
description:
type: string
description: Short text further describing the relation
delay*:
type: integer
description: The delay in days between closing of `from` and start of `to`
minimum: 0
_links:
type: object
required:
- self
- schema
- from
- to
properties:
update:
allOf:
- "$ref": "./link.yml"
- description: |-
Updates the relation between two work packages via a form
# Conditions
**Permission**: manage work package relations
readOnly: true
updateImmediately:
allOf:
- "$ref": "./link.yml"
- description: |-
Updates the relation between two work packages
# Conditions
**Permission**: manage work package relations
readOnly: true
delete:
allOf:
- "$ref": "./link.yml"
- description: |-
Destroys the relation between the two work packages
# Conditions
**Permission**: manage work package relations
readOnly: true
self:
allOf:
- "$ref": "./link.yml"
- description: |-
This relation
**Resource**: Relation
# Conditions
**Permission**: view work packages
readOnly: true
schema:
allOf:
- "$ref": "./link.yml"
- description: |-
The schema of this relation
**Resource**: Schema
readOnly: true
from:
allOf:
- "$ref": "./link.yml"
- description: |-
The emanating work package
**Resource**: WorkPackage
# Conditions
**Permission**: view work packages
readOnly: true
to:
allOf:
- "$ref": "./link.yml"
- description: |-
The work package the relation ends in
**Resource**: WorkPackage
# Conditions
**Permission**: view work packages
readOnly: true
example:
_links:
self:
href: "/api/v3/relations/1"
update:
href: "/api/v3/relations/1/form"
method: POST
updateImmediately:
href: "/api/v3/relations/1"
method: PATCH
delete:
href: "/api/v3/relations/1"
method: DELETE
from:
href: "/api/v3/work_packages/42"
title: Steel Delivery
to:
href: "/api/v3/work_packages/84"
title: Bending the steel
_type: Relation
id: 1
name: precedes
type: precedes
reverseType: follows
description: We can't bend the steel before it's been delivered!
delay: 0