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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#40228] added proposal for openapi spec
Eric Schubertf5892274ad3a
diff --git a/docs/api/apiv3/components/schemas/aggregations.yml b/docs/api/apiv3/components/schemas/aggregations.ymldeleted file mode 100644index 6c01dfdbddb..00000000000--- a/docs/api/apiv3/components/schemas/aggregations.yml+++ /dev/null@@ -1,2 +0,0 @@-# Schema: Aggregations---- {}diff --git a/docs/api/apiv3/components/schemas/attachments.yml b/docs/api/apiv3/components/schemas/attachments.ymldeleted file mode 100644index 43def99250e..00000000000--- a/docs/api/apiv3/components/schemas/attachments.yml+++ /dev/null@@ -1,2 +0,0 @@-# Schema: Attachments---- {}diff --git a/docs/api/apiv3/components/schemas/watchers_model.yml b/docs/api/apiv3/components/schemas/watchers_model.ymlindex 0438905e772..661da92616d 100644--- a/docs/api/apiv3/components/schemas/watchers_model.yml+++ b/docs/api/apiv3/components/schemas/watchers_model.yml@@ -24,7 +24,7 @@ example:method: POSTdelete:href: "/api/v3/users/1"- title: Delete j.sheppard+ title: Delete j.sheppard#method: DELETEid: 1login: j.shepparddiff --git a/docs/api/apiv3/components/schemas/work_package_file_link_model.yml b/docs/api/apiv3/components/schemas/work_package_file_link_model.ymlnew file mode 100644index 00000000000..82dc5816dee--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_package_file_link_model.yml@@ -0,0 +1,155 @@+# Schema: Work_Package_File_Link_Model+---+type: object+required:+ - id+ - _type+ - storageType+ - storageId+ - originData+properties:+ id:+ type: integer+ description: File link id+ readOnly: true+ _type:+ type: string+ enum:+ - FileLink+ storageType:+ type: string+ readOnly: true+ storageId:+ type: integer+ readOnly: true+ createdAt:+ type: string+ format: date-time+ description: Time of creation+ readOnly: true+ updatedAt:+ type: string+ format: date-time+ description: Time of the most recent change to the file link+ readOnly: true+ originData:+ type: object+ properties:+ id:+ type: string+ description: Linked file's id on the origin+ name:+ type: string+ description: Linked file's name on the origin+ mimeType:+ type: string+ description: MIME type of the linked file+ createdAt:+ type: string+ format: date-time+ description: Timestamp of the creation datetime of the file on the origin+ lastModifiedAt:+ type: string+ format: date-time+ description: Timestamp of the datetime of the last modification of the file on the origin+ createdByName:+ type: string+ description: Display name of the author that created the file on the origin+ lastModifiedByName:+ type: string+ description: Display name of the author that modified the file on the origin last+ _links:+ type: object+ required:+ - self+ - container+ - delete+ - downloadLocation+ - staticDownloadLocation+ - originOpen+ properties:+ self:+ allOf:+ - $ref: './link.yml'+ - description: |-+ This file link++ **Resource**: FileLink+ readOnly: true+ container:+ allOf:+ - $ref: './link.yml'+ - description: |-+ The container the origin file is linked to.++ Can be one of the following **Resources**:++ - WorkPackage+ readOnly: true+ delete:+ allOf:+ - $ref: './link.yml'+ - description: |-+ The uri to delete the file link++ **Resource**: N/A+ readOnly: true+ downloadLocation:+ allOf:+ - $ref: './link.yml'+ - description: |-+ The uri to download the origin file from++ **Resource**: N/A+ readOnly: true+ staticDownloadLocation:+ allOf:+ - $ref: './link.yml'+ - description: |-+ A static uri to fetch the download uri++ **Resource**: N/A+ readOnly: true+ originOpen:+ allOf:+ - $ref: './link.yml'+ - description: |-+ The uri to open the origin file on the origin itself++ **Resource**: N/A+ readOnly: true+example:+ id: 1337+ _type: FileLink+ storageType: nextcloud+ storageId: 2+ createdAt: '2021-12-20T13:37:00.211Z'+ updatedAt: '2021-12-20T13:37:00.211Z'+ originData:+ id: 5503+ name: logo.png+ mimeType: image/png+ createdAt: '2021-12-19T09:42:10.170Z'+ lastModifiedAt: '2021-12-20T14:00:13.987Z'+ createdByName: Luke Skywalker+ lastModifiedByName: Anakin Skywalker+ _links:+ self:+ href: /api/v3/work_package/17/file_links/1337+ title: file link+ container:+ href: /api/v3/work_package/17+ title: work package+ delete:+ href: /api/v3/work_package/17/file_links/1337+ title: file link delete API+ downloadLocation:+ href: https://nextcloud.deathstar.rocks/index.php/dl?fileid=5503+ title: file download+ staticDownloadLocation:+ href: /api/v3/work_package/17/file_links/1337/download+ title: file link static download API+ originOpen:+ href: https://nextcloud.deathstar.rocks/index.php/f?fileid=5503+ title: file open+diff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.ymlindex ec5e4ae424f..e1bf45f6bc7 100644--- a/docs/api/apiv3/openapi-spec.yml+++ b/docs/api/apiv3/openapi-spec.yml@@ -392,6 +392,12 @@ paths:"$ref": "./paths/work_package_available_relation_candidates.yml""/api/v3/work_packages/{id}/available_watchers":"$ref": "./paths/work_package_available_watchers.yml"+ "/api/v3/work_packages/{id}/file_links":+ "$ref": "./paths/work_package_file_links.yml"+ "/api/v3/work_packages/{id}/file_links/{file_link_id}":+ "$ref": "./paths/work_package_file_link.yml"+ "/api/v3/work_packages/{id}/file_links/{file_link_id}/download":+ "$ref": "./paths/work_package_file_link_download.yml""/api/v3/work_packages/{id}/form":"$ref": "./paths/work_package_form.yml""/api/v3/work_packages/{id}/revisions":@@ -423,12 +429,8 @@ components:schemas:ActivityModel:"$ref": "./components/schemas/activity_model.yml"- Aggregations:- "$ref": "./components/schemas/aggregations.yml"AttachmentModel:"$ref": "./components/schemas/attachment_model.yml"- Attachments:- "$ref": "./components/schemas/attachments.yml"Attachments_by_post:"$ref": "./components/schemas/attachments_by_post.yml"Attachments_by_postModel:@@ -745,6 +747,8 @@ components:"$ref": "./components/schemas/work_package_create_form_for_project.yml"Work_Package_Edit_Form:"$ref": "./components/schemas/work_package_edit_form.yml"+ Work_Package_File_LinkModel:+ "$ref": "./components/schemas/work_package_file_link_model.yml"Work_Package_Relation_FormModel:"$ref": "./components/schemas/work_package_relation_form_model.yml"Work_Package_Schema:diff --git a/docs/api/apiv3/paths/work_package.yml b/docs/api/apiv3/paths/work_package.ymlindex 87ae94ca520..b8b02c702f4 100644--- a/docs/api/apiv3/paths/work_package.yml+++ b/docs/api/apiv3/paths/work_package.yml@@ -2,13 +2,13 @@---delete:parameters:- - description: Work package id- example: '1'- in: path- name: id- required: true- schema:- type: integer+ - description: Work package id+ example: 1+ in: path+ name: id+ required: true+ schema:+ type: integerresponses:'204':description: |-@@ -16,41 +16,37 @@ delete:Note that the response body is empty as of now. In future versions of the API a body*might* be returned along with an appropriate HTTP status.- headers: {}+ headers: { }'403':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission- message: You are not allowed to delete this work package.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to delete this work package.description: |-Returned if the client does not have sufficient permissions.**Required permission:** delete work package- headers: {}+ headers: { }'404':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:NotFound- message: The specified work package does not exist.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified work package does not exist.description: |-Returned if the work package does not exist or the client does not have sufficient permissions to see it.**Required permission:** view work package- headers: {}+ headers: { }tags:- - Work Packages+ - Work Packagesdescription: |-Deletes the work package, as well as:@@ -61,425 +57,409 @@ delete:summary: Delete Work Packageget:parameters:- - description: Work package id- example: '1'- in: path- name: id- required: true- schema:- type: integer+ - description: Work package id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integerresponses:'200':content:application/hal+json:- examples:- response:- value:- _links:- addAttachment:- href: "/api/v3/work_packages/1528/attachments"- method: post- addComment:- href: "/api/v3/work_packages/1528/activities"- method: post- title: Add comment- addRelation:- href: "/api/v3/relations"- method: post- title: Add relation- addWatcher:- href: "/api/v3/work_packages/1528/watchers"- method: post- payload:- user:- href: "/api/v3/users/{user_id}"- templated: true- ancestors:- - href: "/api/v3/work_packages/1290"- title: Root node of hierarchy- - href: "/api/v3/work_packages/1291"- title: Intermediate node of hierarchy- - href: "/api/v3/work_packages/1298"- title: nisi eligendi officiis eos delectus quis voluptas dolores- assignee:- href: "/api/v3/users/11"- title: Emmie Okuneva - Adele5450- attachments:- href: "/api/v3/work_packages/1528/attachments"- author:+ example:+ _links:+ addAttachment:+ href: "/api/v3/work_packages/1528/attachments"+ method: post+ addComment:+ href: "/api/v3/work_packages/1528/activities"+ method: post+ title: Add comment+ addRelation:+ href: "/api/v3/relations"+ method: post+ title: Add relation+ addWatcher:+ href: "/api/v3/work_packages/1528/watchers"+ method: post+ payload:+ user:+ href: "/api/v3/users/{user_id}"+ templated: true+ ancestors:+ - href: "/api/v3/work_packages/1290"+ title: Root node of hierarchy+ - href: "/api/v3/work_packages/1291"+ title: Intermediate node of hierarchy+ - href: "/api/v3/work_packages/1298"+ title: nisi eligendi officiis eos delectus quis voluptas dolores+ assignee:+ href: "/api/v3/users/11"+ title: Emmie Okuneva - Adele5450+ attachments:+ href: "/api/v3/work_packages/1528/attachments"+ author:+ href: "/api/v3/users/1"+ title: OpenProject Admin - admin+ availableWatchers:+ href: "/api/v3/work_packages/1528/available_watchers"+ category:+ href: "/api/v3/categories/1298"+ title: eligend isi+ changeParent:+ href: "/api/v3/work_packages/694"+ method: patch+ title: Change parent of Bug in OpenProject+ children:+ - href: "/api/v3/work_packages/1529"+ title: Write API documentation+ customActions:+ - href: "/api/v3/work_packages/1528/custom_actions/153/execute"+ method: post+ title: Reset+ - href: "/api/v3/work_packages/1528/custom_actions/94/execute"+ method: post+ title: Forward to accounting+ customField3:+ href: api/v3/users/14+ delete:+ href: "/work_packages/bulk?ids=1528"+ method: delete+ title: Delete Develop API+ logTime:+ href: "/work_packages/1528/time_entries/new"+ title: Log time on Develop API+ type: text/html+ move:+ href: "/work_packages/1528/move/new"+ title: Move Develop API+ type: text/html+ parent:+ href: "/api/v3/work_packages/1298"+ title: nisi eligendi officiis eos delectus quis voluptas dolores+ priority:+ href: "/api/v3/priorities/2"+ title: Normal+ project:+ href: "/api/v3/projects/1"+ title: A Test Project+ relations:+ href: "/api/v3/work_packages/1528/relations"+ title: Show relations+ removeWatcher:+ href: "/api/v3/work_packages/1528/watchers/{user_id}"+ method: delete+ templated: true+ responsible:+ href: "/api/v3/users/23"+ title: Laron Leuschke - Alaina5788+ revisions:+ href: "/api/v3/work_packages/1528/revisions"+ schema:+ href: "/api/v3/work_packages/schemas/11-2"+ self:+ href: "/api/v3/work_packages/1528"+ title: Develop API+ status:+ href: "/api/v3/statuses/1"+ title: New+ timeEntries:+ href: "/work_packages/1528/time_entries"+ title: Time entries+ type: text/html+ type:+ href: "/api/v3/types/1"+ title: A Type+ update:+ href: "/api/v3/work_packages/1528"+ method: patch+ title: Update Develop API+ version:+ href: "/api/v3/versions/1"+ title: Version 1+ watch:+ href: "/api/v3/work_packages/1528/watchers"+ method: post+ payload:+ user:href: "/api/v3/users/1"- title: OpenProject Admin - admin- availableWatchers:- href: "/api/v3/work_packages/1528/available_watchers"- category:- href: "/api/v3/categories/1298"- title: eligend isi- changeParent:- href: "/api/v3/work_packages/694"- method: patch- title: Change parent of Bug in OpenProject- children:- - href: "/api/v3/work_packages/1529"- title: Write API documentation- customActions:- - href: "/api/v3/work_packages/1528/custom_actions/153/execute"- method: post- title: Reset- - href: "/api/v3/work_packages/1528/custom_actions/94/execute"- method: post- title: Forward to accounting- customField3:- href: api/v3/users/14- delete:- href: "/work_packages/bulk?ids=1528"- method: delete- title: Delete Develop API- logTime:- href: "/work_packages/1528/time_entries/new"- title: Log time on Develop API- type: text/html- move:- href: "/work_packages/1528/move/new"- title: Move Develop API- type: text/html- parent:- href: "/api/v3/work_packages/1298"- title: nisi eligendi officiis eos delectus quis voluptas dolores- priority:- href: "/api/v3/priorities/2"- title: Normal- project:- href: "/api/v3/projects/1"- title: A Test Project- relations:- href: "/api/v3/work_packages/1528/relations"- title: Show relations- removeWatcher:- href: "/api/v3/work_packages/1528/watchers/{user_id}"- method: delete- templated: true- responsible:- href: "/api/v3/users/23"- title: Laron Leuschke - Alaina5788- revisions:- href: "/api/v3/work_packages/1528/revisions"- schema:- href: "/api/v3/work_packages/schemas/11-2"- self:- href: "/api/v3/work_packages/1528"- title: Develop API- status:- href: "/api/v3/statuses/1"- title: New- timeEntries:- href: "/work_packages/1528/time_entries"- title: Time entries- type: text/html- type:- href: "/api/v3/types/1"- title: A Type- update:- href: "/api/v3/work_packages/1528"- method: patch- title: Update Develop API- version:- href: "/api/v3/versions/1"- title: Version 1- watch:- href: "/api/v3/work_packages/1528/watchers"- method: post- payload:- user:- href: "/api/v3/users/1"- watchers:- href: "/api/v3/work_packages/1528/watchers"- _type: WorkPackage- createdAt: '2014-08-29T12:40:53Z'- customField1: Foo- customField2: 42- derivedDueDate:- derivedEstimatedTime: PT10H- derivedStartDate:- description:- format: markdown- html: "<p>Develop super cool OpenProject API.</p>"- raw: Develop super cool OpenProject API.- dueDate:- estimatedTime: PT2H- id: 1528- percentageDone: 0- scheduleManually: false- startDate:- subject: Develop API- updatedAt: '2014-08-29T12:44:41Z'+ watchers:+ href: "/api/v3/work_packages/1528/watchers"+ _type: WorkPackage+ createdAt: '2014-08-29T12:40:53Z'+ customField1: Foo+ customField2: 42+ derivedDueDate:+ derivedEstimatedTime: PT10H+ derivedStartDate:+ description:+ format: markdown+ html: "<p>Develop super cool OpenProject API.</p>"+ raw: Develop super cool OpenProject API.+ dueDate:+ estimatedTime: PT2H+ id: 1528+ percentageDone: 0+ scheduleManually: false+ startDate:+ subject: Develop API+ updatedAt: '2014-08-29T12:44:41Z'schema:"$ref": "../components/schemas/work_package_model.yml"description: OK- headers: {}+ headers: { }'404':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:NotFound- message: The specified work package does not exist.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified work package does not exist.description: |-Returned if the work package does not exist or the client does not have sufficient permissions to see it.**Required permission:** view work package- headers: {}+ headers: { }tags:- - Work Packages+ - Work Packagesdescription: ''operationId: View_Work_Packagesummary: View Work Packagepatch:parameters:- - description: Work package id- example: '1'- in: path- name: id- required: true- schema:- type: integer- - description: |-- 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.- example: 'false'- in: query- name: notify- required: false- schema:- default: 'true'- type: boolean+ - description: Work package id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ - description: |-+ 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.+ example: 'false'+ in: query+ name: notify+ required: false+ schema:+ default: 'true'+ type: booleanresponses:'200':content:application/hal+json:- examples:- response:- value:- _links:- addAttachment:- href: "/api/v3/work_packages/1528/attachments"- method: post- addComment:- href: "/api/v3/work_packages/1528/activities"- method: post- title: Add comment- addRelation:- href: "/api/v3/relations"- method: post- title: Add relation- addWatcher:- href: "/api/v3/work_packages/1528/watchers"- method: post- payload:- user:- href: "/api/v3/users/{user_id}"- templated: true- ancestors:- - href: "/api/v3/work_packages/1290"- title: Root node of hierarchy- - href: "/api/v3/work_packages/1291"- title: Intermediate node of hierarchy- - href: "/api/v3/work_packages/1298"- title: nisi eligendi officiis eos delectus quis voluptas dolores- assignee:- href: "/api/v3/users/11"- title: Emmie Okuneva - Adele5450- attachments:- href: "/api/v3/work_packages/1528/attachments"- author:+ example:+ _links:+ addAttachment:+ href: "/api/v3/work_packages/1528/attachments"+ method: post+ addComment:+ href: "/api/v3/work_packages/1528/activities"+ method: post+ title: Add comment+ addRelation:+ href: "/api/v3/relations"+ method: post+ title: Add relation+ addWatcher:+ href: "/api/v3/work_packages/1528/watchers"+ method: post+ payload:+ user:+ href: "/api/v3/users/{user_id}"+ templated: true+ ancestors:+ - href: "/api/v3/work_packages/1290"+ title: Root node of hierarchy+ - href: "/api/v3/work_packages/1291"+ title: Intermediate node of hierarchy+ - href: "/api/v3/work_packages/1298"+ title: nisi eligendi officiis eos delectus quis voluptas dolores+ assignee:+ href: "/api/v3/users/11"+ title: Emmie Okuneva - Adele5450+ attachments:+ href: "/api/v3/work_packages/1528/attachments"+ author:+ href: "/api/v3/users/1"+ title: OpenProject Admin - admin+ availableWatchers:+ href: "/api/v3/work_packages/1528/available_watchers"+ category:+ href: "/api/v3/categories/1298"+ title: eligend isi+ changeParent:+ href: "/api/v3/work_packages/694"+ method: patch+ title: Change parent of Bug in OpenProject+ children:+ - href: "/api/v3/work_packages/1529"+ title: Write API documentation+ customActions:+ - href: "/api/v3/work_packages/1528/custom_actions/153/execute"+ method: post+ title: Reset+ - href: "/api/v3/work_packages/1528/custom_actions/94/execute"+ method: post+ title: Forward to accounting+ customField3:+ href: api/v3/users/14+ delete:+ href: "/work_packages/bulk?ids=1528"+ method: delete+ title: Delete Develop API+ logTime:+ href: "/work_packages/1528/time_entries/new"+ title: Log time on Develop API+ type: text/html+ move:+ href: "/work_packages/1528/move/new"+ title: Move Develop API+ type: text/html+ parent:+ href: "/api/v3/work_packages/1298"+ title: nisi eligendi officiis eos delectus quis voluptas dolores+ priority:+ href: "/api/v3/priorities/2"+ title: Normal+ project:+ href: "/api/v3/projects/1"+ title: A Test Project+ relations:+ href: "/api/v3/work_packages/1528/relations"+ title: Show relations+ removeWatcher:+ href: "/api/v3/work_packages/1528/watchers/{user_id}"+ method: delete+ templated: true+ responsible:+ href: "/api/v3/users/23"+ title: Laron Leuschke - Alaina5788+ revisions:+ href: "/api/v3/work_packages/1528/revisions"+ schema:+ href: "/api/v3/work_packages/schemas/11-2"+ self:+ href: "/api/v3/work_packages/1528"+ title: Develop API+ status:+ href: "/api/v3/statuses/1"+ title: New+ timeEntries:+ href: "/work_packages/1528/time_entries"+ title: Time entries+ type: text/html+ type:+ href: "/api/v3/types/1"+ title: A Type+ update:+ href: "/api/v3/work_packages/1528"+ method: patch+ title: Update Develop API+ version:+ href: "/api/v3/versions/1"+ title: Version 1+ watch:+ href: "/api/v3/work_packages/1528/watchers"+ method: post+ payload:+ user:href: "/api/v3/users/1"- title: OpenProject Admin - admin- availableWatchers:- href: "/api/v3/work_packages/1528/available_watchers"- category:- href: "/api/v3/categories/1298"- title: eligend isi- changeParent:- href: "/api/v3/work_packages/694"- method: patch- title: Change parent of Bug in OpenProject- children:- - href: "/api/v3/work_packages/1529"- title: Write API documentation- customActions:- - href: "/api/v3/work_packages/1528/custom_actions/153/execute"- method: post- title: Reset- - href: "/api/v3/work_packages/1528/custom_actions/94/execute"- method: post- title: Forward to accounting- customField3:- href: api/v3/users/14- delete:- href: "/work_packages/bulk?ids=1528"- method: delete- title: Delete Develop API- logTime:- href: "/work_packages/1528/time_entries/new"- title: Log time on Develop API- type: text/html- move:- href: "/work_packages/1528/move/new"- title: Move Develop API- type: text/html- parent:- href: "/api/v3/work_packages/1298"- title: nisi eligendi officiis eos delectus quis voluptas dolores- priority:- href: "/api/v3/priorities/2"- title: Normal- project:- href: "/api/v3/projects/1"- title: A Test Project- relations:- href: "/api/v3/work_packages/1528/relations"- title: Show relations- removeWatcher:- href: "/api/v3/work_packages/1528/watchers/{user_id}"- method: delete- templated: true- responsible:- href: "/api/v3/users/23"- title: Laron Leuschke - Alaina5788- revisions:- href: "/api/v3/work_packages/1528/revisions"- schema:- href: "/api/v3/work_packages/schemas/11-2"- self:- href: "/api/v3/work_packages/1528"- title: Develop API- status:- href: "/api/v3/statuses/1"- title: New- timeEntries:- href: "/work_packages/1528/time_entries"- title: Time entries- type: text/html- type:- href: "/api/v3/types/1"- title: A Type- update:- href: "/api/v3/work_packages/1528"- method: patch- title: Update Develop API- version:- href: "/api/v3/versions/1"- title: Version 1- watch:- href: "/api/v3/work_packages/1528/watchers"- method: post- payload:- user:- href: "/api/v3/users/1"- watchers:- href: "/api/v3/work_packages/1528/watchers"- _type: WorkPackage- createdAt: '2014-08-29T12:40:53Z'- customField1: Foo- customField2: 42- derivedDueDate:- derivedEstimatedTime: PT10H- derivedStartDate:- description:- format: markdown- html: "<p>Develop super cool OpenProject API.</p>"- raw: Develop super cool OpenProject API.- dueDate:- estimatedTime: PT2H- id: 1528- percentageDone: 0- scheduleManually: false- startDate:- subject: Develop API- updatedAt: '2014-08-29T12:44:41Z'+ watchers:+ href: "/api/v3/work_packages/1528/watchers"+ _type: WorkPackage+ createdAt: '2014-08-29T12:40:53Z'+ customField1: Foo+ customField2: 42+ derivedDueDate:+ derivedEstimatedTime: PT10H+ derivedStartDate:+ description:+ format: markdown+ html: "<p>Develop super cool OpenProject API.</p>"+ raw: Develop super cool OpenProject API.+ dueDate:+ estimatedTime: PT2H+ id: 1528+ percentageDone: 0+ scheduleManually: false+ startDate:+ subject: Develop API+ updatedAt: '2014-08-29T12:44:41Z'schema:"$ref": "../components/schemas/work_package_model.yml"description: OK- headers: {}+ headers: { }'400':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody- message: The request body was not a single JSON object.+ example:+ _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 therequest body.- headers: {}+ headers: { }'403':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission- message: You are not allowed to edit the content of the work package.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to edit the content of the work package.description: |-Returned if the client does not have sufficient permissions.**Required permission:** edit work package, assign version, manage subtasks or move work package- headers: {}+ headers: { }'404':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:NotFound- message: The specified work package does not exist.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified work package does not exist.description: |-Returned if the work package does not exist or the client does not have sufficient permissions to see it.**Required permission:** view work package- headers: {}+ headers: { }'409':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:UpdateConflict- message: Your changes could not be saved, because the work package- was changed since you've seen it the last time.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:UpdateConflict+ message: Your changes could not be saved, because the work package+ was changed since you've seen it the last time.description: Returned if the resource was changed since the client requestedit. This is determined using the `lockVersion` property.- headers: {}+ headers: { }'422':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _embedded:- details:- attribute: Subject- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation- message: The subject might not be blank.+ example:+ _embedded:+ details:+ attribute: Subject+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: The subject might not be blank.description: |-Returned if:@@ -488,9 +468,9 @@ patch:* a constraint for a property was violated (`PropertyConstraintViolation`)* the client provides a link to an invalid resource (`ResourceTypeMismatch`)- headers: {}+ headers: { }tags:- - Work Packages+ - Work Packagesdescription: |-When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body.Note that it is only allowed to provide properties or links supporting the **write** operation.diff --git a/docs/api/apiv3/paths/work_package_file_link.yml b/docs/api/apiv3/paths/work_package_file_link.ymlnew file mode 100644index 00000000000..fe522107b31--- /dev/null+++ b/docs/api/apiv3/paths/work_package_file_link.yml@@ -0,0 +1,121 @@+# /api/v3/work_packages/{id}/file_links/{file_link_id}+---+get:+ summary: Gets a file link.+ operationId: Work_Package_Get_File_Link+ tags:+ - Work Packages+ - File links+ description: |-+ Gets a single file link resource of a work package.+ parameters:+ - name: id+ description: Work package id+ in: path+ required: true+ schema:+ type: integer+ example: 1337+ - name: file_link_id+ description: File link id+ in: path+ required: true+ schema:+ type: integer+ example: 42+ responses:+ '200':+ description: OK+ content:+ application/hal+json:+ schema:+ $ref: '#/components/schemas/Work_Package_File_LinkModel'+ headers: { }+ '403':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to delete file links of this work package.+ # TODO: specify permissions, will there be even any except from viewing the wp?+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit work package++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ '404':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the work package does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work package++delete:+ summary: Removes a file link.+ operationId: Work_Package_Delete_File_Link+ tags:+ - Work Packages+ - File links+ description: |-+ Removes a file link on a work package.++ The request contains only the file link identifier as a path parameter. No request body is needed.+ parameters:+ - name: id+ description: Work package id+ in: path+ required: true+ schema:+ type: integer+ example: 1337+ - name: file_link_id+ description: File link id+ in: path+ required: true+ schema:+ type: integer+ example: 42+ responses:+ '200':+ description: OK+ headers: { }+ '403':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to delete file links of this work package.+ # TODO: specify permissions, will there be even any except from viewing the wp?+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit work package++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ '404':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the work package does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work packagediff --git a/docs/api/apiv3/paths/work_package_file_link_download.yml b/docs/api/apiv3/paths/work_package_file_link_download.ymlnew file mode 100644index 00000000000..1f8dcc87b64--- /dev/null+++ b/docs/api/apiv3/paths/work_package_file_link_download.yml@@ -0,0 +1,63 @@+# /api/v3/work_packages/{id}/file_links/{file_link_id}/download+---+post:+ summary: Creates a download uri of the linked file.+ operationId: Work_Package_File_Link_Download+ tags:+ - Work Packages+ - File links+ description: |-+ Creates a download uri of the origin file linked by the given file link. This uri depends on the storage type and+ always is located on the origin storage itself.+ parameters:+ - name: id+ description: Work package id+ in: path+ required: true+ schema:+ type: integer+ example: 1337+ - name: file_link_id+ description: File link id+ in: path+ required: true+ schema:+ type: integer+ example: 42+ responses:+ '200':+ description: OK+ content:+ application/hal+json:+ schema:+ $ref: '#/components/schemas/Link'+ headers: { }+ '403':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to delete file links of this work package.+ # TODO: specify permissions, will there be even any except from viewing the wp?+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit work package++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ '404':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the work package does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work package\ No newline at end of filediff --git a/docs/api/apiv3/paths/work_package_file_links.yml b/docs/api/apiv3/paths/work_package_file_links.ymlnew file mode 100644index 00000000000..9225feb9432--- /dev/null+++ b/docs/api/apiv3/paths/work_package_file_links.yml@@ -0,0 +1,244 @@+# /api/v3/work_packages/{id}/file_links+---+post:+ summary: Creates file links.+ operationId: Work_Package_Create_File_Links+ tags:+ - Work Packages+ - File links+ description: |-+ Creates file links on a work package.++ The request body must contain the generated storage token, and not the storage id. In addition, the request must+ send the origin file id and the stored meta data.++ If there is already a link on the given work package with the same file id, the previous data is not overwritten.+ parameters:+ - name: id+ description: Work package id+ in: path+ required: true+ schema:+ type: integer+ example: 1337+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - storage+ - files+ properties:+ storage:+ type: string+ description: the storage token+ files:+ type: array+ items:+ type: object+ required:+ - id+ - name+ - mimeType+ - createdAt+ - lastModifiedAt+ - createdByName+ - lastModifiedByName+ properties:+ id:+ type: string+ name:+ type: string+ mimeType:+ type: string+ createdAt:+ type: string+ format: date-time+ lastModifiedAt:+ type: string+ format: date-time+ createdByName:+ type: string+ lastModifiedByName:+ type: string+ example:+ storage: e24fac19b889cc23b6f+ files:+ - id: 5503+ name: logo.png+ mimeType: image/png+ createdAt: '2022-01-18T12:01:37.302Z'+ lastModifiedAt: '2022-01-18T12:07:17.017Z'+ createdByName: Leia Organa+ lastModifiedByName: Anakin Skywalker+ - id: 5504+ name: README.md+ mimeType: text/plain+ createdAt: '2022-01-18T12:02:12.117Z'+ lastModifiedAt: '2022-01-18T12:02:12.117Z'+ createdByName: Bale Organa+ lastModifiedByName: Anakin Skywalker+ responses:+ '201':+ description: Created+ content:+ application/hal+json:+ schema:+ type: object+ required:+ - _type+ - count+ - total+ - _embedded+ properties:+ _type:+ type: string+ enum:+ - Collection+ count:+ type: integer+ minimum: 0+ total:+ type: integer+ minimum: 0+ _embedded:+ type: object+ required:+ - elements+ properties:+ elements:+ type: array+ items:+ $ref: '#/components/schemas/Work_Package_File_LinkModel'+ '400':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody+ message: The request body was invalid.+ description: Occurs when the client did not send a valid JSON object in the request body.+ '403':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to create file links of this work package.+ # TODO: specify permissions, will there be even any except from viewing the wp?+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit work package++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ '404':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the work package does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work package+get:+ summary: Gets all file links of a work package+ operationId: Work_Package_Get_File_Links+ tags:+ - Work Packages+ - File links+ description: |-+ Gets all file links of a work package.++ The request can be filtered for the storage types and ids.+ parameters:+ - name: id+ description: Work package id+ in: path+ required: true+ schema:+ type: integer+ example: 1337+ - name: filters+ in: query+ required: false+ schema:+ type: string+ description: |-+ JSON specifying filter conditions.++ Accepts the same format as returned by the [queries](https://www.openproject.org/docs/api/endpoints/queries/) endpoint. Currently supported filters are:++ - storage_id: the identifier of a storage the file links refer to+ - storage_type: the type of a storage of file links+ example: '[{ "storage_type": { "operator": "=", "values": ["nextcloud"] } }]'+ responses:+ '200':+ description: OK+ content:+ application/hal+json:+ schema:+ type: object+ required:+ - _type+ - count+ - total+ - _embedded+ properties:+ _type:+ type: string+ enum:+ - Collection+ count:+ type: integer+ minimum: 0+ total:+ type: integer+ minimum: 0+ _embedded:+ type: object+ required:+ - elements+ properties:+ elements:+ type: array+ items:+ $ref: '#/components/schemas/Work_Package_File_LinkModel'+ '403':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to create file links of this work package.+ # TODO: specify permissions, will there be even any except from viewing the wp?+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit work package++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ '404':+ content:+ application/hal+json:+ schema:+ $ref: "#/components/schemas/ErrorResponse"+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the work package does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work packagediff --git a/docs/api/apiv3/paths/work_package_watchers.yml b/docs/api/apiv3/paths/work_package_watchers.ymlindex 5320b5da6b9..311897d6312 100644--- a/docs/api/apiv3/paths/work_package_watchers.yml+++ b/docs/api/apiv3/paths/work_package_watchers.yml@@ -2,147 +2,139 @@---get:parameters:- - description: Work package id- example: '1'- in: path- name: id- required: true- schema:- type: integer+ - description: Work package id+ example: 1+ in: path+ name: id+ required: true+ schema:+ type: integerresponses:'200':content:application/hal+json:- examples:- response:- value:- _embedded:- elements:- - _links:- delete:- href: "/api/v3/users/1"- method: DELETE- title: Delete j.sheppard- lock:- href: "/api/v3/users/1/lock"- method: POST- title: Set lock on j.sheppard- self:- href: "/api/v3/users/1"- title: John Sheppard - j.sheppard- showUser:- href: "/users/1"- type: text/html- _type: User- avatar: https://example.org/users/1/avatar- createdAt: '2014-05-21T08:51:20Z'- firstName: John- id: 1- lastName: Sheppard- login: j.sheppard- mail: [email protected]- status: active- updatedAt: '2014-05-21T08:51:20Z'- - _links:- delete:- href: "/api/v3/users/2"- method: DELETE- title: Delete j.sheppard2- lock:- href: "/api/v3/users/2/lock"- method: POST- title: Set lock on j.sheppard2- self:- href: "/api/v3/users/2"- title: Jim Sheppard - j.sheppard2- _type: User- avatar: https://example.org/users/1/avatar- createdAt: '2014-05-21T08:51:20Z'- firstName: Jim- id: 2- lastName: Sheppard- login: j.sheppard2- mail: [email protected]- status: active- updatedAt: '2014-05-21T08:51:20Z'- _links:- self:- href: "/api/v3/work_packages/14/watchers"- _type: Collection- count: 2- total: 2+ example:+ _embedded:+ elements:+ - _links:+ delete:+ href: "/api/v3/users/1"+ method: DELETE+ title: Delete j.sheppard+ lock:+ href: "/api/v3/users/1/lock"+ method: POST+ title: Set lock on j.sheppard+ self:+ href: "/api/v3/users/1"+ title: John Sheppard - j.sheppard+ showUser:+ href: "/users/1"+ type: text/html+ _type: User+ avatar: https://example.org/users/1/avatar+ createdAt: '2014-05-21T08:51:20Z'+ firstName: John+ id: 1+ lastName: Sheppard+ login: j.sheppard+ mail: [email protected]+ status: active+ updatedAt: '2014-05-21T08:51:20Z'+ - _links:+ delete:+ href: "/api/v3/users/2"+ method: DELETE+ title: Delete j.sheppard2+ lock:+ href: "/api/v3/users/2/lock"+ method: POST+ title: Set lock on j.sheppard2+ self:+ href: "/api/v3/users/2"+ title: Jim Sheppard - j.sheppard2+ _type: User+ avatar: https://example.org/users/1/avatar+ createdAt: '2014-05-21T08:51:20Z'+ firstName: Jim+ id: 2+ lastName: Sheppard+ login: j.sheppard2+ mail: [email protected]+ status: active+ updatedAt: '2014-05-21T08:51:20Z'+ _links:+ self:+ href: "/api/v3/work_packages/14/watchers"+ _type: Collection+ count: 2+ total: 2schema:"$ref": "../components/schemas/watchers_model.yml"description: OK- headers: {}+ headers: { }'403':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission- message: You are not allowed to see the watchers of this work package.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to see the watchers of this work package.description: |-Returned if the client does not have sufficient permissions.**Required permission:** view work package watchers*Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*- headers: {}+ headers: { }'404':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:NotFound- message: The specified work package does not exist.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified work package does not exist.description: |-Returned if the work package does not exist or the client does not have sufficient permissions to see it.**Required permission:** view work package*Note that you will effectively not be able to see the watchers of a work package without being able to see the work package.*- headers: {}+ headers: { }tags:- - Work Packages+ - Work Packagesdescription: ''operationId: List_watcherssummary: List watcherspost:parameters:- - description: Work package id- example: '1'- in: path- name: id- required: true- schema:- type: integer+ - description: Work package id+ example: 1+ in: path+ name: id+ required: true+ schema:+ type: integerresponses:'200':description: OK- headers: {}+ headers: { }'201':description: Created- headers: {}+ headers: { }'400':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody- message: The request body was not a single JSON object.+ example:+ _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.@@ -153,18 +145,16 @@ post:* The JSON object did not contain the key `user`* The value of `users` was not a link object- headers: {}+ headers: { }'403':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission- message: You are not allowed to add watchers to this work package.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to add watchers to this work package.description: |-Returned if the client does not have sufficient permissions.@@ -175,25 +165,23 @@ post:* add work package watchers (for other users)*Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*- headers: {}+ headers: { }'404':content:application/hal+json:schema:$ref: "../components/schemas/error_response.yml"- examples:- response:- value:- _type: Error- errorIdentifier: urn:openproject-org:api:v3:errors:NotFound- message: The specified work package does not exist.+ example:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified work package does not exist.description: |-Returned if the work package does not exist or the client does not have sufficient permissions to see it.**Required permission:** view work package*Note that you will effectively not be able to change the watchers of a work package without being able to see the work package.*- headers: {}+ headers: { }'422':description: |-Returned if:@@ -203,9 +191,9 @@ post:* the user specified is not allowed to watch that work package (`PropertyConstraintViolation`)* the user specified does not exist (`PropertyConstraintViolation`)- headers: {}+ headers: { }tags:- - Work Packages+ - Work Packagesdescription: |-Adds a watcher to the specified work package.diff --git a/docs/api/apiv3/tags/file_links.yml b/docs/api/apiv3/tags/file_links.ymlnew file mode 100644index 00000000000..ab09cb94f70--- /dev/null+++ b/docs/api/apiv3/tags/file_links.yml@@ -0,0 +1,4 @@+---+description: |-+ TBD+name: File links