Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

complete the api specification for project phase resources

ulfertsf75c8687ddd3
diff --git a/docs/api/apiv3/components/schemas/project_phase_model.yml b/docs/api/apiv3/components/schemas/project_phase_model.yml
new file mode 100644
index 00000000000..dc1174d17c7
--- /dev/null
+++ b/docs/api/apiv3/components/schemas/project_phase_model.yml
@@ -0,0 +1,73 @@
+# Schema: ProjectPhaseModel
+---
+type: object
+required:
+ - _type
+ - id
+ - name
+ - active
+ - createdAt
+ - updatedAt
+properties:
+ _type:
+ type: string
+ enum:
+ - ProjectPhase
+ id:
+ type: integer
+ description: The project phase's id
+ minimum: 1
+ name:
+ type: boolean
+ createdAt:
+ type: string
+ format: date-time
+ description: Time of creation
+ updatedAt:
+ type: string
+ format: date-time
+ description: Time of the most recent change to the project phase
+ _links:
+ type: object
+ required:
+ - self
+ - definition
+ - project
+ properties:
+ self:
+ allOf:
+ - $ref: './link.yml'
+ - description: |-
+ This project phase.
+
+ **Resource**: ProjectPhase
+ definition:
+ allOf:
+ - $ref: './link.yml'
+ - description: |-
+ The definition this phase relies on.
+
+ **Resource**: ProjectPhaseDefinition
+ project:
+ allOf:
+ - $ref: './link.yml'
+ - description: |-
+ The project resource, that is the container of this phase.
+
+ **Resource**: Project
+example:
+ _type: 'ProjectPhase'
+ id: 1337
+ title: 'Initiating'
+ active: true
+ createdAt: '2023-01-20T14:30:00.368Z'
+ updatedAt: '2023-05-23T11:57:48.618Z'
+ _links:
+ self:
+ href: '/api/v3/project_phases/23'
+ definition:
+ title: 'Initiating'
+ href: '/api/v3/project_definitions/11'
+ project:
+ title: 'Death Star 3.0'
+ href: '/api/v3/projects/11'
diff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.yml
index e2380b8abb6..81390420184 100644
--- a/docs/api/apiv3/openapi-spec.yml
+++ b/docs/api/apiv3/openapi-spec.yml
@@ -294,6 +294,8 @@ paths:
"$ref": "./paths/priorities.yml"
"/api/v3/priorities/{id}":
"$ref": "./paths/priority.yml"
+ "/api/v3/project_phase":
+ "$ref": "./paths/project_phase.yml"
"/api/v3/project_storages":
"$ref": "./paths/project_storages.yml"
"/api/v3/project_storages/{id}":
@@ -775,6 +777,8 @@ components:
"$ref": "./components/schemas/project_collection_model.yml"
ProjectModel:
"$ref": "./components/schemas/project_model.yml"
+ ProjectPhaseModel:
+ "$ref": "./components/schemas/project_phase_model.yml"
ProjectStorageCollectionModel:
"$ref": "./components/schemas/project_storage_collection_model.yml"
ProjectStorageModel:
diff --git a/docs/api/apiv3/paths/project_phase.yml b/docs/api/apiv3/paths/project_phase.yml
new file mode 100644
index 00000000000..8930e3c870a
--- /dev/null
+++ b/docs/api/apiv3/paths/project_phase.yml
@@ -0,0 +1,38 @@
+# /api/v3/project_phases/{id}
+---
+get:
+ summary: Get a project phase
+ operationId: get_project_phase
+ tags:
+ - Project Phase
+ description: |-
+ Gets a project phase resource. This resource contains an instance of a ProjectPhaseDefinition within a project which can
+ then have project specific dates.
+ parameters:
+ - name: id
+ description: Project phase id
+ in: path
+ required: true
+ schema:
+ type: integer
+ example: 1337
+ responses:
+ '200':
+ description: OK
+ content:
+ application/hal+json:
+ schema:
+ $ref: '../components/schemas/project_phase_model.yml'
+ '404':
+ content:
+ application/hal+json:
+ schema:
+ $ref: '../components/schemas/error_response.yml'
+ example:
+ _type: Error
+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound
+ message: The requested resource could not be found.
+ description: |-
+ Returned if the project phase does not exist or the client does not have sufficient permissions to see it.
+
+ **Required permission:** view project phase