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
openapi spec, post apib conversion
Markus Kahl968ffc2ca6cb
diff --git a/docs/api/api_documentation_layouts/README.md b/docs/api/api_documentation_layouts/README.mddeleted file mode 100644index 053f0bd820d..00000000000--- a/docs/api/api_documentation_layouts/README.md+++ /dev/null@@ -1,48 +0,0 @@-<!---- copyright-OpenProject is an open source project management software.-Copyright (C) 2012-2020 the OpenProject GmbH--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License version 3.--OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-Copyright (C) 2006-2013 Jean-Philippe Lang-Copyright (C) 2010-2013 the ChiliProject Team--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License-as published by the Free Software Foundation; either version 2-of the License, or (at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program; if not, write to the Free Software-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.--See docs/COPYRIGHT.rdoc for more details.--++-->--API Documentation Layouts----------------------------## API Version 3--_Status: under development_--The documentation for APIv3 is written in the [API Blueprint Format](http://apiblueprint.org/).--You can use [aglio](https://github.com/danielgtaylor/aglio) to generate HTML documentation.-Aglio supports the use of templates to adjust the output to your own needs. OpenProject is-using the openproject.jade template file. To generate the documentation using the-openproject.jade layout file the following command:--```bash-aglio -t openproject-layout.jade -i ../apiv3-documentation.api -o api.html--```-diff --git a/docs/api/api_documentation_layouts/openproject-includes.jade b/docs/api/api_documentation_layouts/openproject-includes.jadedeleted file mode 100644index 5e04ea8f11c..00000000000--- a/docs/api/api_documentation_layouts/openproject-includes.jade+++ /dev/null@@ -1,261 +0,0 @@-//- Common mixins that templates can share--mixin Nav(multipage, collapsible)- div.col-md-3- ul.menu(id="op-api-menu")- - var menuItem = 'menu-item';- each resourceGroup in api.resourceGroups-- - var randomGroupIndex = Math.random().toString(16).slice(2)- - var groupHasChildren = resourceGroup.resources.length ? menuItem + '-has-children' : ''- - var resourceGroupClasses = [menuItem, menuItem + '-type-post_type', menuItem + '-object-page', 'dropdown', menuItem + '-' + randomGroupIndex, groupHasChildren]-- li(class=resourceGroupClasses, id=[menuItem + '-' + randomGroupIndex])- a.menu-item-link(href="##{slug(resourceGroup.name)}")- = resourceGroup.name || 'Resource Group'- if resourceGroup.resources.length- a.dropdown-toggle.toggle-open-menu(href="##{slug(resourceGroup.name)}", data-toggle="dropdown")- i.icon.icon-arrow-down1- i.icon.icon-arrow-up1- ul.dropdown-menu- each resource in resourceGroup.resources- - var randomResourceIndex = Math.random().toString(16).slice(2)- - var resourceHasChildren = resource.length ? menuItem + '-has-children' : ''- - var resourceClasses = [menuItem, menuItem + '-type-post_type', menuItem + '-object-page', 'dropdown', menuItem + '-' + randomResourceIndex, resourceHasChildren]- li(class=resourceClasses, id=[menuItem + '-' + randomResourceIndex])- a.menu-item-link(href="##{slug(resourceGroup.name)}-#{slug(resource.name)}")- = resource.name || 'Resource'- if (resource.actions.length != 1)- a.dropdown-toggle.toggle-open-menu(href="##{slug(resourceGroup.name)}-#{slug(resource.name)}", data-toggle="dropdown")- i.icon.icon-arrow-down1- i.icon.icon-arrow-up1- ul.dropdown-menu- each action in resource.actions- - var randomActionIndex = Math.random().toString(16).slice(2)- - var resourceActionClasses = [menuItem, menuItem + '-type-post_type', menuItem + '-object-page', 'dropdown', menuItem + '-' + randomActionIndex]- li(class=resourceActionClasses, id=[menuItem + '-' + randomActionIndex])- a.menu-item-link(href="##{slug(resourceGroup.name)}-#{slug(resource.name)}-#{slug(action.method)}")- = action.name || action.method + ' ' + resource.uriTemplate- else- each meta in api.metadata- if meta.name == 'HOST'- p(style="text-align: center; word-wrap: break-word;")- a(href=meta.value)= meta.value--mixin Parameters(params)- ul.list-group- li.list-group-item.bg-default: strong Parameters- li.list-group-item- dl.dl-horizontal- each param in params- dt= param.name- dd- code= param.type- | - if param.required- span.required (required)- else- span (optional)- | - if param.default- span.text-info.default- strong Default: - span= param.default- | - if param.example- span.text-muted.example- strong Example: - span= param.example- != markdown(param.description)- if param.values.length- p- strong Choices: - each value in param.values- code= value.value- = ' '--mixin RequestResponse(title, request, resourceGroup, resource, action)- - var id = hash(resourceGroup.name.toString() + resource.name.toString() + action.name.toString() + action.method.toString() + title.toString() + request.name.toString() + request.headers.toString() + request.body.toString() + request.schema.toString())- - var content = request.description || Object.keys(request.headers).length || request.body || request.schema- li.list-group-item- strong- = title- if request.name- | - code= request.name- if content- a.pull-right.collapsed(data-toggle="collapse", data-target="##{id}")- span.closed Show- span.open Hide- if content- li.list-group-item.panel-collapse.collapse(id=id)- if request.description- .description!= markdown(request.description)-- if Object.keys(request.headers).length- h5 Headers- pre- code- each item in request.headers- != highlight(item.name + ': ' + item.value, 'http')- br- if request.body- h5 Body- pre- code!= highlight(request.body)- if request.schema- h5 Schema- pre- code!= highlight(request.schema)---mixin Examples(resourceGroup, resource, action)- ul.list-group- each example in action.examples- each request in example.requests- +RequestResponse('Request', request, resourceGroup, resource, action)- each response in example.responses- +RequestResponse('Response', response, resourceGroup, resource, action)--mixin ResourceGroup(resourceGroup, getButtonClass, multipage)- .panel.panel-default- .panel-heading- h3(id="#{slug(resourceGroup.name)}")- = resourceGroup.name || 'Resource Group'- | - a(href="##{multipage ? 'page:' : ''}#{slug(resourceGroup.name)}")- i.fa.fa-link- .panel-body- if resourceGroup.description- != markdown(resourceGroup.description)- each resource in resourceGroup.resources- h4(id="#{slug(resourceGroup.name)}-#{slug(resource.name)}")- = resource.name || 'Resources'- | - a(href="##{(multipage ? 'page:' + slug(resourceGroup.name) + ',header:' : '')}#{slug(resourceGroup.name)}-#{slug(resource.name)}")- i.fa.fa-link- if resource.description- != markdown(resource.description)- each action in resource.actions- case action.method- when 'POST': - var panelClass = 'panel-success'- when 'GET': - var panelClass = 'panel-info'- when 'PUT': - var panelClass = 'panel-warning'- when 'PATCH': - var panelClass = 'panel-warning'- when 'DELETE': - var panelClass = 'panel-danger'- default: - var panelClass = 'panel-default'- section.panel(class=panelClass, id="#{slug(resourceGroup.name)}-#{slug(resource.name)}-#{slug(action.method)}")- .panel-heading- if action.name- div(style="float:right")- span(style="text-transform: lowercase")= action.name- case action.method- when 'POST': - var btnClass = 'btn-success'- when 'GET': - var btnClass = 'btn-' + getButtonClass- when 'PUT': - var btnClass = 'btn-warning'- when 'PATCH': - var btnClass = 'btn-warning'- when 'DELETE': - var btnClass = 'btn-danger'- default: - var btnClass = 'btn-default'- div(style="float:left")- a.btn.btn-xs(class=btnClass, href="##{(multipage ? 'page:' + slug(resourceGroup.name) + ',header:' : '')}#{slug(resourceGroup.name)}-#{slug(resource.name)}-#{slug(action.method)}")= action.method- div(style="overflow:hidden" class="panel-heading-code")- code= resource.uriTemplate- if action.description- .panel-body!= markdown(action.description)-- - var params = action.parameters.length ? action.parameters : resource.parameters- if params.length- +Parameters(params)- if action.examples- +Examples(resourceGroup, resource, action)--mixin Paginate(resourceGroups, index)- if index < resourceGroups.length - 1- a.btn.btn-default.pull-right(href="#page:#{slug(resourceGroups[index + 1].name)}")- | Next - i.fa.fa-arrow-circle-right-- if index > 0- a.btn.btn-default(href="#page:#{slug(resourceGroups[index - 1].name)}")- i.fa.fa-arrow-circle-left- | Previous- else- a.btn.btn-default(href="#")- i.fa.fa-arrow-circle-left- | Previous- .clearfix- hr--mixin Icon(method)- case method- when 'GET'- span.badge.alert-info- i.fa.fa-arrow-down- when 'POST'- span.badge.alert-success- i.fa.fa-plus- when 'PUT'- span.badge.alert-warning- i.fa.fa-pencil- when 'PATCH'- span.badge.alert-warning- i.fa.fa-pencil- when 'DELETE'- span.badge.alert-danger- i.fa.fa-times- default- span.badge- i.fa.fa-dot-circle-o--mixin Content(getButtonClass, multipage)- div(data-bind=multipage ? "visible: page() == 'home'" : undefined)- header- .page-header- h1#top= api.name || 'API Documentation'-- .description!= markdown(api.description)-- if multipage- a.btn.btn-default.pull-right(href="#page:#{slug(api.resourceGroups[0].name)}")- | Next - i.fa.fa-arrow-circle-right- .clearfix- hr-- each resourceGroup, index in api.resourceGroups- div(data-bind=multipage ? "visible: page() == '#{slug(resourceGroup.name)}', style: {marginTop: page() == '#{slug(resourceGroup.name)}' ? '38px' : ''}" : undefined)- +ResourceGroup(resourceGroup, getButtonClass, multipage)-- if multipage- +Paginate(api.resourceGroups, index)--mixin Multipage()- //- Multi-page support through Knockout.js- script(src="//cdnjs.cloudflare.com/ajax/libs/knockout/3.0.0/knockout-min.js")- script- :coffee- class App- constructor: ->- @page = ko.observable 'home'-- window.app = new App()-- window.onhashchange = ->- vars = {}- for v in location.hash.substr(1).split(',')- parts = v.split ':'- vars[parts[0]] = parts[1]-- # Set the page- window.app.page vars.page or 'home'-- # Scroll to a header if Set- if vars.header- $("##{vars.header}")[0].scrollIntoView true- else- window.scrollTo 0, 0-- ko.applyBindings window.app-- # Load the correct page- window.onhashchange()diff --git a/docs/api/api_documentation_layouts/openproject-layout.jade b/docs/api/api_documentation_layouts/openproject-layout.jadedeleted file mode 100644index d32589edea2..00000000000--- a/docs/api/api_documentation_layouts/openproject-layout.jade+++ /dev/null@@ -1,28 +0,0 @@-doctype--include openproject-includes.jade--html- head- meta(charset="utf-8")- title= api.name || 'API Documentation'- block bootstrap-theme- link(rel="stylesheet", href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css")- link(rel="stylesheet", href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css")- block styles- link(rel="stylesheet", href="//fonts.googleapis.com/css?family=Roboto:400,700|Inconsolata|Raleway:200")- style.- /* Highlight.js Theme Tomorrow */- .hljs-comment,.hljs-title{color:#8e908c}.hljs-variable,.hljs-attribute,.hljs-tag,.hljs-regexp,.ruby .hljs-constant,.xml .hljs-tag .hljs-title,.xml .hljs-pi,.xml .hljs-doctype,.html .hljs-doctype,.css .hljs-id,.css .hljs-class,.css .hljs-pseudo{color:#c82829}.hljs-number,.hljs-preprocessor,.hljs-pragma,.hljs-built_in,.hljs-literal,.hljs-params,.hljs-constant{color:#f5871f}.ruby .hljs-class .hljs-title,.css .hljs-rules .hljs-attribute{color:#eab700}.hljs-string,.hljs-value,.hljs-inheritance,.hljs-header,.ruby .hljs-symbol,.xml .hljs-cdata{color:#718c00}.css .hljs-hexcolor{color:#3e999f}.hljs-function,.python .hljs-decorator,.python .hljs-title,.ruby .hljs-function .hljs-title,.ruby .hljs-title .hljs-keyword,.perl .hljs-sub,.javascript .hljs-title,.coffeescript .hljs-title{color:#4271ae}.hljs-keyword,.javascript .hljs-function{color:#8959a8}.hljs{display:block;background:white;color:#4d4d4c;padding:.5em}.coffeescript .javascript,.javascript .xml,.tex .hljs-formula,.xml .javascript,.xml .vbscript,.xml .css,.xml .hljs-cdata{opacity:.5}--- body- div(class=fullWidth ? 'container-fluid' : 'container')- .row- block nav- +Nav(false)-- .col-md-8- div(id="op-api-content")- block content- +Content('primary', false)diff --git a/docs/api/apiv3-doc-dev.apib b/docs/api/apiv3-doc-dev.apibdeleted file mode 100644index 46e543745d0..00000000000--- a/docs/api/apiv3-doc-dev.apib+++ /dev/null@@ -1,8 +0,0 @@-FORMAT: 1A--# OpenProject API V3 (DEV)--You're looking at the current **development** documentation of the OpenProject APIv3. If you're interested in the current-stable version, please go to https://docs.openproject.org/api/--<!-- include(apiv3/index.apib) -->diff --git a/docs/api/apiv3-doc-stable.apib b/docs/api/apiv3-doc-stable.apibdeleted file mode 100644index d8bba063acf..00000000000--- a/docs/api/apiv3-doc-stable.apib+++ /dev/null@@ -1,8 +0,0 @@-FORMAT: 1A--# OpenProject API V3 (Stable)--You're looking at the current **stable** documentation of the OpenProject APIv3. If you're interested in the current-development version, please go to https://docs.openproject.org/api/--<!-- include(apiv3/index.apib) -->diff --git a/docs/api/apiv3/README.md b/docs/api/apiv3/README.mdindex ba5ac0c9b42..06e08ef91bd 100644--- a/docs/api/apiv3/README.md+++ b/docs/api/apiv3/README.md@@ -2,12 +2,15 @@_Status: under development_-The documentation for APIv3 is written in the [API Blueprint Format](http://apiblueprint.org/).+The documentation for APIv3 is written according to the [OpenAPI 3.0 Specification](https://swagger.io/specification/).The generated APIv3 documentation is built regular on the `dev` branch and can be found at: [opf.github.io/apiv3-doc/](opf.github.io/apiv3-doc/).-You can also use [aglio](https://github.com/danielgtaylor/aglio) to generate HTML documentation locally, e.g. using the following command:+The file in the repository is split up into many files. Some OAS (OpenAPI Specification) do not support that.+You can retrieve the complete, singular file from any OpenProject server under under `/api/v3/spec.json` or `/api/v3/spec.yml`.+Additionally there is a rake task that outputs the specification as a whole as well, either as json or yaml depending+on the given output file name:-```bash-aglio -i apiv3-documentation.apib -o api.html+```+bundle exec rake api:save_spec ./openproject-oas.yml```diff --git a/docs/api/apiv3/basic-objects.apib b/docs/api/apiv3/basic-objects.apibdeleted file mode 100644index 9831a3704bd..00000000000--- a/docs/api/apiv3/basic-objects.apib+++ /dev/null@@ -1,223 +0,0 @@--# Group Basic Objects--# Links--Links to other resources in the API are represented uniformly by so called link objects.--## Local Properties--| Property | Description | Type | Required | Nullable | Default |-|:---------:| ------------------------------------------------------------------------ | ------- |:--------:|:--------:| ----------- |-| href | URL to the referenced resource (might be relative) | String | ✓ | ✓ | |-| title | Representative label for the resource | String | | | |-| templated | If true the `href` contains parts that need to be replaced by the client | Boolean | | | false |-| method | The HTTP verb to use when requesting the resource | String | | | GET |-| payload | The payload to send in the request to achieve the desired result | String | | | unspecified |-| identifier| An optional unique identifier to the link object | String | | | unspecified |--All link objects *must* contain the `href` property, though it might be `null`. Thus the following is a valid-link object:-- {- "href": null- }--whereas `{ }` is not a valid link object. The meaning of `"href": null` is that **no** resource is referenced.-For example a work package without an assignee will still have an assignee link, but its `href` will be `null`.--If a `title` is present, the client can display the title to the user when referring to the resource.--Templated links are links that contain client replaceable parts. Replaceable parts are enclosed in braces. For example-the link `api/v3/example/{id}` is not complete in itself, but the client needs to replace the string `{id}` itself.-As of now the API does not indicate the valid replacement values.--The `method` indicates which HTTP verb the client *must* use when following the link for the intended purpose.--If a `payload` is specified, it needs to be sent as the body of the request to achieve the desired result (e.g. perform the-action represented by the link). If no `payload` is specified, there is either no payload to send or a valid payload is not specified-by the link object. A payload might also be templated slightly. If the `templated` property is true, a payload might contain replaceable parts-in its strings (e.g. `{ "href": "/api/v3/examples/{example_id}" }`).--Note: When writing links (e.g. during a `PATCH` operation) only changes to `href` are accepted.-Changes to all other properties will be **silently ignored**.--For resources invisible to the client (e.g. because of missing permissions), a link will contain-the uri `urn:openproject-org:api:v3:undisclosed` instead of a url. This indicates the existence of a value-without revealing the actual value. An example for this is the parent project. A project resource which itself might be-visible to the client can have a reference to a parent project invisible to the same client. Revealing the existence of-a parent over hiding has the benefit of allowing the client to make an informed decision of whether to keep the existing reference-or updating it. Sending ‘{ "href": "urn:openproject-org:api:v3:undisclosed" }` for a resource will have the effect of keeping the-original value. This is especially beneficial if the client creates and updates resources based on the payload object provided-as part of a form as is recommended when interacting with the API.--# Errors--In case of an error, the API will respond with an appropriate HTTP status code.-For responses with an HTTP status of `4xx` and `5xx` the body will always contain a single error object.-Error objects shall give the client additional details about the cause of an erroneous response.--## General errors--* Error objects have their `_type` set to `Error`-* The `errorIdentifier` serves as a unique (and machine readable) identifier for a specific error cause- * There *may* be multiple possible error identifiers per HTTP status code- * There *may* be multiple possible HTTP status codes per error identifier- * The "List of Error Identifiers" defines the possible mappings between HTTP status and error identifier-* The `message` contains a human readable concise message describing the error- * It *optionally* includes specific information, for example which permission would have been needed to perform an action- * It is localized depending on the users preferences- * It *must not* include HTML or other kind of markup- * Error messages form complete sentences including punctuation--### Example-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InternalServerError",- "message": "An internal server error occurred. This is not your fault."- }--## Embedded error information--Errors might optionally contain embedded objects that contain further information.--### Error details--Under the embedded key `details` there might be an object describing the error more verbosely. For example if the-error affects a specific field, this field could be defined there.--#### Example-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:examples:ExampleError",- "message": "This is an example error.",- "_embedded": {- "details": {- "_type": "ExampleErrorDetailInformation",- "erroneousField": "subject"- }- }- }--### Multiple error objects--To ease implementation of basic clients it is guaranteed that the response body always only contains a single error object.-However it is allowed that an error object *embeds* other error objects under the key `errors`, thereby aggregating them.--The `errorIdentifier` of such an object is always `urn:openproject-org:api:v3:errors:MultipleErrors`. The message can either describe one of the-embedded errors or simply state that multiple errors occurred.--#### Example-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MultipleErrors",- "message": "Multiple fields violated their constraints.",- "_embedded": {- "errors": [- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "...": "..."- },- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "...": "..."- }- ]- }- }--## List of Error Identifiers--* `urn:openproject-org:api:v3:errors:InvalidQuery` (**HTTP 400**) - The query contained a value that did not match the servers expectation-* `urn:openproject-org:api:v3:errors:InvalidRequestBody` (**HTTP 400**) - The format of the request body did not match the servers expectation-* `urn:openproject-org:api:v3:errors:InvalidRenderContext` (**HTTP 400**) - The client specified a rendering context that does not exist-* `urn:openproject-org:api:v3:errors:InvalidUserStatusTransition` (**HTTP 400**) - The client used an invalid transition in the attempt to change the status of a user account.-* `urn:openproject-org:api:v3:errors:Unauthenticated` (**HTTP 401**) - The client has to authenticate to access the requested resource.-* `urn:openproject-org:api:v3:errors:MissingPermission` (**HTTP 403**) - The client does not have the needed permissions to perform the requested action-* `urn:openproject-org:api:v3:errors:NotFound` (**HTTP 404**) - Default for HTTP 404 when no further information is available-* `urn:openproject-org:api:v3:errors:UpdateConflict` (**HTTP 409**) - The resource changed between GET-ing it and performing an update on it-* `urn:openproject-org:api:v3:errors:TypeNotSupported` (**HTTP 415**) - The request contained data in an unsupported media type (Content-Type)-* `urn:openproject-org:api:v3:errors:PropertyIsReadOnly` (**HTTP 422**) - The client tried to set or change a property that is not writable-* `urn:openproject-org:api:v3:errors:PropertyConstraintViolation` (**HTTP 422**) - The client tried to set a property to an invalid value-* `urn:openproject-org:api:v3:errors:PropertyValueNotAvailableAnymore` (**HTTP 422**) - An unchanged property needs to be changed, because other changes to the resource make it unavailable-* `urn:openproject-org:api:v3:errors:ResourceTypeMismatch` (**HTTP 422**) - A link to a resource of a specific type was expected, but the link to another type of resource was provided-* `urn:openproject-org:api:v3:errors:PropertyFormatError` (**HTTP 422**) - A property value was provided in a format that the server does not understand or accept-* `urn:openproject-org:api:v3:errors:InternalServerError` (**HTTP 500**) - Default for HTTP 500 when no further information is available-* `urn:openproject-org:api:v3:errors:MultipleErrors` - Multiple errors occurred. See the embedded `errors` array for more details.--# Formattable Text--OpenProject supports text formatting in Markdown. Properties that contain formattable text have a special representation in this API. In this specification their-type is indicated as `Formattable`. Their representation contains the following properties:--| Property | Description | Type | Example | Supported operations |-|:--------:| -------------------------------------------------- | ------ | ---------------------------------- | -------------------- |-| format | Indicates the formatting language of the raw text | String | markdown | READ |-| raw | The raw text, as entered by the user | String | `I **am** formatted!` | READ / WRITE |-| html | The text converted to HTML according to the format | String | `I <strong>am</strong> formatted!` | READ |--`format` can as of today have one of the following values:--* `plain` - only basic formatting, e.g. inserting paragraphs and line breaks into HTML-* `markdown` - formatting using Markdown-* `custom` - There is no apparent formatting rule that transforms the raw version to HTML (only used for read only properties)--Note that `raw` is the only property supporting the **write** operation. A property of type *Formattable* that-is marked as **read and write**, will only accept changes to the `raw` property. Changes to `format` and `html` will be **silently ignored**.-It is thus sufficient to solely provide the `raw` property for changes.--If the *Formattable* is marked as **read only**, the `raw` attribute also becomes **read only**.--#### Example-- {- "format": "markdown",- "raw": "I **am** formatted!",- "html": "I <strong>am</strong> formatted!"- }--# Dates, Times and Durations--Representation of time related values in this API is done according to [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601).-In this specification the following terms will be used as type specifiers (e.g. in tables):--* `Date` - refers to an ISO 8601 date, e.g. "2014-05-21"-* `DateTime` - refers to an ISO 8601 combined date and time, e.g. "2014-05-21T13:37:00Z"-* `Duration` - refers to an ISO 8601 duration, e.g. "P1DT18H"--# Colors--Colors are represented in RGB using hexadecimal notation as specified in [CSS Color Module Level 3](http://www.w3.org/TR/css3-color/).-That is a `#` followed by either three or six hexadecimal digits.--#### Examples-- red: #ff0000 or #f00- green: #00ff00 or #0f0- black: #000000 or #000- white: #ffffff or #fff--# Digests--Digests (or Hashes) are one way functions that map data of arbitrary size to data of a fixed size.-In OpenProject they are for example used to calculate checksums for (attachment) files.-The checksum calculated depends on the hashed data and the algorithm used as hash function.--Therefore all digests are represented in the following form:--| Property | Description | Type | Example |-|:---------:| -------------------------------------------------- | ------ | ---------------------------------- |-| algorithm | The algorithm used to compute the digest | String | md5 |-| hash | The calculated digest in hexadecimal notation | String | 64c26a8403cd796ea4cf913cda2ee4a9 |--#### Example-- {- "algorithm": "md5",- "hash": "64c26a8403cd796ea4cf913cda2ee4a9"- }diff --git a/docs/api/apiv3/components/schemas/activity_model.yml b/docs/api/apiv3/components/schemas/activity_model.ymlnew file mode 100644index 00000000000..e9b4cbcb123--- /dev/null+++ b/docs/api/apiv3/components/schemas/activity_model.yml@@ -0,0 +1,51 @@+# Schema: ActivityModel+---+type: object+properties:+ id:+ type: integer+ description: Activity id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ version:+ type: integer+ description: Activity version+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ comment:+ allOf:+ - "$ref": "./formattable.yml"+ - {}+ details:+ type: array of formattable+ readOnly: true+ createdAt:+ type: string+ format: date-time+ description: Time of creation+ readOnly: true+example:+ _type: Activity::Comment+ _links:+ self:+ href: "/api/v3/activity/1"+ title: Priority changed from High to Low+ workPackage:+ href: "/api/v3/work_packages/1"+ title: quis numquam qui voluptatum quia praesentium blanditiis nisi+ user:+ href: "/api/v3/users/1"+ title: John Sheppard - admin+ id: 1+ details:+ - format: markdown+ raw: Lorem ipsum dolor sit amet.+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ comment:+ format: markdown+ raw: Lorem ipsum dolor sit amet.+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ createdAt: '2014-05-21T08:51:20Z'+ version: 31diff --git a/docs/api/apiv3/components/schemas/aggregations.yml b/docs/api/apiv3/components/schemas/aggregations.ymlnew file mode 100644index 00000000000..6c01dfdbddb--- /dev/null+++ b/docs/api/apiv3/components/schemas/aggregations.yml@@ -0,0 +1,2 @@+# Schema: Aggregations+--- {}diff --git a/docs/api/apiv3/components/schemas/attachment_model.yml b/docs/api/apiv3/components/schemas/attachment_model.ymlnew file mode 100644index 00000000000..a89eb57c9c8--- /dev/null+++ b/docs/api/apiv3/components/schemas/attachment_model.yml@@ -0,0 +1,122 @@+# Schema: AttachmentModel+---+type: object+required:+- title+- fileName+- description+- contentType+- digest+- createdAt+properties:+ id:+ type: integer+ description: Attachment's id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ title:+ type: string+ description: The name of the file+ readOnly: true+ fileName:+ type: string+ description: The name of the uploaded file+ readOnly: true+ fileSize:+ type: integer+ description: The size of the uploaded file in Bytes+ readOnly: true+ minimum: 0+ description:+ allOf:+ - "$ref": "./formattable.yml"+ - description: A user provided description of the file+ readOnly: true+ contentType:+ type: string+ description: The files MIME-Type as determined by the server+ readOnly: true+ digest:+ type: digest+ description: A checksum for the files content+ readOnly: true+ createdAt:+ type: string+ format: date-time+ description: Time of creation+ _links:+ type: object+ required:+ - self+ - container+ - author+ - downloadLocation+ properties:+ delete:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Deletes this attachment++ # Conditions++ **Permission**: edit on attachment container or being the author for attachments without container+ readOnly: true+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This attachment++ **Resource**: Attachment+ readOnly: true+ container:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The object (e.g. WorkPackage) housing the attachment++ **Resource**: Anything+ readOnly: true+ author:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The user who uploaded the attachment++ **Resource**: User+ readOnly: true+ downloadLocation:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Direct download link to the attachment++ **Resource**: -+ readOnly: true+example:+ _type: Attachment+ _links:+ self:+ href: "/api/v3/attachments/1"+ container:+ href: "/api/v3/work_packages/1"+ author:+ href: "/api/v3/users/1"+ staticDownloadLocation:+ href: "/api/v3/attachments/1/download"+ downloadLocation:+ href: "/some/remote/aws/url/image.png"+ id: 1+ fileName: cat.png+ filesize: 24+ description:+ format: plain+ raw: A picture of a cute cat+ html: "<p>A picture of a cute cat</p>"+ contentType: image/png+ digest:+ algorithm: md5+ hash: 64c26a8403cd796ea4cf913cda2ee4a9+ createdAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/attachments.yml b/docs/api/apiv3/components/schemas/attachments.ymlnew file mode 100644index 00000000000..43def99250e--- /dev/null+++ b/docs/api/apiv3/components/schemas/attachments.yml@@ -0,0 +1,2 @@+# Schema: Attachments+--- {}diff --git a/docs/api/apiv3/components/schemas/attachments_by_post.yml b/docs/api/apiv3/components/schemas/attachments_by_post.ymlnew file mode 100644index 00000000000..8cb9eed5c37--- /dev/null+++ b/docs/api/apiv3/components/schemas/attachments_by_post.yml@@ -0,0 +1,2 @@+# Schema: Attachments_by_post+--- {}diff --git a/docs/api/apiv3/components/schemas/attachments_by_post_model.yml b/docs/api/apiv3/components/schemas/attachments_by_post_model.ymlnew file mode 100644index 00000000000..ac77d405900--- /dev/null+++ b/docs/api/apiv3/components/schemas/attachments_by_post_model.yml@@ -0,0 +1,2 @@+# Schema: Attachments_by_postModel+--- {}diff --git a/docs/api/apiv3/components/schemas/attachments_by_wiki_page.yml b/docs/api/apiv3/components/schemas/attachments_by_wiki_page.ymlnew file mode 100644index 00000000000..398c2f7c1cc--- /dev/null+++ b/docs/api/apiv3/components/schemas/attachments_by_wiki_page.yml@@ -0,0 +1,2 @@+# Schema: Attachments_by_wiki_page+--- {}diff --git a/docs/api/apiv3/components/schemas/attachments_by_wiki_page_model.yml b/docs/api/apiv3/components/schemas/attachments_by_wiki_page_model.ymlnew file mode 100644index 00000000000..a26b035a101--- /dev/null+++ b/docs/api/apiv3/components/schemas/attachments_by_wiki_page_model.yml@@ -0,0 +1,2 @@+# Schema: Attachments_by_wiki_pageModel+--- {}diff --git a/docs/api/apiv3/components/schemas/attachments_by_work_package.yml b/docs/api/apiv3/components/schemas/attachments_by_work_package.ymlnew file mode 100644index 00000000000..6ccfbed78b7--- /dev/null+++ b/docs/api/apiv3/components/schemas/attachments_by_work_package.yml@@ -0,0 +1,2 @@+# Schema: Attachments_by_work_package+--- {}diff --git a/docs/api/apiv3/components/schemas/attachments_by_work_package_model.yml b/docs/api/apiv3/components/schemas/attachments_by_work_package_model.ymlnew file mode 100644index 00000000000..1200c89a231--- /dev/null+++ b/docs/api/apiv3/components/schemas/attachments_by_work_package_model.yml@@ -0,0 +1,2 @@+# Schema: Attachments_by_work_packageModel+--- {}diff --git a/docs/api/apiv3/components/schemas/available_assignees_model.yml b/docs/api/apiv3/components/schemas/available_assignees_model.ymlnew file mode 100644index 00000000000..91a8f839af9--- /dev/null+++ b/docs/api/apiv3/components/schemas/available_assignees_model.yml@@ -0,0 +1,56 @@+# Schema: Available_AssigneesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects/42/available_assignees"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: User+ _links:+ self:+ href: "/api/v3/users/1"+ title: John Sheppard - j.sheppard+ lock:+ href: "/api/v3/users/1/lock"+ title: Set lock on j.sheppard+ method: POST+ delete:+ href: "/api/v3/users/1"+ title: Delete j.sheppard+ method: DELETE+ id: 1+ login: j.sheppard+ firstName: John+ lastName: Sheppard+ email: [email protected]+ avatar: https://example.org/users/1/avatar+ status: active+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'+ - _type: User+ _links:+ self:+ href: "/api/v3/users/2"+ title: Jim Sheppard - j.sheppard2+ lock:+ href: "/api/v3/users/2/lock"+ title: Set lock on j.sheppard2+ method: POST+ delete:+ href: "/api/v3/users/2"+ title: Delete j.sheppard2+ method: DELETE+ id: 2+ login: j.sheppard2+ firstName: Jim+ lastName: Sheppard+ email: [email protected]+ avatar: https://example.org/users/1/avatar+ status: active+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/available_projects_for_memberships_model.yml b/docs/api/apiv3/components/schemas/available_projects_for_memberships_model.ymlnew file mode 100644index 00000000000..cb7e7be4bbf--- /dev/null+++ b/docs/api/apiv3/components/schemas/available_projects_for_memberships_model.yml@@ -0,0 +1,63 @@+# Schema: Available_projects_for_membershipsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/memberships/available_projects"+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/6"+ title: A project+ editWorkPackage:+ href: "/api/v3//work_packages/{work_package_id}/form"+ templated: true+ method: post+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/6/categories"+ memberships:+ href: "/api/v3/projects/6/memberships"+ id: 6+ identifier: a_project+ name: A project+ description: Eveniet molestias omnis quis aut qui eum adipisci. Atque aut aut+ in exercitationem adipisci amet. Nisi asperiores quia ratione veritatis enim+ exercitationem magnam. Aut fuga architecto adipisci nihil. Et repellat pariatur.+ Aliquam et sed perferendis nostrum quaerat. Fugit doloremque voluptatem.+ createdAt: '2015-07-06T13:28:14+00:00'+ updatedAt: '2015-10-01T09:55:02+00:00'+ type: Customer Project+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/14"+ title: Another project+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/14/categories"+ memberships:+ href: "/api/v3/projects/14/memberships"+ id: 14+ identifier: another_project+ name: Another project+ description: ''+ createdAt: '2016-02-29T12:50:20+00:00'+ updatedAt: '2016-02-29T12:50:20+00:00'+ type:diff --git a/docs/api/apiv3/components/schemas/available_projects_for_query_model.yml b/docs/api/apiv3/components/schemas/available_projects_for_query_model.ymlnew file mode 100644index 00000000000..a43151fca64--- /dev/null+++ b/docs/api/apiv3/components/schemas/available_projects_for_query_model.yml@@ -0,0 +1,56 @@+# Schema: Available_projects_for_queryModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/queries/available_projects"+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/6"+ title: A project+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/6/categories"+ versions:+ href: "/api/v3/projects/6/versions"+ id: 6+ identifier: a_project+ name: A project+ description: Eveniet molestias omnis quis aut qui eum adipisci.+ createdAt: '2015-07-06T13:28:14+00:00'+ updatedAt: '2015-10-01T09:55:02+00:00'+ type: Customer Project+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/14"+ title: Another project+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/14/categories"+ versions:+ href: "/api/v3/projects/14/versions"+ id: 14+ identifier: another_project+ name: Another project+ description: ''+ createdAt: '2016-02-29T12:50:20+00:00'+ updatedAt: '2016-02-29T12:50:20+00:00'+ type:diff --git a/docs/api/apiv3/components/schemas/available_projects_for_time_entries_model.yml b/docs/api/apiv3/components/schemas/available_projects_for_time_entries_model.ymlnew file mode 100644index 00000000000..7e8fb51174b--- /dev/null+++ b/docs/api/apiv3/components/schemas/available_projects_for_time_entries_model.yml@@ -0,0 +1,14 @@+# Schema: Available_projects_for_time_entriesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/time_entries/available_projects"+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: Project...+ - _type: Project...diff --git a/docs/api/apiv3/components/schemas/available_projects_for_versions_model.yml b/docs/api/apiv3/components/schemas/available_projects_for_versions_model.ymlnew file mode 100644index 00000000000..57f4a154469--- /dev/null+++ b/docs/api/apiv3/components/schemas/available_projects_for_versions_model.yml@@ -0,0 +1,63 @@+# Schema: Available_projects_for_versionsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/versions/available_projects"+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/6"+ title: A project+ editWorkPackage:+ href: "/api/v3//work_packages/{work_package_id}/form"+ templated: true+ method: post+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/6/categories"+ versions:+ href: "/api/v3/projects/6/versions"+ id: 6+ identifier: a_project+ name: A project+ description: Eveniet molestias omnis quis aut qui eum adipisci. Atque aut aut+ in exercitationem adipisci amet. Nisi asperiores quia ratione veritatis enim+ exercitationem magnam. Aut fuga architecto adipisci nihil. Et repellat pariatur.+ Aliquam et sed perferendis nostrum quaerat. Fugit doloremque voluptatem.+ createdAt: '2015-07-06T13:28:14+00:00'+ updatedAt: '2015-10-01T09:55:02+00:00'+ type: Customer Project+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/14"+ title: Another project+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/14/categories"+ versions:+ href: "/api/v3/projects/14/versions"+ id: 14+ identifier: another_project+ name: Another project+ description: ''+ createdAt: '2016-02-29T12:50:20+00:00'+ updatedAt: '2016-02-29T12:50:20+00:00'+ type:diff --git a/docs/api/apiv3/components/schemas/available_projects_for_work_package_model.yml b/docs/api/apiv3/components/schemas/available_projects_for_work_package_model.ymlnew file mode 100644index 00000000000..d0c88ba784a--- /dev/null+++ b/docs/api/apiv3/components/schemas/available_projects_for_work_package_model.yml@@ -0,0 +1,63 @@+# Schema: Available_projects_for_work_packageModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/work_packages/5/available_projects"+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/6"+ title: A project+ editWorkPackage:+ href: "/api/v3//work_packages/{work_package_id}/form"+ templated: true+ method: post+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/6/categories"+ versions:+ href: "/api/v3/projects/6/versions"+ id: 6+ identifier: a_project+ name: A project+ description: Eveniet molestias omnis quis aut qui eum adipisci. Atque aut aut+ in exercitationem adipisci amet. Nisi asperiores quia ratione veritatis enim+ exercitationem magnam. Aut fuga architecto adipisci nihil. Et repellat pariatur.+ Aliquam et sed perferendis nostrum quaerat. Fugit doloremque voluptatem.+ createdAt: '2015-07-06T13:28:14+00:00'+ updatedAt: '2015-10-01T09:55:02+00:00'+ type: Customer Project+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/14"+ title: Another project+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/14/categories"+ versions:+ href: "/api/v3/projects/14/versions"+ id: 14+ identifier: another_project+ name: Another project+ description: ''+ createdAt: '2016-02-29T12:50:20+00:00'+ updatedAt: '2016-02-29T12:50:20+00:00'+ type:diff --git a/docs/api/apiv3/components/schemas/available_relation_candidates_model.yml b/docs/api/apiv3/components/schemas/available_relation_candidates_model.ymlnew file mode 100644index 00000000000..0471a6c0a48--- /dev/null+++ b/docs/api/apiv3/components/schemas/available_relation_candidates_model.yml@@ -0,0 +1,24 @@+# Schema: Available_relation_candidatesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects/14/work_packages"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: WorkPackage+ _links:+ self:+ href: "/api/v3/work_packages/1"+ id: 1+ subject: Skipped other properties for brevity+ - _type: WorkPackage+ _links:+ self:+ href: "/api/v3/work_packages/2"+ id: 2+ subject: Skipped other properties for brevitydiff --git a/docs/api/apiv3/components/schemas/available_responsibles_model.yml b/docs/api/apiv3/components/schemas/available_responsibles_model.ymlnew file mode 100644index 00000000000..5e40277d1d0--- /dev/null+++ b/docs/api/apiv3/components/schemas/available_responsibles_model.yml@@ -0,0 +1,56 @@+# Schema: Available_ResponsiblesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects/42/available_responsibles"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: User+ _links:+ self:+ href: "/api/v3/users/1"+ title: John Sheppard - j.sheppard+ lock:+ href: "/api/v3/users/1/lock"+ title: Set lock on j.sheppard+ method: POST+ delete:+ href: "/api/v3/users/1"+ title: Delete j.sheppard+ method: DELETE+ id: 1+ login: j.sheppard+ firstName: John+ lastName: Sheppard+ email: [email protected]+ avatar: https://example.org/users/1/avatar+ status: active+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'+ - _type: User+ _links:+ self:+ href: "/api/v3/users/2"+ title: Jim Sheppard - j.sheppard2+ lock:+ href: "/api/v3/users/2/lock"+ title: Set lock on j.sheppard2+ method: POST+ delete:+ href: "/api/v3/users/2"+ title: Delete j.sheppard2+ method: DELETE+ id: 2+ login: j.sheppard2+ firstName: Jim+ lastName: Sheppard+ email: [email protected]+ avatar: https://example.org/users/1/avatar+ status: active+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/available_watchers_model.yml b/docs/api/apiv3/components/schemas/available_watchers_model.ymlnew file mode 100644index 00000000000..f00f0a1cf36--- /dev/null+++ b/docs/api/apiv3/components/schemas/available_watchers_model.yml@@ -0,0 +1,56 @@+# Schema: Available_WatchersModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/work_packages/1/available_watchers"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: User+ _links:+ self:+ href: "/api/v3/users/1"+ title: John Sheppard - j.sheppard+ lock:+ href: "/api/v3/users/1/lock"+ title: Set lock on j.sheppard+ method: POST+ delete:+ href: "/api/v3/users/1"+ title: Delete j.sheppard+ method: DELETE+ id: 1+ login: j.sheppard+ firstName: John+ lastName: Sheppard+ email: [email protected]+ avatar: https://example.org/users/1/avatar+ status: active+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'+ - _type: User+ _links:+ self:+ href: "/api/v3/users/2"+ title: Jim Sheppard - j.sheppard2+ lock:+ href: "/api/v3/users/2/lock"+ title: Set lock on j.sheppard2+ method: POST+ delete:+ href: "/api/v3/users/2"+ title: Delete j.sheppard2+ method: DELETE+ id: 2+ login: j.sheppard2+ firstName: Jim+ lastName: Sheppard+ email: [email protected]+ avatar: https://example.org/users/1/avatar+ status: active+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/budget_model.yml b/docs/api/apiv3/components/schemas/budget_model.ymlnew file mode 100644index 00000000000..9505e74e055--- /dev/null+++ b/docs/api/apiv3/components/schemas/budget_model.yml@@ -0,0 +1,25 @@+# Schema: BudgetModel+---+type: object+properties:+ _links:+ type: object+ required:+ - self+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This budget++ **Resource**: Budget+ readOnly: true+example:+ _type: Budget+ _links:+ self:+ href: "/api/v3/budgets/1"+ title: Q3 2015+ id: 1+ subject: Q3 2015diff --git a/docs/api/apiv3/components/schemas/budgets_by_project_model.yml b/docs/api/apiv3/components/schemas/budgets_by_project_model.ymlnew file mode 100644index 00000000000..c7b610a0303--- /dev/null+++ b/docs/api/apiv3/components/schemas/budgets_by_project_model.yml@@ -0,0 +1,26 @@+# Schema: Budgets_by_ProjectModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects/1/budgets"+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: Budget+ _links:+ self:+ href: "/api/v3/budgets/1"+ title: Q3 2015+ id: 1+ subject: Q3 2015+ - _type: Budget+ _links:+ self:+ href: "/api/v3/budgets/2"+ title: Q4 2015+ id: 2+ subject: Q4 2015diff --git a/docs/api/apiv3/components/schemas/categories_by_project_model.yml b/docs/api/apiv3/components/schemas/categories_by_project_model.ymlnew file mode 100644index 00000000000..38460fb1a1b--- /dev/null+++ b/docs/api/apiv3/components/schemas/categories_by_project_model.yml@@ -0,0 +1,33 @@+# Schema: Categories_by_ProjectModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects/11/categories"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/categories/10"+ title: Category with assignee+ project:+ href: "/api/v3/projects/11"+ title: Example project+ defaultAssignee:+ href: "/api/v3/users/42"+ title: John Sheppard+ _type: Category+ id: 10+ name: Foo+ - _links:+ self:+ href: "/api/v3/categories/11"+ project:+ href: "/api/v3/projects/11"+ _type: Category+ id: 11+ name: Bardiff --git a/docs/api/apiv3/components/schemas/category_model.yml b/docs/api/apiv3/components/schemas/category_model.ymlnew file mode 100644index 00000000000..fe9e5975c93--- /dev/null+++ b/docs/api/apiv3/components/schemas/category_model.yml@@ -0,0 +1,57 @@+# Schema: CategoryModel+---+type: object+properties:+ id:+ type: integer+ description: Category id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: Category name+ _links:+ type: object+ required:+ - self+ - project+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This category++ **Resource**: Category+ readOnly: true+ project:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The project of this category++ **Resource**: Project+ readOnly: true+ defaultAssignee:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Default assignee for work packages of this category++ **Resource**: User+ readOnly: true+example:+ _links:+ self:+ href: "/api/v3/categories/10"+ title: Category with assignee+ project:+ href: "/api/v3/projects/11"+ title: Example project+ defaultAssignee:+ href: "/api/v3/users/42"+ title: John Sheppard+ _type: Category+ id: 10+ name: Foodiff --git a/docs/api/apiv3/components/schemas/collection_model.yml b/docs/api/apiv3/components/schemas/collection_model.ymlnew file mode 100644index 00000000000..1905b499fca--- /dev/null+++ b/docs/api/apiv3/components/schemas/collection_model.yml@@ -0,0 +1,22 @@+# Schema: CollectionModel+---+type: object+properties:+ total:+ type: integer+ description: The total amount of elements available in the collection+ pageSize:+ type: integer+ description: Amount of elements that a response will hold+ count:+ type: integer+ description: Actual amount of elements in this response+ offset:+ type: integer+ description: The page number that is requested from paginated collection+ groups:+ type: object+ description: Summarized information about aggregation groups+ totalSums:+ type: object+ description: Aggregations of supported values for elements of the collectiondiff --git a/docs/api/apiv3/components/schemas/configuration_model.yml b/docs/api/apiv3/components/schemas/configuration_model.ymlnew file mode 100644index 00000000000..94e02424a8c--- /dev/null+++ b/docs/api/apiv3/components/schemas/configuration_model.yml@@ -0,0 +1,23 @@+# Schema: ConfigurationModel+---+type: object+properties:+ maximumAttachmentFileSize:+ type: integer+ description: The maximum allowed size of an attachment in Bytes+ readOnly: true+ perPageOptions:+ type: integer[]+ description: Page size steps to be offered in paginated list UI+example:+ _type: Configuration+ _links:+ self:+ href: "/api/v3/configuration"+ userPreferences:+ href: "/api/v3/my_preferences"+ maximumAttachmentFileSize: 5242880+ perPageOptions:+ - 1+ - 10+ - 100diff --git a/docs/api/apiv3/components/schemas/create_group.yml b/docs/api/apiv3/components/schemas/create_group.ymlnew file mode 100644index 00000000000..0d79144c23e--- /dev/null+++ b/docs/api/apiv3/components/schemas/create_group.yml@@ -0,0 +1,2 @@+# Schema: Create_group+--- {}diff --git a/docs/api/apiv3/components/schemas/create_membership.yml b/docs/api/apiv3/components/schemas/create_membership.ymlnew file mode 100644index 00000000000..2df51bddd5e--- /dev/null+++ b/docs/api/apiv3/components/schemas/create_membership.yml@@ -0,0 +1,2 @@+# Schema: Create_membership+--- {}diff --git a/docs/api/apiv3/components/schemas/create_project.yml b/docs/api/apiv3/components/schemas/create_project.ymlnew file mode 100644index 00000000000..fdc877b4eb9--- /dev/null+++ b/docs/api/apiv3/components/schemas/create_project.yml@@ -0,0 +1,2 @@+# Schema: Create_project+--- {}diff --git a/docs/api/apiv3/components/schemas/create_project_copy.yml b/docs/api/apiv3/components/schemas/create_project_copy.ymlnew file mode 100644index 00000000000..a591064f53a--- /dev/null+++ b/docs/api/apiv3/components/schemas/create_project_copy.yml@@ -0,0 +1,2 @@+# Schema: Create_project_copy+--- {}diff --git a/docs/api/apiv3/components/schemas/create_time_entry.yml b/docs/api/apiv3/components/schemas/create_time_entry.ymlnew file mode 100644index 00000000000..ca168beb16b--- /dev/null+++ b/docs/api/apiv3/components/schemas/create_time_entry.yml@@ -0,0 +1,2 @@+# Schema: Create_time_entry+--- {}diff --git a/docs/api/apiv3/components/schemas/create_user.yml b/docs/api/apiv3/components/schemas/create_user.ymlnew file mode 100644index 00000000000..fba2a69bbb2--- /dev/null+++ b/docs/api/apiv3/components/schemas/create_user.yml@@ -0,0 +1,2 @@+# Schema: Create_User+--- {}diff --git a/docs/api/apiv3/components/schemas/cursor_based_pagination.yml b/docs/api/apiv3/components/schemas/cursor_based_pagination.ymlnew file mode 100644index 00000000000..972f31d04e4--- /dev/null+++ b/docs/api/apiv3/components/schemas/cursor_based_pagination.yml@@ -0,0 +1,2 @@+# Schema: Cursor_based_pagination+--- {}diff --git a/docs/api/apiv3/components/schemas/custom_action_model.yml b/docs/api/apiv3/components/schemas/custom_action_model.ymlnew file mode 100644index 00000000000..4916888f563--- /dev/null+++ b/docs/api/apiv3/components/schemas/custom_action_model.yml@@ -0,0 +1,15 @@+# Schema: Custom_ActionModel+---+type: object+example:+ _type: CustomAction+ name: Change project and type+ description: Changes project and type in one go+ _links:+ executeImmediately:+ href: "/apiChanges project and type in one go"+ title: Execute Change project and type+ method: post+ self:+ href: "/api/v3/custom_actions/2"+ title: Change project and typediff --git a/docs/api/apiv3/components/schemas/custom_object_model.yml b/docs/api/apiv3/components/schemas/custom_object_model.ymlnew file mode 100644index 00000000000..ef321fcde6a--- /dev/null+++ b/docs/api/apiv3/components/schemas/custom_object_model.yml@@ -0,0 +1,31 @@+# Schema: Custom_ObjectModel+---+type: object+properties:+ id:+ type: integer+ description: The identifier+ readOnly: true+ value:+ type: string+ description: The value defined for this custom object+ readOnly: true+ _links:+ type: object+ required:+ - self+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This custom object++ **Resource**: CustomObject+ readOnly: true+example:+ _links:+ self:+ href: "/api/v3/custom_objects/1"+ _type: CustomObject+ value: Foodiff --git a/docs/api/apiv3/components/schemas/customaction_model.yml b/docs/api/apiv3/components/schemas/customaction_model.ymlnew file mode 100644index 00000000000..2208672ba9e--- /dev/null+++ b/docs/api/apiv3/components/schemas/customaction_model.yml@@ -0,0 +1,25 @@+# Schema: CustomactionModel+---+type: object+properties:+ id:+ type: integer+ description: Custom action id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: The user selected name of the custom action+ readOnly: true+ description:+ type: string+ description: A text describing the custom action+ _links:+ type: object+ properties:+ executeImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: Apply the action to a work package+ readOnly: truediff --git a/docs/api/apiv3/components/schemas/default_query_for_project_model.yml b/docs/api/apiv3/components/schemas/default_query_for_project_model.ymlnew file mode 100644index 00000000000..ed19f70f1a1--- /dev/null+++ b/docs/api/apiv3/components/schemas/default_query_for_project_model.yml@@ -0,0 +1,83 @@+# Schema: Default_Query_for_ProjectModel+---+type: object+example:+ _type: Query+ name: default+ filters:+ - _type: StatusQueryFilter+ name: Status+ _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ public: false+ sums: false+ timelineVisible: false+ timelineZoomLevel: days+ showHierarchies: true+ starred: false+ _embedded:+ results:+ _type: WorkPackageCollection+ total: 234+ count: 30+ pageSize: 2+ offset: 1+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ self:+ href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ jumpTo:+ href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ changeSize:+ href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ _links:+ self:+ href: "/api/v3/projects/42/queries/default"+ title: Default+ results:+ href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ project:+ href: "/api/v3/projects/42"+ title: Lorem ipsum projectdiff --git a/docs/api/apiv3/components/schemas/default_query_model.yml b/docs/api/apiv3/components/schemas/default_query_model.ymlnew file mode 100644index 00000000000..762d950d732--- /dev/null+++ b/docs/api/apiv3/components/schemas/default_query_model.yml@@ -0,0 +1,86 @@+# Schema: Default_QueryModel+---+type: object+example:+ _type: Query+ name: default+ filters:+ - _type: StatusQueryFilter+ name: Status+ _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ public: false+ sums: false+ timelineVisible: false+ timelineZoomLevel: days+ timelineLabels: {}+ highlightingMode: inline+ showHierarchies: true+ starred: false+ _embedded:+ results:+ _type: WorkPackageCollection+ total: 234+ count: 30+ pageSize: 2+ offset: 1+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ self:+ href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ jumpTo:+ href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ changeSize:+ href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ highlightedAttributes: []+ _links:+ self:+ href: "/api/v3/queries/default"+ title: Default+ results:+ href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ highlightedAttributes: []+ groupBy:+ href:+ title:+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ project:+ href:diff --git a/docs/api/apiv3/components/schemas/delete_group.yml b/docs/api/apiv3/components/schemas/delete_group.ymlnew file mode 100644index 00000000000..b35812ccd25--- /dev/null+++ b/docs/api/apiv3/components/schemas/delete_group.yml@@ -0,0 +1,2 @@+# Schema: Delete_group+--- {}diff --git a/docs/api/apiv3/components/schemas/delete_membership.yml b/docs/api/apiv3/components/schemas/delete_membership.ymlnew file mode 100644index 00000000000..b97f086866a--- /dev/null+++ b/docs/api/apiv3/components/schemas/delete_membership.yml@@ -0,0 +1,2 @@+# Schema: Delete_membership+--- {}diff --git a/docs/api/apiv3/components/schemas/delete_project.yml b/docs/api/apiv3/components/schemas/delete_project.ymlnew file mode 100644index 00000000000..6cda3ae5d66--- /dev/null+++ b/docs/api/apiv3/components/schemas/delete_project.yml@@ -0,0 +1,2 @@+# Schema: Delete_project+--- {}diff --git a/docs/api/apiv3/components/schemas/delete_time_entry.yml b/docs/api/apiv3/components/schemas/delete_time_entry.ymlnew file mode 100644index 00000000000..f7c3ae62fbd--- /dev/null+++ b/docs/api/apiv3/components/schemas/delete_time_entry.yml@@ -0,0 +1,2 @@+# Schema: Delete_time_entry+--- {}diff --git a/docs/api/apiv3/components/schemas/delete_user.yml b/docs/api/apiv3/components/schemas/delete_user.ymlnew file mode 100644index 00000000000..b7394755ccc--- /dev/null+++ b/docs/api/apiv3/components/schemas/delete_user.yml@@ -0,0 +1,2 @@+# Schema: Delete_User+--- {}diff --git a/docs/api/apiv3/components/schemas/document_model.yml b/docs/api/apiv3/components/schemas/document_model.ymlnew file mode 100644index 00000000000..5ac6e6825f9--- /dev/null+++ b/docs/api/apiv3/components/schemas/document_model.yml@@ -0,0 +1,93 @@+# Schema: DocumentModel+---+type: object+properties:+ id:+ type: integer+ description: Document's id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ title:+ type: string+ description: The title chosen for the collection of documents+ readOnly: true+ description:+ type: string+ description: A text describing the documents+ readOnly: true+ createdAt:+ type: string+ format: date-time+ description: The time the document was created at+ readOnly: true+ _links:+ type: object+ required:+ - self+ - project+ - attachments+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This document++ **Resource**: Document+ readOnly: true+ project:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The project the document is in++ **Resource**: Project+ attachments:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The attachments belonging to the document++ **Resource**: []Attachment+example:+ _type: Document+ id: 1+ title: Some other document+ description:+ format: markdown+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago+ vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago+ consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus+ tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto+ sortitus cresco apud vestrum qui.+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur+ vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria+ ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter+ somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero+ vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"+ createdAt: '2018-12-10T20:53:39Z'+ _links:+ attachments:+ href: "/api/v3/documents/1/attachments"+ addAttachment:+ href: "/api/v3/documents/1/attachments"+ method: post+ self:+ href: "/api/v3/documents/1"+ title: Some document+ project:+ href: "/api/v3/projects/19"+ title: Some project+ _embedded:+ project:+ _type: Project...+ attachments:+ _type: Collection+ total: 2+ count: 2+ _embedded...:+ elements: []+ _links:+ self:+ href: "/api/v3/documents/1/attachments"diff --git a/docs/api/apiv3/components/schemas/documents_model.yml b/docs/api/apiv3/components/schemas/documents_model.ymlnew file mode 100644index 00000000000..8239f5f13d4--- /dev/null+++ b/docs/api/apiv3/components/schemas/documents_model.yml@@ -0,0 +1,76 @@+# Schema: DocumentsModel+---+type: object+example:+ _type: Collection+ total: 2+ count: 2+ pageSize: 30+ offset: 1+ _embedded:+ elements:+ - description:+ format: markdown+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur+ vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam+ patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos+ velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito+ quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur+ vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam+ patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos+ velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito+ quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"+ _type: Document+ id: 1+ title: Some other document+ createdAt: '2018-12-10T20:53:39Z'+ _links:+ attachments:+ href: "/api/v3/documents/1/attachments"+ addAttachment:+ href: "/api/v3/documents/1/attachments"+ method: post+ self:+ href: "/api/v3/documents/1"+ title: Some document+ project:+ href: "/api/v3/projects/19"+ title: Some project+ - description:+ format: markdown+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur+ vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam+ patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos+ velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito+ quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur+ vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam+ patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos+ velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito+ quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"+ _type: Document+ id: 2+ title: Some other document+ createdAt: '2018-12-10T20:55:54Z'+ _links:+ attachments:+ href: "/api/v3/documents/2/attachments"+ addAttachment:+ href: "/api/v3/documents/2/attachments"+ method: post+ self:+ href: "/api/v3/documents/2"+ title: Some other document+ project:+ href: "/api/v3/projects/29"+ title: Some other project+ _links:+ self:+ href: "/api/v3/documents?offset=1&pageSize=30"+ jumpTo:+ href: "/api/v3/documents?offset=%7Boffset%7D&pageSize=30"+ templated: true+ changeSize:+ href: "/api/v3/documents?offset=1&pageSize=%7Bsize%7D"+ templated: truediff --git a/docs/api/apiv3/components/schemas/example_form_model.yml b/docs/api/apiv3/components/schemas/example_form_model.ymlnew file mode 100644index 00000000000..6b63b921273--- /dev/null+++ b/docs/api/apiv3/components/schemas/example_form_model.yml@@ -0,0 +1,77 @@+# Schema: Example_FormModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/example/form"+ validate:+ href: "/api/v3/example/form"+ method: POST+ previewMarkup:+ href: "/api/v3/render/markdown"+ method: POST+ commit:+ href: "/api/v3/example"+ method: PATCH+ _type: Form+ _embedded:+ payload:+ _links:+ status:+ href: "/api/v3/statuses/1"+ _type: Example+ lockVersion: 5+ subject: An example title+ schema:+ _type: Schema+ _links:+ self:+ href: "/api/v3/example/schema"+ lockVersion:+ type: Integer+ writable: false+ subject:+ type: String+ minLength: 1+ maxLength: 255+ status:+ _links:+ allowedValues:+ - href: "/api/v3/statuses/1"+ title: New+ - href: "/api/v3/statuses/2"+ title: Closed+ type: Status+ _embedded:+ allowedValues:+ - _links:+ self:+ href: "/api/v3/statuses/1"+ _type: Status+ id: 1+ name: New+ position: 1+ isDefault: true+ isClosed: false+ defaultDoneRatio: 0+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T09:12:00Z'+ - _links:+ self:+ href: "/api/v3/statuses/2"+ _type: Status+ id: 2+ name: Closed+ position: 2+ isDefault: false+ isClosed: true+ defaultDoneRatio: 100+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T09:12:00Z'+ validationErrors:+ subject:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:BadExampleError+ message: For the purpose of this example we need a validation error. The remainder+ of the response pretends there were no errors.diff --git a/docs/api/apiv3/components/schemas/example_schema_model.yml b/docs/api/apiv3/components/schemas/example_schema_model.ymlnew file mode 100644index 00000000000..ad1b63616df--- /dev/null+++ b/docs/api/apiv3/components/schemas/example_schema_model.yml@@ -0,0 +1,54 @@+# Schema: Example_SchemaModel+---+type: object+example:+ _type: Schema+ _dependencies: []+ _links:+ self:+ href: "/api/v3/example/schema"+ lockVersion:+ name: Resource Version+ type: Integer+ writable: false+ subject:+ name: Subject+ type: String+ minLength: 1+ maxLength: 255+ status:+ _links:+ allowedValues:+ - href: "/api/v3/statuses/1"+ title: New+ - href: "/api/v3/statuses/2"+ title: Closed+ name: Status+ type: Status+ location: _links+ _embedded:+ allowedValues:+ - _links:+ self:+ href: "/api/v3/statuses/1"+ _type: Status+ id: 1+ name: New+ position: 1+ isDefault: true+ isClosed: false+ defaultDoneRatio: 0+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T09:12:00Z'+ - _links:+ self:+ href: "/api/v3/statuses/2"+ _type: Status+ id: 2+ name: Closed+ position: 2+ isDefault: false+ isClosed: true+ defaultDoneRatio: 100+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T09:12:00Z'diff --git a/docs/api/apiv3/components/schemas/execute_custom_action.yml b/docs/api/apiv3/components/schemas/execute_custom_action.ymlnew file mode 100644index 00000000000..58589b0e0ed--- /dev/null+++ b/docs/api/apiv3/components/schemas/execute_custom_action.yml@@ -0,0 +1,2 @@+# Schema: Execute_custom_action+--- {}diff --git a/docs/api/apiv3/components/schemas/form_model.yml b/docs/api/apiv3/components/schemas/form_model.ymlnew file mode 100644index 00000000000..910aab9cc90--- /dev/null+++ b/docs/api/apiv3/components/schemas/form_model.yml@@ -0,0 +1,37 @@+# Schema: FormModel+---+type: object+properties:+ _links:+ type: object+ properties:+ validate:+ allOf:+ - "$ref": "./link.yml"+ - description: Validate changes, show errors and allowed values for changed+ resource+ readOnly: true+ commit:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Actually perform changes to the resource++ # Conditions++ form content is valid+ readOnly: true+ previewMarkup:+ allOf:+ - "$ref": "./link.yml"+ - description: Post markup (e.g. markdown) here to receive an HTML-rendered+ response+ readOnly: true+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This form++ **Resource**: Form+ readOnly: truediff --git a/docs/api/apiv3/components/schemas/formattable.yml b/docs/api/apiv3/components/schemas/formattable.ymlnew file mode 100644index 00000000000..c710b102b17--- /dev/null+++ b/docs/api/apiv3/components/schemas/formattable.yml@@ -0,0 +1,28 @@+# Schema: Formattable+---+type: object+required:+- format+properties:+ format:+ type: string+ enum:+ - plain+ - markdown+ - custom+ readOnly: true+ description: Indicates the formatting language of the raw text+ example: markdown+ raw:+ type: string+ description: The raw text, as entered by the user+ example: I **am** formatted!+ html:+ type: string+ readOnly: true+ description: The text converted to HTML according to the format+ example: I <strong>am</strong> formatted!+example:+ format: markdown+ raw: I am formatted!+ html: I am formatted!diff --git a/docs/api/apiv3/components/schemas/grid_create_form.yml b/docs/api/apiv3/components/schemas/grid_create_form.ymlnew file mode 100644index 00000000000..20d915531ab--- /dev/null+++ b/docs/api/apiv3/components/schemas/grid_create_form.yml@@ -0,0 +1,2 @@+# Schema: Grid_Create_Form+--- {}diff --git a/docs/api/apiv3/components/schemas/grid_model.yml b/docs/api/apiv3/components/schemas/grid_model.ymlnew file mode 100644index 00000000000..69f10927440--- /dev/null+++ b/docs/api/apiv3/components/schemas/grid_model.yml@@ -0,0 +1,121 @@+# Schema: GridModel+---+type: object+properties:+ id:+ type: integer+ description: Grid's id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ rowCount:+ type: integer+ description: The number of rows the grid has+ minimum: 0+ exclusiveMinimum: true+ columnCount:+ type: integer+ description: The number of columns the grid has+ minimum: 0+ exclusiveMinimum: true+ widgets:+ type: "[]gridwidget"+ description: |-+ The set of `GridWidget`s selected for the grid++ # Conditions++ The widgets cannot overlap+ createdAt:+ type: string+ format: date-time+ description: The time the grid was created+ readOnly: true+ updatedAt:+ type: string+ format: date-time+ description: The time the grid was last updated+ readOnly: true+ _links:+ type: object+ required:+ - self+ - page+ properties:+ updateImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Directly perform edits on this grid++ # Conditions++ **Permission**: depends on the page the grid is defined for+ readOnly: true+ update:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Validate edits on the grid via a form resource before committing++ # Conditions++ **Permission**: depends on the page the grid is defined for+ readOnly: true+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This grid++ **Resource**: Grid+ readOnly: true+ page:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The url of the page the grid is defined for++ **Resource**: url++ # Conditions++ The page cannot be changed after the creation+example:+ _type: Grid+ id: 2+ rowCount: 8+ columnCount: 5+ widgets:+ - _type: GridWidget+ identifier: time_entries_current_user+ startRow: 1+ endRow: 8+ startColumn: 1+ endColumn: 3+ - _type: GridWidget+ identifier: news+ startRow: 3+ endRow: 8+ startColumn: 4+ endColumn: 5+ - _type: GridWidget+ identifier: documents+ startRow: 1+ endRow: 3+ startColumn: 3+ endColumn: 6+ createdAt: '2018-12-03T16:58:30Z'+ updatedAt: '2018-12-13T19:36:40Z'+ _links:+ scope:+ href: "/my/page"+ type: text/html+ updateImmediately:+ href: "/api/v3/grids/2"+ method: patch+ update:+ href: "/api/v3/grids/2/form"+ method: post+ self:+ href: "/api/v3/grids/2"diff --git a/docs/api/apiv3/components/schemas/grid_update_form.yml b/docs/api/apiv3/components/schemas/grid_update_form.ymlnew file mode 100644index 00000000000..3edd2b9a374--- /dev/null+++ b/docs/api/apiv3/components/schemas/grid_update_form.yml@@ -0,0 +1,2 @@+# Schema: Grid_Update_Form+--- {}diff --git a/docs/api/apiv3/components/schemas/grids_model.yml b/docs/api/apiv3/components/schemas/grids_model.ymlnew file mode 100644index 00000000000..995bdeb96f2--- /dev/null+++ b/docs/api/apiv3/components/schemas/grids_model.yml@@ -0,0 +1,94 @@+# Schema: GridsModel+---+type: object+example:+ _type: Collection+ total: 1+ count: 1+ pageSize: 30+ offset: 1+ _embedded:+ elements:+ - _type: Grid+ id: 2+ rowCount: 8+ columnCount: 5+ widgets:+ - _type: GridWidget+ identifier: time_entries_current_user+ startRow: 1+ endRow: 8+ startColumn: 1+ endColumn: 3+ - _type: GridWidget+ identifier: news+ startRow: 3+ endRow: 8+ startColumn: 4+ endColumn: 5+ - _type: GridWidget+ identifier: documents+ startRow: 1+ endRow: 3+ startColumn: 3+ endColumn: 6+ createdAt: '2018-12-03T16:58:30Z'+ updatedAt: '2018-12-13T19:36:40Z'+ _links:+ scope:+ href: "/my/page"+ type: text/html+ updateImmediately:+ href: "/api/v3/grids/2"+ method: patch+ update:+ href: "/api/v3/grids/2/form"+ method: post+ self:+ href: "/api/v3/grids/2"+ - _type: Grid+ id: 5+ rowCount: 1+ columnCount: 4+ widgets:+ - _type: GridWidget+ identifier: work_package_query+ startRow: 1+ endRow: 8+ startColumn: 1+ endColumn: 3+ - _type: GridWidget+ identifier: work_package_query+ startRow: 3+ endRow: 8+ startColumn: 4+ endColumn: 5+ - _type: GridWidget+ identifier: work_package_query+ startRow: 1+ endRow: 3+ startColumn: 3+ endColumn: 6+ createdAt: '2019-01-05T16:58:30Z'+ updatedAt: '2019-01-07T19:36:40Z'+ _links:+ scope:+ href: "/projects/a_project/boards"+ type: text/html+ updateImmediately:+ href: "/api/v3/grids/5"+ method: patch+ update:+ href: "/api/v3/grids/5/form"+ method: post+ self:+ href: "/api/v3/grids/5"+ _links:+ self:+ href: "/api/v3/grids?offset=1&pageSize=30"+ jumpTo:+ href: "/api/v3/grids?offset=%7Boffset%7D&pageSize=30"+ templated: true+ changeSize:+ href: "/api/v3/grids?offset=1&pageSize=%7Bsize%7D"+ templated: truediff --git a/docs/api/apiv3/components/schemas/group_model.yml b/docs/api/apiv3/components/schemas/group_model.ymlnew file mode 100644index 00000000000..ccb11f55624--- /dev/null+++ b/docs/api/apiv3/components/schemas/group_model.yml@@ -0,0 +1,89 @@+# Schema: GroupModel+---+type: object+properties:+ id:+ type: integer+ description: Group's id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: |-+ Group's full name, formatting depends on instance settings++ # Conditions++ Admin to write+ createdAt:+ type: string+ format: date-time+ description: |-+ Time of creation++ # Conditions++ Only visible by admins+ readOnly: true+ updatedAt:+ type: string+ format: date-time+ description: Time of the most recent change to the user+ readOnly: true+ _links:+ type: object+ required:+ - self+ properties:+ delete:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Deletes the group.++ # Conditions++ **Permission**: Administrator+ readOnly: true+ updateImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Updates the group's attributes.++ # Conditions++ **Permission**: Administrator+ readOnly: true+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This group++ **Resource**: Group+ readOnly: true+ memberships:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Link to collection of all the group's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions.++ **Resource**: MemberCollection++ # Conditions++ **Permission**: view members or manage members in any project+ readOnly: true+ members:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The list all all the users that are members of the group++ **Resource**: UserCollection++ # Conditions++ **Permission**: manage members in any project to read & admin to writediff --git a/docs/api/apiv3/components/schemas/help_text_model.yml b/docs/api/apiv3/components/schemas/help_text_model.ymlnew file mode 100644index 00000000000..37c622291ae--- /dev/null+++ b/docs/api/apiv3/components/schemas/help_text_model.yml@@ -0,0 +1,19 @@+# Schema: Help_textModel+---+type: object+example:+ _type: HelpText+ _links:+ self:+ href: "/api/v3/help_texts/1"+ editText:+ type: text/html+ href: "/admin/attribute_help_texts/1/edit"+ id: 1+ attribute: id+ attributeCaption: ID+ scope: WorkPackage+ helpText:+ format: markdown+ raw: Help text for id attribute.+ html: "<p>Help text for id attribute.</p>"diff --git a/docs/api/apiv3/components/schemas/help_texts_model.yml b/docs/api/apiv3/components/schemas/help_texts_model.ymlnew file mode 100644index 00000000000..c6c8c5faaa9--- /dev/null+++ b/docs/api/apiv3/components/schemas/help_texts_model.yml@@ -0,0 +1,36 @@+# Schema: Help_textsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/help_texts"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: HelpText+ _links:+ self:+ href: "/api/v3/help_texts/1"+ id: 1+ attribute: id+ attributeCaption: ID+ scope: WorkPackage+ helpText:+ format: markdown+ raw: Help text for id attribute.+ html: "<p>Help text for id attribute.</p>"+ - _type: HelpText+ _links:+ self:+ href: "/api/v3/help_texts/2"+ id: 2+ attribute: status+ attributeCaption: Status+ scope: WorkPackage+ helpText:+ format: markdown+ raw: Help text for status attribute.+ html: "<p>Help text for status attribute.</p>"diff --git a/docs/api/apiv3/components/schemas/helptext_model.yml b/docs/api/apiv3/components/schemas/helptext_model.ymlnew file mode 100644index 00000000000..adcd134fe6d--- /dev/null+++ b/docs/api/apiv3/components/schemas/helptext_model.yml@@ -0,0 +1,43 @@+# Schema: HelptextModel+---+type: object+properties:+ id:+ type: integer+ description: Help text id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ attribute:+ type: string+ description: Attribute name+ readOnly: true+ attributeCaption:+ type: string+ description: Attribute caption+ readOnly: true+ helpText:+ allOf:+ - "$ref": "./formattable.yml"+ - description: Help text content+ _links:+ type: object+ required:+ - self+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This help text++ **Resource**: HelpText+ readOnly: true+ editText:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Edit the help text entry++ **Resource**: text/htm+ readOnly: truediff --git a/docs/api/apiv3/components/schemas/link.yml b/docs/api/apiv3/components/schemas/link.ymlnew file mode 100644index 00000000000..46bba475274--- /dev/null+++ b/docs/api/apiv3/components/schemas/link.yml@@ -0,0 +1,34 @@+# Schema: Link+---+type: object+required:+- href+properties:+ href:+ type: string+ nullable: true+ description: URL to the referenced resource (might be relative)+ title:+ type: string+ description: "\tRepresentative label for the resource"+ templated:+ type: boolean+ default: false+ description: If true the href contains parts that need to be replaced by the client+ method:+ type: string+ default: GET+ description: The HTTP verb to use when requesting the resource+ payload:+ type: string+ description: The payload to send in the request to achieve the desired result+ identifier:+ type: string+ description: "\tAn optional unique identifier to the link object"+examples:+- href:+- href: "/api/v3/work_packages"+ method: POST+- href: "/api/v3/examples/{example_id}"+ templated: true+- href: urn:openproject-org:api:v3:undiscloseddiff --git a/docs/api/apiv3/components/schemas/list_actions_model.yml b/docs/api/apiv3/components/schemas/list_actions_model.ymlnew file mode 100644index 00000000000..8a00475433d--- /dev/null+++ b/docs/api/apiv3/components/schemas/list_actions_model.yml@@ -0,0 +1,37 @@+# Schema: List_actionsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/actions"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/actions/work_packages/create"+ title: Add work package+ _type: Action+ id: work_packages/create+ name: Add work package+ description: Creating a work package within a project including the uploading+ of attachments. Some attributes might not be selected, e.g version which requires+ a second permission+ modules:+ - work_packages+ - _links:+ self:+ href: "/api/v3/actions/work_packages/assign_versions"+ title: Assigning version+ _type: Action+ id: work_packages/assign_versions+ name: Assign version+ description: Assigning a work package to a version when creating/updating a+ work package. Only principals having this permission can assign a value to+ the version property of the work package resource.+ modules:+ - work_packages+ - versionsdiff --git a/docs/api/apiv3/components/schemas/list_available_parent_project_candidates_model.yml b/docs/api/apiv3/components/schemas/list_available_parent_project_candidates_model.ymlnew file mode 100644index 00000000000..587af2d2618--- /dev/null+++ b/docs/api/apiv3/components/schemas/list_available_parent_project_candidates_model.yml@@ -0,0 +1,80 @@+# Schema: List_available_parent_project_candidatesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects/available_parent_projects?of=123"+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/6"+ title: A project+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/6/categories"+ versions:+ href: "/api/v3/projects/6/versions"+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ id: 6+ identifier: a_project+ name: A project+ active: true+ statusExplanation:+ format: markdown+ raw: Everything **fine**+ html: "<p>Everything <strong>fine</strong></p>"+ public: false+ description:+ format: markdown+ raw: Lorem **ipsum** dolor sit amet+ html: "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"+ createdAt: '2015-07-06T13:28:14+00:00'+ updatedAt: '2015-10-01T09:55:02+00:00'+ type: Customer Project+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/14"+ title: Another project+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/14/categories"+ versions:+ href: "/api/v3/projects/14/versions"+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ id: 14+ identifier: another_project+ name: Another project+ active: true+ statusExplanation:+ format: markdown+ raw: Everything super **fine**+ html: "<p>Everything super <strong>fine</strong></p>"+ public: true+ description:+ format: markdown+ raw: ''+ html: ''+ createdAt: '2016-02-29T12:50:20+00:00'+ updatedAt: '2016-02-29T12:50:20+00:00'+ type:diff --git a/docs/api/apiv3/components/schemas/list_capabilities_model.yml b/docs/api/apiv3/components/schemas/list_capabilities_model.ymlnew file mode 100644index 00000000000..70cf2c6a2d2--- /dev/null+++ b/docs/api/apiv3/components/schemas/list_capabilities_model.yml@@ -0,0 +1,71 @@+# Schema: List_capabilitiesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/capabilities"+ changeSize:+ href: "/api/v3/capabilities?pageSize={size}"+ templated: true+ jumpTo:+ href: "/api/v3/capabilities?offset={offset}"+ templated: true+ total: 4+ count: 4+ _type: Collection+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/capabilities/work_packages/create/p123-567"+ action:+ href: "/api/v3/actions/work_packages/create"+ title: Add work package+ context:+ href: "/api/v3/projects/123"+ title: A project+ principal:+ href: "/api/v3/users/567"+ title: Some user+ _type: Capability+ id: work_packages/create/p123-567+ - _links:+ self:+ href: "/api/v3/capabilities/work_packages/assignee/p123-567"+ action:+ href: "/api/v3/actions/work_packages/assignee"+ context:+ href: "/api/v3/projects/123"+ title: A project+ principal:+ href: "/api/v3/users/567"+ title: Some user+ _type: Capability+ id: work_packages/assignee/p123-567+ - _links:+ self:+ href: "/api/v3/capabilities/memberships/create/p345-821"+ title: Create members+ action:+ href: "/api/v3/actions/memberships/create"+ context:+ href: "/api/v3/projects/345"+ title: A project+ principal:+ href: "/api/v3/users/821"+ title: Some user+ _type: Capability+ id: memberships/create/p345-821+ - _links:+ self:+ href: "/api/v3/capabilities/users/delete/g-567"+ title: Delete user+ context:+ href: "/api/v3/capabilities/context/global"+ title: Global+ principal:+ href: "/api/v3/users/567"+ title: Some user+ _type: Capability+ id: users/delete/g-567diff --git a/docs/api/apiv3/components/schemas/list_groups_model.yml b/docs/api/apiv3/components/schemas/list_groups_model.ymlnew file mode 100644index 00000000000..2b4f2b50f99--- /dev/null+++ b/docs/api/apiv3/components/schemas/list_groups_model.yml@@ -0,0 +1,46 @@+# Schema: List_groupsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/groups"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: Group+ id: 9+ name: The group+ createdAt: '2015-09-23T11:06:36Z'+ updatedAt: '2015-09-23T11:06:36Z'+ _links:+ self:+ href: "/api/v3/groups/9"+ title: The group+ memberships:+ href: /api/v3/memberships?filters=[{"principal":{"operator":"=","values":["9"]}}]+ title: Memberships+ members:+ - href: "/api/v3/users/363"+ title: First user+ - href: "/api/v3/users/60"+ title: Second user+ - _type: Group+ id: 123+ name: Another group+ createdAt: '2018-09-23T11:06:36Z'+ updatedAt: '2019-09-23T11:06:36Z'+ _links:+ self:+ href: "/api/v3/groups/123"+ title: Another group+ memberships:+ href: /api/v3/memberships?filters=[{"principal":{"operator":"=","values":["123"]}}]+ title: Memberships+ members:+ - href: "/api/v3/users/343"+ title: Third user+ - href: "/api/v3/users/60"+ title: Second userdiff --git a/docs/api/apiv3/components/schemas/list_memberships_model.yml b/docs/api/apiv3/components/schemas/list_memberships_model.ymlnew file mode 100644index 00000000000..f11f42a49ab--- /dev/null+++ b/docs/api/apiv3/components/schemas/list_memberships_model.yml@@ -0,0 +1,48 @@+# Schema: List_membershipsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/memberships"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/memberships/11"+ schema:+ href: "/api/v3/memberships/schema"+ project:+ href: "/api/v3/projects/3"+ title: A Project+ principal:+ href: "/api/v3/users/5"+ title: A user+ roles:+ - href: "/api/v3/roles/4"+ title: Reader+ _type: Membership+ id: 11+ createdAt: '2015-03-20T12:56:56Z'+ updatedAt: '2018-12-20T18:16:11Z'+ - _links:+ self:+ href: "/api/v3/memberships/41"+ schema:+ href: "/api/v3/memberships/schema"+ project:+ href: "/api/v3/projects/6"+ title: Another Project+ principal:+ href: "/api/v3/groups/5"+ title: A group+ roles:+ - href: "/api/v3/roles/8"+ title: Project admin+ _type: Membership+ id: 41+ createdAt: '2019-12-22T12:56:06Z'+ updatedAt: '2020-12-20T18:16:12Z'diff --git a/docs/api/apiv3/components/schemas/list_of_news_model.yml b/docs/api/apiv3/components/schemas/list_of_news_model.ymlnew file mode 100644index 00000000000..718b4bbb730--- /dev/null+++ b/docs/api/apiv3/components/schemas/list_of_news_model.yml@@ -0,0 +1,75 @@+# Schema: List_of_NewsModel+---+type: object+example:+ _type: Collection+ total: 78+ count: 2+ pageSize: 2+ offset: 1+ _embedded:+ elements:+ - _type: News+ id: 1+ title: asperiores possimus nam doloribus ab+ summary: Celebrer spiculum colo viscus claustrum atque. Id nulla culpa sumptus.+ Comparo crapula depopulo demonstro.+ description:+ format: markdown+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur+ vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam+ patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos+ velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito+ quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur+ vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam+ patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos+ velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito+ quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"+ createdAt: '2015-03-20T12:57:01Z'+ _links:+ self:+ href: "/api/v3/news/1"+ title: asperiores possimus nam doloribus ab+ project:+ href: "/api/v3/projects/1"+ title: Seeded Project+ author:+ href: "/api/v3/users/2"+ title: Peggie Feeney+ - _type: News+ id: 2+ title: terminatio tutamen. Officia adeptio sp+ summary: Consequatur sequi surculus creo tui aequitas.+ description:+ format: markdown+ raw: Amicitia alius cattus voluntarius. Virgo viduo terminatio tutamen. Officia+ adeptio spectaculum atavus nisi cum concido bis. Harum caecus auxilium sol+ theatrum eaque consequatur. Omnis aeger suus adipisci cicuta. Cur delicate+ alias curto cursim atqui talio fugiat.+ html: "<p>Amicitia alius cattus voluntarius. Virgo viduo terminatio tutamen.+ Officia adeptio spectaculum atavus nisi cum concido bis. Harum caecus auxilium+ sol theatrum eaque consequatur. Omnis aeger suus adipisci cicuta. Cur delicate+ alias curto cursim atqui talio fugiat.</p>"+ createdAt: '2015-03-20T12:57:01Z'+ _links:+ self:+ href: "/api/v3/news/2"+ title: terminatio tutamen. Officia adeptio sp+ project:+ href: "/api/v3/projects/1"+ title: Seeded Project+ author:+ href: "/api/v3/users/2"+ title: Peggie Feeney+ _links:+ self:+ href: "/api/v3/news?offset=1&pageSize=2"+ jumpTo:+ href: "/api/v3/news?offset=%7Boffset%7D&pageSize=2"+ templated: true+ changeSize:+ href: "/api/v3/news?offset=1&pageSize=%7Bsize%7D"+ templated: true+ nextByOffset:+ href: "/api/v3/news?offset=2&pageSize=2"diff --git a/docs/api/apiv3/components/schemas/list_projects_by_version_model.yml b/docs/api/apiv3/components/schemas/list_projects_by_version_model.ymlnew file mode 100644index 00000000000..894add598a9--- /dev/null+++ b/docs/api/apiv3/components/schemas/list_projects_by_version_model.yml@@ -0,0 +1,38 @@+# Schema: List_projects_by_versionModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/versions/2/projects"+ total: 1+ count: 1+ _type: Collection+ _embedded:+ elements:+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/1"+ title: Lorem+ categories:+ href: "/api/v3/projects/1/categories"+ versions:+ href: "/api/v3/projects/1/versions"+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ id: 1+ identifier: project_identifier+ name: Project example+ description:+ format: markdown+ raw: Lorem **ipsum** dolor sit amet+ html: "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"+ active: true+ statusExplanation:+ format: markdown+ raw: Everything **fine**+ html: "<p>Everything <strong>fine</strong></p>"+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/list_projects_model.yml b/docs/api/apiv3/components/schemas/list_projects_model.ymlnew file mode 100644index 00000000000..63e58adacd5--- /dev/null+++ b/docs/api/apiv3/components/schemas/list_projects_model.yml@@ -0,0 +1,84 @@+# Schema: List_projectsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects"+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/6"+ title: A project+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/6/categories"+ versions:+ href: "/api/v3/projects/6/versions"+ projects:+ href: "/api/v3/projects/123"+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ id: 6+ identifier: a_project+ name: A project+ active: true+ statusExplanation:+ format: markdown+ raw: Everything **fine**+ html: "<p>Everything <strong>fine</strong></p>"+ public: false+ description:+ format: markdown+ raw: Lorem **ipsum** dolor sit amet+ html: "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"+ createdAt: '2015-07-06T13:28:14+00:00'+ updatedAt: '2015-10-01T09:55:02+00:00'+ type: Customer Project+ - _type: Project+ _links:+ self:+ href: "/api/v3/projects/14"+ title: Another project+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/14/categories"+ versions:+ href: "/api/v3/projects/14/versions"+ projects:+ href:+ status:+ href: "/api/v3/project_statuses/off_track"+ title: Off track+ id: 14+ identifier: another_project+ name: Another project+ active: false+ statusExplanation:+ format: markdown+ raw: Uh **oh**+ html: "<p>Uh <strong>oh</strong></p>"+ public: true+ description:+ format: markdown+ raw: ''+ html: ''+ createdAt: '2016-02-29T12:50:20+00:00'+ updatedAt: '2016-02-29T12:50:20+00:00'+ type:diff --git a/docs/api/apiv3/components/schemas/list_time_entries_model.yml b/docs/api/apiv3/components/schemas/list_time_entries_model.ymlnew file mode 100644index 00000000000..0a3c75445e2--- /dev/null+++ b/docs/api/apiv3/components/schemas/list_time_entries_model.yml@@ -0,0 +1,84 @@+# Schema: List_time_entriesModel+---+type: object+example:+ _type: Collection+ total: 39+ count: 2+ pageSize: 2+ offset: 1+ _embedded:+ elements:+ - _type: TimeEntry+ id: 5+ comment:+ format: plain+ raw: Some comment+ html: "<p>Some comment</p>"+ spentOn: '2015-03-20'+ hours: PT5H+ createdAt: '2015-03-20T12:56:56Z'+ updatedAt: '2015-03-20T12:56:56Z'+ _links:+ self:+ href: "/api/v3/time_entries/1"+ updateImmediately:+ href: "/api/v3/time_entries/1"+ method: patch+ delete:+ href: "/api/v3/time_entries/1"+ method: delete+ project:+ href: "/api/v3/projects/1"+ title: Some project+ workPackage:+ href: "/api/v3/work_packages/1"+ title: Some work package+ user:+ href: "/api/v3/users/2"+ title: Some user+ activity:+ href: "/api/v3/time_entries/activities/18"+ title: Some time entry activity+ - _type: TimeEntry+ id: 10+ comment:+ format: plain+ raw: Another comment+ html: "<p>Another comment</p>"+ spentOn: '2015-03-21'+ hours: PT7H+ createdAt: '2015-03-20T12:56:56Z'+ updatedAt: '2015-03-20T12:56:56Z'+ _links:+ self:+ href: "/api/v3/time_entries/2"+ project:+ href: "/api/v3/projects/42"+ title: Some other project+ workPackage:+ href: "/api/v3/work_packages/541"+ title: Some other work package+ user:+ href: "/api/v3/users/6"+ title: Some other project+ activity:+ href: "/api/v3/time_entries/activities/14"+ title: some other time entry activity+ _links:+ self:+ href: "/api/v3/time_entries?offset=1&pageSize=2"+ jumpTo:+ href: "/api/v3/time_entries?offset=%7Boffset%7D&pageSize=2"+ templated: true+ changeSize:+ href: "/api/v3/time_entries?offset=1&pageSize=%7Bsize%7D"+ templated: true+ nextByOffset:+ href: "/api/v3/time_entries?offset=2&pageSize=2"+ createTimeEntry:+ href: "/api/v3/time_entries/form"+ method: post+ createTimeEntryImmediately:+ href: "/api/v3/time_entries"+ method: postdiff --git a/docs/api/apiv3/components/schemas/lock_user.yml b/docs/api/apiv3/components/schemas/lock_user.ymlnew file mode 100644index 00000000000..e7e29cef86b--- /dev/null+++ b/docs/api/apiv3/components/schemas/lock_user.yml@@ -0,0 +1,2 @@+# Schema: Lock_user+--- {}diff --git a/docs/api/apiv3/components/schemas/markdown.yml b/docs/api/apiv3/components/schemas/markdown.ymlnew file mode 100644index 00000000000..434a108828e--- /dev/null+++ b/docs/api/apiv3/components/schemas/markdown.yml@@ -0,0 +1,2 @@+# Schema: Markdown+--- {}diff --git a/docs/api/apiv3/components/schemas/markdown_model.yml b/docs/api/apiv3/components/schemas/markdown_model.ymlnew file mode 100644index 00000000000..fca9910d174--- /dev/null+++ b/docs/api/apiv3/components/schemas/markdown_model.yml@@ -0,0 +1,6 @@+# Schema: MarkdownModel+---+type: string+format: html+example: <p>Hello world! <a href="http://example.com">This</a> <strong>is</strong>+ markdown!</p>diff --git a/docs/api/apiv3/components/schemas/membership_create_form.yml b/docs/api/apiv3/components/schemas/membership_create_form.ymlnew file mode 100644index 00000000000..f1b9aa92a53--- /dev/null+++ b/docs/api/apiv3/components/schemas/membership_create_form.yml@@ -0,0 +1,2 @@+# Schema: Membership_create_form+--- {}diff --git a/docs/api/apiv3/components/schemas/membership_model.yml b/docs/api/apiv3/components/schemas/membership_model.ymlnew file mode 100644index 00000000000..f8ff170cbaf--- /dev/null+++ b/docs/api/apiv3/components/schemas/membership_model.yml@@ -0,0 +1,62 @@+# Schema: MembershipModel+---+type: object+required:+- createdAt+- updatedAt+properties:+ id:+ type: integer+ description: Membership id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ createdAt:+ type: string+ format: date-time+ description: Time of creation+ readOnly: true+ updatedAt:+ type: string+ format: date-time+ description: Time of latest update+ readOnly: true+ _links:+ type: object+ required:+ - self+ - roles+ - principal+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This membership++ **Resource**: Membership+ readOnly: true+ project:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The project for which the membership is granted++ **Resource**: Project+ readOnly: true+ roles:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The list of roles the user or group is granted in the project++ **Resource**: RoleCollection+ readOnly: true+ principal:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The user or group that was granted membership++ **Resource**: User or Group+ readOnly: truediff --git a/docs/api/apiv3/components/schemas/membership_update_form.yml b/docs/api/apiv3/components/schemas/membership_update_form.ymlnew file mode 100644index 00000000000..2a43cc87238--- /dev/null+++ b/docs/api/apiv3/components/schemas/membership_update_form.yml@@ -0,0 +1,2 @@+# Schema: Membership_update_form+--- {}diff --git a/docs/api/apiv3/components/schemas/news_model.yml b/docs/api/apiv3/components/schemas/news_model.ymlnew file mode 100644index 00000000000..01018da64e2--- /dev/null+++ b/docs/api/apiv3/components/schemas/news_model.yml@@ -0,0 +1,91 @@+# Schema: NewsModel+---+type: object+properties:+ id:+ type: integer+ description: News' id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ title:+ type: string+ description: The headline of the news+ readOnly: true+ summary:+ type: string+ description: A short summary+ readOnly: true+ description:+ type: string+ description: The main body of the news with all the details+ readOnly: true+ createdAt:+ type: string+ format: date-time+ description: The time the news was created at+ readOnly: true+ _links:+ type: object+ required:+ - self+ - project+ - author+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This news++ **Resource**: News+ readOnly: true+ project:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The project the news is situated in++ **Resource**: Project+ author:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The user having created the news++ **Resource**: User+ readOnly: true+example:+ _type: News+ id: 1+ title: asperiores possimus nam doloribus ab+ summary: Celebrer spiculum colo viscus claustrum atque. Id nulla culpa sumptus.+ Comparo crapula depopulo demonstro.+ description:+ format: markdown+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago+ vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago+ consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus+ tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto+ sortitus cresco apud vestrum qui.+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur+ vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria+ ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter+ somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero+ vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"+ createdAt: '2015-03-20T12:57:01Z'+ _links:+ self:+ href: "/api/v3/news/1"+ title: asperiores possimus nam doloribus ab+ project:+ href: "/api/v3/projects/1"+ title: A project+ author:+ href: "/api/v3/users/2"+ title: Peggie Feeney+ _embedded:+ project:+ _type: Project...+ author:+ _type: User...diff --git a/docs/api/apiv3/components/schemas/offset_based_pagination.yml b/docs/api/apiv3/components/schemas/offset_based_pagination.ymlnew file mode 100644index 00000000000..df79b8764fc--- /dev/null+++ b/docs/api/apiv3/components/schemas/offset_based_pagination.yml@@ -0,0 +1,2 @@+# Schema: Offset_based_pagination+--- {}diff --git a/docs/api/apiv3/components/schemas/plain_text.yml b/docs/api/apiv3/components/schemas/plain_text.ymlnew file mode 100644index 00000000000..555c8793f85--- /dev/null+++ b/docs/api/apiv3/components/schemas/plain_text.yml@@ -0,0 +1,2 @@+# Schema: Plain_Text+--- {}diff --git a/docs/api/apiv3/components/schemas/plain_text_model.yml b/docs/api/apiv3/components/schemas/plain_text_model.ymlnew file mode 100644index 00000000000..7260a6fea65--- /dev/null+++ b/docs/api/apiv3/components/schemas/plain_text_model.yml@@ -0,0 +1,5 @@+# Schema: Plain_TextModel+---+type: string+format: html+example: "<p>Hello world! This *is* plain text!</p>"diff --git a/docs/api/apiv3/components/schemas/post_model.yml b/docs/api/apiv3/components/schemas/post_model.ymlnew file mode 100644index 00000000000..835ce5295b6--- /dev/null+++ b/docs/api/apiv3/components/schemas/post_model.yml@@ -0,0 +1,46 @@+# Schema: PostModel+---+type: object+required:+- subject+properties:+ id:+ type: integer+ description: Identifier of this post+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ subject:+ type: string+ description: The post's subject+ _links:+ type: object+ properties:+ addAttachment:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Attach a file to the post++ # Conditions++ **Permission**: edit messages+ readOnly: true+example:+ _type: Post+ id: 1+ subject: A post with a subject+ _embedded:+ project:+ _type: Project...+ _links:+ self:+ href: "/api/v3/posts/1"+ attachments:+ href: "/api/v3/posts/1/attachments"+ addAttachment:+ href: "/api/v3/posts/1/attachments"+ method: post+ project:+ href: "/api/v3/projects/1"+ title: A project with a titlediff --git a/docs/api/apiv3/components/schemas/previewing_model.yml b/docs/api/apiv3/components/schemas/previewing_model.ymlnew file mode 100644index 00000000000..6cf67f4a9fa--- /dev/null+++ b/docs/api/apiv3/components/schemas/previewing_model.yml@@ -0,0 +1,3 @@+# Schema: PreviewingModel+---+type: objectdiff --git a/docs/api/apiv3/components/schemas/principal_model.yml b/docs/api/apiv3/components/schemas/principal_model.ymlnew file mode 100644index 00000000000..8b366f58623--- /dev/null+++ b/docs/api/apiv3/components/schemas/principal_model.yml@@ -0,0 +1,3 @@+# Schema: PrincipalModel+---+type: objectdiff --git a/docs/api/apiv3/components/schemas/principals_model.yml b/docs/api/apiv3/components/schemas/principals_model.ymlnew file mode 100644index 00000000000..158b789a8c1--- /dev/null+++ b/docs/api/apiv3/components/schemas/principals_model.yml@@ -0,0 +1,94 @@+# Schema: PrincipalsModel+---+type: object+example:+ _type: Collection+ total: 4+ count: 4+ _embedded:+ elements:+ - _type: User+ id: 4+ login: Eliza92778+ admin: false+ firstName: Danika+ lastName: O'Keefe+ name: Danika O'Keefe+ email: [email protected]+ avatar: https://example.org/users/4/avatar+ createdAt: '2015-03-20T12:57:02Z'+ updatedAt: '2015-06-16T15:28:14Z'+ status: active+ identityUrl:+ _links:+ self:+ href: "/api/v3/users/4"+ title: Danika O'Keefe+ showUser:+ href: "/users/4"+ type: text/html+ updateImmediately:+ href: "/api/v3/users/4"+ title: Update Eliza92778+ method: patch+ lock:+ href: "/api/v3/users/4/lock"+ title: Set lock on Eliza92778+ method: post+ delete:+ href: "/api/v3/users/4"+ title: Delete Eliza92778+ method: delete+ - _type: User+ id: 2+ login: Sebastian9686+ admin: false+ firstName: Peggie+ lastName: Feeney+ name: Peggie Feeney+ email:+ avatar: https://example.org/users/4/avatar+ createdAt: '2015-03-20T12:56:55Z'+ updatedAt: '2015-03-20T12:56:55Z'+ status: active+ identityUrl:+ _links:+ self:+ href: "/api/v3/users/2"+ title: Peggie Feeney+ showUser:+ href: "/users/2"+ type: text/html+ updateImmediately:+ href: "/api/v3/users/2"+ title: Update Sebastian9686+ method: patch+ lock:+ href: "/api/v3/users/2/lock"+ title: Set lock on Sebastian9686+ method: post+ delete:+ href: "/api/v3/users/2"+ title: Delete Sebastian9686+ method: delete+ - _type: Group+ id: 9+ name: The group+ createdAt: '2015-09-23T11:06:36Z'+ updatedAt: '2015-09-23T11:06:36Z'+ _links:+ self:+ href: "/api/v3/groups/9"+ title: The group+ - _type: PlaceholderUser+ id: 29+ name: UX Designer+ createdAt: '2018-09-23T11:06:36Z'+ updatedAt: '2019-10-23T11:06:36Z'+ _links:+ self:+ href: "/api/v3/placeholder_users/29"+ title: UX Designer+ _links:+ self:+ href: "/api/v3/principals"diff --git a/docs/api/apiv3/components/schemas/priorities_model.yml b/docs/api/apiv3/components/schemas/priorities_model.ymlnew file mode 100644index 00000000000..49ebbda9fba--- /dev/null+++ b/docs/api/apiv3/components/schemas/priorities_model.yml@@ -0,0 +1,52 @@+# Schema: PrioritiesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/priorities"+ _type: Collection+ total: 4+ count: 4+ _embedded:+ elements:+ - _type: Priority+ _links:+ self:+ href: "/api/v3/priorities/1"+ title: Low+ id: 1+ name: Low+ position: 1+ isDefault: false+ isActive: true+ - _type: Priority+ _links:+ self:+ href: "/api/v3/priorities/2"+ title: Normal+ id: 2+ name: Normal+ position: 2+ isDefault: true+ isActive: true+ - _type: Priority+ _links:+ self:+ href: "/api/v3/priorities/3"+ title: High+ id: 3+ name: High+ position: 3+ isDefault: false+ isActive: true+ - _type: Priority+ _links:+ self:+ href: "/api/v3/priorities/4"+ title: Immediate+ id: 4+ name: Immediate+ position: 5+ isDefault: false+ isActive: truediff --git a/docs/api/apiv3/components/schemas/priority_model.yml b/docs/api/apiv3/components/schemas/priority_model.ymlnew file mode 100644index 00000000000..b2dfe42968d--- /dev/null+++ b/docs/api/apiv3/components/schemas/priority_model.yml@@ -0,0 +1,52 @@+# Schema: PriorityModel+---+type: object+properties:+ id:+ type: integer+ description: Priority id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: Priority name+ readOnly: true+ minLength: 1+ position:+ type: integer+ description: Sort index of the priority+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ isDefault:+ type: boolean+ description: Indicates whether this is the default value+ readOnly: true+ isActive:+ type: boolean+ description: Indicates whether the priority is available+ _links:+ type: object+ required:+ - self+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This priority++ **Resource**: Priority+ readOnly: true+example:+ _type: Priority+ _links:+ self:+ href: "/api/v3/priorities/1"+ title: Low+ id: 1+ name: Low+ position: 1+ isDefault: false+ isActive: truediff --git a/docs/api/apiv3/components/schemas/project_copy_form.yml b/docs/api/apiv3/components/schemas/project_copy_form.ymlnew file mode 100644index 00000000000..38764fb6e82--- /dev/null+++ b/docs/api/apiv3/components/schemas/project_copy_form.yml@@ -0,0 +1,2 @@+# Schema: Project_copy_form+--- {}diff --git a/docs/api/apiv3/components/schemas/project_create_form.yml b/docs/api/apiv3/components/schemas/project_create_form.ymlnew file mode 100644index 00000000000..c01bd1f350d--- /dev/null+++ b/docs/api/apiv3/components/schemas/project_create_form.yml@@ -0,0 +1,2 @@+# Schema: Project_create_form+--- {}diff --git a/docs/api/apiv3/components/schemas/project_model.yml b/docs/api/apiv3/components/schemas/project_model.ymlnew file mode 100644index 00000000000..020ee5792f6--- /dev/null+++ b/docs/api/apiv3/components/schemas/project_model.yml@@ -0,0 +1,180 @@+# Schema: ProjectModel+---+type: object+properties:+ id:+ type: integer+ description: Projects' id+ minimum: 0+ exclusiveMinimum: true+ identifier:+ type: string+ name:+ type: string+ active:+ type: boolean+ description: Indicates whether the project is currently active or already archived+ statusExplanation:+ allOf:+ - "$ref": "./formattable.yml"+ - description: A text detailing and explaining why the project has the reported+ status+ public:+ type: boolean+ description: Indicates whether the project is accessible for everybody+ description:+ allOf:+ - "$ref": "./formattable.yml"+ - {}+ 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 project+ readOnly: true+ _links:+ type: object+ required:+ - self+ - categories+ - types+ - versions+ - memberships+ - workPackages+ properties:+ update:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Form endpoint that aids in updating this project++ # Conditions++ **Permission**: edit project+ readOnly: true+ updateImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Directly update this project++ # Conditions++ **Permission**: edit project+ readOnly: true+ delete:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Delete this project++ # Conditions++ **Permission**: admin+ readOnly: true+ createWorkPackage:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Form endpoint that aids in preparing and creating a work package++ # Conditions++ **Permission**: add work packages+ readOnly: true+ createWorkPackageImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Directly creates a work package in the project++ # Conditions++ **Permission**: add work packages+ readOnly: true+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This project++ **Resource**: Project+ readOnly: true+ categories:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Categories available in this project++ **Resource**: Collection+ readOnly: true+ types:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Types available in this project++ **Resource**: Collection++ # Conditions++ **Permission**: view work packages or manage types+ readOnly: true+ versions:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Versions available in this project++ **Resource**: Collection++ # Conditions++ **Permission**: view work packages or manage versions+ readOnly: true+ memberships:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Memberships in the project++ **Resource**: Collection++ # Conditions++ **Permission**: view members+ readOnly: true+ workPackages:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Work Packages of this project++ **Resource**: Collection+ readOnly: true+ parent:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Parent project of the project++ **Resource**: Project++ # Conditions++ **Permission** edit project+ status:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Denotes the status of the project, so whether the project is on track, at risk or is having trouble.++ **Resource**: ProjectStatus++ # Conditions++ **Permission** edit projectdiff --git a/docs/api/apiv3/components/schemas/project_update_form.yml b/docs/api/apiv3/components/schemas/project_update_form.ymlnew file mode 100644index 00000000000..b5f904c8cc5--- /dev/null+++ b/docs/api/apiv3/components/schemas/project_update_form.yml@@ -0,0 +1,2 @@+# Schema: Project_update_form+--- {}diff --git a/docs/api/apiv3/components/schemas/projects_schema_model.yml b/docs/api/apiv3/components/schemas/projects_schema_model.ymlnew file mode 100644index 00000000000..179be856cdd--- /dev/null+++ b/docs/api/apiv3/components/schemas/projects_schema_model.yml@@ -0,0 +1,129 @@+# Schema: Projects_schemaModel+---+type: object+example:+ _type: Schema+ _dependencies: []+ id:+ type: Integer+ name: ID+ required: true+ hasDefault: false+ writable: false+ name:+ type: String+ name: Name+ required: true+ hasDefault: false+ writable: true+ minLength: 1+ maxLength: 255+ identifier:+ type: String+ name: Identifier+ required: true+ hasDefault: false+ writable: true+ minLength: 1+ maxLength: 100+ description:+ type: Formattable+ name: Description+ required: false+ hasDefault: false+ writable: true+ public:+ type: Boolean+ name: Public+ required: true+ hasDefault: false+ writable: true+ active:+ type: Boolean+ name: Active+ required: true+ hasDefault: true+ writable: true+ status:+ type: ProjectStatus+ name: Status+ required: false+ hasDefault: true+ writable: true+ _links:+ allowedValues:+ - href: "/api/v3/project_statuses/on_track"+ title: On track+ - href: "/api/v3/project_statuses/at_risk"+ title: At risk+ - href: "/api/v3/project_statuses/off_track"+ title: Off track+ statusExplanation:+ type: Formattable+ name: Status explanation+ required: false+ hasDefault: false+ writable: true+ parent:+ type: Project+ name: Subproject of+ required: false+ hasDefault: false+ writable: true+ location: _links+ visibility: default+ _links: {}+ createdAt:+ type: DateTime+ name: Created on+ required: true+ hasDefault: false+ writable: false+ updatedAt:+ type: DateTime+ name: Updated on+ required: true+ hasDefault: false+ writable: false+ customField30:+ type: Integer+ name: Integer project custom field+ required: false+ hasDefault: false+ writable: true+ visibility: default+ customField31:+ type: CustomOption+ name: List project custom field+ required: false+ hasDefault: false+ writable: true+ location: _links+ visibility: default+ _links: {}+ customField32:+ type: Version+ name: Version project custom field+ required: false+ hasDefault: false+ writable: true+ location: _links+ visibility: default+ _links: {}+ customField34:+ type: Boolean+ name: Boolean project custom field+ required: false+ hasDefault: false+ writable: true+ visibility: default+ customField35:+ type: String+ name: Text project custom field+ required: true+ hasDefault: false+ writable: true+ visibility: default+ _links:+ self:+ href: "/api/v3/projects/schema"diff --git a/docs/api/apiv3/components/schemas/queries_model.yml b/docs/api/apiv3/components/schemas/queries_model.ymlnew file mode 100644index 00000000000..4888917b0eb--- /dev/null+++ b/docs/api/apiv3/components/schemas/queries_model.yml@@ -0,0 +1,104 @@+# Schema: QueriesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/queries"+ total: 1+ count: 1+ _type: Collection+ _embedded:+ elements:+ - _type: Query+ id: 9+ name: fdsfdsfdsf+ createdAt: '2015-03-20T12:56:56Z'+ updatedAt: '2015-05-20T18:16:53Z'+ filters:+ - _type: StatusQueryFilter+ name: Status+ _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ - _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ public: false+ sums: false+ starred: true+ _embedded:+ results:+ _type: WorkPackageCollection+ total: 234+ count: 30+ pageSize: 2+ offset: 1+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ _links:+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ project:+ href: "/api/v3/projects/3"+ title: copydiff --git a/docs/api/apiv3/components/schemas/query_column_model.yml b/docs/api/apiv3/components/schemas/query_column_model.ymlnew file mode 100644index 00000000000..7e4d3712338--- /dev/null+++ b/docs/api/apiv3/components/schemas/query_column_model.yml@@ -0,0 +1,22 @@+# Schema: Query_ColumnModel+---+type: object+required:+- id+- name+properties:+ id:+ type: string+ description: Query column id+ readOnly: true+ name:+ type: string+ description: Query column name+example:+ _type: QueryColumn::Property+ id: priority+ name: Priority+ _links:+ self:+ href: "/api/v3/queries/columns/priority"+ title: Prioritydiff --git a/docs/api/apiv3/components/schemas/query_create_form.yml b/docs/api/apiv3/components/schemas/query_create_form.ymlnew file mode 100644index 00000000000..5dbab5e4488--- /dev/null+++ b/docs/api/apiv3/components/schemas/query_create_form.yml@@ -0,0 +1,2 @@+# Schema: Query_Create_Form+--- {}diff --git a/docs/api/apiv3/components/schemas/query_filter_instance_schema_model.yml b/docs/api/apiv3/components/schemas/query_filter_instance_schema_model.ymlnew file mode 100644index 00000000000..c7d8a6f8289--- /dev/null+++ b/docs/api/apiv3/components/schemas/query_filter_instance_schema_model.yml@@ -0,0 +1,77 @@+# Schema: Query_Filter_Instance_SchemaModel+---+type: object+required:+- name+- filter+properties:+ name:+ type: field schema+ description: Describes the name attribute+ readOnly: true+ filter:+ type: field schema+ description: QuerySortBy name+ _links:+ type: object+ required:+ - self+ - filter+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This QueryFilterInstanceSchema (same as for schema)++ **Resource**: QueryFilterInstanceSchema+ readOnly: true+ filter:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The filter for which this schema is specific++ **Resource**: Filter+ readOnly: true+example:+ _type: QueryFilterInstanceSchema+ _dependencies:+ - _type: SchemaDependency+ 'on': operator+ dependencies:+ "/api/v3/queries/operators/=":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ name:+ type: String+ name: Name+ required: true+ hasDefault: true+ writable: false+ filter:+ type: QueryFilter+ name: Filter+ required: true+ hasDefault: false+ writable: true+ _links: {}+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ filter:+ href: "/api/v3/queries/filters/author"+ title: Authordiff --git a/docs/api/apiv3/components/schemas/query_filter_instance_schemas_for_project_model.yml b/docs/api/apiv3/components/schemas/query_filter_instance_schemas_for_project_model.ymlnew file mode 100644index 00000000000..5ba0c556cb5--- /dev/null+++ b/docs/api/apiv3/components/schemas/query_filter_instance_schemas_for_project_model.yml@@ -0,0 +1,94 @@+# Schema: Query_Filter_Instance_Schemas_For_ProjectModel+---+type: object+example:+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: QueryFilterInstanceSchema+ _dependencies:+ - _type: SchemaDependency+ 'on': operator+ dependencies:+ "/api/v3/queries/operators/=":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!*": {}+ "/api/v3/queries/operators/*": {}+ name:+ type: String+ name: Name+ required: true+ hasDefault: true+ writable: false+ filter:+ type: QueryFilter+ name: Filter+ required: true+ hasDefault: false+ writable: true+ _links: {}+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas/assignee"+ filter:+ href: "/api/v3/queries/filters/assignee"+ title: Assignee+ - _type: QueryFilterInstanceSchema+ _dependencies:+ - _type: SchemaDependency+ 'on': operator+ dependencies:+ "/api/v3/queries/operators/=":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ name:+ type: String+ name: Name+ required: true+ hasDefault: true+ writable: false+ filter:+ type: QueryFilter+ name: Filter+ required: true+ hasDefault: false+ writable: true+ _links: {}+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ filter:+ href: "/api/v3/queries/filters/author"+ title: Author+ _links:+ self:+ href: "/api/v3/projects/42/queries/filter_instance_schemas"diff --git a/docs/api/apiv3/components/schemas/query_filter_instance_schemas_model.yml b/docs/api/apiv3/components/schemas/query_filter_instance_schemas_model.ymlnew file mode 100644index 00000000000..f092cfcf06a--- /dev/null+++ b/docs/api/apiv3/components/schemas/query_filter_instance_schemas_model.yml@@ -0,0 +1,94 @@+# Schema: Query_Filter_Instance_SchemasModel+---+type: object+example:+ _type: Collection+ total: 2+ count: 2+ _embedded:+ elements:+ - _type: QueryFilterInstanceSchema+ _dependencies:+ - _type: SchemaDependency+ 'on': operator+ dependencies:+ "/api/v3/queries/operators/=":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!*": {}+ "/api/v3/queries/operators/*": {}+ name:+ type: String+ name: Name+ required: true+ hasDefault: true+ writable: false+ filter:+ type: QueryFilter+ name: Filter+ required: true+ hasDefault: false+ writable: true+ _links: {}+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas/assignee"+ filter:+ href: "/api/v3/queries/filters/assignee"+ title: Assignee+ - _type: QueryFilterInstanceSchema+ _dependencies:+ - _type: SchemaDependency+ 'on': operator+ dependencies:+ "/api/v3/queries/operators/=":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ name:+ type: String+ name: Name+ required: true+ hasDefault: true+ writable: false+ filter:+ type: QueryFilter+ name: Filter+ required: true+ hasDefault: false+ writable: true+ _links: {}+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ filter:+ href: "/api/v3/queries/filters/author"+ title: Author+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas"diff --git a/docs/api/apiv3/components/schemas/query_filter_model.yml b/docs/api/apiv3/components/schemas/query_filter_model.ymlnew file mode 100644index 00000000000..4c22d79621d--- /dev/null+++ b/docs/api/apiv3/components/schemas/query_filter_model.yml@@ -0,0 +1,16 @@+# Schema: Query_FilterModel+---+type: object+required:+- id+properties:+ id:+ type: string+ description: QueryFilter id+example:+ _type: QueryFilter+ id: status+ _links:+ self:+ href: "/api/v3/queries/filters/status"+ title: Statusdiff --git a/docs/api/apiv3/components/schemas/query_model.yml b/docs/api/apiv3/components/schemas/query_model.ymlnew file mode 100644index 00000000000..fd548fde221--- /dev/null+++ b/docs/api/apiv3/components/schemas/query_model.yml@@ -0,0 +1,206 @@+# Schema: QueryModel+---+type: object+required:+- createdAt+- updatedAt+properties:+ id:+ type: integer+ description: Query id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: Query name+ readOnly: true+ filters:+ type: "[]queryfilterinstance"+ description: A set of QueryFilters which will be applied to the work packages+ to determine the resulting work packages+ readOnly: true+ sums:+ type: boolean+ description: Should sums (of supported properties) be shown?+ readOnly: true+ timelineVisible:+ type: boolean+ description: Should the timeline mode be shown?+ readOnly: true+ timelineLabels:+ type: querytimelinelabels+ description: Which labels are shown in the timeline, empty when default+ readOnly: true+ timelineZoomLevel:+ type: string+ description: Which zoom level should the timeline be rendered in?+ readOnly: true+ highlightingMode:+ type: string+ description: Which highlighting mode should the table have?+ readOnly: true+ showHierarchies:+ type: boolean+ description: Should the hierarchy mode be enabled?+ readOnly: true+ hidden:+ type: boolean+ description: Should the query be hidden from the query list?+ readOnly: true+ public:+ type: boolean+ description: Can users besides the owner see the query?+ readOnly: true+ starred:+ type: boolean+ description: Should the query be highlighted to the user?+ 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 query+ readOnly: true+ _links:+ type: object+ properties:+ star:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Elevates the query to the status of 'starred'++ # Conditions++ **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is not yet starred+ readOnly: true+ unstar:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Removes the 'starred' status++ # Conditions++ **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is starred+ readOnly: true+ update:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Use the Form based process to verify the query before persisting++ # Conditions++ **Permission**: view work packages+ readOnly: true+ updateImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Persist the query without using a Form based process for guidance++ # Conditions++ **Permission**: save queries for own queries, manage public queries for public queries;+ readOnly: true+example:+ _type: Query+ id: 9+ name: fdsfdsfdsf+ createdAt: '2015-03-20T12:56:56Z'+ updatedAt: '2015-05-20T18:16:53Z'+ filters:+ - _type: StatusQueryFilter+ name: Status+ _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ - _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ public: false+ sums: false+ starred: false+ _embedded:+ results:+ _type: WorkPackageCollection+ total: 234+ count: 30+ pageSize: 2+ offset: 1+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ highlightedAttributes: []+ _links:+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ highlightedAttributes: []+ groupBy:+ href:+ title:+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ project:+ href: "/api/v3/projects/3"+ title: copydiff --git a/docs/api/apiv3/components/schemas/query_operator_model.yml b/docs/api/apiv3/components/schemas/query_operator_model.ymlnew file mode 100644index 00000000000..33c9c111d5d--- /dev/null+++ b/docs/api/apiv3/components/schemas/query_operator_model.yml@@ -0,0 +1,22 @@+# Schema: Query_OperatorModel+---+type: object+required:+- id+- name+properties:+ id:+ type: string+ description: Query operator id+ readOnly: true+ name:+ type: string+ description: Query operator name+example:+ _type: QueryOperator+ id: "!"+ name: is not+ _links:+ self:+ href: "/api/v3/queries/operators/!"+ title: is notdiff --git a/docs/api/apiv3/components/schemas/query_sort_by_model.yml b/docs/api/apiv3/components/schemas/query_sort_by_model.ymlnew file mode 100644index 00000000000..b2f90ac6956--- /dev/null+++ b/docs/api/apiv3/components/schemas/query_sort_by_model.yml@@ -0,0 +1,28 @@+# Schema: Query_Sort_ByModel+---+type: object+required:+- id+- name+properties:+ id:+ type: string+ description: QuerySortBy id+ readOnly: true+ name:+ type: string+ description: QuerySortBy name+example:+ _type: QuerySortBy+ id: status-asc+ name: Status (Ascending)+ _links:+ self:+ href: "/api/v3/queries/sort_bys/status-asc"+ title: Status (Ascending)+ column:+ href: "/api/v3/queries/columns/status"+ title: Status+ direction:+ href: urn:openproject-org:api:v3:queries:directions:asc+ title: Ascendingdiff --git a/docs/api/apiv3/components/schemas/relation_edit_form_model.yml b/docs/api/apiv3/components/schemas/relation_edit_form_model.ymlnew file mode 100644index 00000000000..e633a83527c--- /dev/null+++ b/docs/api/apiv3/components/schemas/relation_edit_form_model.yml@@ -0,0 +1,76 @@+# Schema: Relation_edit_formModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/relations/form"+ validate:+ href: "/api/v3/relations/form"+ method: POST+ commit:+ href: "/api/v3/relations"+ method: PATCH+ _type: Form+ _embedded:+ payload:+ _links:+ from:+ href: "/api/v3/work_packages/4534"+ to:+ href: "/api/v3/work_packages/3857"+ _type: WorkPackage+ type: follows+ delay: 3+ description: let it rest for 3 days+ schema:+ _type: Schema+ _links:+ self:+ href: "/api/v3/relations/schema"+ id:+ name: ID+ type: Integer+ writable: false+ type:+ name: Type+ type: String+ writable: true+ allowedValues:+ - relates+ - duplicates+ - duplicated+ - blocks+ - blocked+ - precedes+ - follows+ - includes+ - partof+ - requires+ - required+ reverseType:+ name: Reverse Type+ type: String+ writable: false+ description:+ name: Description+ type: String+ writable: true+ from:+ name: From work package+ type: WorkPackage+ writeable: false+ to:+ name: To work package+ type: WorkPackage+ writable: false+ delay:+ name: Delay+ type: Integer+ writable: true+ validationErrors:+ from:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:BadExampleError+ message: For the purpose of this example we need a validation error. The remainder+ of the response pretends there were no errors.diff --git a/docs/api/apiv3/components/schemas/relation_model.yml b/docs/api/apiv3/components/schemas/relation_model.ymlnew file mode 100644index 00000000000..d1bf4d8a91e--- /dev/null+++ b/docs/api/apiv3/components/schemas/relation_model.yml@@ -0,0 +1,135 @@+# 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: 0diff --git a/docs/api/apiv3/components/schemas/relation_schema_for_type.yml b/docs/api/apiv3/components/schemas/relation_schema_for_type.ymlnew file mode 100644index 00000000000..983b099954f--- /dev/null+++ b/docs/api/apiv3/components/schemas/relation_schema_for_type.yml@@ -0,0 +1,2 @@+# Schema: Relation_schema_for_type+--- {}diff --git a/docs/api/apiv3/components/schemas/relation_schema_model.yml b/docs/api/apiv3/components/schemas/relation_schema_model.ymlnew file mode 100644index 00000000000..a30d61a6e49--- /dev/null+++ b/docs/api/apiv3/components/schemas/relation_schema_model.yml@@ -0,0 +1,36 @@+# Schema: Relation_schemaModel+---+type: object+example:+ _type: Schema+ _links:+ self:+ href: "/api/v3/relations/schema"+ id:+ name: ID+ type: Integer+ writable: false+ type:+ name: Type+ type: String+ writable: true+ reverseType:+ name: Reverse Type+ type: String+ writable: false+ description:+ name: Description+ type: String+ writable: true+ from:+ name: From work package+ type: WorkPackage+ writable: false+ to:+ name: To work package+ type: WorkPackage+ writable: false+ delay:+ name: Delay+ type: Integer+ writable: truediff --git a/docs/api/apiv3/components/schemas/relations_model.yml b/docs/api/apiv3/components/schemas/relations_model.ymlnew file mode 100644index 00000000000..1b122604830--- /dev/null+++ b/docs/api/apiv3/components/schemas/relations_model.yml@@ -0,0 +1,37 @@+# Schema: RelationsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/relations"+ total: 3+ count: 1+ _type: Collection+ _embedded:+ elements:+ - _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: 0diff --git a/docs/api/apiv3/components/schemas/remove_watcher.yml b/docs/api/apiv3/components/schemas/remove_watcher.ymlnew file mode 100644index 00000000000..782e5b8d8e7--- /dev/null+++ b/docs/api/apiv3/components/schemas/remove_watcher.yml@@ -0,0 +1,2 @@+# Schema: Remove_Watcher+--- {}diff --git a/docs/api/apiv3/components/schemas/revision_model.yml b/docs/api/apiv3/components/schemas/revision_model.ymlnew file mode 100644index 00000000000..02de971d433--- /dev/null+++ b/docs/api/apiv3/components/schemas/revision_model.yml@@ -0,0 +1,101 @@+# Schema: RevisionModel+---+type: object+required:+- identifier+- formattedIdentifier+- authorName+- message+- createdAt+properties:+ id:+ type: integer+ description: Revision's id, assigned by OpenProject+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ identifier:+ type: string+ description: The raw SCM identifier of the revision (e.g. full SHA hash)+ readOnly: true+ formattedIdentifier:+ type: string+ description: The SCM identifier of the revision, formatted (e.g. shortened unambiguous+ SHA hash). May be identical to identifier in many cases+ readOnly: true+ authorName:+ type: string+ description: The name of the author that committed this revision. Note that this+ name is retrieved from the repository and does not identify a user in OpenProject.+ readOnly: true+ message:+ allOf:+ - "$ref": "./formattable.yml"+ - description: The commit message of the revision+ readOnly: true+ createdAt:+ type: string+ format: date-time+ description: The time this revision was committed to the repository+ _links:+ type: object+ required:+ - self+ - project+ - showRevision+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This revision++ **Resource**: Revision+ readOnly: true+ project:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The project to which the revision belongs++ **Resource**: Project+ readOnly: true+ author:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The user that added this revision, if the authorName was mapped to a user in OpenProject++ **Resource**: User+ readOnly: true+ showRevision:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ A URL to the repository view (outside APIv3) showing this revision++ **Resource**: -+ readOnly: true+example:+ _type: Revision+ _links:+ self:+ href: "/api/v3/revisions/1"+ project:+ href: "/api/v3/projects/1"+ author:+ href: "/api/v3/users/1"+ showRevision:+ href: "/projects/identifier/repository/revision/11f4b07"+ id: 1+ identifier: 11f4b07dff4f4ce9548a52b7d002daca7cd63ec6+ formattedIdentifier: 11f4b07+ authorName: Some Developer+ message:+ format: plain+ raw: |-+ This revision provides new features++ An elaborate description+ html: "<p>This revision provides new features<br/><br/>An elaborate description</p>"+ createdAt: '2015-07-21T13:36:59Z'diff --git a/docs/api/apiv3/components/schemas/revisions_model.yml b/docs/api/apiv3/components/schemas/revisions_model.ymlnew file mode 100644index 00000000000..178b174a986--- /dev/null+++ b/docs/api/apiv3/components/schemas/revisions_model.yml@@ -0,0 +1,60 @@+# Schema: RevisionsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/work_packages/42/revisions"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: Revision+ _links:+ self:+ href: "/api/v3/revisions/13"+ project:+ href: "/api/v3/projects/1"+ title: A Test Project+ author:+ href: "/api/v3/users/1"+ title: John Sheppard - j.sheppard+ showRevision:+ href: "/projects/identifier/repository/revision/11f4b07"+ id: 13+ identifier: 11f4b07dff4f4ce9548a52b7d002daca7cd63ec6+ formattedIdentifier: 11f4b07+ authorName: John Sheppard+ message:+ format: plain+ raw: |-+ This revision provides new features++ An elaborate description+ html: "<p>This revision provides new features<br/><br/>An elaborate description</p>"+ createdAt: '2015-07-21T13:36:59Z'+ - _type: Revision+ _links:+ self:+ href: "/api/v3/revisions/14"+ project:+ href: "/api/v3/projects/1"+ title: A Test Project+ author:+ href: "/api/v3/users/2"+ title: Jim Sheppard - j.sheppard+ showRevision:+ href: "/projects/identifier/repository/revision/029ed72a"+ id: 13+ identifier: '029ed72a3b7b7c4ab332b1f6eaa6576e7c946059'+ formattedIdentifier: '029ed72a'+ authorName: j1msheppard+ message:+ format: plain+ raw: |-+ This revision fixes some stuff++ More information here+ html: "<p>This revision fixes some stuff<br/><br/>More information here</p>"+ createdAt: '2015-06-30T08:47:00Z'diff --git a/docs/api/apiv3/components/schemas/role_model.yml b/docs/api/apiv3/components/schemas/role_model.ymlnew file mode 100644index 00000000000..393aba7c110--- /dev/null+++ b/docs/api/apiv3/components/schemas/role_model.yml@@ -0,0 +1,36 @@+# Schema: RoleModel+---+type: object+required:+- name+properties:+ id:+ type: integer+ description: Role id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: Role name+ _links:+ type: object+ required:+ - self+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This role++ **Resource**: Role+ readOnly: true+example:+ _type: Role+ id: 3+ name: Manager+ _links:+ self:+ href: "/api/v3/roles/3"+ title: Managerdiff --git a/docs/api/apiv3/components/schemas/roles_model.yml b/docs/api/apiv3/components/schemas/roles_model.ymlnew file mode 100644index 00000000000..e2c2537da40--- /dev/null+++ b/docs/api/apiv3/components/schemas/roles_model.yml@@ -0,0 +1,47 @@+# Schema: RolesModel+---+type: object+example:+ _type: Collection+ total: 5+ count: 5+ _embedded:+ elements:+ - _type: Role+ id: 3+ name: Manager+ _links:+ self:+ href: "/api/v3/roles/3"+ title: Manager+ - _type: Role+ id: 2+ name: Anonymous+ _links:+ self:+ href: "/api/v3/roles/2"+ title: Anonymous+ - _type: Role+ id: 5+ name: Reader+ _links:+ self:+ href: "/api/v3/roles/5"+ title: Reader+ - _type: Role+ id: 4+ name: Member+ _links:+ self:+ href: "/api/v3/roles/4"+ title: Member+ - _type: Role+ id: 1+ name: Non member+ _links:+ self:+ href: "/api/v3/roles/1"+ title: Non member+ _links:+ self:+ href: "/api/v3/roles"diff --git a/docs/api/apiv3/components/schemas/root_model.yml b/docs/api/apiv3/components/schemas/root_model.ymlnew file mode 100644index 00000000000..8d3177d74e3--- /dev/null+++ b/docs/api/apiv3/components/schemas/root_model.yml@@ -0,0 +1,39 @@+# Schema: RootModel+---+type: object+properties:+ instanceName:+ type: string+ description: The name of the OpenProject instance+ readOnly: true+ coreVersion:+ type: string+ description: |-+ The OpenProject core version number for the instance++ # Conditions++ **Permission** requires admin privileges+example:+ _links:+ configuration:+ href: "/api/v3/configuration"+ user:+ href: "/api/v3/users/1"+ title: John Sheppard+ userPreferences:+ href: "/api/v3/my_preferences"+ priorities:+ href: "/api/v3/priorities"+ relations:+ href: "/api/v3/relations"+ statuses:+ href: "/api/v3/statuses"+ types:+ href: "/api/v3/types"+ workPackages:+ href: "/api/v3/work_packages"+ users:+ href: "/api/v3/users"+ instanceName: My own OpenProject+ coreVersion: 10.3.0diff --git a/docs/api/apiv3/components/schemas/schema_for_global_queries_model.yml b/docs/api/apiv3/components/schemas/schema_for_global_queries_model.ymlnew file mode 100644index 00000000000..75269358ce3--- /dev/null+++ b/docs/api/apiv3/components/schemas/schema_for_global_queries_model.yml@@ -0,0 +1,234 @@+# Schema: Schema_For_Global_QueriesModel+---+type: object+example:+ _type: Schema+ _dependencies: []+ id:+ type: Integer+ name: ID+ required: true+ hasDefault: false+ writable: false+ name:+ type: String+ name: Name+ required: true+ hasDefault: false+ writable: true+ minLength: 1+ maxLength: 255+ createdAt:+ type: DateTime+ name: Created on+ required: true+ hasDefault: false+ writable: false+ updatedAt:+ type: DateTime+ name: Updated on+ required: true+ hasDefault: false+ writable: false+ user:+ type: User+ name: User+ required: true+ hasDefault: true+ writable: false+ project:+ type: Project+ name: Project+ required: false+ hasDefault: false+ writable: true+ location: _links+ _links: {}+ public:+ type: Boolean+ name: Public+ required: false+ hasDefault: true+ writable: true+ sums:+ type: Boolean+ name: Sums+ required: false+ hasDefault: true+ writable: true+ timelineVisible:+ type: Boolean+ name: Timeline visible+ required: false+ hasDefault: true+ writable: true+ timelineZoomLevel:+ type: String+ name: Timeline zoom level+ required: false+ hasDefault: true+ writable: true+ timelineLabels:+ type: QueryTimelineLabels+ name: Timeline labels+ required: false+ hasDefault: true+ writable: true+ highlightingMode:+ type: String+ name: Highlighting mode+ required: false+ hasDefault: true+ writable: true+ highlightedAttributes:+ type: "[]QueryColumn"+ name: Highlighted attributes+ required: false+ hasDefault: true+ writable: true+ location: _links+ showHierarchies:+ type: Boolean+ name: Show hierarchies+ required: false+ hasDefault: true+ writable: true+ starred:+ type: Boolean+ name: Starred+ required: false+ hasDefault: true+ writable: true+ columns:+ type: "[]QueryColumn"+ name: Columns+ required: false+ hasDefault: true+ writable: true+ location: _links+ _links: {}+ filters:+ type: "[]QueryFilterInstance"+ name: Filters+ required: false+ writable: true+ hasDefault: true+ location: _links+ _links:+ allowedValuesSchemas:+ href: "/api/v3/queries/filter_instance_schemas"+ groupBy:+ type: "[]QueryGroupBy"+ name: Group results by+ required: false+ hasDefault: false+ writable: true+ _links: {}+ sortBy:+ type: "[]QuerySortBy"+ name: Sort by+ required: false+ hasDefault: true+ writable: true+ _links: {}+ results:+ type: WorkPackageCollection+ name: Results+ required: false+ hasDefault: false+ writable: false+ _embedded:+ filtersSchemas:+ _type: Collection+ total: 20+ count: 20+ _embedded:+ elements:+ - _type: QueryFilterInstanceSchema+ _dependencies:+ - _type: SchemaDependency+ 'on': operator+ dependencies:+ "/api/v3/queries/operators/=":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!*": {}+ "/api/v3/queries/operators/*": {}+ name:+ type: String+ name: Name+ required: true+ hasDefault: true+ writable: false+ filter:+ type: QueryFilter+ name: Filter+ required: true+ hasDefault: false+ writable: true+ _links: {}+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas/assignee"+ filter:+ href: "/api/v3/queries/filters/assignee"+ title: Assignee+ - _type: QueryFilterInstanceSchema+ _dependencies:+ - _type: SchemaDependency+ 'on': operator+ dependencies:+ "/api/v3/queries/operators/=":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ name:+ type: String+ name: Name+ required: true+ hasDefault: true+ writable: false+ filter:+ type: QueryFilter+ name: Filter+ required: true+ hasDefault: false+ writable: true+ _links: {}+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ filter:+ href: "/api/v3/queries/filters/author"+ title: Author+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas"+ _links:+ self:+ href: "/api/v3/queries/schema"diff --git a/docs/api/apiv3/components/schemas/schema_for_project_queries_model.yml b/docs/api/apiv3/components/schemas/schema_for_project_queries_model.ymlnew file mode 100644index 00000000000..36cb786e4e4--- /dev/null+++ b/docs/api/apiv3/components/schemas/schema_for_project_queries_model.yml@@ -0,0 +1,212 @@+# Schema: Schema_For_Project_QueriesModel+---+type: object+example:+ _type: Schema+ _dependencies: []+ id:+ type: Integer+ name: ID+ required: true+ hasDefault: false+ writable: false+ name:+ type: String+ name: Name+ required: true+ hasDefault: false+ writable: true+ minLength: 1+ maxLength: 255+ createdAt:+ type: DateTime+ name: Created on+ required: true+ hasDefault: false+ writable: false+ updatedAt:+ type: DateTime+ name: Updated on+ required: true+ hasDefault: false+ writable: false+ user:+ type: User+ name: User+ required: true+ hasDefault: true+ writable: false+ project:+ type: Project+ name: Project+ required: false+ hasDefault: false+ writable: true+ _links: {}+ public:+ type: Boolean+ name: Public+ required: false+ hasDefault: true+ writable: true+ sums:+ type: Boolean+ name: Sums+ required: false+ hasDefault: true+ writable: true+ timelineVisible:+ type: Boolean+ name: Timeline visible+ required: false+ hasDefault: true+ writable: true+ timelineZoomLevel:+ type: String+ name: Timeline zoom level+ required: false+ hasDefault: true+ writable: true+ showHierarchies:+ type: Boolean+ name: Show hierarchies+ required: false+ hasDefault: true+ writable: true+ starred:+ type: Boolean+ name: Starred+ required: false+ hasDefault: true+ writable: true+ columns:+ type: "[]QueryColumn"+ name: Columns+ required: false+ hasDefault: true+ writable: true+ _links: {}+ filters:+ type: "[]QueryFilterInstance"+ name: Filters+ required: false+ writable: true+ hasDefault: true+ _links:+ allowedValuesSchemas:+ href: "/api/v3/projects/42/queries/filter_instance_schemas"+ groupBy:+ type: "[]QueryGroupBy"+ name: Group results by+ required: false+ hasDefault: false+ writable: true+ _links: {}+ sortBy:+ type: "[]QuerySortBy"+ name: Sort by+ required: false+ hasDefault: true+ writable: true+ _links: {}+ results:+ type: WorkPackageCollection+ name: Results+ required: false+ hasDefault: false+ writable: false+ _embedded:+ filtersSchemas:+ _type: Collection+ total: 20+ count: 20+ _embedded:+ elements:+ - _type: QueryFilterInstanceSchema+ _dependencies:+ - _type: SchemaDependency+ 'on': operator+ dependencies:+ "/api/v3/queries/operators/=":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!*": {}+ "/api/v3/queries/operators/*": {}+ name:+ type: String+ name: Name+ required: true+ hasDefault: true+ writable: false+ filter:+ type: QueryFilter+ name: Filter+ required: true+ hasDefault: false+ writable: true+ _links: {}+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas/assignee"+ filter:+ href: "/api/v3/queries/filters/assignee"+ title: Assignee+ - _type: QueryFilterInstanceSchema+ _dependencies:+ - _type: SchemaDependency+ 'on': operator+ dependencies:+ "/api/v3/queries/operators/=":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ "/api/v3/queries/operators/!":+ values:+ type: "[]User"+ name: Values+ required: true+ hasDefault: false+ writable: true+ _links: {}+ name:+ type: String+ name: Name+ required: true+ hasDefault: true+ writable: false+ filter:+ type: QueryFilter+ name: Filter+ required: true+ hasDefault: false+ writable: true+ _links: {}+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ filter:+ href: "/api/v3/queries/filters/author"+ title: Author+ _links:+ self:+ href: "/api/v3/projects/42/queries/filter_instance_schemas"+ _links:+ self:+ href: "/api/v3/projects/42/queries/schema"diff --git a/docs/api/apiv3/components/schemas/schema_model.yml b/docs/api/apiv3/components/schemas/schema_model.ymlnew file mode 100644index 00000000000..2972bcc8293--- /dev/null+++ b/docs/api/apiv3/components/schemas/schema_model.yml@@ -0,0 +1,18 @@+# Schema: SchemaModel+---+type: object+properties:+ _dependencies:+ type: schemadependency+ description: A list of dependencies between one property's value and another property+ _links:+ type: object+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This schema++ **Resource**: Schema+ readOnly: truediff --git a/docs/api/apiv3/components/schemas/star_query_model.yml b/docs/api/apiv3/components/schemas/star_query_model.ymlnew file mode 100644index 00000000000..ff081ce4ff7--- /dev/null+++ b/docs/api/apiv3/components/schemas/star_query_model.yml@@ -0,0 +1,96 @@+# Schema: Star_QueryModel+---+type: object+example:+ _type: Query+ id: 9+ name: fdsfdsfdsf+ createdAt: '2015-03-20T12:56:56Z'+ updatedAt: '2015-05-20T18:16:53Z'+ filters:+ - _type: StatusQueryFilter+ name: Status+ _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ - _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ public: false+ sums: false+ starred: true+ _embedded:+ results:+ _type: WorkPackageCollection+ total: 234+ count: 30+ pageSize: 2+ offset: 1+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ _links:+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ project:+ href: "/api/v3/projects/3"+ title: copydiff --git a/docs/api/apiv3/components/schemas/status_model.yml b/docs/api/apiv3/components/schemas/status_model.ymlnew file mode 100644index 00000000000..3764f23140a--- /dev/null+++ b/docs/api/apiv3/components/schemas/status_model.yml@@ -0,0 +1,57 @@+# Schema: StatusModel+---+type: object+properties:+ id:+ type: integer+ description: Status id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: Status name+ readOnly: true+ position:+ type: integer+ description: Sort index of the status+ readOnly: true+ isDefault:+ type: boolean+ readOnly: true+ isClosed:+ type: boolean+ description: are tickets of this status considered closed?+ readOnly: true+ isReadonly:+ type: boolean+ description: are tickets of this status read only?+ readOnly: true+ defaultDoneRatio:+ type: integer+ description: The percentageDone being applied when changing to this status+ maximum: 100+ _links:+ type: object+ required:+ - self+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This status++ **Resource**: Status+ readOnly: true+example:+ _links:+ self:+ href: "/api/v3/statuses/1"+ _type: Status+ id: 1+ name: New+ position: 1+ isDefault: true+ isClosed: false+ defaultDoneRatio: 0diff --git a/docs/api/apiv3/components/schemas/statuses_model.yml b/docs/api/apiv3/components/schemas/statuses_model.ymlnew file mode 100644index 00000000000..331d23eb979--- /dev/null+++ b/docs/api/apiv3/components/schemas/statuses_model.yml@@ -0,0 +1,73 @@+# Schema: StatusesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/statuses"+ total: 6+ count: 6+ _type: Collection+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/statuses/1"+ _type: Status+ id: 1+ name: New+ position: 1+ isDefault: true+ isClosed: false+ defaultDoneRatio: 0+ - _links:+ self:+ href: "/api/v3/statuses/3"+ _type: Status+ id: 3+ name: Resolved+ position: 3+ isDefault: false+ isClosed: false+ isReadonly: false+ defaultDoneRatio: 75+ - _links:+ self:+ href: "/api/v3/statuses/4"+ _type: Status+ id: 4+ name: Feedback+ position: 4+ isDefault: false+ isClosed: false+ defaultDoneRatio: 25+ - _links:+ self:+ href: "/api/v3/statuses/5"+ _type: Status+ id: 5+ name: Closed+ position: 5+ isDefault: false+ isClosed: true+ defaultDoneRatio: 100+ - _links:+ self:+ href: "/api/v3/statuses/6"+ _type: Status+ id: 6+ name: Rejected+ position: 6+ isDefault: false+ isClosed: true+ defaultDoneRatio: 100+ - _links:+ self:+ href: "/api/v3/statuses/2"+ _type: Status+ id: 2+ name: In Progress+ position: 3+ isDefault: false+ isClosed: false+ defaultDoneRatio: 50diff --git a/docs/api/apiv3/components/schemas/time_entry_activity_model.yml b/docs/api/apiv3/components/schemas/time_entry_activity_model.ymlnew file mode 100644index 00000000000..b2679333f80--- /dev/null+++ b/docs/api/apiv3/components/schemas/time_entry_activity_model.yml@@ -0,0 +1,44 @@+# Schema: Time_Entry_ActivityModel+---+type: object+properties:+ id:+ type: integer+ description: Time entries' id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: The human readable name chosen for this activity+ readOnly: true+ position:+ type: string+ format: date+ description: The rank the activity has in a list of activities+ readOnly: true+ default:+ type: boolean+ description: Flag to signal whether this activity is the default activity+ readOnly: true+ _links:+ type: object+ required:+ - self+ - projects+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This time entry activity++ **Resource**: TimeEntriesActivity+ readOnly: true+ projects:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ List of projects the time entry is active in++ **Resource**: []Projectdiff --git a/docs/api/apiv3/components/schemas/time_entry_create_form.yml b/docs/api/apiv3/components/schemas/time_entry_create_form.ymlnew file mode 100644index 00000000000..fe277818188--- /dev/null+++ b/docs/api/apiv3/components/schemas/time_entry_create_form.yml@@ -0,0 +1,2 @@+# Schema: Time_entry_create_form+--- {}diff --git a/docs/api/apiv3/components/schemas/time_entry_model.yml b/docs/api/apiv3/components/schemas/time_entry_model.ymlnew file mode 100644index 00000000000..b59ca5efd1f--- /dev/null+++ b/docs/api/apiv3/components/schemas/time_entry_model.yml@@ -0,0 +1,105 @@+# Schema: Time_EntryModel+---+type: object+properties:+ id:+ type: integer+ description: Time entries' id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ comment:+ type: string+ description: A text provided by the user detailing the time entry+ spentOn:+ type: string+ format: date+ description: The date the expenditure is booked for+ hours:+ type: time+ description: The time quantifying the expenditure+ createdAt:+ type: string+ format: date-time+ description: The time the time entry was created+ readOnly: true+ updatedAt:+ type: string+ format: date-time+ description: The time the time entry was last updated+ readOnly: true+ _links:+ type: object+ required:+ - self+ - project+ - user+ - activity+ properties:+ updateImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Directly perform edits on this time entry++ # Conditions++ **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user+ readOnly: true+ update:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Form endpoint that aids in preparing and performing edits on a TimeEntry++ # Conditions++ **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user+ readOnly: true+ delete:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Delete this time entry++ # Conditions++ **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user+ readOnly: true+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This time entry++ **Resource**: TimeEntry+ readOnly: true+ project:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The project the time entry is bundled in. The project might be different from the work package's project once the workPackage is moved.++ **Resource**: Project+ workPackage:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The work package the time entry is created on++ **Resource**: WorkPackage+ user:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The user the time entry tracks expenditures for++ **Resource**: User+ readOnly: true+ activity:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The time entry activity the time entry is categorized as++ **Resource**: TimeEntriesActivitydiff --git a/docs/api/apiv3/components/schemas/time_entry_update_form.yml b/docs/api/apiv3/components/schemas/time_entry_update_form.ymlnew file mode 100644index 00000000000..de6b33c3f18--- /dev/null+++ b/docs/api/apiv3/components/schemas/time_entry_update_form.yml@@ -0,0 +1,2 @@+# Schema: Time_entry_update_form+--- {}diff --git a/docs/api/apiv3/components/schemas/type_model.yml b/docs/api/apiv3/components/schemas/type_model.ymlnew file mode 100644index 00000000000..5b16d99bd3a--- /dev/null+++ b/docs/api/apiv3/components/schemas/type_model.yml@@ -0,0 +1,64 @@+# Schema: TypeModel+---+type: object+properties:+ id:+ type: integer+ description: Type id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: Type name+ readOnly: true+ color:+ type: color+ description: The color used to represent this type+ readOnly: true+ position:+ type: integer+ description: Sort index of the type+ readOnly: true+ isDefault:+ type: boolean+ readOnly: true+ isMilestone:+ type: boolean+ description: Do tickets of this type represent a milestone?+ 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 user+ _links:+ type: object+ required:+ - self+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This type++ **Resource**: Type+ readOnly: true+example:+ _links:+ self:+ href: "/api/v3/types/1"+ _type: Type+ id: 1+ name: Bug+ color: "#ff0000"+ position: 1+ isDefault: true+ isMilestone: false+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/types_by_project_model.yml b/docs/api/apiv3/components/schemas/types_by_project_model.ymlnew file mode 100644index 00000000000..7a1996115fd--- /dev/null+++ b/docs/api/apiv3/components/schemas/types_by_project_model.yml@@ -0,0 +1,36 @@+# Schema: Types_by_ProjectModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects/11/types"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/types/1"+ _type: Type+ id: 1+ name: Bug+ color: "#ff0000"+ position: 1+ isDefault: true+ isMilestone: false+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'+ - _links:+ self:+ href: "/api/v3/types/2"+ _type: Type+ id: 2+ name: Feature+ color: "#888"+ position: 2+ isDefault: false+ isMilestone: false+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/types_model.yml b/docs/api/apiv3/components/schemas/types_model.ymlnew file mode 100644index 00000000000..465001086b1--- /dev/null+++ b/docs/api/apiv3/components/schemas/types_model.yml@@ -0,0 +1,36 @@+# Schema: TypesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/types"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/types/1"+ _type: Type+ id: 1+ name: Bug+ color: "#ff0000"+ position: 1+ isDefault: true+ isMilestone: false+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'+ - _links:+ self:+ href: "/api/v3/types/2"+ _type: Type+ id: 2+ name: Feature+ color: "#888"+ position: 2+ isDefault: false+ isMilestone: false+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/unlock_user.yml b/docs/api/apiv3/components/schemas/unlock_user.ymlnew file mode 100644index 00000000000..8dce50d1081--- /dev/null+++ b/docs/api/apiv3/components/schemas/unlock_user.yml@@ -0,0 +1,2 @@+# Schema: Unlock_user+--- {}diff --git a/docs/api/apiv3/components/schemas/unstar_query_model.yml b/docs/api/apiv3/components/schemas/unstar_query_model.ymlnew file mode 100644index 00000000000..a937da8aa11--- /dev/null+++ b/docs/api/apiv3/components/schemas/unstar_query_model.yml@@ -0,0 +1,96 @@+# Schema: Unstar_QueryModel+---+type: object+example:+ _type: Query+ id: 9+ name: fdsfdsfdsf+ createdAt: '2015-03-20T12:56:56Z'+ updatedAt: '2015-05-20T18:16:53Z'+ filters:+ - _type: StatusQueryFilter+ name: Status+ _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ - _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ public: false+ sums: false+ starred: false+ _embedded:+ results:+ _type: WorkPackageCollection+ total: 234+ count: 30+ pageSize: 2+ offset: 1+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ _links:+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ project:+ href: "/api/v3/projects/3"+ title: copydiff --git a/docs/api/apiv3/components/schemas/update_group.yml b/docs/api/apiv3/components/schemas/update_group.ymlnew file mode 100644index 00000000000..7d60782ffc3--- /dev/null+++ b/docs/api/apiv3/components/schemas/update_group.yml@@ -0,0 +1,2 @@+# Schema: Update_group+--- {}diff --git a/docs/api/apiv3/components/schemas/update_membership.yml b/docs/api/apiv3/components/schemas/update_membership.ymlnew file mode 100644index 00000000000..a8bbde0cff4--- /dev/null+++ b/docs/api/apiv3/components/schemas/update_membership.yml@@ -0,0 +1,2 @@+# Schema: Update_membership+--- {}diff --git a/docs/api/apiv3/components/schemas/update_project.yml b/docs/api/apiv3/components/schemas/update_project.ymlnew file mode 100644index 00000000000..a3425acfbe5--- /dev/null+++ b/docs/api/apiv3/components/schemas/update_project.yml@@ -0,0 +1,2 @@+# Schema: Update_project+--- {}diff --git a/docs/api/apiv3/components/schemas/update_time_entry.yml b/docs/api/apiv3/components/schemas/update_time_entry.ymlnew file mode 100644index 00000000000..12dfe4fa292--- /dev/null+++ b/docs/api/apiv3/components/schemas/update_time_entry.yml@@ -0,0 +1,2 @@+# Schema: Update_time_entry+--- {}diff --git a/docs/api/apiv3/components/schemas/update_user.yml b/docs/api/apiv3/components/schemas/update_user.ymlnew file mode 100644index 00000000000..22dc3272489--- /dev/null+++ b/docs/api/apiv3/components/schemas/update_user.yml@@ -0,0 +1,2 @@+# Schema: Update_User+--- {}diff --git a/docs/api/apiv3/components/schemas/user_create_form.yml b/docs/api/apiv3/components/schemas/user_create_form.ymlnew file mode 100644index 00000000000..d390bd1b905--- /dev/null+++ b/docs/api/apiv3/components/schemas/user_create_form.yml@@ -0,0 +1,2 @@+# Schema: User_create_form+--- {}diff --git a/docs/api/apiv3/components/schemas/user_model.yml b/docs/api/apiv3/components/schemas/user_model.ymlnew file mode 100644index 00000000000..f6e3793a80c--- /dev/null+++ b/docs/api/apiv3/components/schemas/user_model.yml@@ -0,0 +1,183 @@+# Schema: UserModel+---+type: object+properties:+ id:+ type: integer+ description: User's id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ login:+ type: string+ description: |-+ User's login name++ # Conditions++ **Permission**: Administrator, manage_user global permission+ maxLength: 256+ firstName:+ type: string+ description: |-+ User's first name++ # Conditions++ **Permission**: Administrator, manage_user global permission+ maxLength: 30+ lastName:+ type: string+ description: |-+ User's last name++ # Conditions++ **Permission**: Administrator, manage_user global permission+ maxLength: 30+ name:+ type: string+ description: User's full name, formatting depends on instance settings+ readOnly: true+ email:+ type: string+ description: |-+ User's email address++ # Conditions++ E-Mail address not hidden, **Permission**: Administrator, manage_user global permission+ maxLength: 60+ admin:+ type: boolean+ description: |-+ Flag indicating whether or not the user is an admin++ # Conditions++ **Permission**: Administrator+ avatar:+ type: string+ format: uri+ description: URL to user's avatar+ readOnly: true+ status:+ type: string+ description: The current activation status of the user (see below)+ readOnly: true+ language:+ type: string+ description: |-+ User's language | ISO 639-1 format++ # Conditions++ **Permission**: Administrator, manage_user global permission+ password:+ type: string+ description: |-+ User's password for the default password authentication++ # Conditions++ **Permission**: Administrator+ writeOnly: true+ identity_url:+ type: string+ description: |-+ User's identity_url for OmniAuth authentication++ # Conditions++ **Permission**: Administrator+ 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 user+ readOnly: true+ _links:+ type: object+ required:+ - self+ properties:+ lock:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Restrict the user from logging in and performing any actions++ # Conditions++ not locked; **Permission**: Administrator+ readOnly: true+ show:+ allOf:+ - "$ref": "./link.yml"+ - description: Link to the OpenProject user page (HTML)+ readOnly: true+ unlock:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Allow a locked user to login and act again++ # Conditions++ locked; **Permission**: Administrator+ readOnly: true+ updateImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Updates the user's attributes.++ # Conditions++ **Permission**: Administrator, manage_user global permission+ readOnly: true+ delete:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Permanently remove a user from the instance++ # Conditions++ **Permission**: Administrator, self-delete+ readOnly: true+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This user++ **Resource**: User+ readOnly: true+ auth_source:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Link to the user's auth source (endpoint not yet implemented)++ **Resource**: AuthSource++ # Conditions++ **Permission**: Administrator+ members:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Link to collection of all the user's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions.++ **Resource**: MemberCollection++ # Conditions++ **Permission**: view members or manage members in any project+ readOnly: truediff --git a/docs/api/apiv3/components/schemas/user_preference_model.yml b/docs/api/apiv3/components/schemas/user_preference_model.ymlnew file mode 100644index 00000000000..6f562563967--- /dev/null+++ b/docs/api/apiv3/components/schemas/user_preference_model.yml@@ -0,0 +1,41 @@+# Schema: User_PreferenceModel+---+type: object+properties:+ hideMail:+ type: boolean+ description: Hide mail address from other users+ timeZone:+ type: string+ description: Current selected time zone+ commentSortDescending:+ type: boolean+ description: Sort comments in descending order+ warnOnLeavingUnsaved:+ type: boolean+ description: Issue warning when leaving a page with unsaved text+ accessibilityMode:+ type: boolean+ description: Enable accessibility mode+ _links:+ type: object+ required:+ - self+ - user+ properties:+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This UserPreferences++ **Resource**: UserPreferences+ readOnly: true+ user:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The user that this preference belongs to++ **Resource**: User+ readOnly: truediff --git a/docs/api/apiv3/components/schemas/user_preferences_model.yml b/docs/api/apiv3/components/schemas/user_preferences_model.ymlnew file mode 100644index 00000000000..cfe00b76f9f--- /dev/null+++ b/docs/api/apiv3/components/schemas/user_preferences_model.yml@@ -0,0 +1,16 @@+# Schema: UserPreferencesModel+---+type: object+example:+ _type: UserPreferences+ _links:+ self:+ href: "/api/v3/my_preferences"+ user:+ href: "/api/v3/users/1"+ title: John Sheppard+ hideMail: false+ timeZone: Europe/Berlin+ commentSortDescending: true+ warnOnLeavingUnsaved: true+ accessibilityMode: falsediff --git a/docs/api/apiv3/components/schemas/user_update_form.yml b/docs/api/apiv3/components/schemas/user_update_form.ymlnew file mode 100644index 00000000000..e03eaf74771--- /dev/null+++ b/docs/api/apiv3/components/schemas/user_update_form.yml@@ -0,0 +1,2 @@+# Schema: User_update_form+--- {}diff --git a/docs/api/apiv3/components/schemas/users_model.yml b/docs/api/apiv3/components/schemas/users_model.ymlnew file mode 100644index 00000000000..eef18e53820--- /dev/null+++ b/docs/api/apiv3/components/schemas/users_model.yml@@ -0,0 +1,43 @@+# Schema: UsersModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/users"+ total: 2+ count: 1+ _type: Collection+ _embedded:+ elements:+ - _type: User+ _links:+ self:+ href: "/api/v3/users/1"+ title: John Sheppard - j.sheppard+ showUser:+ href: "/users/1"+ type: text/html+ lock:+ href: "/api/v3/users/1/lock"+ title: Set lock on j.sheppard+ method: POST+ update:+ href: "/api/v3/users/1"+ title: Update j.sheppard+ method: PATCH+ delete:+ href: "/api/v3/users/1"+ title: Delete j.sheppard+ method: DELETE+ id: 1+ login: j.sheppard+ firstName: John+ lastName: Sheppard+ email: [email protected]+ admin: true+ avatar: https://example.org/users/1/avatar+ status: active+ language: en+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/version_create_form.yml b/docs/api/apiv3/components/schemas/version_create_form.ymlnew file mode 100644index 00000000000..d19561eb4aa--- /dev/null+++ b/docs/api/apiv3/components/schemas/version_create_form.yml@@ -0,0 +1,2 @@+# Schema: Version_create_form+--- {}diff --git a/docs/api/apiv3/components/schemas/version_model.yml b/docs/api/apiv3/components/schemas/version_model.ymlnew file mode 100644index 00000000000..013541b45d4--- /dev/null+++ b/docs/api/apiv3/components/schemas/version_model.yml@@ -0,0 +1,124 @@+# Schema: VersionModel+---+type: object+required:+- name+- status+- sharing+- createdAt+- updatedAt+properties:+ id:+ type: integer+ description: Version id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ name:+ type: string+ description: Version name+ description:+ allOf:+ - "$ref": "./formattable.yml"+ - {}+ startDate:+ type: string+ format: date+ endDate:+ type: string+ format: date+ status:+ type: string+ description: The current status of the version+ sharing:+ type: string+ description: The current status of the version+ 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 version+ readOnly: true+ _links:+ type: object+ required:+ - self+ - availableInProjects+ properties:+ update:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Form endpoint that aids in preparing and performing edits on the version++ # Conditions++ **Permission**: manage versions+ readOnly: true+ updateImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Directly perform edits on the version++ # Conditions++ **Permission**: manage versions+ readOnly: true+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This version++ **Resource**: Version+ readOnly: true+ definingProject:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The project to which the version belongs++ **Resource**: Project+ readOnly: true+ availableInProjects:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Projects where this version can be used++ **Resource**: Projects+ readOnly: true+example:+ _links:+ self:+ href: "/api/v3/versions/11"+ update:+ href: "/api/v3/versions/11/form"+ method: POST+ updateImmediately:+ href: "/api/v3/versions/11"+ method: PATCH+ definingProject:+ href: "/api/v3/projects/11"+ availableInProjects:+ href: "/api/v3/versions/11/projects"+ customField4:+ href: "/api/v3/custom_options/5"+ title: Custom field option+ _type: Version+ id: 11+ name: v3.0 Alpha+ description:+ format: plain+ raw: This version has a description+ html: This version has a description+ startDate: '2014-11-20'+ endDate:+ status: open+ sharing: system+ customField14: '1234567890'diff --git a/docs/api/apiv3/components/schemas/version_schema_model.yml b/docs/api/apiv3/components/schemas/version_schema_model.ymlnew file mode 100644index 00000000000..aed0c7a3472--- /dev/null+++ b/docs/api/apiv3/components/schemas/version_schema_model.yml@@ -0,0 +1,92 @@+# Schema: Version_schemaModel+---+type: object+example:+ _type: Schema+ _dependencies: []+ id:+ type: Integer+ name: ID+ required: true+ hasDefault: false+ writable: false+ name:+ type: String+ name: Name+ required: true+ hasDefault: false+ writable: true+ minLength: 1+ maxLength: 60+ description:+ type: Formattable+ name: Description+ required: false+ hasDefault: false+ writable: true+ startDate:+ type: Date+ name: Start date+ required: false+ hasDefault: false+ writable: true+ endDate:+ type: Date+ name: Finish date+ required: false+ hasDefault: false+ writable: false+ status:+ type: String+ name: Status+ required: true+ hasDefault: false+ writable: true+ visibility: default+ _links: {}+ sharing:+ type: String+ name: Sharing+ required: true+ hasDefault: false+ writable: true+ visibility: default+ _links: {}+ createdAt:+ type: DateTime+ name: Created on+ required: true+ hasDefault: false+ writable: false+ updatedAt:+ type: DateTime+ name: Updated on+ required: true+ hasDefault: false+ writable: false+ definingProject:+ type: Project+ name: Project+ required: true+ hasDefault: false+ writable: true+ _links: {}+ customField14:+ type: String+ name: text CF+ required: false+ hasDefault: false+ writable: true+ visibility: default+ customField40:+ type: CustomOption+ name: List CF+ required: false+ hasDefault: false+ writable: true+ location: _links+ visibility: default+ _links: {}+ _links:+ self:+ href: "/api/v3/versions/schema"diff --git a/docs/api/apiv3/components/schemas/version_update_form.yml b/docs/api/apiv3/components/schemas/version_update_form.ymlnew file mode 100644index 00000000000..959c775acda--- /dev/null+++ b/docs/api/apiv3/components/schemas/version_update_form.yml@@ -0,0 +1,2 @@+# Schema: Version_update_form+--- {}diff --git a/docs/api/apiv3/components/schemas/versions_by_project_model.yml b/docs/api/apiv3/components/schemas/versions_by_project_model.ymlnew file mode 100644index 00000000000..efddfdd6b24--- /dev/null+++ b/docs/api/apiv3/components/schemas/versions_by_project_model.yml@@ -0,0 +1,63 @@+# Schema: Versions_by_ProjectModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects/11/versions"+ total: 3+ count: 3+ _type: Collection+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/versions/11"+ definingProject:+ href: "/api/v3/projects/11"+ availableInProjects:+ href: "/api/v3/versions/11/projects"+ _type: Version+ id: 11+ name: v3.0 Alpha+ description:+ format: plain+ raw: This version has a description+ html: This version has a description+ startDate: '2014-11-20'+ endDate:+ status: Open+ - _links:+ self:+ href: "/api/v3/versions/12"+ definingProject:+ href: "/api/v3/projects/11"+ availableInProjects:+ href: "/api/v3/versions/12/projects"+ _type: Version+ id: 12+ name: v2.0+ description:+ format: plain+ raw: ''+ html: ''+ startDate:+ endDate:+ status: Closed+ - _links:+ self:+ href: "/api/v3/versions/10"+ definingProject:+ href: "/api/v3/projects/11"+ availableInProjects:+ href: "/api/v3/versions/10/projects"+ _type: Version+ id: 10+ name: v1.0+ description:+ format: plain+ raw: ''+ html: ''+ startDate:+ endDate:+ status: Opendiff --git a/docs/api/apiv3/components/schemas/versions_model.yml b/docs/api/apiv3/components/schemas/versions_model.ymlnew file mode 100644index 00000000000..8a1f5e7c712--- /dev/null+++ b/docs/api/apiv3/components/schemas/versions_model.yml@@ -0,0 +1,63 @@+# Schema: VersionsModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/versions"+ total: 3+ count: 3+ _type: Collection+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/versions/11"+ definingProject:+ href: "/api/v3/projects/12"+ availableInProjects:+ href: "/api/v3/versions/11/projects"+ _type: Version+ id: 11+ name: v3.0 Alpha+ description:+ format: plain+ raw: This version has a description+ html: This version has a description+ startDate: '2014-11-20'+ endDate:+ status: Open+ - _links:+ self:+ href: "/api/v3/versions/12"+ definingProject:+ href: "/api/v3/projects/11"+ availableInProjects:+ href: "/api/v3/versions/12/projects"+ _type: Version+ id: 12+ name: v2.0+ description:+ format: plain+ raw: ''+ html: ''+ startDate:+ endDate:+ status: Closed+ - _links:+ self:+ href: "/api/v3/versions/10"+ definingProject:+ href: "/api/v3/projects/13"+ availableInProjects:+ href: "/api/v3/versions/13/projects"+ _type: Version+ id: 10+ name: v1.0+ description:+ format: plain+ raw: ''+ html: ''+ startDate:+ endDate:+ status: Opendiff --git a/docs/api/apiv3/components/schemas/view_action_model.yml b/docs/api/apiv3/components/schemas/view_action_model.ymlnew file mode 100644index 00000000000..92065d20a50--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_action_model.yml@@ -0,0 +1,16 @@+# Schema: View_actionModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/actions/work_packages/create"+ title: Add work package+ _type: Action+ id: work_packages/create+ name: Add work package+ description: Creating a work package within a project including the uploading of+ attachments. Some attributes might not be selected, e.g version which requires+ a second permission+ modules:+ - work_packagesdiff --git a/docs/api/apiv3/components/schemas/view_capabilities_model.yml b/docs/api/apiv3/components/schemas/view_capabilities_model.ymlnew file mode 100644index 00000000000..998b8ca0881--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_capabilities_model.yml@@ -0,0 +1,18 @@+# Schema: View_capabilitiesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/capabilities/work_packages/create/p123-567"+ action:+ href: "/api/v3/actions/work_packages/create"+ title: Add work package+ context:+ href: "/api/v3/projects/123"+ title: A project+ principal:+ href: "/api/v3/users/567"+ title: Some user+ _type: Capability+ id: work_packages/create/p123-567diff --git a/docs/api/apiv3/components/schemas/view_global_context_model.yml b/docs/api/apiv3/components/schemas/view_global_context_model.ymlnew file mode 100644index 00000000000..a82ab2151dc--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_global_context_model.yml@@ -0,0 +1,9 @@+# Schema: View_global_contextModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/capabilities/context/global"+ _type: CapabilityContext::Global+ id: globaldiff --git a/docs/api/apiv3/components/schemas/view_group_model.yml b/docs/api/apiv3/components/schemas/view_group_model.ymlnew file mode 100644index 00000000000..2ef051c2049--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_group_model.yml@@ -0,0 +1,27 @@+# Schema: View_groupModel+---+type: object+example:+ _type: Group+ id: 9+ name: The group+ createdAt: '2015-09-23T11:06:36Z'+ updatedAt: '2015-09-23T11:06:36Z'+ _links:+ self:+ href: "/api/v3/groups/9"+ title: The group+ delete:+ href: "/api/v3/group/9"+ method: delete+ memberships:+ href: /api/v3/memberships?filters=[{"principal":{"operator":"=","values":["9"]}}]+ title: Memberships+ updateImmediately:+ href: "/api/v3/group/9"+ method: patch+ members:+ - href: "/api/v3/users/363"+ title: First user+ - href: "/api/v3/users/60"+ title: Second userdiff --git a/docs/api/apiv3/components/schemas/view_membership_model.yml b/docs/api/apiv3/components/schemas/view_membership_model.ymlnew file mode 100644index 00000000000..8eaf6f5d4aa--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_membership_model.yml@@ -0,0 +1,35 @@+# Schema: View_membershipModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/memberships/11"+ title: Some user+ schema:+ href: "/api/v3/memberships/schema"+ update:+ href: "/api/v3/memberships/11/form"+ method: post+ updateImmediately:+ href: "/api/v3/memberships/11"+ method: patch+ project:+ href: "/api/v3/projects/3"+ title: A project+ principal:+ href: "/api/v3/users/4"+ title: Some user+ roles:+ - href: "/api/v3/roles/5"+ title: Member+ - href: "/api/v3/roles/4"+ title: Reader+ _type: Membership+ id: 11+ createdAt: '2015-03-20T12:56:56Z'+ updatedAt: '2018-12-20T18:16:11Z'+ _embedded:+ project...: {}+ principal...: {}+ roles...: []diff --git a/docs/api/apiv3/components/schemas/view_membership_schema_model.yml b/docs/api/apiv3/components/schemas/view_membership_schema_model.ymlnew file mode 100644index 00000000000..8cfcf80cd99--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_membership_schema_model.yml@@ -0,0 +1,59 @@+# Schema: View_membership_schemaModel+---+type: object+example:+ _type: Schema+ _dependencies: []+ id:+ type: Integer+ name: ID+ required: true+ hasDefault: false+ writable: false+ createdAt:+ type: DateTime+ name: Created on+ required: true+ hasDefault: false+ writable: false+ updatedAt:+ type: DateTime+ name: Updated on+ required: true+ hasDefault: false+ writable: false+ notificationMessage:+ type: Formattable+ name: Message+ required: false+ hasDefault: false+ writable: true+ options: {}+ location: _meta+ project:+ type: Project+ name: Project+ required: false+ hasDefault: false+ writable: true+ location: _links+ _links: {}+ principal:+ type: Principal+ name: Principal+ required: true+ hasDefault: false+ writable: true+ location: _links+ _links: {}+ roles:+ type: "[]Role"+ name: Role+ required: true+ hasDefault: false+ writable: true+ location: _links+ _links: {}+ _links:+ self:+ href: "/api/v3/memberships/schema"diff --git a/docs/api/apiv3/components/schemas/view_project_model.yml b/docs/api/apiv3/components/schemas/view_project_model.ymlnew file mode 100644index 00000000000..ac9e3f918ca--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_project_model.yml@@ -0,0 +1,49 @@+# Schema: View_projectModel+---+type: object+example:+ _type: Project+ _links:+ self:+ href: "/api/v3/projects/1"+ title: Lorem+ createWorkPackage:+ href: "/api/v3/projects/1/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/1/work_packages"+ method: post+ categories:+ href: "/api/v3/projects/1/categories"+ types:+ href: "/api/v3/projects/1/types"+ versions:+ href: "/api/v3/projects/1/versions"+ workPackages:+ href: "/api/v3/projects/1/work_packages"+ memberships:+ href: /api/v3/memberships?filters=[{"project":{"operator":"=","values":["1"]}}]+ customField456:+ href: "/api/v3/users/315"+ method: A user+ projects:+ href: "/api/v3/projects/123"+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ id: 1+ identifier: project_identifier+ name: Project example+ active: true+ public: false+ statusExplanation:+ format: markdown+ raw: Everything **fine**+ html: "<p>Everything <strong>fine</strong></p>"+ description:+ format: markdown+ raw: Lorem **ipsum** dolor sit amet+ html: "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'+ customField123: 123diff --git a/docs/api/apiv3/components/schemas/view_project_status_model.yml b/docs/api/apiv3/components/schemas/view_project_status_model.ymlnew file mode 100644index 00000000000..01e7348dca9--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_project_status_model.yml@@ -0,0 +1,10 @@+# Schema: View_project_statusModel+---+type: object+example:+ _type: ProjectStatus+ id: on_track+ name: On track+ _links:+ self:+ href: "/api/v3/project_statuses/on_track"diff --git a/docs/api/apiv3/components/schemas/view_time_entries_activity_model.yml b/docs/api/apiv3/components/schemas/view_time_entries_activity_model.ymlnew file mode 100644index 00000000000..0235879f539--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_time_entries_activity_model.yml@@ -0,0 +1,20 @@+# Schema: View_time_entries_activityModel+---+type: object+example:+ _type: TimeEntriesActivity+ id: 18+ name: a autem+ position: 10+ default: false+ _embedded:+ projects...: []+ _links:+ self:+ href: "/api/v3/time_entries/activities/18"+ title: a autem+ projects:+ - href: "/api/v3/projects/seeded_project"+ title: Seeded Project+ - href: "/api/v3/projects/working-project"+ title: Working Projectdiff --git a/docs/api/apiv3/components/schemas/view_time_entry_model.yml b/docs/api/apiv3/components/schemas/view_time_entry_model.ymlnew file mode 100644index 00000000000..be6509e83b5--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_time_entry_model.yml@@ -0,0 +1,44 @@+# Schema: View_time_entryModel+---+type: object+example:+ _type: TimeEntry+ id: 1+ comment:+ format: plain+ raw: Some text explaining why the time entry was created+ html: "<p>Some text explaining why the time entry was created</p>"+ spentOn: '2015-03-20'+ hours: PT5H+ createdAt: '2015-03-20T12:56:56Z'+ updatedAt: '2015-03-20T12:56:56Z'+ customField12: 5+ _embedded:+ project...: {}+ workPackage...: {}+ user...: {}+ activity...: {}+ _links:+ self:+ href: "/api/v3/time_entries/1"+ updateImmediately:+ href: "/api/v3/time_entries/1"+ method: patch+ delete:+ href: "/api/v3/time_entries/1"+ method: delete+ project:+ href: "/api/v3/projects/1"+ title: Some project+ workPackage:+ href: "/api/v3/work_packages/1"+ title: Some work package+ user:+ href: "/api/v3/users/2"+ title: Some user+ activity:+ href: "/api/v3/time_entries/activities/18"+ title: Some time entry activity+ customField4:+ href: "/api/v3/users/5"+ title: Some other userdiff --git a/docs/api/apiv3/components/schemas/view_time_entry_schema_model.yml b/docs/api/apiv3/components/schemas/view_time_entry_schema_model.ymlnew file mode 100644index 00000000000..dd7549fa0e9--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_time_entry_schema_model.yml@@ -0,0 +1,83 @@+# Schema: View_time_entry_schemaModel+---+type: object+example:+ _type: Schema+ _dependencies: []+ id:+ type: Integer+ name: ID+ required: true+ hasDefault: false+ writable: false+ options: {}+ createdAt:+ type: DateTime+ name: Created on+ required: true+ hasDefault: false+ writable: false+ options: {}+ updatedAt:+ type: DateTime+ name: Updated on+ required: true+ hasDefault: false+ writable: false+ options: {}+ spentOn:+ type: Date+ name: Date+ required: true+ hasDefault: false+ writable: true+ options: {}+ hours:+ type: Duration+ name: Hours+ required: true+ hasDefault: false+ writable: true+ options: {}+ user:+ type: User+ name: User+ required: true+ hasDefault: false+ writable: false+ options: {}+ workPackage:+ type: WorkPackage+ name: Work package+ required: false+ hasDefault: false+ writable: true+ location: _links+ _links: {}+ project:+ type: Project+ name: Project+ required: false+ hasDefault: false+ writable: true+ location: _links+ _links: {}+ activity:+ type: TimeEntriesActivity+ name: Activity+ required: true+ hasDefault: true+ writable: true+ location: _links+ _links: {}+ customField29:+ type: String+ name: sfsdfsdfsdfsdfdsf+ required: false+ hasDefault: false+ writable: true+ options:+ rtl:+ _links:+ self:+ href: "/api/v3/time_entries/schema"diff --git a/docs/api/apiv3/components/schemas/view_user_model.yml b/docs/api/apiv3/components/schemas/view_user_model.ymlnew file mode 100644index 00000000000..37f9ce6f861--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_user_model.yml@@ -0,0 +1,32 @@+# Schema: View_userModel+---+type: object+example:+ _type: User+ _links:+ self:+ href: "/api/v3/users/1"+ title: j.sheppard+ show:+ href: "/users/1"+ type: text/html+ lock:+ href: "/api/v3/users/1/lock"+ method: POST+ updateImmediately:+ href: "/api/v3/users/1"+ method: PATCH+ delete:+ href: "/api/v3/users/1"+ method: DELETE+ id: 1+ login: j.sheppard+ firstName: John+ lastName: Sheppard+ email: [email protected]+ admin: true+ avatar: https://example.org/users/1/avatar+ status: active+ language: en+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/view_user_schema_model.yml b/docs/api/apiv3/components/schemas/view_user_schema_model.ymlnew file mode 100644index 00000000000..e36cb7482b9--- /dev/null+++ b/docs/api/apiv3/components/schemas/view_user_schema_model.yml@@ -0,0 +1,121 @@+# Schema: View_user_schemaModel+---+type: object+example:+ _type: Schema+ _dependencies: []+ id:+ type: Integer+ name: ID+ required: true+ hasDefault: false+ writable: false+ options: {}+ login:+ type: String+ name: Username+ required: true+ hasDefault: false+ writable: true+ minLength: 1+ maxLength: 255+ options: {}+ admin:+ type: Boolean+ name: Administrator+ required: false+ hasDefault: false+ writable: true+ options: {}+ mail:+ type: String+ name: Email+ required: true+ hasDefault: false+ writable: true+ minLength: 1+ maxLength: 255+ options: {}+ firstName:+ type: String+ name: First name+ required: true+ hasDefault: false+ writable: false+ minLength: 1+ maxLength: 255+ options: {}+ lastName:+ type: String+ name: Last name+ required: true+ hasDefault: false+ writable: false+ minLength: 1+ maxLength: 255+ options: {}+ avatar:+ type: String+ name: Avatar+ required: false+ hasDefault: false+ writable: false+ options: {}+ status:+ type: String+ name: Status+ required: false+ hasDefault: false+ writable: true+ options: {}+ identityUrl:+ type: String+ name: Identity url+ required: false+ hasDefault: false+ writable: true+ options: {}+ language:+ type: String+ name: Language+ required: false+ hasDefault: false+ writable: true+ options: {}+ password:+ type: Password+ name: Password+ required: false+ hasDefault: false+ writable: false+ options: {}+ createdAt:+ type: DateTime+ name: Created on+ required: true+ hasDefault: false+ writable: false+ options: {}+ updatedAt:+ type: DateTime+ name: Updated on+ required: true+ hasDefault: false+ writable: false+ options: {}+ customField1:+ type: String+ name: User String CF+ required: false+ hasDefault: false+ writable: true+ customField2:+ type: CustomOption+ name: User List cf+ required: false+ hasDefault: false+ writable: true+ location: _links+ _links:+ self:+ href: "/api/v3/users/schema"diff --git a/docs/api/apiv3/components/schemas/watchers_model.yml b/docs/api/apiv3/components/schemas/watchers_model.ymlnew file mode 100644index 00000000000..0438905e772--- /dev/null+++ b/docs/api/apiv3/components/schemas/watchers_model.yml@@ -0,0 +1,59 @@+# Schema: WatchersModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/work_packages/14/watchers"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: User+ _links:+ self:+ href: "/api/v3/users/1"+ title: John Sheppard - j.sheppard+ showUser:+ href: "/users/1"+ type: text/html+ lock:+ href: "/api/v3/users/1/lock"+ title: Set lock on j.sheppard+ method: POST+ delete:+ href: "/api/v3/users/1"+ title: Delete j.sheppard+ method: DELETE+ id: 1+ login: j.sheppard+ firstName: John+ lastName: Sheppard+ mail: [email protected]+ avatar: https://example.org/users/1/avatar+ status: active+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'+ - _type: User+ _links:+ self:+ href: "/api/v3/users/2"+ title: Jim Sheppard - j.sheppard2+ lock:+ href: "/api/v3/users/2/lock"+ title: Set lock on j.sheppard2+ method: POST+ delete:+ href: "/api/v3/users/2"+ title: Delete j.sheppard2+ method: DELETE+ id: 2+ login: j.sheppard2+ firstName: Jim+ lastName: Sheppard+ mail: [email protected]+ avatar: https://example.org/users/1/avatar+ status: active+ createdAt: '2014-05-21T08:51:20Z'+ updatedAt: '2014-05-21T08:51:20Z'diff --git a/docs/api/apiv3/components/schemas/wiki_page_model.yml b/docs/api/apiv3/components/schemas/wiki_page_model.ymlnew file mode 100644index 00000000000..18002af4053--- /dev/null+++ b/docs/api/apiv3/components/schemas/wiki_page_model.yml@@ -0,0 +1,47 @@+# Schema: Wiki_PageModel+---+type: object+required:+- title+properties:+ id:+ type: integer+ description: Identifier of this wiki page+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ title:+ type: string+ description: The wiki page's title+ _links:+ type: object+ properties:+ addAttachment:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Attach a file to the wiki page++ # Conditions++ **Permission**: edit wiki page+ readOnly: true+example:+ _type: WikiPage+ id: 72+ title: A wiki page with a name+ _embedded:+ project:+ _type: Project...+ id: 12+ _links:+ self:+ href: "/api/v3/wiki_pages/72"+ attachments:+ href: "/api/v3/wiki_pages/72/attachments"+ addAttachment:+ href: "/api/v3/wiki_pages/72/attachments"+ method: post+ project:+ href: "/api/v3/projects/12"+ title: some projectdiff --git a/docs/api/apiv3/components/schemas/work_package_activities_model.yml b/docs/api/apiv3/components/schemas/work_package_activities_model.ymlnew file mode 100644index 00000000000..f0faba5a5be--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_package_activities_model.yml@@ -0,0 +1,44 @@+# Schema: Work_Package_activitiesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/work_packages/1/revisions"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: Activity+ _links:+ self:+ href: "/api/v3/activity/1"+ workPackage:+ href: "/api/v3/work_packages/1"+ user:+ href: "/api/v3/users/1"+ id: 1+ details: []+ comment:+ format: markdown+ raw: Lorem ipsum dolor sit amet.+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ createdAt: '2014-05-21T08:51:20Z'+ version: 1+ - _type: Activity+ _links:+ self:+ href: "/api/v3/activity/2"+ workPackage:+ href: "/api/v3/work_packages/1"+ user:+ href: "/api/v3/users/1"+ id: 2+ details: []+ comment:+ format: markdown+ raw: Lorem ipsum dolor sit amet.+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ createdAt: '2014-05-21T08:51:22Z'+ version: 2diff --git a/docs/api/apiv3/components/schemas/work_package_create_form.yml b/docs/api/apiv3/components/schemas/work_package_create_form.ymlnew file mode 100644index 00000000000..07ecaaa3ff2--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_package_create_form.yml@@ -0,0 +1,2 @@+# Schema: Work_Package_Create_Form+--- {}diff --git a/docs/api/apiv3/components/schemas/work_package_create_form_for_project.yml b/docs/api/apiv3/components/schemas/work_package_create_form_for_project.ymlnew file mode 100644index 00000000000..0d0b082ff94--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_package_create_form_for_project.yml@@ -0,0 +1,2 @@+# Schema: Work_Package_Create_Form_For_Project+--- {}diff --git a/docs/api/apiv3/components/schemas/work_package_edit_form.yml b/docs/api/apiv3/components/schemas/work_package_edit_form.ymlnew file mode 100644index 00000000000..2cf117d0d5c--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_package_edit_form.yml@@ -0,0 +1,2 @@+# Schema: Work_Package_Edit_Form+--- {}diff --git a/docs/api/apiv3/components/schemas/work_package_model.yml b/docs/api/apiv3/components/schemas/work_package_model.ymlnew file mode 100644index 00000000000..1ac667e5ee4--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_package_model.yml@@ -0,0 +1,533 @@+# Schema: Work_PackageModel+---+type: object+required:+- subject+- type+properties:+ id:+ type: integer+ description: Work package id+ readOnly: true+ minimum: 0+ exclusiveMinimum: true+ lockVersion:+ type: integer+ description: The version of the item as used for optimistic locking+ readOnly: true+ subject:+ type: string+ description: Work package subject+ type:+ type: string+ description: Name of the work package's type+ readOnly: true+ description:+ allOf:+ - "$ref": "./formattable.yml"+ - description: The work package description+ scheduleManually:+ type: boolean+ description: If false (default) schedule automatically.+ startDate:+ type: string+ format: date+ description: Scheduled beginning of a work package+ dueDate:+ type: string+ format: date+ description: Scheduled end of a work package+ date:+ type: string+ format: date+ description: Date on which a milestone is achieved+ derivedStartDate:+ type: string+ format: date+ description: Similar to start date but is not set by a client but rather deduced+ by the work packages's descendants. If manual scheduleManually is active, the+ two dates can deviate.+ readOnly: true+ derivedDueDate:+ type: string+ format: date+ description: Similar to due date but is not set by a client but rather deduced+ by the work packages's descendants. If manual scheduleManually is active, the+ two dates can deviate.+ readOnly: true+ estimatedTime:+ type: string+ format: duration+ description: Time a work package likely needs to be completed excluding its descendants+ derivedEstimatedTime:+ type: string+ format: duration+ description: Time a work package likely needs to be completed including its descendants+ readOnly: true+ spentTime:+ type: string+ format: duration+ description: |-+ The time booked for this work package by users working on it++ # Conditions++ **Permission** view time entries+ readOnly: true+ percentageDone:+ type: integer+ description: Amount of total completion for a work package+ maximum: 100+ 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 work package+ readOnly: true+ _links:+ type: object+ required:+ - self+ - schema+ - ancestors+ - attachments+ - author+ - children+ - priority+ - project+ - status+ - type+ properties:+ addAttachment:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Attach a file to the WP++ # Conditions++ **Permission**: edit work package+ readOnly: true+ addComment:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Post comment to WP++ # Conditions++ **Permission**: add work package notes+ readOnly: true+ addRelation:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Adds a relation to this work package.++ # Conditions++ **Permission**: manage wp relations+ readOnly: true+ addWatcher:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Add any user to WP watchers++ # Conditions++ **Permission**: add watcher+ readOnly: true+ customActions:+ allOf:+ - "$ref": "./link.yml"+ - description: Collection of predefined changes that can be applied to the+ work package+ readOnly: true+ previewMarkup:+ allOf:+ - "$ref": "./link.yml"+ - description: Post markup (in markdown) here to receive an HTML-rendered+ response+ readOnly: true+ removeWatcher:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Remove any user from WP watchers++ # Conditions++ **Permission**: delete watcher+ readOnly: true+ unwatch:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Remove current user from WP watchers++ # Conditions++ logged in; watching+ readOnly: true+ update:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Form endpoint that aids in preparing and performing edits on a WP++ # Conditions++ **Permission**: edit work package+ readOnly: true+ updateImmediately:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Directly perform edits on a work package++ # Conditions++ **Permission**: edit work package+ readOnly: true+ watch:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Add current user to WP watchers++ # Conditions++ logged in; not watching+ readOnly: true+ self:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ This work package++ **Resource**: WorkPackage+ readOnly: true+ schema:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The schema of this work package++ **Resource**: Schema+ readOnly: true+ ancestors:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Array of all visible ancestors of the work package, with the root node being the first element++ **Resource**: Collection++ # Conditions++ **Permission** view work packages+ readOnly: true+ attachments:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The files attached to this work package++ **Resource**: Collection+ author:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The person that created the work package++ **Resource**: User+ readOnly: true+ assignee:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The person that is intended to work on the work package++ **Resource**: User+ availableWatchers:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ All users that can be added to the work package as watchers.++ **Resource**: User++ # Conditions++ **Permission** add work package watchers+ readOnly: true+ budget:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The budget this work package is associated to++ **Resource**: Budget++ # Conditions++ **Permission** view cost objects+ category:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The category of the work package++ **Resource**: Category+ children:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Array of all visible children of the work package++ **Resource**: Collection++ # Conditions++ **Permission** view work packages+ readOnly: true+ parent:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Parent work package++ **Resource**: WorkPackage+ priority:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The priority of the work package++ **Resource**: Priority+ project:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The project to which the work package belongs++ **Resource**: Project+ responsible:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The person that is responsible for the overall outcome++ **Resource**: User+ relations:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Relations this work package is involved in++ **Resource**: Relation++ # Conditions++ **Permission** view work packages+ readOnly: true+ revisions:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ Revisions that are referencing the work package++ **Resource**: Revision++ # Conditions++ **Permission** view changesets+ readOnly: true+ status:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The current status of the work package++ **Resource**: Status+ timeEntries:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ All time entries logged on the work package. Please note that this is a link to an HTML resource for now and as such, the link is subject to change.++ **Resource**: N/A++ # Conditions++ **Permission** view time entries+ readOnly: true+ type:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The type of the work package++ **Resource**: Type+ version:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ The version associated to the work package++ **Resource**: Version+ watchers:+ allOf:+ - "$ref": "./link.yml"+ - description: |-+ All users that are currently watching this work package++ **Resource**: Collection++ # Conditions++ **Permission** view work package watchers+ readOnly: true+example:+ _type: WorkPackage+ _links:+ self:+ href: "/api/v3/work_packages/1528"+ title: Develop API+ schema:+ href: "/api/v3/work_packages/schemas/11-2"+ update:+ href: "/api/v3/work_packages/1528"+ method: patch+ title: Update Develop API+ delete:+ href: "/work_packages/bulk?ids=1528"+ method: delete+ title: Delete Develop API+ logTime:+ href: "/work_packages/1528/time_entries/new"+ type: text/html+ title: Log time on Develop API+ move:+ href: "/work_packages/1528/move/new"+ type: text/html+ title: Move Develop API+ attachments:+ href: "/api/v3/work_packages/1528/attachments"+ addAttachment:+ href: "/api/v3/work_packages/1528/attachments"+ method: post+ author:+ href: "/api/v3/users/1"+ title: OpenProject Admin - admin+ 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+ responsible:+ href: "/api/v3/users/23"+ title: Laron Leuschke - Alaina5788+ relations:+ href: "/api/v3/work_packages/1528/relations"+ title: Show relations+ revisions:+ href: "/api/v3/work_packages/1528/revisions"+ assignee:+ href: "/api/v3/users/11"+ title: Emmie Okuneva - Adele5450+ priority:+ href: "/api/v3/priorities/2"+ title: Normal+ project:+ href: "/api/v3/projects/1"+ title: A Test Project+ status:+ href: "/api/v3/statuses/1"+ title: New+ type:+ href: "/api/v3/types/1"+ title: A Type+ version:+ href: "/api/v3/versions/1"+ title: Version 1+ availableWatchers:+ href: "/api/v3/work_packages/1528/available_watchers"+ watch:+ href: "/api/v3/work_packages/1528/watchers"+ method: post+ payload:+ user:+ href: "/api/v3/users/1"+ addWatcher:+ href: "/api/v3/work_packages/1528/watchers"+ method: post+ payload:+ user:+ href: "/api/v3/users/{user_id}"+ templated: true+ removeWatcher:+ href: "/api/v3/work_packages/1528/watchers/{user_id}"+ method: delete+ templated: true+ addRelation:+ href: "/api/v3/relations"+ method: post+ title: Add relation+ changeParent:+ href: "/api/v3/work_packages/694"+ method: patch+ title: Change parent of Bug in OpenProject+ addComment:+ href: "/api/v3/work_packages/1528/activities"+ method: post+ title: Add comment+ parent:+ href: "/api/v3/work_packages/1298"+ title: nisi eligendi officiis eos delectus quis voluptas dolores+ category:+ href: "/api/v3/categories/1298"+ title: eligend isi+ children:+ - href: "/api/v3/work_packages/1529"+ title: Write API documentation+ 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+ timeEntries:+ href: "/work_packages/1528/time_entries"+ type: text/html+ title: Time entries+ watchers:+ href: "/api/v3/work_packages/1528/watchers"+ customField3:+ href: api/v3/users/14+ id: 1528+ subject: Develop API+ description:+ format: markdown+ raw: Develop super cool OpenProject API.+ html: "<p>Develop super cool OpenProject API.</p>"+ scheduleManually: false+ startDate:+ dueDate:+ derivedStartDate:+ derivedDueDate:+ estimatedTime: PT2H+ derivedEstimatedTime: PT10H+ percentageDone: 0+ customField1: Foo+ customField2: 42+ createdAt: '2014-08-29T12:40:53Z'+ updatedAt: '2014-08-29T12:44:41Z'diff --git a/docs/api/apiv3/components/schemas/work_package_relation_form_model.yml b/docs/api/apiv3/components/schemas/work_package_relation_form_model.ymlnew file mode 100644index 00000000000..c77e8d56bcb--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_package_relation_form_model.yml@@ -0,0 +1,80 @@+# Schema: Work_Package_Relation_FormModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/relations/form"+ validate:+ href: "/api/v3/relations/form"+ method: POST+ commit:+ href: "/api/v3/relations"+ method: PATCH+ _type: Form+ _embedded:+ payload:+ _links:+ from:+ href: "/api/v3/work_packages/4534"+ to:+ href: "/api/v3/work_packages/3857"+ _type: WorkPackage+ type: follows+ delay: 3+ description: let it rest for 3 days+ schema:+ _type: Schema+ id:+ name: ID+ type: Integer+ writable: false+ type:+ name: Type+ type: String+ writable: true+ allowedValues:+ - relates+ - duplicates+ - duplicated+ - blocks+ - blocked+ - precedes+ - follows+ - includes+ - partof+ - requires+ - required+ reverseType:+ name: Reverse Type+ type: String+ writable: false+ description:+ name: Description+ type: String+ writable: true+ from:+ _links:+ allowedValues:+ - href: "/api/v3/work_packages/{id}"+ name: From work package+ type: WorkPackage+ writable: true+ to:+ _links:+ allowedValues:+ href: "/api/v3/work_packages/{id}/available_relation_candidates"+ title: Available work packages to relate to+ name: To work package+ type: WorkPackage+ writable: true+ delay:+ name: Delay+ type: Integer+ writable: true+ validationErrors:+ from:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:BadExampleError+ message: For the purpose of this example we need a validation error. The remainder+ of the response pretends there were no errors.diff --git a/docs/api/apiv3/components/schemas/work_package_schema.yml b/docs/api/apiv3/components/schemas/work_package_schema.ymlnew file mode 100644index 00000000000..8aba1c876b2--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_package_schema.yml@@ -0,0 +1,2 @@+# Schema: Work_Package_Schema+--- {}diff --git a/docs/api/apiv3/components/schemas/work_package_schemas_model.yml b/docs/api/apiv3/components/schemas/work_package_schemas_model.ymlnew file mode 100644index 00000000000..4a7dd065c0a--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_package_schemas_model.yml@@ -0,0 +1,20 @@+# Schema: Work_Package_SchemasModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/work_packages/schemas"+ total: 5+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: Schema...+ _links:+ self:+ href: "/api/v3/work_packages/schemas/13-1"+ - _type: Schema...+ _links:+ self:+ href: "/api/v3/work_packages/schemas/7-6"diff --git a/docs/api/apiv3/components/schemas/work_packages_by_project_model.yml b/docs/api/apiv3/components/schemas/work_packages_by_project_model.ymlnew file mode 100644index 00000000000..fff3f0dc115--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_packages_by_project_model.yml@@ -0,0 +1,24 @@+# Schema: Work_Packages_by_ProjectModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/projects/14/work_packages"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: WorkPackage+ _links:+ self:+ href: "/api/v3/work_packages/1"+ id: 1+ subject: Skipped other properties for brevity+ - _type: WorkPackage+ _links:+ self:+ href: "/api/v3/work_packages/2"+ id: 2+ subject: Skipped other properties for brevitydiff --git a/docs/api/apiv3/components/schemas/work_packages_model.yml b/docs/api/apiv3/components/schemas/work_packages_model.ymlnew file mode 100644index 00000000000..77edb63a12e--- /dev/null+++ b/docs/api/apiv3/components/schemas/work_packages_model.yml@@ -0,0 +1,24 @@+# Schema: Work_PackagesModel+---+type: object+example:+ _links:+ self:+ href: "/api/v3/work_packages"+ total: 2+ count: 2+ _type: Collection+ _embedded:+ elements:+ - _type: WorkPackage+ _links:+ self:+ href: "/api/v3/work_packages/1"+ id: 1+ subject: Skipped other properties for brevity+ - _type: WorkPackage+ _links:+ self:+ href: "/api/v3/work_packages/2"+ id: 2+ subject: Skipped other properties for brevitydiff --git a/docs/api/apiv3/endpoints/README.md b/docs/api/apiv3/endpoints/README.mddeleted file mode 100644index 409b51c0774..00000000000--- a/docs/api/apiv3/endpoints/README.md+++ /dev/null@@ -1,5 +0,0 @@-# Endpoints--The APIv3 can be grouped by the resources it supports.--This section is to be understood as a compendium for looking up specific endpoints to understand their capabilities and how to implement a client communicating with them. Be sure to have read the more generic introductory explanations before looking into a specific endpoint.\ No newline at end of filediff --git a/docs/api/apiv3/endpoints/actions.apib b/docs/api/apiv3/endpoints/actions.apibdeleted file mode 100644index a3bcdfe80c5..00000000000--- a/docs/api/apiv3/endpoints/actions.apib+++ /dev/null@@ -1,400 +0,0 @@-# Group Actions & Capabilities--An action is a change one can trigger within the OpenProject instance.-This could be creating a work package, exporting work packages or updating a user.-An action can also be something where the user is able to be involved so where the user is in the passive role-e.g. when being assigned a work package.--A capability combines an action with a context and a principal. It thus communicates, which principal can carry out-(or be passively involved) which action within a certain context. E.g. a user might have the capability of creating work packages-within a project.--In other words, an action is independent of a principal and context while a capability is-a relation between an action, the context and the principal.--The actions are most of the time derived from permissions which can be configured via the administrative UI where an administrator-selects from a set of permissions to be granted per role. But there are other cases, e.g. in order to become assignee or responsible of a work package, a user has-to have a role which allows having work packages assigned which is not a permission.--Even though user might have a capability, it might still not be possible to carry out the action-because some other requirement is not met.-E.g. A user might have the capability to update work packages, but if a particular work package is-in a readonly state, that work package cannot be updated.--*Only a small set of actions that actually already exist in the system are currently exposed via-the api. They will be added over time.*---## Action--An action describes what can be carried out within the application. Until an action becomes assigned,-which turns it into a capability, it remains in the state of "could be".--### Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:-------------------:|----------------------------------------- | ------------- | -------------------------------------------------------------- | -------------------- |-| self | The action | Action | not null | READ |--### Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |-| id | Identifier for the action | String | Not null | READ |-| name | A human readable name for the action *Not yet implemented* | String | Not null | READ |-| description | Describes what can be done by principals having that action *Not yet implemented* | String | Not null | READ |-| modules | Clusters the actions into groups into which they belong logically *Not yet implemented* | []String | Not null | READ |---## Capabilities--Actions can be assigned to a principal by assigning roles to that principal. E.g. a user might receive the 'work_packages/show'-action by having a role called reader assigned within a project.--Whenever a principal is assigned an action within a context, the principal has additional capabilities.--Exactly which actions can be gained by having a role assigned depends on the configuration of that role.-The configuration is adaptable by admins within the administration of the OpenProject instance.--### Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|-------------------- |----------------------------------------- | ------------- | --------------- | -------------------- |-| self | The capability | | | |-| action | The action the principal is granted | Action | not null | READ |-| context | The context the principal has this the action in. This is typically a project or the global context. | Project or null | | READ |-| principal | The principal being allowed the action. | Action | not null | READ |--### Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |-| id | Identifier for the action | String | Not null | READ |-| name | A human readable name for the action | String | Not null | READ |--## View action [/api/v3/actions/{id}]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/actions/work_packages/create",- "title": "Add work package"- }- },- "_type": "Action",- "id": "work_packages/create",- "name": "Add work package",- "description": "Creating a work package within a project including the uploading of attachments. Some attributes might not be selected, e.g version which requires a second permission",- "modules": [- "work_packages"- ]- }--## View action [GET]--Returns an individual action.--+ Parameters- + id (required, string, `work_packages/create`) ... action id which is the name of the action--+ Response 200 (application/hal+json)-- [View action][]--+ Response 404 (application/hal+json)-- Returned if the action does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }---## List actions [/api/v3/actions{?filters,sortBy}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/actions" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_links": {- "self": {- "href": "/api/v3/actions/work_packages/create",- "title": "Add work package"- }- },- "_type": "Action",- "id": "work_packages/create",- "name": "Add work package",- "description": "Creating a work package within a project including the uploading of attachments. Some attributes might not be selected, e.g version which requires a second permission",- "modules": [- "work_packages"- ]- },- {- "_links": {- "self": {- "href": "/api/v3/actions/work_packages/assign_versions",- "title": "Assigning version"- }- },- "_type": "Action",- "id": "work_packages/assign_versions",- "name": "Assign version",- "description": "Assigning a work package to a version when creating/updating a work package. Only principals having this permission can assign a value to the version property of the work package resource.",- "modules": [- "work_packages",- "versions"- ]- }- ]- }- }---## List actions [GET]--Returns a collection of actions. The client can choose to filter the actions similar to how work packages are filtered.-In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client-has sufficient permissions.--+ Parameters- + filters (optional, string, `[{ "id": { "operator": "=", "values": ["memberships/create"] }" }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint.- Currently supported filters are:- + id: Returns only the action having the id or all actions except those having the id(s).-- + sortBy = ["id", "asc"] (optional, string, `[["id", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:- + *No sort supported yet*--+ Response 200 (application/hal+json)-- [List actions][]--## View capabilities [/api/v3/capabilities/{id}]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/capabilities/work_packages/create/p123-567"- },- "action": {- "href": "/api/v3/actions/work_packages/create",- "title": "Add work package"- },- "context": {- "href": "/api/v3/projects/123",- "title": "A project"- },- "principal": {- "href": "/api/v3/users/567",- "title": "Some user"- }- },- "_type": "Capability",- "id": "work_packages/create/p123-567"- }--## View capabilities [GET]--+ Parameters- + id (required, string, `work_packages/create/p123-567`) ... capability id--+ Response 200 (application/hal+json)-- [View capabilities][]--+ Response 404 (application/hal+json)-- Returned if the capability does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }---## List capabilities [/api/v3/capabilities{?filters,sortBy}]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/capabilities"- },- "changeSize": {- "href": "/api/v3/capabilities?pageSize={size}",- "templated": true- },- "jumpTo": {- "href": "/api/v3/capabilities?offset={offset}",- "templated": true- }- },- "total": 4,- "count": 4,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_links": {- "self": {- "href": "/api/v3/capabilities/work_packages/create/p123-567"- },- "action": {- "href": "/api/v3/actions/work_packages/create",- "title": "Add work package"- },- "context": {- "href": "/api/v3/projects/123",- "title": "A project"- },- "principal": {- "href": "/api/v3/users/567",- "title": "Some user"- }- },- "_type": "Capability",- "id": "work_packages/create/p123-567"- },- {- "_links": {- "self": {- "href": "/api/v3/capabilities/work_packages/assignee/p123-567"- },- "action": {- "href": "/api/v3/actions/work_packages/assignee"- },- "context": {- "href": "/api/v3/projects/123",- "title": "A project"- },- "principal": {- "href": "/api/v3/users/567",- "title": "Some user"- }- },- "_type": "Capability",- "id": "work_packages/assignee/p123-567"- },- {- "_links": {- "self": {- "href": "/api/v3/capabilities/memberships/create/p345-821",- "title": "Create members"- },- "action": {- "href": "/api/v3/actions/memberships/create"- },- "context": {- "href": "/api/v3/projects/345",- "title": "A project"- },- "principal": {- "href": "/api/v3/users/821",- "title": "Some user"- }- },- "_type": "Capability",- "id": "memberships/create/p345-821"- },- {- "_links": {- "self": {- "href": "/api/v3/capabilities/users/delete/g-567",- "title": "Delete user"- },- "context": {- "href": "/api/v3/capabilities/context/global",- "title": "Global"- },- "principal": {- "href": "/api/v3/users/567",- "title": "Some user"- }- },- "_type": "Capability",- "id": "users/delete/g-567"- }- ]- }- }---## List capabilities [GET]--Returns a collection of actions assigned to a principal in a context. The client can choose to filter the actions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client has sufficient permissions--+ Parameters- + filters (optional, string, `[{ "principal": { "operator": "=", "values": ["1"] }" }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint.- + action: Get all capabilities of a certain action- + principal: Get all capabilities of a principal- + context: Get all capabilities within a context. Note that for a project context the client needs to provide `p{id}`, e.g. `p5` and for the global context a `g`--- + sortBy = ["id", "asc"] (optional, string, `[["id", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:- + id: Sort by the capabilities id--+ Response 200 (application/hal+json)-- [List capabilities][]--## View global context [/api/v3/capabilities/context/global]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/capabilities/context/global"- }- },- "_type": "CapabilityContext::Global",- "id": "global"- }--## View global context [GET]--Returns the global capability context. This context is necessary to consistently link to a context even if the context is not a project.--+ Parameters--+ Response 200 (application/hal+json)-- [View global context][]--+ Response 404 (application/hal+json)-- Returned if the action does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }\ No newline at end of filediff --git a/docs/api/apiv3/endpoints/activities.apib b/docs/api/apiv3/endpoints/activities.apibdeleted file mode 100644index e76eb6e710c..00000000000--- a/docs/api/apiv3/endpoints/activities.apib+++ /dev/null@@ -1,115 +0,0 @@-# Group Activities--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :---------: | ------------- | ---- | ----------- | -------------------- |-| id | Activity id | Integer | x > 0 | READ |-| version | Activity version | Integer | x > 0 | READ |-| comment | | Formattable | | READ / WRITE |-| details | | Array of Formattable | | READ |-| createdAt | Time of creation | DateTime | | READ |--Activity can be either _type Activity or _type Activity::Comment.--## Activity [/api/v3/activities/{id}]--+ Model- + Body-- {- "_type": "Activity::Comment",- "_links": {- "self": {- "href": "/api/v3/activity/1",- "title": "Priority changed from High to Low"- },- "workPackage": {- "href": "/api/v3/work_packages/1",- "title": "quis numquam qui voluptatum quia praesentium blanditiis nisi"- },- "user": {- "href": "/api/v3/users/1",- "title": "John Sheppard - admin"- }- },- "id": 1,- "details": [- {- "format": "markdown",- "raw": "Lorem ipsum dolor sit amet.",- "html": "<p>Lorem ipsum dolor sit amet.</p>"- }- ],- "comment": {- "format": "markdown",- "raw": "Lorem ipsum dolor sit amet.",- "html": "<p>Lorem ipsum dolor sit amet.</p>"- },- "createdAt": "2014-05-21T08:51:20Z",- "version": 31- }--## View activity [GET]--+ Parameters- + id (required, integer, `1`) ... Activity id--+ Response 200 (application/hal+json)-- [Activity][]--## Update activity [PATCH]--Updates an activity's comment and, on success, returns the updated activity.--+ Parameters- + id (required, integer, `1`) ... Activity id--+ Request (application/json)-- {- "comment": { "raw": "The updated comment" }- }--+ Response 200 (application/hal+json)-- [Activity][]--+ 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:** edit journals-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to edit the comment of this journal entry."- }---+ Response 422 (application/hal+json)-- Returned if the client tries to modify a read-only property.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyIsReadOnly",- "message": "The ID of an activity can't be changed."- }diff --git a/docs/api/apiv3/endpoints/attachments.apib b/docs/api/apiv3/endpoints/attachments.apibdeleted file mode 100644index d806a9fff16..00000000000--- a/docs/api/apiv3/endpoints/attachments.apib+++ /dev/null@@ -1,1014 +0,0 @@-# Group Attachments--Attachments are files that were uploaded to OpenProject. Each attachment belongs to a single-container (e.g. a work package or a board message).--## Actions--| Link | Description | Condition |-|:-------------------:|----------------------------------------------------------------------| -------------------------------------------- |-| delete | Deletes this attachment | **Permission**: edit on attachment container or being the author for attachments without container |--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:----------------:| --------------------------------------------------- | ------------- | ----------- | -------------------- |-| self | This attachment | Attachment | not null | READ |-| container | The object (e.g. WorkPackage) housing the attachment| Anything | not null | READ |-| author | The user who uploaded the attachment | User | not null | READ |-| downloadLocation | Direct download link to the attachment | - | not null | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-|:------------:| ----------------------------------------------- | ----------- | ----------- | -------------------- |-| id | Attachment's id | Integer | x > 0 | READ |-| title | The name of the file | String | not null | READ |-| fileName | The name of the uploaded file | String | not null | READ |-| fileSize | The size of the uploaded file in Bytes | Integer | x >= 0 | READ |-| description | A user provided description of the file | Formattable | not null | READ |-| contentType | The files MIME-Type as determined by the server | String | not null | READ |-| digest | A checksum for the files content | Digest | not null | READ |-| createdAt | Time of creation | DateTime | not null | READ |--## Attachments [/api/v3/attachments]--## Create Attachment [POST]--Clients can create attachments without a container first and attach them later on.-This is useful if the container does not exist at the time the attachment is uploaded.-After the upload, the client can then claim such containerless attachments for any resource eligible (e.g. WorkPackage) on subsequent requests.-The upload and the claiming *must* be done for the same user account. Attachments uploaded by another user cannot be claimed and-once claimed for a resource, they cannot be claimed by another.--The upload request must be of type `multipart/form-data` with exactly two parts.--The first part *must* be called `metadata`. Its content type is expected to be `application/json`,-the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`.--The second part *must* be called `file`, its content type *should* match the mime type of the file.-The body *must* be the raw content of the file.-Note that a `filename` *must* be indicated in the `Content-Disposition` of this part, although it will be ignored.-Instead the `fileName` inside the JSON of the metadata part will be used.--+ Request (multipart/form-data; boundary=boundary-delimiter)-- --boundary-delimiter- Content-Disposition: form-data; name="metadata"- Content-Type: application/json; charset=UTF-8-- {- "fileName": "cute-cat.png",- "description": {- "raw": "A cute kitty, cuddling with its friends!"- }- }-- --boundary-delimiter- Content-Disposition: form-data; name="file"; filename="attachment"- Content-Type: image/png-- PNG file data- --boundary-delimiter----+ Response 200 (application/hal+json)-- [Attachment][]--+ Response 400 (application/hal+json)-- Returned if the client sends a not understandable request. Reasons include:-- * Omitting one of the required parts (metadata and file)- * sending unparsable JSON in the metadata part-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody",- "message": "The request could not be parsed as JSON."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** At least one permission in any project: edit work package, add work package, edit messages, edit wiki pages (plugins might extend this list)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to delete this attachment."- }--+ Response 422 (application/hal+json)-- Returned if the client tries to send an invalid attachment.- Reasons are:-- * Omitting the file name (`fileName` property of metadata part)- * Sending a file that is too large-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "File is too large (maximum size is 5242880 Bytes)."- }----## Attachment [/api/v3/attachments/{id}]--+ Model- + Body-- {- "_type": "Attachment",- "_links": {- "self": {- "href": "/api/v3/attachments/1"- },- "container": {- "href": "/api/v3/work_packages/1"- },- "author": {- "href": "/api/v3/users/1"- },- "staticDownloadLocation": {- "href": "/api/v3/attachments/1/download"- },- "downloadLocation": {- "href": "/some/remote/aws/url/image.png"- }- },- "id": 1,- "fileName": "cat.png",- "filesize": 24,- "description": {- "format": "plain",- "raw": "A picture of a cute cat",- "html": "<p>A picture of a cute cat</p>"- },- "contentType": "image/png",- "digest": {- "algorithm": "md5",- "hash": "64c26a8403cd796ea4cf913cda2ee4a9"- },- "createdAt": "2014-05-21T08:51:20Z"- }--## View attachment [GET]--+ Parameters- + id (required, integer, `1`) ... Attachment id--+ Response 200 (application/hal+json)-- [Attachment][]--+ Response 404 (application/hal+json)-- Returned if the attachment does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view permission for the container of the attachment or being the author for attachments without container-- *Note: A client without sufficient permissions shall not be able to test for the existence of an attachment.- 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 attachment does not exist."- }--## Delete attachment [DELETE]--Permanently deletes the specified attachment.--+ Parameters- + id (required, integer, `1`) ... Attachment id--+ Response 204-- Returned if the attachment was deleted successfully.-- 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.-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** edit permission for the container of the attachment or being the author for attachments without container-- *Note that you will only receive this error, if you are at least allowed to see the attachment.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to delete this attachment."- }--+ Response 404 (application/hal+json)-- Returned if the attachment does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view permission for the container of the attachment or being the author for attachments without container-- *Note: A client without sufficient permissions shall not be able to test for the existence of an attachment.- 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 attachment does not exist."- }---# Attachments by post [/api/v3/posts/{id}/attachments]--+ Model- + Body-- {- "_type": "Collection",- "total": 1,- "count": 1,- "_embedded": {- "elements": [- {- "_type": "Attachment",- "id": 376,- "fileName": "some.gif",- "fileSize": 3521772,- "description": {- "format": "plain",- "raw": "",- "html": ""- },- "contentType": "image/gif",- "digest": {- "algorithm": "md5",- "hash": "7ac9c97ef73d47127f590788b84c0c1c"- },- "createdAt": "2018-06-01T07:24:19Z",- "_links": {- "self": {- "href": "/api/v3/attachments/376",- "title": "200.gif"- },- "author": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "container": {- "href": "/api/v3/posts/72",- "title": "wiki"- },- "downloadLocation": {- "href": "/api/v3/attachments/376/content"- },- "delete": {- "href": "/api/v3/attachments/376",- "method": "delete"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/posts/72/attachments"- }- }- }--## List attachments by post [GET]--+ Parameters- + id (required, integer, `1`) ... ID of the post whose attachments will be listed--+ Response 200 (application/hal+json)-- [Attachments by post][]--+ Response 404 (application/hal+json)-- Returned if the post does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view messages-- *Note: A client without sufficient permissions shall not be able to test for the existence of a post.- 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 requested resource could not be found."- }--## Add attachment to post [POST]--Adds an attachment with the post as it's container.--See [the general specification for uploading attachments](#attachments-attachments) for details.--+ Parameters- + id (required, integer, `1`) ... ID of the post to receive the attachment--+ Request (multipart/form-data; boundary=boundary-delimiter)-- --boundary-delimiter- Content-Disposition: form-data; name="metadata"- Content-Type: application/json; charset=UTF-8-- {- "fileName": "cute-cat.png",- "description": {- "raw": "A cute kitty, cuddling with its friends!"- }- }-- --boundary-delimiter- Content-Disposition: form-data; name="file"; filename="attachment"- Content-Type: image/png-- PNG file data- --boundary-delimiter----+ Response 200 (application/hal+json)-- + Body-- {- "_embedded": {- "author": {- "_type": "User",- "id": 1,- "name": "OpenProject Admin",- "createdAt": "2015-03-20T12:56:52Z",- "updatedAt": "2018-05-29T13:57:44Z",- "login": "admin",- "admin": true,- "firstName": "OpenProject",- "lastName": "Admin",- "email": null,- "avatar": "",- "status": "active",- "identityUrl": null,- "_links": {- "self": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "showUser": {- "href": "/users/1",- "type": "text/html"- },- "updateImmediately": {- "href": "/api/v3/users/1",- "title": "Update admin",- "method": "patch"- },- "lock": {- "href": "/api/v3/users/1/lock",- "title": "Set lock on admin",- "method": "post"- }- }- },- "container": {- "_type": "Post",- "id": 150,- "subject": "sfsdfsdfsdfsdf",- "_links": {- "self": {- "href": "/api/v3/posts/150"- },- "attachments": {- "href": "/api/v3/posts/150/attachments"- },- "addAttachment": {- "href": "/api/v3/posts/150/attachments",- "method": "post"- },- "project": {- "href": "/api/v3/projects/12",- "title": "Demo project"- }- }- }- },- "_type": "Attachment",- "id": 377,- "fileName": "some.gif",- "fileSize": 3521772,- "description": {- "format": "plain",- "raw": "",- "html": ""- },- "contentType": "image/gif",- "digest": {- "algorithm": "md5",- "hash": "7ac9c97ef73d47127f590788b84c0c1c"- },- "createdAt": "2018-06-01T07:53:36Z",- "_links": {- "self": {- "href": "/api/v3/attachments/377",- "title": "200.gif"- },- "author": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "container": {- "href": "/api/v3/posts/150",- "title": "sfsdfsdfsdfsdf"- },- "downloadLocation": {- "href": "/api/v3/attachments/377/content"- },- "delete": {- "href": "/api/v3/attachments/377",- "method": "delete"- }- }- }--+ Response 400 (application/hal+json)-- Returned if the client sends a not understandable request. Reasons include:-- * Omitting one of the required parts (metadata and file)- * sending unparsable JSON in the metadata part-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody",- "message": "The request could not be parsed as JSON."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** edit messages-- *Note that you will only receive this error, if you are at least allowed to see the wiki page*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to delete this attachment."- }--+ Response 404 (application/hal+json)-- Returned if the post does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view messages-- *Note: A client without sufficient permissions shall not be able to test for the existence of a post.- 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 requested resource could not be found."- }--+ Response 422 (application/hal+json)-- Returned if the client tries to send an invalid attachment.- Reasons are:-- * Omitting the file name (`fileName` property of metadata part)- * Sending a file that is too large-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "File is too large (maximum size is 5242880 Bytes)."- }---# Attachments by wiki page [/api/v3/wiki_pages/{id}/attachments]--+ Model- + Body-- {- "_type": "Collection",- "total": 1,- "count": 1,- "_embedded": {- "elements": [- {- "_type": "Attachment",- "id": 376,- "fileName": "some.gif",- "fileSize": 3521772,- "description": {- "format": "plain",- "raw": "",- "html": ""- },- "contentType": "image/gif",- "digest": {- "algorithm": "md5",- "hash": "7ac9c97ef73d47127f590788b84c0c1c"- },- "createdAt": "2018-06-01T07:24:19Z",- "_links": {- "self": {- "href": "/api/v3/attachments/376",- "title": "200.gif"- },- "author": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "container": {- "href": "/api/v3/wiki_pages/72",- "title": "wiki"- },- "downloadLocation": {- "href": "/api/v3/attachments/376/content"- },- "delete": {- "href": "/api/v3/attachments/376",- "method": "delete"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/wiki_pages/72/attachments"- }- }- }--## List attachments by wiki page [GET]--+ Parameters- + id (required, integer, `1`) ... ID of the wiki page whose attachments will be listed--+ Response 200 (application/hal+json)-- [Attachments by wiki page][]--+ Response 404 (application/hal+json)-- Returned if the wiki page does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view wiki pages-- *Note: A client without sufficient permissions shall not be able to test for the existence of a work package.- 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 requested resource could not be found."- }--## Add attachment to wiki page [POST]--Adds an attachment with the wiki page as it's container.--See [the general specification for uploading attachments](#attachments-attachments) for details.--+ Parameters- + id (required, integer, `1`) ... ID of the wiki page to receive the attachment--+ Request (multipart/form-data; boundary=boundary-delimiter)-- --boundary-delimiter- Content-Disposition: form-data; name="metadata"- Content-Type: application/json; charset=UTF-8-- {- "fileName": "cute-cat.png",- "description": {- "raw": "A cute kitty, cuddling with its friends!"- }- }-- --boundary-delimiter- Content-Disposition: form-data; name="file"; filename="attachment"- Content-Type: image/png-- PNG file data- --boundary-delimiter----+ Response 200 (application/hal+json)-- + Body-- {- "_embedded": {- "author": {- "_type": "User",- "id": 1,- "name": "OpenProject Admin",- "createdAt": "2015-03-20T12:56:52Z",- "updatedAt": "2018-05-29T13:57:44Z",- "login": "admin",- "admin": true,- "firstName": "OpenProject",- "lastName": "Admin",- "email": null,- "avatar": "",- "status": "active",- "identityUrl": null,- "_links": {- "self": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "showUser": {- "href": "/users/1",- "type": "text/html"- },- "updateImmediately": {- "href": "/api/v3/users/1",- "title": "Update admin",- "method": "patch"- },- "lock": {- "href": "/api/v3/users/1/lock",- "title": "Set lock on admin",- "method": "post"- }- }- },- "container": {- "_type": "WikiPage",- "id": 72,- "title": "wiki",- "_links": {- "self": {- "href": "/api/v3/wiki_pages/72"- },- "attachments": {- "href": "/api/v3/wiki_pages/72/attachments"- },- "addAttachment": {- "href": "/api/v3/wiki_pages/72/attachments",- "method": "post"- },- "project": {- "href": "/api/v3/projects/12",- "title": "Demo project"- }- }- }- },- "_type": "Attachment",- "id": 376,- "fileName": "some.gif",- "fileSize": 3521772,- "description": {- "format": "plain",- "raw": "",- "html": ""- },- "contentType": "image/gif",- "digest": {- "algorithm": "md5",- "hash": "7ac9c97ef73d47127f590788b84c0c1c"- },- "createdAt": "2018-06-01T07:24:19Z",- "_links": {- "self": {- "href": "/api/v3/attachments/376",- "title": "200.gif"- },- "author": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "container": {- "href": "/api/v3/wiki_pages/72",- "title": "wiki"- },- "downloadLocation": {- "href": "/api/v3/attachments/376/content"- },- "delete": {- "href": "/api/v3/attachments/376",- "method": "delete"- }- }- }---+ Response 400 (application/hal+json)-- Returned if the client sends a not understandable request. Reasons include:-- * Omitting one of the required parts (metadata and file)- * sending unparsable JSON in the metadata part-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody",- "message": "The request could not be parsed as JSON."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** edit wiki pages-- *Note that you will only receive this error, if you are at least allowed to see the wiki page*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to delete this attachment."- }--+ Response 404 (application/hal+json)-- Returned if the wiki page does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view wiki pages-- *Note: A client without sufficient permissions shall not be able to test for the existence of a wiki page- 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 requested resource could not be found."- }--+ Response 422 (application/hal+json)-- Returned if the client tries to send an invalid attachment.- Reasons are:-- * Omitting the file name (`fileName` property of metadata part)- * Sending a file that is too large-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "File is too large (maximum size is 5242880 Bytes)."- }--# Attachments by work package [/api/v3/work_packages/{id}/attachments]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/work_packages/1/attachments" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_type": "Attachment",- "_links": {- "self": {- "href": "/api/v3/attachments/1"- },- "container" {- "href": "/api/v3/work_packages/1"- },- "author": {- "href": "/api/v3/users/1"- },- "downloadLocation": {- "href": "/attachments/1/download"- }- },- "id": 1,- "fileName": "cat.png",- "filesize": 24,- "description": {- "format": "plain",- "raw": "A picture of a cute cat",- "html": "<p>A picture of a cute cat</p>"- },- "contentType": "image/png",- "digest": {- "algorithm": "md5",- "64c26a8403cd796ea4cf913cda2ee4a9":- },- "createdAt": "2014-05-21T08:51:20Z"- },- {- "_type": "Attachment",- "_links": {- "self": {- "href": "/api/v3/attachments/2"- },- "container" {- "href": "/api/v3/work_packages/1"- },- "author": {- "href": "/api/v3/users/1"- },- "downloadLocation": {- "href": "/attachments/2/download"- }- },- "id": 2,- "fileName": "cat2.png",- "filesize": 24,- "description": {- "format": "plain",- "raw": "A picture of another cute cat",- "html": "<p>A picture of another cute cat</p>"- },- "contentType": "image/png",- "digest": {- "algorithm": "md5",- "46c26a8403cd769ea4c9f13cdae2e49a":- },- "createdAt": "2014-05-21T08:51:20Z"- }- ]- }- }--## List attachments by work package [GET]--+ Parameters- + id (required, integer, `1`) ... ID of the work package whose attachments will be listed--+ Response 200 (application/hal+json)-- [Attachments by work package][]--+ Response 404 (application/hal+json)-- 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: A client without sufficient permissions shall not be able to test for the existence of a work package.- 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 work package does not exist."- }--## Add attachment to work package [POST]--To add an attachment to a work package, a client needs to issue a request of type `multipart/form-data`-with exactly two parts.--The first part *must* be called `metadata`. Its content type is expected to be `application/json`,-the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`.--The second part *must* be called `file`, its content type *should* match the mime type of the file.-The body *must* be the raw content of the file.-Note that a `filename` must be indicated in the `Content-Disposition` of this part, however it will be ignored.-Instead the `fileName` inside the JSON of the metadata part will be used.--+ Parameters- + id (required, integer, `1`) ... ID of the work package to receive the attachment--+ Request (multipart/form-data; boundary=boundary-delimiter)-- --boundary-delimiter- Content-Disposition: form-data; name="metadata"- Content-Type: application/json; charset=UTF-8-- {- "fileName": "cute-cat.png",- "description": {- "raw": "A cute kitty, cuddling with its friends!"- }- }-- --boundary-delimiter- Content-Disposition: form-data; name="file"; filename="attachment"- Content-Type: image/png-- PNG file data- --boundary-delimiter----+ Response 200 (application/hal+json)-- [Attachment][]--+ Response 400 (application/hal+json)-- Returned if the client sends a not understandable request. Reasons include:-- * Omitting one of the required parts (metadata and file)- * sending unparsable JSON in the metadata part-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody",- "message": "The request could not be parsed as JSON."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** edit work package or add work package-- *Note that you will only receive this error, if you are at least allowed to see the work package.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to delete this attachment."- }--+ Response 404 (application/hal+json)-- 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: A client without sufficient permissions shall not be able to test for the existence of a work package.- 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 work package does not exist."- }--+ Response 422 (application/hal+json)-- Returned if the client tries to send an invalid attachment.- Reasons are:-- * Omitting the file name (`fileName` property of metadata part)- * Sending a file that is too large-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "File is too large (maximum size is 5242880 Bytes)."- }diff --git a/docs/api/apiv3/endpoints/budgets.apib b/docs/api/apiv3/endpoints/budgets.apibdeleted file mode 100644index 3e459d25521..00000000000--- a/docs/api/apiv3/endpoints/budgets.apib+++ /dev/null@@ -1,147 +0,0 @@-# Group Budgets--*Note: Budgets are currently only implemented as a stub. Further properties of budgets might be added at a future date, however they will require the view budget permission to be displayed.*--## Linked Properties:-| Link | Description | Type | Constraints | Supported operations |-|:---------:|-------------------------------------------- | ------------- | --------------------- | -------------------- |-| self | This budget | Budget | not null | READ |--## Properties-| Property | Description | Type | Constraints | Supported operations | Condition |-| :---------: | ------------------------------------------- | ----------- | ----------- | -------------------- | --------------------------- |-| id | Budget id | Integer | x > 0 | READ | |-| subject | Budget name | String | not empty | READ | |--## Budget [/api/v3/budgets/{id}]--+ Model- + Body-- {- "_type" : "Budget",- "_links" : {- "self" : {- "href" : "/api/v3/budgets/1",- "title" : "Q3 2015"- }- },- "id" : 1,- "subject" : "Q3 2015"- }---## view Budget [GET]--+ Parameters- + id (required, integer, `1`) ... Budget id--+ Response 200 (application/hal+json)-- [Budget][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work packages **or** view budgets (on the budgets project)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see this budget."- }--## Budgets by Project [/api/v3/projects/{id}/budgets]--+ Model- + Body-- {- "_links" : {- "self" : {- "href" : "/api/v3/projects/1/budgets"- }- },- "_type" : "Collection",- "total" : 2,- "count" : 2,- "_embedded" : {- "elements" : [- {- "_type" : "Budget",- "_links" : {- "self" : {- "href" : "/api/v3/budgets/1",- "title" : "Q3 2015"- }- },- "id" : 1,- "subject" : "Q3 2015"- },- {- "_type" : "Budget",- "_links" : {- "self" : {- "href" : "/api/v3/budgets/2",- "title" : "Q4 2015"- }- },- "id" : 2,- "subject" : "Q4 2015"- }- ]- }- }---## view Budgets of a Project [GET]--+ Parameters- + id (required, integer, `1`) ... Project id--+ Response 200 (application/hal+json)-- [Budgets by Project][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see the budgets of the given- project.-- **Required permission:** view work packages **or** view budgets-- *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 see the budgets of this project."- }--+ Response 404 (application/hal+json)-- Returned if either:-- * the project does not exist- * the client does not have sufficient permissions to see the project- * the costs module is not enabled on the given project-- **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."- }--diff --git a/docs/api/apiv3/endpoints/categories.apib b/docs/api/apiv3/endpoints/categories.apibdeleted file mode 100644index e34627f17bf..00000000000--- a/docs/api/apiv3/endpoints/categories.apib+++ /dev/null@@ -1,140 +0,0 @@-# Group Categories--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:---------------:| --------------------------------------------------- | ------------- | ----------- | -------------------- |-| self | This category | Category | not null | READ |-| project | The project of this category | Project | not null | READ |-| defaultAssignee | Default assignee for work packages of this category | User | | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :--------: | ------------- | ------- | ----------- | -------------------- |-| id | Category id | Integer | x > 0 | READ |-| name | Category name | String | | READ |--## Categories by Project [/api/v3/projects/{project_id}/categories]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/projects/11/categories" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_links": {- "self": {- "href": "/api/v3/categories/10",- "title": "Category with assignee"- },- "project": {- "href": "/api/v3/projects/11",- "title": "Example project"- },- "defaultAssignee": {- "href": "/api/v3/users/42",- "title": "John Sheppard"- }- },- "_type": "Category",- "id": 10,- "name": "Foo"- },- {- "_links": {- "self": { "href": "/api/v3/categories/11" },- "project": { "href": "/api/v3/projects/11" }- },- "_type": "Category",- "id": 11,- "name": "Bar"- }- ]- }- }--## List categories of a project [GET]--+ Parameters- + project_id (required, integer, `1`) ... ID of the project whose categories will be listed--+ Response 200 (application/hal+json)-- [Categories by 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."- }--## Category [/api/v3/categories/{id}]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/categories/10",- "title": "Category with assignee"- },- "project": {- "href": "/api/v3/projects/11",- "title": "Example project"- },- "defaultAssignee": {- "href": "/api/v3/users/42",- "title": "John Sheppard"- }- },- "_type": "Category",- "id": 10,- "name": "Foo"- }--## View Category [GET]--+ Parameters- + id (required, integer, `1`) ... category id--+ Response 200 (application/hal+json)-- [Category][]--+ Response 404 (application/hal+json)-- Returned if the category does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view project (defining the category)-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a category. 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 category does not exist."- }diff --git a/docs/api/apiv3/endpoints/configuration.apib b/docs/api/apiv3/endpoints/configuration.apibdeleted file mode 100644index 15da51dd08b..00000000000--- a/docs/api/apiv3/endpoints/configuration.apib+++ /dev/null@@ -1,45 +0,0 @@-# Group Configuration--The configuration endpoint allows to read certain configuration parameters of the OpenProject instance.-Note that there is no 1:1 relationship between this endpoint and the settings you can find in your settings.yml.--For now this endpoint will only allow access to settings deemed useful for a client to know in general.--As clients might rely on the combination of both, the system settings as well as the current user's preferences, the resource-embeds the current user's preferences so client can fetch both with one request.--| Link | Description | Type | Nullable | Supported operations |-|:-------------------:| ------------------------------------------------ | ------------- | -------- | -------------------- |-| self | The configuration | Configuration | | READ |-| userPreferences | The preferences of the current user | UserPreferences | | READ |--## Local Properties-| Property | Description | Type | Condition | Supported operations |-| :-----------------------: | -------------------------------------------------- | ---------- | --------------------------------- | -------------------- |-| maximumAttachmentFileSize | The maximum allowed size of an attachment in Bytes | Integer | | READ |-| perPageOptions | Page size steps to be offered in paginated list UI | Integer[] | | READ |--## Configuration [/api/v3/configuration]--+ Model- + Body-- {- "_type": "Configuration",- "_links": {- "self": {- "href": "/api/v3/configuration"- },- "userPreferences": {- "href": "/api/v3/my_preferences"- }- },- "maximumAttachmentFileSize": 5242880,- "perPageOptions": [1, 10, 100]- }--## View configuration [GET]--+ Response 200 (application/hal+json)-- [Configuration][]diff --git a/docs/api/apiv3/endpoints/custom-actions.apib b/docs/api/apiv3/endpoints/custom-actions.apibdeleted file mode 100644index c842a6db9aa..00000000000--- a/docs/api/apiv3/endpoints/custom-actions.apib+++ /dev/null@@ -1,176 +0,0 @@-# Group Custom actions--Custom actions are a preconfigured set of changes that are applied to a work package.--Currently, this resource is a stub. The conditions and changes defined for the custom action are not yet present in the resource.--## Actions--| Link | Description | Condition |-|:-------------------:|----------------------------------------------------------------------| --------------------------------------- |-| executeImmediately | Apply the action to a work package |--## Linked Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |-| self | This custom action | CustomAction | not null | READ |--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | ------------ | -------------------- |-| id | Custom action id | Integer | x > 0 | READ |-| name | The user selected name of the custom action | String | | READ |-| description | A text describing the custom action | String | | READ |--## Custom Action [/api/v3/custom_actions/{custom_action_id}]--+ Model- + Body-- {- "_type": "CustomAction",- "name": "Change project and type",- "description": "Changes project and type in one go",- "_links": {- "executeImmediately": {- "href": "/apiChanges project and type in one go",- "title": "Execute Change project and type",- "method": "post"- },- "self": {- "href": "/api/v3/custom_actions/2",- "title": "Change project and type"- }- }- }--## View custom action [GET]--+ Parameters- + custom_action_id (required, integer, `1`) ... The id of the custom action to fetch--+ Response 200 (application/hal+json)-- [Custom Action][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** edit work packages in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the custom action does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }--## Execute custom action [/api/v3/custom_actions/{custom_action_id}/execute]--## Execute custom action [POST]--A POST to this end point executes the custom action on the work package provided in the payload. The altered work package will be returned. In order to avoid executing- the custom action unbeknown to a change that has already taken place, the client has to provide the work package's current lockVersion.--+ Parameters- + custom_action_id (required, integer, `1`) ... The id of the custom action to execute--+ Request Execute custom action (application/json)-- + Body-- {- "lockVersion": "3",- "_links": {- "workPackage": {- "href": "/api/v3/work_packages/42"- }- }- }--+ Response 200 (application/hal+json)-- Returns the work package resource that was updated. See [Work packages](work-packages) section for details.--+ 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:** edit work packages - Additional permissions might be required based on the custom action.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the custom action does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }--+ Response 409 (application/hal+json)-- Returned if the client provided an outdated lockVersion or no lockVersion at all.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:UpdateConflict",- "message": "Couldn't update the resource because of conflicting modifications."- }--+ Response 422 (application/hal+json)-- Returned if the custom action was not executed successfully e.g. when a constraint on a work package property was violated.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Delay must be a number greater than or equal to 0",- "_embedded": {- "details": {- "attribute": "delay"- }- }- }diff --git a/docs/api/apiv3/endpoints/custom-options.apib b/docs/api/apiv3/endpoints/custom-options.apibdeleted file mode 100644index d1f51ec5bc8..00000000000--- a/docs/api/apiv3/endpoints/custom-options.apib+++ /dev/null@@ -1,51 +0,0 @@-# Group Custom Objects--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:-------------:|-------------------------- | ------------- | ----------- | -------------------- |-| self | This custom object | CustomObject | not null | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-|:----------------:| ---------------------------------------------- | -------- | ----------- | -------------------- |-| id | The identifier | Integer | | READ |-| value | The value defined for this custom object | String | | READ |---Custom objects are options of list custom fields.--## Custom Object [/api/v3/custom_objects/{id}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/custom_objects/1" }- },- "_type": "CustomObject",- "value": "Foo"- }--## View Custom Object [GET]--+ Parameters- + id (required, integer, `1`) ... The custom object's identifier--+ Response 200 (application/hal+json)-- [Custom Object][]--+ Response 404 (application/hal+json)-- Returned if the custom object does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package in any project the custom object's custom field is active in.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }diff --git a/docs/api/apiv3/endpoints/documents.apib b/docs/api/apiv3/endpoints/documents.apibdeleted file mode 100644index e062b5d07a5..00000000000--- a/docs/api/apiv3/endpoints/documents.apib+++ /dev/null@@ -1,230 +0,0 @@-# Group Documents--A document is a file containing a list of attachments.--*Please note, that the endpoint is only a stub for now.*--## Actions--None yet--## Linked Properties-| Link | Description | Type | Constraints | Supported operations | Condition |-| :-----------: | ------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |-| self | This document | Document | not null | READ | |-| project | The project the document is in | Project | not null | READ / WRITE | |-| attachments | The attachments belonging to the document | []Attachment | not null | READ / WRITE | |--## Local Properties--| Property | Description | Type | Constraints | Supported operations | Condition |-| :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |-| id | Document's id | Integer | x > 0 | READ | |-| title | The title chosen for the collection of documents | String | max 60 characters | READ | |-| description | A text describing the documents | String | | READ | |-| createdAt | The time the document was created at | DateTime | | READ | |--## Document [/api/v3/documents/{id}]--+ Model- + Body-- {- "_type": "Document",- "id": 1,- "title": "Some other document",- "description": {- "format": "markdown",- "raw": "Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.",- "html": "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"- },- "createdAt": "2018-12-10T20:53:39Z",- "_links": {- "attachments": {- "href": "/api/v3/documents/1/attachments"- },- "addAttachment": {- "href": "/api/v3/documents/1/attachments",- "method": "post"- },- "self": {- "href": "/api/v3/documents/1",- "title": "Some document"- },- "project": {- "href": "/api/v3/projects/19",- "title": "Some project"- }- },- "_embedded": {- "project": {- "_type": "Project..."- },- "attachments": {- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded...": { "elements": [] },- "_links": {- "self": {- "href": "/api/v3/documents/1/attachments"- }- }- }- }- }--## View document [GET]--+ Parameters- + id (required, integer, `1`) ... document id--+ Response 200 (application/hal+json)-- [Document][]--+ Response 404 (application/hal+json)-- Returned if the document does not exist or if the user does not have permission to view it.-- **Required permission** `view documents` in the project the document belongs to-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }----## Documents [/api/v3/documents{?offset,pageSize,sortBy}]--+ Model- + Body-- {- "_type": "Collection",- "total": 2,- "count": 2,- "pageSize": 30,- "offset": 1,- "_embedded": {- "elements": [- {- "description": {- "format": "markdown",- "raw": "Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.",- "html": "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"- },- "_type": "Document",- "id": 1,- "title": "Some other document",- "createdAt": "2018-12-10T20:53:39Z",- "_links": {- "attachments": {- "href": "/api/v3/documents/1/attachments"- },- "addAttachment": {- "href": "/api/v3/documents/1/attachments",- "method": "post"- },- "self": {- "href": "/api/v3/documents/1",- "title": "Some document"- },- "project": {- "href": "/api/v3/projects/19",- "title": "Some project"- }- }- },- {- "description": {- "format": "markdown",- "raw": "Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.",- "html": "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"- },- "_type": "Document",- "id": 2,- "title": "Some other document",- "createdAt": "2018-12-10T20:55:54Z",- "_links": {- "attachments": {- "href": "/api/v3/documents/2/attachments"- },- "addAttachment": {- "href": "/api/v3/documents/2/attachments",- "method": "post"- },- "self": {- "href": "/api/v3/documents/2",- "title": "Some other document"- },- "project": {- "href": "/api/v3/projects/29",- "title": "Some other project"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/documents?offset=1&pageSize=30"- },- "jumpTo": {- "href": "/api/v3/documents?offset=%7Boffset%7D&pageSize=30",- "templated": true- },- "changeSize": {- "href": "/api/v3/documents?offset=1&pageSize=%7Bsize%7D",- "templated": true- }- }- }--## List Documents [GET]--The documents returned depend on the provided parameters and also on the requesting user's permissions.--+ Parameters- + offset = `1` (optional, integer, `25`) ... Page number inside the requested collection.-- + pageSize (optional, integer, `25`) ... Number of elements to display per page.-- + sortBy (optional, string, `[["created_at", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:- + id: Sort by primary key- + created_at: Sort by document creation datetime--+ Response 200 (application/hal+json)-- [Documents][]--+ Response 400 (application/hal+json)-- Returned if the client sends invalid request parameters e.g. filters-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidQuery",- "message": [- "Filters Invalid filter does not exist."- ]- }--+ Response 403 (application/hal+json)-- Returned if the client is not logged in and login is required.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to view this resource."- }diff --git a/docs/api/apiv3/endpoints/grids.apib b/docs/api/apiv3/endpoints/grids.apibdeleted file mode 100644index e08309a3f99..00000000000--- a/docs/api/apiv3/endpoints/grids.apib+++ /dev/null@@ -1,864 +0,0 @@-# Group Grids--A grid is a layout for a page or a part of the page of the OpenProject application. It defines the structure (number of rows and number of columns) as well as the contents of the page.--The contents is defined by `GridWidget`s. While a `GridWidget` is it's own type, it is not a resource in it's own right as it is an intrinsic part of a `Grid`.--Depending on what page a grid is defined for, different widgets may be eligible to be placed on the grid. The page might also define the permissions needed for accessing, creating or modifying the grid.--Currently, the following pages employ grids:-+ /my/page: The my page every user has. Only a user can access or modify their "my page".--*The delete action is not yet supported*--## Actions-| Link | Description | Condition |-|:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- |-| updateImmediately | Directly perform edits on this grid | **Permission**: depends on the page the grid is defined for |-| update | Validate edits on the grid via a form resource before committing | **Permission**: depends on the page the grid is defined for |--## Linked Properties-| Link | Description | Type | Constraints | Supported operations | Condition |-| :-----------: | -------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |-| self | This grid | Grid | not null | READ | |-| page | The url of the page the grid is defined for | url | not null | READ / WRITE | The page cannot be changed after the creation |--## Local Properties--| Property | Description | Type | Constraints | Supported operations | Condition |-| :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | -------------- |-| id | Grid's id | Integer | x > 0 | READ | |-| rowCount | The number of rows the grid has | Integer | x > 0 | READ/WRITE | |-| columnCount | The number of columns the grid has | Integer | x > 0 | READ/WRITE | |-| widgets | The set of `GridWidget`s selected for the grid | []GridWidget | | READ/WRITE | The widgets cannot overlap |-| createdAt | The time the grid was created | DateTime | | READ | |-| updatedAt | The time the grid was last updated | DateTime | | READ | |--## GridWidget Properties--| Property | Description | Type | Constraints | Supported operations | Condition |-| :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | -------------- |-| identifier | The kind of widget | String | not null | READ/WRITE | |-| startRow | The row the widget starts at (1 based) | Integer | x > 0, x < rowCount of the grid, x < endRow | READ/WRITE | |-| endRow | The row the widget ends. The widget's area does not include the row itself. | Integer | x > 0, x <= rowCount of the grid, x > startRow | READ/WRITE | |-| startColumn | The column the widget starts at (1 based) | Integer | x > 0, x < columnCount of the grid, x < endColumn | READ/WRITE | |-| endColumn | The column the widget ends. The widget's area does not include the column itself. | Integer | x > 0, x <= columnCount of the grid, x > startColumn | READ/WRITE | |-| options | An options hash of values customizable by the widget | JSON | | READ/WRITE | |--## Grid [/api/v3/grids/{id}]--+ Model- + Body-- {- "_type": "Grid",- "id": 2,- "rowCount": 8,- "columnCount": 5,- "widgets": [- {- "_type": "GridWidget",- "identifier": "time_entries_current_user",- "startRow": 1,- "endRow": 8,- "startColumn": 1,- "endColumn": 3- },- {- "_type": "GridWidget",- "identifier": "news",- "startRow": 3,- "endRow": 8,- "startColumn": 4,- "endColumn": 5- },- {- "_type": "GridWidget",- "identifier": "documents",- "startRow": 1,- "endRow": 3,- "startColumn": 3,- "endColumn": 6- }- ],- "createdAt": "2018-12-03T16:58:30Z",- "updatedAt": "2018-12-13T19:36:40Z",- "_links": {- "scope": {- "href": "/my/page",- "type": "text/html"- },- "updateImmediately": {- "href": "/api/v3/grids/2",- "method": "patch"- },- "update": {- "href": "/api/v3/grids/2/form",- "method": "post"- },- "self": {- "href": "/api/v3/grids/2"- }- }- }--## View grid [GET]--+ Parameters- + id (required, integer, `1`) ... grid id--+ Response 200 (application/hal+json)-- [Grid][]--+ Response 404 (application/hal+json)-- Returned if the Grid does not exist or if the user does not have permission to view it.-- **Required permission** depends on the page the grid is defined for-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }---## Grids [/api/v3/grids{?offset,pageSize,filters,sortBy}]--+ Model- + Body-- {- "_type": "Collection",- "total": 1,- "count": 1,- "pageSize": 30,- "offset": 1,- "_embedded": {- "elements": [- {- "_type": "Grid",- "id": 2,- "rowCount": 8,- "columnCount": 5,- "widgets": [- {- "_type": "GridWidget",- "identifier": "time_entries_current_user",- "startRow": 1,- "endRow": 8,- "startColumn": 1,- "endColumn": 3- },- {- "_type": "GridWidget",- "identifier": "news",- "startRow": 3,- "endRow": 8,- "startColumn": 4,- "endColumn": 5- },- {- "_type": "GridWidget",- "identifier": "documents",- "startRow": 1,- "endRow": 3,- "startColumn": 3,- "endColumn": 6- }- ],- "createdAt": "2018-12-03T16:58:30Z",- "updatedAt": "2018-12-13T19:36:40Z",- "_links": {- "scope": {- "href": "/my/page",- "type": "text/html"- },- "updateImmediately": {- "href": "/api/v3/grids/2",- "method": "patch"- },- "update": {- "href": "/api/v3/grids/2/form",- "method": "post"- },- "self": {- "href": "/api/v3/grids/2"- }- }- },- {- "_type": "Grid",- "id": 5,- "rowCount": 1,- "columnCount": 4,- "widgets": [- {- "_type": "GridWidget",- "identifier": "work_package_query",- "startRow": 1,- "endRow": 8,- "startColumn": 1,- "endColumn": 3- },- {- "_type": "GridWidget",- "identifier": "work_package_query",- "startRow": 3,- "endRow": 8,- "startColumn": 4,- "endColumn": 5- },- {- "_type": "GridWidget",- "identifier": "work_package_query",- "startRow": 1,- "endRow": 3,- "startColumn": 3,- "endColumn": 6- }- ],- "createdAt": "2019-01-05T16:58:30Z",- "updatedAt": "2019-01-07T19:36:40Z",- "_links": {- "scope": {- "href": "/projects/a_project/boards",- "type": "text/html"- },- "updateImmediately": {- "href": "/api/v3/grids/5",- "method": "patch"- },- "update": {- "href": "/api/v3/grids/5/form",- "method": "post"- },- "self": {- "href": "/api/v3/grids/5"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/grids?offset=1&pageSize=30"- },- "jumpTo": {- "href": "/api/v3/grids?offset=%7Boffset%7D&pageSize=30",- "templated": true- },- "changeSize": {- "href": "/api/v3/grids?offset=1&pageSize=%7Bsize%7D",- "templated": true- }- }- }---## List Grids [GET]--Lists all grids matching the provided filters and being part of the selected query page. The grids returned will also depend on the permissions of the requesting user.--+ Parameters- + offset = `1` (optional, integer, `25`) ... Page number inside the requested collection.-- + pageSize (optional, integer, `25`) ... Number of elements to display per page.-- + filters (optional, string, `[{ "page": { "operator": "=", "values": ["/my/page"] } }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:- + page: Filter grid by work package--+ Response 200 (application/hal+json)-- [Grid][]--+ Response 400 (application/hal+json)-- Returned if the client sends invalid request parameters e.g. filters-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidQuery",- "message": [- "Filters Invalid filter does not exist."- ]- }--+ Response 403 (application/hal+json)-- Returned if the client is not logged in and login is required.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to view this resource."- }--## Create Grid [POST]--Creates a new grid applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to create a grid.--+ Request Create grid-- + Body-- {- "rowCount": 8,- "columnCount": 5,- "widgets": [- {- "identifier": "time_entries_current_user",- "startRow": 1,- "endRow": 8,- "startColumn": 1,- "endColumn": 3- },- {- "identifier": "news",- "startRow": 3,- "endRow": 8,- "startColumn": 4,- "endColumn": 5- },- {- "identifier": "documents",- "startRow": 1,- "endRow": 3,- "startColumn": 3,- "endColumn": 6- }- ],- "_links": {- "scope": {- "href": "/my/page"- }- }- }--+ Response 201-- [Grid][]--+ 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:** Depends on the page the grid is defined for.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Grid is invalid.",- "_embedded": {- "details": {- "attribute"=>"rowCount",- "message"=>"Number of rows must be greater than 0."- }- }- }--## Update Grid [PATCH]--Updates the given grid by applying the attributes provided in the body. The constraints applied to the grid depend on the page the grid is placed in which is why the create form end point should be used to be guided when wanting to update a grid.--+ Request Update grid-- + Body-- {- "rowCount": 8,- "columnCount": 5,- "widgets": [- {- "identifier": "time_entries_current_user",- "startRow": 1,- "endRow": 8,- "startColumn": 1,- "endColumn": 3- },- {- "identifier": "news",- "startRow": 3,- "endRow": 8,- "startColumn": 4,- "endColumn": 5- },- {- "identifier": "documents",- "startRow": 1,- "endRow": 3,- "startColumn": 3,- "endColumn": 6- }- ]- }--+ Response 200-- [Grid][]--+ 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:** The permission depends on the page the grid is placed in.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Grid is invalid.",- "_embedded": {- "details": {- "attribute"=>"rowCount",- "message"=>"Number of rows must be greater than 0."- }- }- }--## Grid Create Form [/api/v3/grids/form]--This endpoint returns a form to allow a guided creation of a new grids.-The returned form will be pre-filled with default values for every property, if available.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).-A page link must be provided in the body when calling this end point.--## Grid Create Form [POST]--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "rowCount": 6,- "columnCount": 4,- "widgets": [- {- "_type": "GridWidget",- "identifier": "work_packages_assigned",- "startRow": 1,- "endRow": 7,- "startColumn": 1,- "endColumn": 3- },- {- "_type": "GridWidget",- "identifier": "work_packages_created",- "startRow": 1,- "endRow": 7,- "startColumn": 3,- "endColumn": 5- }- ],- "_links": {- "scope": {- "href": "/my/page",- "type": "text/html"- }- }- },- "schema": {- "_type": "Schema",- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "rowCount": {- "type": "Integer",- "name": "Number of rows",- "required": true,- "hasDefault": false,- "writable": true- },- "columnCount": {- "type": "Integer",- "name": "Number of columns",- "required": true,- "hasDefault": false,- "writable": true- },- "scope": {- "type": "Href",- "name": "Page",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {- "allowedValues": [- {- "href": "/my/page",- "title": "My page"- }- ]- }- },- "widgets": {- "type": "[]GridWidget",- "name": "Widgets",- "required": true,- "hasDefault": false,- "writable": true,- "_embedded": {- allowedValues: [- {- "_type": "GridWidget",- "identifier": "work_packages_assigned"- },- {- "_type": "GridWidget",- "identifier": "news"- }- ]- },- "_links": {}- },- "_links": {}- },- "validationErrors": {- "widgets": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MultipleErrors",- "message": "Multiple field constraints have been violated.",- "_embedded": {- "errors": [- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Widgets is outside of the grid.",- "_embedded": {- "details": {- "attribute": "widgets"- }- }- },- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Widgets is outside of the grid.",- "_embedded": {- "details": {- "attribute": "widgets"- }- }- }- ]- }- },- "rowCount": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Number of rows must be greater than 0.",- "_embedded": {- "details": {- "attribute": "rowCount"- }- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/grids/form",- "method": "post"- },- "validate": {- "href": "/api/v3/grids/form",- "method": "post"- }- }- }---## Grid Update Form [/api/v3/grids/{id}/form]--This endpoint returns a form to allow a guided modification of an existing grid.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Grid Update Form [POST]--+ Parameters- + id (required, integer, `1`) ... ID of the grid being modified--+ Request Update grid form-- + Body-- {- "rowCount": 8,- "columnCount": 5,- "widgets": [- {- "identifier": "time_entries_current_user",- "startRow": 1,- "endRow": 8,- "startColumn": 1,- "endColumn": 3- },- {- "identifier": "news",- "startRow": 3,- "endRow": 8,- "startColumn": 4,- "endColumn": 5- },- {- "identifier": "documents",- "startRow": 1,- "endRow": 3,- "startColumn": 3,- "endColumn": 6- }- ]- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "rowCount": 6,- "columnCount": 5,- "widgets": [- {- "_type": "GridWidget",- "identifier": "time_entries_current_user",- "startRow": 1,- "endRow": 8,- "startColumn": 1,- "endColumn": 3- },- {- "_type": "GridWidget",- "identifier": "news",- "startRow": 3,- "endRow": 8,- "startColumn": 4,- "endColumn": 5- },- {- "_type": "GridWidget",- "identifier": "documents",- "startRow": 1,- "endRow": 3,- "startColumn": 3,- "endColumn": 6- }- ]- },- "schema": {- "_type": "Schema",- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "rowCount": {- "type": "Integer",- "name": "Number of rows",- "required": true,- "hasDefault": false,- "writable": true- },- "columnCount": {- "type": "Integer",- "name": "Number of columns",- "required": true,- "hasDefault": false,- "writable": true- },- "scope": {- "type": "Href",- "name": "Page",- "required": true,- "hasDefault": false,- "writable": false,- "_links": {}- },- "widgets": {- "type": "[]GridWidget",- "name": "Widgets",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {}- },- "validationErrors": {- "widgets": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MultipleErrors",- "message": "Multiple field constraints have been violated.",- "_embedded": {- "errors": [- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Widgets is outside of the grid.",- "_embedded": {- "details": {- "attribute": "widgets"- }- }- },- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Widgets is outside of the grid.",- "_embedded": {- "details": {- "attribute": "widgets"- }- }- }- ]- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/grids/2/form",- "method": "post"- },- "validate": {- "href": "/api/v3/grids/2/form",- "method": "post"- }- }- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** depends on the page the grid is defined for.-- *Note that you will only receive this error, if you are at least allowed to see the corresponding grid.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the grid does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }-diff --git a/docs/api/apiv3/endpoints/groups.apib b/docs/api/apiv3/endpoints/groups.apibdeleted file mode 100644index e48a54264c7..00000000000--- a/docs/api/apiv3/endpoints/groups.apib+++ /dev/null@@ -1,414 +0,0 @@-# Group Groups--Groups are collections of users. They support assigning/unassigning multiple users to/from a project in one operation.--This resource does not yet have the form and schema endpoints. But as all properties are static, clients should still be able-to work with this resource.--## Actions--## Actions-| Link | Description | Condition |-|:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- |-| delete | Deletes the group. | **Permission**: Administrator |-| updateImmediately | Updates the group's attributes. | **Permission**: Administrator |--## Linked Properties-| Link | Description | Type | Constraints | Supported operations | Condition |-|:-----------: |-------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |-| self | This group | Group | not null | READ | |-| memberships | Link to collection of all the group's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions. | MemberCollection | | READ | **Permission**: view members or manage members in any project |-| members | The list all all the users that are members of the group | UserCollection | | READ/WRITE | **Permission**: manage members in any project to read & admin to write |--## Local Properties-| Property | Description | Type | Constraints | Supported operations | Condition |-| :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |-| id | Group's id | Integer | x > 0 | READ | |-| name | Group's full name, formatting depends on instance settings | String | | READ/WRITE | Admin to write |-| createdAt | Time of creation | DateTime | | READ | Only visible by admins |-| updatedAt | Time of the most recent change to the user | DateTime | | READ | Only visible by admins |--## View group [/api/v3/groups/{id}]--+ Model- + Body-- {- "_type": "Group",- "id": 9,- "name": "The group",- "createdAt": "2015-09-23T11:06:36Z",- "updatedAt": "2015-09-23T11:06:36Z",- "_links": {- "self": {- "href": "/api/v3/groups/9",- "title": "The group"- },- "delete": {- "href": "/api/v3/group/9",- "method": "delete"- },- "memberships": {- "href": "/api/v3/memberships?filters=[{\"principal\":{\"operator\":\"=\",\"values\":[\"9\"]}}]",- "title": "Memberships"- },- "updateImmediately": {- "href": "/api/v3/group/9",- "method": "patch"- },- "members": [- {- "href": "/api/v3/users/363",- "title": "First user"- },- {- "href": "/api/v3/users/60",- "title": "Second user"- }- ]- }- }--## View group [GET]--+ Parameters- + id (required, integer, `1`) ... Group id.--+ Response 200 (application/hal+json)-- [View group][]--+ Response 404 (application/hal+json)-- Returned if the group does not exist or if the API user does not have permission to view them.-- **Required permission** If the user has the *manage members* permission in at least one project the user will be able to query all groups. If not, the user- will be able to query all groups which are members in projects, he has the *view members* permission in.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }--## Create group [/api/v3/groups]--## Create group [POST]--Creates a new group applying the attributes provided in the body.--+ Request Create group-- + Body-- {- "name": "The group",- "_links": {- "members": [- {- "href": "/api/v3/users/363"- },- {- "href": "/api/v3/users/60"- }- ]- }- }--+ Response 201-- [View group][]--+ 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:** Administrator-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Name can't be blank.",- "_embedded": {- "details": {- "attribute": "name"- }- }- }--## Update group [/api/v3/groups/{id}]--## Update group [PATCH]--Updates the given group by applying the attributes provided in the body.--+ Parameters- + id (required, integer, `1`) ... Group id--+ Request Update membership-- + Body-- {- "_links": {- "members": [- {- "href": "/api/v3/users/363"- },- {- "href": "/api/v3/users/60"- }- ]- }- }--+ Response 200-- [View group][]--+ 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:** Administrator-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the membership does not exist or the client does not have sufficient permissions- to see it.-- **Required permission** If the user has the *manage members* permission in at least one project the user will be able to query all groups. If not, the user- will be able to query all groups which are members in projects, he has the *view members* permission in.-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a version. 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 requested resource could not be found."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Member is already taken.",- "_embedded": {- "details": {- "attribute": "members"- }- }- }--## Delete group [/api/v3/groups/{id}]--## Delete group [DELETE]--Deletes the group.--+ Parameters- + id (required, integer, `1`) ... Group id--+ Response 202 (application/hal+json)-- Returned if the group was successfully deleted-- Note that the response body is empty as of now. In future versions of the API a body- *might* be returned, indicating the progress of deletion.-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** Administrator-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the group does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** Administrator-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a version. 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 requested resource could not be found."- }---## List groups [/api/v3/groups{?sortBy}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/groups" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_type": "Group",- "id": 9,- "name": "The group",- "createdAt": "2015-09-23T11:06:36Z",- "updatedAt": "2015-09-23T11:06:36Z",- "_links": {- "self": {- "href": "/api/v3/groups/9",- "title": "The group"- },- "memberships": {- "href": "/api/v3/memberships?filters=[{\"principal\":{\"operator\":\"=\",\"values\":[\"9\"]}}]",- "title": "Memberships"- },- "members": [- {- "href": "/api/v3/users/363",- "title": "First user"- },- {- "href": "/api/v3/users/60",- "title": "Second user"- }- ]- }- },- {- "_type": "Group",- "id": 123,- "name": "Another group",- "createdAt": "2018-09-23T11:06:36Z",- "updatedAt": "2019-09-23T11:06:36Z",- "_links": {- "self": {- "href": "/api/v3/groups/123",- "title": "Another group"- },- "memberships": {- "href": "/api/v3/memberships?filters=[{\"principal\":{\"operator\":\"=\",\"values\":[\"123\"]}}]",- "title": "Memberships"- },- "members": [- {- "href": "/api/v3/users/343",- "title": "Third user"- },- {- "href": "/api/v3/users/60",- "title": "Second user"- }- ]- }- }- ]- }- }--## List groups [GET]--Returns a collection of groups. The client can choose to filter the groups similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain groups, for which the requesting client has sufficient permissions (*view_members*, *manage_members*).--+ Parameters- + sortBy = ["id", "asc"] (optional, string, `[["id", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:- + id: Sort by primary key- + created_at: Sort by group creation datetime- + updated_at: Sort by the time the group was updated last--+ Response 200 (application/hal+json)-- [List groups][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** View members or manage members in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }diff --git a/docs/api/apiv3/endpoints/help_texts.apib b/docs/api/apiv3/endpoints/help_texts.apibdeleted file mode 100644index 9784932b171..00000000000--- a/docs/api/apiv3/endpoints/help_texts.apib+++ /dev/null@@ -1,115 +0,0 @@-# Group Help texts--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:-------------:|-------------------------- | ------------- | ----------- | -------------------- |-| self | This help text | HelpText | not null | READ |-| editText | Edit the help text entry | text/htm | Admin | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :---------: | --------------------------- | -------------------- | ----------- | -------------------- |-| id | Help text id | Integer | x > 0 | READ |-| attribute | Attribute name | String | | READ |-| attributeCaption | Attribute caption | String | | READ |-| helpText | Help text content | Formattable | | READ |--## Help texts [/api/v3/help_texts]--+ Model- + Body-- {- "_links":- {- "self":- {- "href": "/api/v3/help_texts"- }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_type": "HelpText",- "_links": {- "self": {- "href": "/api/v3/help_texts/1"- }- },- "id": 1,- "attribute": "id",- "attributeCaption": "ID",- "scope": "WorkPackage",- "helpText": {- "format": "markdown",- "raw": "Help text for id attribute.",- "html": "<p>Help text for id attribute.</p>"- }- },- {- "_type": "HelpText",- "_links": {- "self": {- "href": "/api/v3/help_texts/2"- }- },- "id": 2,- "attribute": "status",- "attributeCaption": "Status",- "scope": "WorkPackage",- "helpText": {- "format": "markdown",- "raw": "Help text for status attribute.",- "html": "<p>Help text for status attribute.</p>"- }- }- ]- }- }--## List all help texts [GET]--+ Response 200 (application/hal+json)-- [Help texts][]---## Help text [/api/v3/help_texts/{id}]--+ Model- + Body-- {- "_type": "HelpText",- "_links": {- "self": {- "href": "/api/v3/help_texts/1"- },- "editText": {- "type": "text/html",- "href": "/admin/attribute_help_texts/1/edit"- }- },- "id": 1,- "attribute": "id",- "attributeCaption": "ID",- "scope": "WorkPackage",- "helpText": {- "format": "markdown",- "raw": "Help text for id attribute.",- "html": "<p>Help text for id attribute.</p>"- }- }--## View help text [GET]--+ Parameters- + id (required, integer, `1`) ... Help text id--+ Response 200 (application/hal+json)-- [Help text][]diff --git a/docs/api/apiv3/endpoints/members.apib b/docs/api/apiv3/endpoints/members.apibdeleted file mode 100644index 3d390fc3b33..00000000000--- a/docs/api/apiv3/endpoints/members.apib+++ /dev/null@@ -1,1003 +0,0 @@-# Group Memberships--Users and groups can become members of a project. Such a membership will also have one or more roles assigned to it. By that, memberships control the permissions a user has within a project.--There are also memberships that do not govern the permissions within a certain project but rather govern global permissions. Among the permissions that can be granted like this are the permissions to "Create project" and "Manage users". Those memberships do not have a project associated.--When creating and updating memberships, a custom message can be sent to users of new and updated memberships. This message can be provided within the `_meta` group.--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:-------------------:|----------------------------------------- | ------------- | -------------------------------------------------------------- | -------------------- |-| self | This membership | Membership | not null | READ |-| project | The project for which the membership is granted | Project | | READ |-| roles | The list of roles the user or group is granted in the project | RoleCollection | not null | READ |-| principal | The user or group that was granted membership | User or Group | not null | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |-| id | Membership id | Integer | x > 0 | READ |-| createdAt | Time of creation | DateTime | not null | READ |-| updatedAt | Time of latest update | DateTime | not null | READ |--## Meta parameters--| Meta property | Description | Type | Constraints | Supported operations |Condition |-| :------------------------: | --------------------------------------------------- | ---- | ----------- | -------------------- |----------|-| notificationMessage | The message included in the email(s) send to the users of new or updated memberships | Formattable | | READ/WRITE | |--## View membership [/api/v3/memberships/{id}]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/memberships/11",- "title": "Some user"- },- "schema": {- "href": "/api/v3/memberships/schema"- },- "update": {- "href": "/api/v3/memberships/11/form",- "method": "post"- },- "updateImmediately": {- "href": "/api/v3/memberships/11",- "method": "patch"- },- "project": {- "href": "/api/v3/projects/3",- "title": "A project"- },- "principal": {- "href": "/api/v3/users/4",- "title": "Some user"- },- "roles": [- {- "href": "/api/v3/roles/5",- "title": "Member"- },- {- "href": "/api/v3/roles/4",- "title": "Reader"- }- ]- },- "_type": "Membership",- "id": 11,- "createdAt": "2015-03-20T12:56:56Z",- "updatedAt": "2018-12-20T18:16:11Z",- "_embedded": {- "project...": {},- "principal...": {},- "roles...": []- }- }--## View membership [GET]--+ Parameters- + id (required, integer, `1`) ... membership id--+ Response 200 (application/hal+json)-- [View membership][]--+ Response 404 (application/hal+json)-- Returned if the membership does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view members **or** manage members-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a membership. 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 requested resource could not be found."- }--## Create membership [/api/v3/memberships]--## Create membership [POST]--Creates a new membership applying the attributes provided in the body.--You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation.--By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user-of the newly created membership. In case of a group, the message will be sent to every user belonging to the group.--+ Request Create memberships-- + Body-- {- "_links": {- "project": {- "href": "/api/v3/projects/1"- },- "principal": {- "href": "/api/v3/users/5"- },- "roles": [- {- "href": "/api/v3/roles/5"- },- {- "href": "/api/v3/roles/8"- }- ]- },- "_meta": {- "notificationMessage": {- "raw" {- "Welcome to our team, Alice."- }- }- }--+ Response 201-- [View membership][]--+ 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:** Manage members-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Project can't be blank.",- "_embedded": {- "details": {- "attribute": "project"- }- }- }--## Update membership [/api/v3/memberships/{id}]--## Update membership [PATCH]--Updates the given membership by applying the attributes provided in the body.--By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user-of the updated membership. In case of a group, the message will be sent to every user belonging to the group.--+ Parameters- + id (required, integer, `1`) ... Membership id--+ Request Update membership-- + Body-- {- "_links": {- "roles": [- {- "href": "/api/v3/roles/3"- },- {- "href": "/api/v3/roles/8"- }- ]- },- "_meta": {- "notificationMessage": {- "raw": "Alice, you can now also create work packages."- }- }- }--+ Response 200-- [View membership][]--+ 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:** Manage members in the membership's project.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the membership does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view member-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a version. 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 requested resource could not be found."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Roles has an unassignable role.",- "_embedded": {- "details": {- "attribute": "roles"- }- }- }--## Delete membership [/api/v3/memberships/{id}]--## Delete membership [DELETE]--Deletes the membership.--+ Parameters- + id (required, integer, `1`) ... Membership id--+ Response 204 (application/hal+json)-- Returned if the membership was successfully deleted-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** manage members-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the membership does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view members-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a version. 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 requested resource could not be found."- }--## List memberships [/api/v3/memberships{?filters,sortBy}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/memberships" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_links": {- "self": {- "href": "/api/v3/memberships/11"- },- "schema": {- "href": "/api/v3/memberships/schema"- },- "project": {- "href": "/api/v3/projects/3",- "title": "A Project"- },- "principal": {- "href": "/api/v3/users/5",- "title": "A user"- },- "roles": [- {- "href": "/api/v3/roles/4",- "title": "Reader"- }- ]- },- "_type": "Membership",- "id": 11,- "createdAt": "2015-03-20T12:56:56Z",- "updatedAt": "2018-12-20T18:16:11Z"- },- {- "_links": {- "self": {- "href": "/api/v3/memberships/41"- },- "schema": {- "href": "/api/v3/memberships/schema"- },- "project": {- "href": "/api/v3/projects/6",- "title": "Another Project"- },- "principal": {- "href": "/api/v3/groups/5",- "title": "A group"- },- "roles": [- {- "href": "/api/v3/roles/8",- "title": "Project admin"- }- ]- },- "_type": "Membership",- "id": 41,- "createdAt": "2019-12-22T12:56:06Z",- "updatedAt": "2020-12-20T18:16:12Z"- }- ]- }- }--## List memberships [GET]--Returns a collection of memberships. The client can choose to filter the memberships similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain memberships, for which the requesting client has sufficient permissions (*view_members*, *manage_members*).--+ Parameters- + filters (optional, string, `[{ "name": { "operator": "=", "values": ["A User"] }" }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint.- Currently supported filters are:- + any_name_attribute: filters memberships based on the name of the principal. All possible name variants (and also email and login) are searched.- + blocked: reduces the result set to all memberships that are temporarily blocked or that are not blocked temporarily.- + group: filters memberships based on the name of a group. The group however is not the principal used for filtering. Rather, the memberships of the group are used as the filter values.- + name: filters memberships based on the name of the principal. Note that only the name is used which depends on a setting in the OpenProject instance.- + principal: filters memberships based on the id of the principal.- + project: filters memberships based on the id of the project.- + role: filters memberships based on the id of any role assigned to the membership.- + status: filters memberships based on the status of the principal.- + created_at: filters memberships based on the time the membership was created.- + updated_at: filters memberships based on the time the membership was updated last.-- + sortBy = ["id", "asc"] (optional, string, `[["id", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:- + id: Sort by primary key- + name: Sort by the name of the principal. Note that this depends on the setting for how the name is to be displayed at least for users.- + email: Sort by the email address of the principal. Groups and principal users, which do not have an email, are sorted last.- + status: Sort by the status of the principal. Groups and principal users, which do not have a status, are sorted together with the active users.- + created_at: Sort by membership creation datetime- + updated_at: Sort by the time the membership was updated last--+ Response 200 (application/hal+json)-- [List memberships][]---## View membership schema [/api/v3/memberships/schemas]--+ Model- + Body-- {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "notificationMessage": {- "type": "Formattable",- "name": "Message",- "required": false,- "hasDefault": false,- "writable": true,- "options": {},- "location": "_meta"- },- "project": {- "type": "Project",- "name": "Project",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {}- },- "principal": {- "type": "Principal",- "name": "Principal",- "required": true,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {}- },- "roles": {- "type": "[]Role",- "name": "Role",- "required": true,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/memberships/schema"- }- }- }---## View membership schema [GET]--+ Response 200 (application/hal+json)-- [View membership schema][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see the schema.-- **Required permission:** manage members or view memberships on any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Membership create form [/api/v3/memberships/form]--This endpoint returns a form allowing a guided creation of new memberships.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Membership create form [POST]--+ Request Create membership form-- + Body-- {- "_links": {- "project": {- "href": "/api/v3/projects/1"- },- "principal": {- "href": "/api/v3/users/5"- },- "roles": [- {- "href": "/api/v3/roles/2"- }- ]- },- "_meta": {- "notificationMessage": {- "raw": "Welcome to our team, Alice."-- }- }- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "_links": {- "project": {- "href": "/api/v3/projects/1",- "title": "A project"- },- "principal": {- "href": "/api/v3/users/5",- "title": "A User"- },- "roles": [- {- "href": "/api/v3/roles/2",- "title": "Manager"- }- ]- },- "_meta": {- "notificationMessage": {- "raw": "Welcome to our team, Alice."- }- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "notificationMessage": {- "type": "Formattable",- "name": "Message",- "required": false,- "hasDefault": false,- "writable": true,- "options": {},- "location": "_meta"- },- "project": {- "type": "Project",- "name": "Project",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {- "allowedValues": {- "href": "/api/v3/memberships/available_projects?filters=%5B%7B%22principal%22%3A%7B%22operator%22%3A%22%21%22%2C%22values%22%3A%5B%225%22%5D%7D%7D%5D"- }- }- },- "principal": {- "type": "Principal",- "name": "Principal",- "required": true,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {- "allowedValues": {- "href": "/api/v3/principals?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22%21%22%2C%22values%22%3A%5B%220%22%2C%223%22%5D%7D%7D%2C%7B%22member%22%3A%7B%22operator%22%3A%22%21%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D"- }- }- },- "roles": {- "type": "[]Role",- "name": "Role",- "required": true,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {- "allowedValues": {- "href": "/api/v3/roles- }- }- },- "_links": {}- },- "validationErrors": {- "user": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "User has already been taken.",- "_embedded": {- "details": {- "attribute": "user"- }- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/memberships/form",- "method": "post"- },- "validate": {- "href": "/api/v3/memberships/form",- "method": "post"- }- }- }--+ 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:** manage memberships in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Membership update form [/api/v3/memberships/{id}/form]--This endpoint returns a form allowing a guided modification of existing memberships.-The returned payload part of the form will be contain a merge between the already existing properties' values (as long as they are writeable) and the provided values with the later having precedence.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--+ Parameters- + id (required, integer, `1`) ... Membership id--## Membership update form [POST]--+ Request Update membership form-- + Body-- {- "_links": {- "roles": [- {- "href": "/api/v3/roles/4"- }- ]- },- "_meta": {- "notificationMessage": {- "raw": "Alice, you can now also create work packages."- }- }- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "_links": {- "roles": [- {- "href": "/api/v3/roles/4",- "title": "A role"- }- ]- },- "_meta": {- "notificationMessage": {- "raw": "Alice, you can now also create work packages."- }- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "notificationMessage": {- "type": "Formattable",- "name": "Message",- "required": false,- "hasDefault": false,- "writable": true,- "options": {},- "location": "_meta"- },- "project": {- "type": "Project",- "name": "Project",- "required": false,- "hasDefault": false,- "writable": false,- "_links": {}- },- "principal": {- "type": "Principal",- "name": "Principal",- "required": true,- "hasDefault": false,- "writable": false,- "_links": {}- },- "roles": {- "type": "[]Role",- "name": "Role",- "required": true,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {- "allowedValues": {- "href": "/api/v3/roles?filters=%5B%7B%22unit%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22project%22%5D%7D%7D%5D"- }- }- },- "_links": {}- },- "validationErrors": {}- },- "_links": {- "self": {- "href": "/api/v3/memberships/5/form",- "method": "post"- },- "validate": {- "href": "/api/v3/memberships/5/form",- "method": "post"- },- "commit": {- "href": "/api/v3/memberships/5",- "method": "patch"- }- }- }--+ 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:** manage versions in the version's project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }---## Available projects for memberships [/api/v3/memberships/available_projects]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/memberships/available_projects"- }- },- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded": {- "elements": [- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/6",- "title": "A project"- },- "editWorkPackage": {- "href": "/api/v3//work_packages/{work_package_id}/form",- "templated": true,- "method": "post"- },- "createWorkPackage": {- "href": "/api/v3/projects/6/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/6/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/6/categories"- },- "memberships": {- "href": "/api/v3/projects/6/memberships"- }- },- "id": 6,- "identifier": "a_project",- "name": "A project",- "description": "Eveniet molestias omnis quis aut qui eum adipisci. Atque aut aut in exercitationem adipisci amet. Nisi asperiores quia ratione veritatis enim exercitationem magnam. Aut fuga architecto adipisci nihil. Et repellat pariatur. Aliquam et sed perferendis nostrum quaerat. Fugit doloremque voluptatem.",- "createdAt": "2015-07-06T13:28:14+00:00",- "updatedAt": "2015-10-01T09:55:02+00:00",- "type": "Customer Project"- },- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/14",- "title": "Another project"- },- "createWorkPackage": {- "href": "/api/v3/projects/14/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/14/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/14/categories"- },- "memberships": {- "href": "/api/v3/projects/14/memberships"- }- },- "id": 14,- "identifier": "another_project",- "name": "Another project",- "description": "",- "createdAt": "2016-02-29T12:50:20+00:00",- "updatedAt": "2016-02-29T12:50:20+00:00",- "type": null- }- ]- }- }--## Available projects for memberships [GET]--Gets a list of projects in which a membership can be created in. The list contains all projects in which the user issuing the request has the manage members permissions.--+ Response 200 (application/hal+json)-- [Available projects for memberships][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** manage members-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }diff --git a/docs/api/apiv3/endpoints/news.apib b/docs/api/apiv3/endpoints/news.apibdeleted file mode 100644index 267da4da74e..00000000000--- a/docs/api/apiv3/endpoints/news.apib+++ /dev/null@@ -1,222 +0,0 @@-# Group News--News are articles written by users in order to inform other users of important information.--## Actions--None yet--## Linked Properties-| Link | Description | Type | Constraints | Supported operations | Condition |-| :-----------: | -------------------------------------| ------------- | --------------------- | -------------------- | ----------------------------------------- |-| self | This news | News | not null | READ | |-| project | The project the news is situated in | Project | not null | READ / WRITE | |-| author | The user having created the news | User | not null | READ | |--## Local Properties--| Property | Description | Type | Constraints | Supported operations | Condition |-| :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |-| id | News' id | Integer | x > 0 | READ | |-| title | The headline of the news | String | max 60 characters | READ | |-| summary | A short summary | String | max 255 characters | READ | |-| description | The main body of the news with all the details | String | | READ | |-| createdAt | The time the news was created at | DateTime | | READ | |--## News [/api/v3/news/{id}]--+ Model- + Body-- {- "_type": "News",- "id": 1,- "title": "asperiores possimus nam doloribus ab",- "summary": "Celebrer spiculum colo viscus claustrum atque. Id nulla culpa sumptus. Comparo crapula depopulo demonstro.",- "description": {- "format": "markdown",- "raw": "Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.",- "html": "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"- },- "createdAt": "2015-03-20T12:57:01Z",- "_links": {- "self": {- "href": "/api/v3/news/1",- "title": "asperiores possimus nam doloribus ab"- },- "project": {- "href": "/api/v3/projects/1",- "title": "A project"- },- "author": {- "href": "/api/v3/users/2",- "title": "Peggie Feeney"- }- },- "_embedded": {- "project": {- "_type": "Project..."- },- "author": {- "_type": "User..."- }- }- }--## View news [GET]--+ Parameters- + id (required, integer, `1`) ... news id--+ Response 200 (application/hal+json)-- [News][]--+ Response 404 (application/hal+json)-- Returned if the news does not exist or if the user does not have permission to view it.-- **Required permission** being member of the project the news belongs to-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }----## List of News [/api/v3/news{?offset,pageSize,filters,sortBy}]--+ Model- + Body-- {- "_type": "Collection",- "total": 78,- "count": 2,- "pageSize": 2,- "offset": 1,- "_embedded": {- "elements": [- {- "_type": "News",- "id": 1,- "title": "asperiores possimus nam doloribus ab",- "summary": "Celebrer spiculum colo viscus claustrum atque. Id nulla culpa sumptus. Comparo crapula depopulo demonstro.",- "description": {- "format": "markdown",- "raw": "Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.",- "html": "<p>Videlicet deserunt aequitas cognatus. Concedo quia est quia pariatur vorago vallum. Calco autem atavus accusamus conscendo cornu ulterius. Tam patria ago consectetur ventito sustineo nihil caecus. Supra officiis eos velociter somniculosus tonsor qui. Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"- },- "createdAt": "2015-03-20T12:57:01Z",- "_links": {- "self": {- "href": "/api/v3/news/1",- "title": "asperiores possimus nam doloribus ab"- },- "project": {- "href": "/api/v3/projects/1",- "title": "Seeded Project"- },- "author": {- "href": "/api/v3/users/2",- "title": "Peggie Feeney"- }- }- },- {- "_type": "News",- "id": 2,- "title": "terminatio tutamen. Officia adeptio sp",- "summary": "Consequatur sequi surculus creo tui aequitas.",- "description": {- "format": "markdown",- "raw": "Amicitia alius cattus voluntarius. Virgo viduo terminatio tutamen. Officia adeptio spectaculum atavus nisi cum concido bis. Harum caecus auxilium sol theatrum eaque consequatur. Omnis aeger suus adipisci cicuta. Cur delicate alias curto cursim atqui talio fugiat.",- "html": "<p>Amicitia alius cattus voluntarius. Virgo viduo terminatio tutamen. Officia adeptio spectaculum atavus nisi cum concido bis. Harum caecus auxilium sol theatrum eaque consequatur. Omnis aeger suus adipisci cicuta. Cur delicate alias curto cursim atqui talio fugiat.</p>"- },- "createdAt": "2015-03-20T12:57:01Z",- "_links": {- "self": {- "href": "/api/v3/news/2",- "title": "terminatio tutamen. Officia adeptio sp"- },- "project": {- "href": "/api/v3/projects/1",- "title": "Seeded Project"- },- "author": {- "href": "/api/v3/users/2",- "title": "Peggie Feeney"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/news?offset=1&pageSize=2"- },- "jumpTo": {- "href": "/api/v3/news?offset=%7Boffset%7D&pageSize=2",- "templated": true- },- "changeSize": {- "href": "/api/v3/news?offset=1&pageSize=%7Bsize%7D",- "templated": true- },- "nextByOffset": {- "href": "/api/v3/news?offset=2&pageSize=2"- }- }- }--## List News [GET]--Lists news. The news returned depend on the provided parameters and also on the requesting user's permissions.--+ Parameters- + offset = `1` (optional, integer, `25`) ... Page number inside the requested collection.-- + pageSize (optional, integer, `25`) ... Number of elements to display per page.-- + sortBy (optional, string, `[["created_at", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:- + id: Sort by primary key- + created_at: Sort by news creation datetime-- + filters (optional, string, `[{ "project_id": { "operator": "=", "values": ["1", "2"] } }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:- + project_id: Filter news by project--+ Response 200 (application/hal+json)-- [List of News][]--+ Response 400 (application/hal+json)-- Returned if the client sends invalid request parameters e.g. filters-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidQuery",- "message": [- "Filters Invalid filter does not exist."- ]- }--+ Response 403 (application/hal+json)-- Returned if the client is not logged in and login is required.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to view this resource."- }diff --git a/docs/api/apiv3/endpoints/notifications.apib b/docs/api/apiv3/endpoints/notifications.apibdeleted file mode 100644index 2ba5682f84c..00000000000--- a/docs/api/apiv3/endpoints/notifications.apib+++ /dev/null@@ -1,78 +0,0 @@-# Group Notifications--## View notification [/api/v3/notifications/{id}]--+ Model- + Body-- {- "_type": "Notification",- "_links": {- "self": {- "href": "/api/v3/notifications/1",- "title": "Work package abc was updated: You are now assignee"- },- "resource": {- "href": "/api/v3/activity/1",- "title": "quis numquam qui voluptatum quia praesentium blanditiis nisi"- },- "context": {- "href": "/api/v3/project/1",- "title": "quis numquam qui voluptatum quia praesentium blanditiis nisi"- },- "actor": {- "href": "/api/v3/users/1",- "title": "John Sheppard"- }- },- "id": 1,- "subject": "Work package abc was updated: You are now assignee"- "readIAN": false,- "readMail": false,- "reason": "mentioned",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z",- "_embedded:": {- "resource": {- "_type": "Activity::Comment",- "_links": {- "self": {- "href": "/api/v3/activity/1",- "title": "Priority changed from High to Low"- },- "workPackage": {- "href": "/api/v3/work_packages/1",- "title": "quis numquam qui voluptatum quia praesentium blanditiis nisi"- },- "user": {- "href": "/api/v3/users/1",- "title": "John Sheppard - admin"- }- },- "id": 1,- "details": [- {- "format": "markdown",- "raw": "Lorem ipsum dolor sit amet.",- "html": "<p>Lorem ipsum dolor sit amet.</p>"- }- ],- "comment": {- "format": "markdown",- "raw": "Lorem ipsum dolor sit amet.",- "html": "<p>Lorem ipsum dolor sit amet.</p>"- },- "createdAt": "2014-05-21T08:51:20Z",- "version": 31- }- }- }--## View notification [GET]--+ Parameters- + id (required, integer, `1`) ... Notification id--+ Response 200 (application/hal+json)-- [View notification][]diff --git a/docs/api/apiv3/endpoints/placeholder_users.apib b/docs/api/apiv3/endpoints/placeholder_users.apibdeleted file mode 100644index f3ff668bc6f..00000000000--- a/docs/api/apiv3/endpoints/placeholder_users.apib+++ /dev/null@@ -1,356 +0,0 @@-# Group Placeholder Users--## Actions-| Link | Description | Condition |-|:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- |-| showUser | Link to the OpenProject placeholder user page (HTML) | |-| updateImmediately | Update a placeholder from the instance | **Permission**: manage_placeholder_user |-| delete | Permanently remove a placeholder from the instance | **Permission**: manage_placeholder_user |--## Linked Properties-| Link | Description | Type | Constraints | Supported operations | Condition |-|:-----------:|-------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |-| self | This user | User | not null | READ | |-| memberships | Link to collection of all the user's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions. | MemberCollection | | READ | **Permission**: view members or manage members in any project |--## Local Properties-| Property | Description | Type | Constraints | Supported operations | Condition |-| :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |-| id | Placeholder user's id | Integer | x > 0 | READ | |-| name | Placeholder user's full name, formatting depends on instance settings | String | | READ | |-| createdAt | Time of creation | DateTime | | READ | |-| updatedAt | Time of the most recent change to the user | DateTime | | READ | |--## PlaceholderUser [/api/v3/placeholder_users/{id}]--+ Model- + Body-- {- "_type": "PlaceholderUser",- "_links": {- "self": {- "href": "/api/v3/placeholder_users/1",- "title": "placeholder"- },- "show": {- "href": "/placeholder_users/1",- "type": "text/html"- },- "delete": {- "href": "/api/v3/placeholder_users/1",- "method": "DELETE"- },- },- "id": 1,- "name": "placeholder",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }--## View placeholder user [GET]--+ Parameters- + id (required, integer)--+ Response 200 (application/hal+json)-- [PlaceholderUser][]--+ Response 404 (application/hal+json)-- Returned if the user does not exist or if the API user does not have permission to view them.-- **Required permission** The user needs to have the manage_placeholder_user permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified user does not exist or you do not have permission to view them."- }--## Update placeholder user [PATCH]--Updates the placeholder user's writable attributes.-When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body.--+ Parameters- + id (required, integer, `1`) ... Placeholder user id--+ Request Update PlaceholderUser (application/json)-- + Body-- {- "name": "New name"- }--+ Response 200-- [PlaceholderUser][]--+ 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:** Administrators, manage_placeholder_user global permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the user does not exist.-- **Required permission:** Administrators, manage_placeholder_user global permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }---+ Response 422 (application/hal+json)-- Returned if:-- * the client tries to modify a read-only property (`PropertyIsReadOnly`)- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Name is already taken.",- "_embedded": {- "details": {- "attribute": "name"- }- }- }--## Delete placeholder user [DELETE]--Permanently deletes the specified placeholder. This action will be performed asynchronously-and the response will only accept the deletion request. The actual deletion will then potentially take a while.--+ Parameters- + id (required, integer, `1`) ... Placeholder user id--+ Response 202-- Returned if the account was successfully scheduled for deletion.-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** Administrators or manage_placeholder_user permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource"- }--+ Response 404 (application/hal+json)-- Returned if the user does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }--## PlaceholderUsers [/api/v3/users{?offset,pageSize,filters,sortBy}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/placeholder_users" }- },- "total": 2,- "count": 1,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "PlaceholderUser",- "_links": {- "self": {- "href": "/api/v3/placeholder_users/1",- "title": "placeholder"- },- "showUser": {- "href": "/placeholder_users/1",- "type": "text/html"- },- "updateImmediately": {- "href": "/api/v3/placeholder_users/1",- "title": "Update placeholder",- "method": "PATCH"- },- "delete": {- "href": "/api/v3/placeholder_users/1",- "title": "Delete placeholder",- "method": "DELETE"- }- },- "id": 1,- "name": "placeholder",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }- ]- }- }--## List Placeholder Users [GET]--Lists placeholders. Only administrators or users with manage_placeholder_user global permission have permission to do this.--+ Parameters- + offset = `1` (optional, integer, `25`) ... Page number inside the requested collection.-- + pageSize (optional, integer, `25`) ... Number of elements to display per page.-- + filters (optional, string, `[{ "group": { "operator": "=", "values": ["1"] } }, { "name": { "operator": "=", "values": ["placeholder"] } }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:- + group: Name of the group in which to-be-listed placeholder users are members.- + name: Filter placeholder users in whose first or last names, or email addresses the given string occurs.- + status: Filter placeholder users by their status. Possible values are "active" and "locked"-- + sortBy (optional, string, `[["name", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint.-- Currently supported orders are:- + id- + name- + group--+ Response 200 (application/hal+json)-- [PlaceholderUsers][]--+ Response 400 (application/hal+json)-- Returned if the client sends an unknown sort column.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidQuery",- "message": "Unknown sort column."- }---+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** Administrator or manage_placeholder_user permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Create placeholder user [/api/v3/placeholder_users]--## Create Placeholder User [POST]--Creates a new placeholder user. Only administrators and users with manage_placeholder_user global permission are allowed to do so.-When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body.--+ Request Create User (application/json)-- + Body-- {- "name": "placeholder"- }--+ Response 201-- [PlaceholderUser][]--+ 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:** Administrator or manage_placeholder_user-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Name is already taken.",- "_embedded": {- "details": {- "attribute": "name"- }- }- }diff --git a/docs/api/apiv3/endpoints/posts.apib b/docs/api/apiv3/endpoints/posts.apibdeleted file mode 100644index 0a4a67d0fcf..00000000000--- a/docs/api/apiv3/endpoints/posts.apib+++ /dev/null@@ -1,83 +0,0 @@-# Group Posts--Represents a post in a board. Posts are also referred to as messages in the application.--*This resource is currently a stub*--## Actions--| Link | Description | Condition |-|:-------------------:|--------------------------------| --------------------------------------- |-| addAttachment | Attach a file to the post | **Permission**: edit messages |--## Linked Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------- | -------------------- |-| self | This post | Post | not null | READ |-| attachments | The files attached to this post | Collection | | READ |-| project | The project the post belongs to | Project | not null | READ |--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------- | ----------- | ------------------------------------ | -------------------- |-| id | Identifier of this post | Integer | x > 0 | READ |-| subject | The post's subject | String | not null | READ |--## Post [/api/v3/posts/{id}]--+ Model- + Body-- {- "_type": "Post",- "id": 1,- "subject": "A post with a subject",- "_embedded": {- "project": {- "_type": "Project..."- }- },- "_links": {- "self": {- "href": "/api/v3/posts/1"- },- "attachments": {- "href": "/api/v3/posts/1/attachments"- },- "addAttachment": {- "href": "/api/v3/posts/1/attachments",- "method": "post"- },- "project": {- "href": "/api/v3/projects/1",- "title": "A project with a title"- }- }- }--## View Post [GET]--Retrieve an individual post as identified by the id parameter--+ Parameters- + id (required, integer, `1`) ... Post's identifier--+ Response 200 (application/hal+json)-- [Post][]--+ Response 404 (application/hal+json)-- Returned if the post does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view messages in the post's project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }diff --git a/docs/api/apiv3/endpoints/principals.apib b/docs/api/apiv3/endpoints/principals.apibdeleted file mode 100644index 2b0d846d0e6..00000000000--- a/docs/api/apiv3/endpoints/principals.apib+++ /dev/null@@ -1,156 +0,0 @@-# Group Principals--Principals are the superclass of users, groups and placeholder users. This end point returns all principals-within a joined collection but can be filtered to e.g. only return groups or users.--## Linked Properties--See [user](#users) and [group](#groups)--## Local Properties--See [user](#users) and [group](#groups) and placeholder users (TDB)--## Principals [/api/v3/principals{?filters}]--+ Model- + Body-- {- "_type": "Collection",- "total": 4,- "count": 4,- "_embedded": {- "elements": [- {- "_type": "User",- "id": 4,- "login": "Eliza92778",- "admin": false,- "firstName": "Danika",- "lastName": "O'Keefe",- "name": "Danika O'Keefe",- "email": "[email protected]",- "avatar": "https://example.org/users/4/avatar",- "createdAt": "2015-03-20T12:57:02Z",- "updatedAt": "2015-06-16T15:28:14Z",- "status": "active",- "identityUrl": null,- "_links": {- "self": {- "href": "/api/v3/users/4",- "title": "Danika O'Keefe"- },- "showUser": {- "href": "/users/4",- "type": "text/html"- },- "updateImmediately": {- "href": "/api/v3/users/4",- "title": "Update Eliza92778",- "method": "patch"- },- "lock": {- "href": "/api/v3/users/4/lock",- "title": "Set lock on Eliza92778",- "method": "post"- },- "delete": {- "href": "/api/v3/users/4",- "title": "Delete Eliza92778",- "method": "delete"- }- }- },- {- "_type": "User",- "id": 2,- "login": "Sebastian9686",- "admin": false,- "firstName": "Peggie",- "lastName": "Feeney",- "name": "Peggie Feeney",- "email": null,- "avatar": "https://example.org/users/4/avatar",- "createdAt": "2015-03-20T12:56:55Z",- "updatedAt": "2015-03-20T12:56:55Z",- "status": "active",- "identityUrl": null,- "_links": {- "self": {- "href": "/api/v3/users/2",- "title": "Peggie Feeney"- },- "showUser": {- "href": "/users/2",- "type": "text/html"- },- "updateImmediately": {- "href": "/api/v3/users/2",- "title": "Update Sebastian9686",- "method": "patch"- },- "lock": {- "href": "/api/v3/users/2/lock",- "title": "Set lock on Sebastian9686",- "method": "post"- },- "delete": {- "href": "/api/v3/users/2",- "title": "Delete Sebastian9686",- "method": "delete"- }- }- },- {- "_type": "Group",- "id": 9,- "name": "The group",- "createdAt": "2015-09-23T11:06:36Z",- "updatedAt": "2015-09-23T11:06:36Z",- "_links": {- "self": {- "href": "/api/v3/groups/9",- "title": "The group"- }- }- },- {- "_type": "PlaceholderUser",- "id": 29,- "name": "UX Designer",- "createdAt": "2018-09-23T11:06:36Z",- "updatedAt": "2019-10-23T11:06:36Z",- "_links": {- "self": {- "href": "/api/v3/placeholder_users/29",- "title": "UX Designer"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/principals"- }- }- }--## List principals [GET]--List all principals. The client can choose to filter the principals similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain principals who are members in projects the client is allowed to see.--+ Parameters- + filters (optional, string, `[{ "type": { "operator": "=", "values": ["User"] } }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint.- Currently supported filters are:- + type: filters principals by their type (*User*, *Group*, *PlaceholderUser*).- + member: filters principals by the projects they are members in.- + name: filters principals by the user or group name.- + any_name_attribute: filters principals by the user or group first- and last name, email or login.- + status: filters principals by their status number (active = *1*, registered = *2*, locked = *3*, invited = *4*)--+ Response 200 (application/hal+json)-- [Principals][]diff --git a/docs/api/apiv3/endpoints/priorities.apib b/docs/api/apiv3/endpoints/priorities.apibdeleted file mode 100644index ac09d391a90..00000000000--- a/docs/api/apiv3/endpoints/priorities.apib+++ /dev/null@@ -1,152 +0,0 @@-# Group Priorities--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:---------:|-------------------------------------------- | ------------- | --------------------- | -------------------- |-| self | This priority | Priority | not null | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :---------: | ------------------------------------------- | ---------- | ----------- | -------------------- |-| id | Priority id | Integer | x > 0 | READ |-| name | Priority name | String | not empty | READ |-| position | Sort index of the priority | Integer | x > 0 | READ |-| isDefault | Indicates whether this is the default value | Boolean | | READ |-| isActive | Indicates whether the priority is available | Boolean | | READ |--## Priorities [/api/v3/priorities]--+ Model- + Body-- {- "_links" : {- "self" : {- "href" : "/api/v3/priorities"- }- },- "_type" : "Collection",- "total" : 4,- "count" : 4,- "_embedded" : {- "elements" : [{- "_type" : "Priority",- "_links" : {- "self" : {- "href" : "/api/v3/priorities/1",- "title" : "Low"- }- },- "id" : 1,- "name" : "Low",- "position" : 1,- "isDefault" : false,- "isActive" : true- }, {- "_type" : "Priority",- "_links" : {- "self" : {- "href" : "/api/v3/priorities/2",- "title" : "Normal"- }- },- "id" : 2,- "name" : "Normal",- "position" : 2,- "isDefault" : true,- "isActive" : true- }, {- "_type" : "Priority",- "_links" : {- "self" : {- "href" : "/api/v3/priorities/3",- "title" : "High"- }- },- "id" : 3,- "name" : "High",- "position" : 3,- "isDefault" : false,- "isActive" : true- }, {- "_type" : "Priority",- "_links" : {- "self" : {- "href" : "/api/v3/priorities/4",- "title" : "Immediate"- }- },- "id" : 4,- "name" : "Immediate",- "position" : 5,- "isDefault" : false,- "isActive" : true- }- ]- }- }---## List all Priorities [GET]--+ Response 200 (application/hal+json)-- [Priorities][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work package (on any project)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see the priorities."- }--## Priority [/api/v3/priorities/{id}]--+ Model- + Body-- {- "_type" : "Priority",- "_links" : {- "self" : {- "href" : "/api/v3/priorities/1",- "title" : "Low"- }- },- "id" : 1,- "name" : "Low",- "position" : 1,- "isDefault" : false,- "isActive" : true- }---## View Priority [GET]--+ Parameters- + id (required, integer, `1`) ... Priority id--+ Response 200 (application/hal+json)-- [Priority][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work package (on any project)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see this priority."- }diff --git a/docs/api/apiv3/endpoints/projects.apib b/docs/api/apiv3/endpoints/projects.apibdeleted file mode 100644index 06ee89c2a62..00000000000--- a/docs/api/apiv3/endpoints/projects.apib+++ /dev/null@@ -1,2235 +0,0 @@-# Group Projects--Projects are containers structuring the information (e.g. work packages, wikis) into smaller groups. They can be used in a classic project management approach but also when structuring work by departments.--As containers, they also control behaviour of the elements within them. One of the most important aspects of this is that projects limit permissions by having members with a certain permission set (roles) assigned to them.--## Actions--| Link | Description | Condition |-|:--------------------------: |----------------------------------------------------------------------| --------------------------------- |-| update | Form endpoint that aids in updating this project | **Permission**: edit project |-| updateImmediately | Directly update this project | **Permission**: edit project |-| delete | Delete this project | **Permission**: admin |-| createWorkPackage | Form endpoint that aids in preparing and creating a work package | **Permission**: add work packages |-| createWorkPackageImmediately | Directly creates a work package in the project | **Permission**: add work packages |--## Linked Properties--| Link | Description | Type | Constraints | Supported operations |Condition |-| :----------: | ------------- | ---- | ----------- | -------------------- |----------------------------------------- |-| self | This project | Project | not null | READ | |-| categories | Categories available in this project | Collection | not null | READ | |-| types | Types available in this project | Collection | not null | READ | **Permission**: view work packages or manage types |-| versions | Versions available in this project | Collection | not null | READ | **Permission**: view work packages or manage versions |-| memberships | Memberships in the project | Collection | not null | READ | **Permission**: view members |-| workPackages | Work Packages of this project | Collection | not null | READ | |-| parent | Parent project of the project | Project | | READ/WRITE | **Permission** edit project |-| status | Denotes the status of the project, so whether the project is on track, at risk or is having trouble. | ProjectStatus | | READ/WRITE | **Permission** edit project |--Depending on custom fields defined for projects, additional links might exist.--Note, that the parent link may contain the "undisclosed uri" `urn:openproject-org:api:v3:undisclosed` in case a-parent project is defined but the client lacks permission to see it. See the-[general introduction into links' properties](/docs/api/basic-objects/#header-local-properties-1) for more information.--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :---------------------:| ------------- | ---- | ----------- | -------------------- |-| id | Projects' id | Integer | x > 0 | READ/WRITE |-| identifier | | String | | READ/WRITE |-| name | | String | | READ/WRITE |-| active | Indicates whether the project is currently active or already archived | Boolean | | READ/WRITE |-| statusExplanation | A text detailing and explaining why the project has the reported status | Formattable | | READ/WRITE |-| public | Indicates whether the project is accessible for everybody | Boolean | | READ/WRITE |-| description | | Formattable | | READ/WRITE |-| createdAt | Time of creation | DateTime | | READ |-| updatedAt | Time of the most recent change to the project | DateTime | | READ |--Depending on custom fields defined for projects, additional properties might exist.--## View project [/api/v3/projects/{id}]--+ Model- + Body-- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/1",- "title": "Lorem"- },- "createWorkPackage": {- "href": "/api/v3/projects/1/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/1/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/1/categories"- },- "types": {- "href": "/api/v3/projects/1/types"- },- "versions": {- "href": "/api/v3/projects/1/versions"- },- "workPackages": {- "href": "/api/v3/projects/1/work_packages"- },- "memberships": {- "href": "/api/v3/memberships?filters=[{\"project\":{\"operator\":\"=\",\"values\":[\"1\"]}}]"- },- "customField456": {- "href": "/api/v3/users/315",- "method": "A user"- },- "projects": {- "href": "/api/v3/projects/123"- },- "status": {- "href": "/api/v3/project_statuses/on_track",- "title": "On track"- }- },- "id": 1,- "identifier": "project_identifier",- "name": "Project example",- "active": true,- "public": false,- "statusExplanation": {- "format": "markdown",- "raw": "Everything **fine**",- "html": "<p>Everything <strong>fine</strong></p>"- },- "description": {- "format": "markdown",- "raw": "Lorem **ipsum** dolor sit amet",- "html": "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"- },- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z",- "customField123": 123- }--## View project [GET]--+ Parameters-- + id (required, integer, `1`) ... Project id--+ Response 200 (application/hal+json)-- [View 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 requested resource could not be found."- }--## Create project [/api/v3/projects]--## Create project [POST]--Creates a new project, applying the attributes provided in the body.--You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation.--+ Request Create project-- + Body-- {- "identifier": "new_project_identifier",- "name": "New project name",- "customField35": "Text custom field value",- "statusExplanation": {- "format": "markdown",- "raw": "Everything **fine**",- "html": "<p>Everything <strong>fine</strong></p>"- },- "_links": {- "customField12": {- "href": "/api/v3/users/5"- },- "parent": {- "href": "/api/v3/projects/6"- },- "status": {- "href": "/api/v3/project_statuses/on_track"- }- }- }--+ Response 201-- [View project][]--+ 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 project which is a global permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Name can't be blank.",- "_embedded": {- "details": {- "attribute": "name"- }- }- }--## Update project [/api/v3/projects/{id}]--## Update Project [PATCH]--Updates the given project by applying the attributes provided in the body.--+ Parameters-- + id (required, integer, `1`) ... Project id--+ Request Update project-- + Body-- {- "name": "A new project name",- "_links": {- "customField35": {- "href": "/api/v3/users/3"- },- "status": {- "href": "/api/v3/project_statuses/at_risk",- }- }- }--+ Response 200-- [View project][]--+ 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:** edit project for the project to be altered-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ 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 version. 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 requested resource could not be found."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Name can't be blank.",- "_embedded": {- "details": {- "attribute": "name"- }- }- }--## Delete project [/api/v3/projects/{id}]--## Delete Project [DELETE]--Deletes the project permanently. As this is a lengthy process, the actual deletion is carried out asynchronously.-So the project might exist well after the request has returned successfully. To prevent unwanted changes to-the project scheduled for deletion, it is archived at once.--+ Parameters-- + id (required, integer, `1`) ... Project id--+ Response 204 (application/hal+json)-- Returned if the project was successfully deleted. There is currently no end point to query for the actual deletion status.- Such an end point _might_ be added in the future.-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** admin-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ 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 version. 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 requested resource could not be found."- }--+ Response 422 (application/hal+json)-- Returned if the project cannot be deleted. This can happen when there are still references to the project in other projects- that need to be severed at first.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Work packages in non descendant projects reference versions of the project or its descendants.",- "_embedded": { "details": { "attribute": "base" } }- }--## List projects [/api/v3/projects{?filters,sortBy}]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/projects"- }- },- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded": {- "elements": [- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/6",- "title": "A project"- },- "createWorkPackage": {- "href": "/api/v3/projects/6/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/6/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/6/categories"- },- "versions": {- "href": "/api/v3/projects/6/versions"- },- "projects": {- "href": "/api/v3/projects/123"- },- "status": {- "href": "/api/v3/project_statuses/on_track",- "title": "On track"- }- },- "id": 6,- "identifier": "a_project",- "name": "A project",- "active": true,- "statusExplanation": {- "format": "markdown",- "raw": "Everything **fine**",- "html": "<p>Everything <strong>fine</strong></p>"- },- "public": false,- "description": {- "format": "markdown",- "raw": "Lorem **ipsum** dolor sit amet",- "html": "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"- },- "createdAt": "2015-07-06T13:28:14+00:00",- "updatedAt": "2015-10-01T09:55:02+00:00",- "type": "Customer Project"- },- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/14",- "title": "Another project"- },- "createWorkPackage": {- "href": "/api/v3/projects/14/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/14/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/14/categories"- },- "versions": {- "href": "/api/v3/projects/14/versions"- },- "projects": {- "href": null- },- "status": {- "href": "/api/v3/project_statuses/off_track",- "title": "Off track"- }- },- "id": 14,- "identifier": "another_project",- "name": "Another project",- "active": false,- "statusExplanation": {- "format": "markdown",- "raw": "Uh **oh**",- "html": "<p>Uh <strong>oh</strong></p>"- },- "public": true,- "description": {- "format": "markdown",- "raw": "",- "html": ""- },- "createdAt": "2016-02-29T12:50:20+00:00",- "updatedAt": "2016-02-29T12:50:20+00:00",- "type": null- }- ]- }- }--## List projects [GET]--Returns a collection of projects. The collection can be filtered via query parameters similar to how work packages are filtered. In addition to the provided filter, the result set is always limited to only contain projects the client is allowed to see.--+ Parameters- + filters (optional, string, `[{ "ancestor": { "operator": "=", "values": ['1'] }" }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint.- Currently supported filters are:- + active: based on the active property of the project- + ancestor: filters projects by their ancestor. A project is not considered to be it's own ancestor.- + created_at: based on the time the project was created- + latest_activity_at: based on the time the last activity was registered on a project.- + name_and_identifier: based on both the name and the identifier.- + parent_id: filters projects by their parent.- + principal: based on members of the project.- + type_id: based on the types active in a project.- + user_action: based on the actions (see [Actions](#actions)) the current user has in the project.- + id: based on projects' id.- + visible: based on the visibility for the user (id) provided as the filter value. This filter is useful for admins to identify the projects visible to a user.- There might also be additional filters based on the custom fields that have been configured.- + sortBy (optional, string, `[["id", "asc"]]`) ... JSON specifying sort criteria.- Currently supported orders are:- + id- + name- + created_at- + public- + latest_activity_at- + required_disk_space- There might also be additional orders based on the custom fields that have been configured.---+ Response 200 (application/hal+json)-- [List projects][]--## Projects schema [/api/v3/projects/schemas]--+ Model- + Body-- {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255- },- "identifier": {- "type": "String",- "name": "Identifier",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 100- },- "description": {- "type": "Formattable",- "name": "Description",- "required": false,- "hasDefault": false,- "writable": true- },- "public": {- "type": "Boolean",- "name": "Public",- "required": true,- "hasDefault": false,- "writable": true- },- "active": {- "type": "Boolean",- "name": "Active",- "required": true,- "hasDefault": true,- "writable": true- },- "status": {- "type": "ProjectStatus",- "name": "Status",- "required": false,- "hasDefault": true,- "writable": true,- "_links": {- "allowedValues": [- {- "href": "/api/v3/project_statuses/on_track",- "title": "On track"- },- {- "href": "/api/v3/project_statuses/at_risk",- "title": "At risk"- },- {- "href": "/api/v3/project_statuses/off_track",- "title": "Off track"- }- ]- }- },- "statusExplanation": {- "type": "Formattable",- "name": "Status explanation",- "required": false,- "hasDefault": false,- "writable": true- },- "parent": {- "type": "Project",- "name": "Subproject of",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "customField30": {- "type": "Integer",- "name": "Integer project custom field",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField31": {- "type": "CustomOption",- "name": "List project custom field",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {}- },- "customField32": {- "type": "Version",- "name": "Version project custom field",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {}- },- "customField34": {- "type": "Boolean",- "name": "Boolean project custom field",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField35": {- "type": "String",- "name": "Text project custom field",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "_links": {- "self": {- "href": "/api/v3/projects/schema"- }- }- }--## View project schema [GET]--+ Response 200 (application/hal+json)-- [Projects schema][]--## Project create form [/api/v3/projects/form]--This endpoint returns a form allowing a guided creation of new projects.--For more details and all possible responses see the general specification of [Forms](#forms).--## Project create form [POST]--+ Request Create project form-- + Body-- {- "identifier": "new_project_identifier",- "name": "New project name",- "customField35": "Text custom field value"- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "identifier": "new_project_identifier",- "name": "New project name",- "active": true,- "public": false,- "description": {- "format": "markdown",- "raw": null,- "html": ""- },- "customField30": null,- "customField34": null,- "customField35": "Text custom field value",- "customField41": {- "format": "markdown",- "raw": "",- "html": ""- },- "customField42": null,- "statusExplanation": {- "format": "markdown",- "raw": null,- "html": "<p></p>"- },- "_links": {- "customField26": {- "href": null,- "title": null- },- "customField31": {- "href": null,- "title": null- },- "parent": {- "href": null- },- "status": {- "href": null- }- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255- },- "identifier": {- "type": "String",- "name": "Identifier",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 100- },- "description": {- "type": "Formattable",- "name": "Description",- "required": false,- "hasDefault": false,- "writable": true- },- "public": {- "type": "Boolean",- "name": "Public",- "required": true,- "hasDefault": false,- "writable": true- },- "active": {- "type": "Boolean",- "name": "Active",- "required": true,- "hasDefault": true,- "writable": true- },- "status": {- "type": "ProjectStatus",- "name": "Status",- "required": false,- "hasDefault": true,- "writable": true,- "_links": {- "allowedValues": [- {- "href": "/api/v3/project_statuses/on_track",- "title": "On track"- },- {- "href": "/api/v3/project_statuses/at_risk",- "title": "At risk"- },- {- "href": "/api/v3/project_statuses/off_track",- "title": "Off track"- }- ]- }- },- "statusExplanation": {- "type": "Formattable",- "name": "Status explanation",- "required": false,- "hasDefault": false,- "writable": true- },- "parent": {- "type": "Project",- "name": "Subproject of",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {- "allowedValues": {- "href": "/api/v3/projects/available_parent_projects"- }- }- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "customField26": {- "type": "User",- "name": "Project user",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {- "allowedValues": {- "href": "/api/v3/principals?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22%21%22%2C%22values%22%3A%5B%220%22%2C%223%22%5D%7D%7D%2C%7B%22type%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22User%22%5D%7D%7D%2C%7B%22member%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22%22%5D%7D%7D%5D&pageSize=0"- }- }- },- "customField30": {- "type": "Integer",- "name": "some project cf",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField31": {- "type": "CustomOption",- "name": "list project cf",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_embedded": {- "allowedValues": [- {- "_type": "CustomOption",- "id": 513,- "value": "abc",- "_links": {- "self": {- "href": "/api/v3/custom_options/513",- "title": "abc"- }- }- },- {- "_type": "CustomOption",- "id": 514,- "value": "def",- "_links": {- "self": {- "href": "/api/v3/custom_options/514",- "title": "def"- }- }- },- {- "_type": "CustomOption",- "id": 515,- "value": "ghi",- "_links": {- "self": {- "href": "/api/v3/custom_options/515",- "title": "ghi"- }- }- }- ]- },- "_links": {- "allowedValues": [- {- "href": "/api/v3/custom_options/513",- "title": "abc"- },- {- "href": "/api/v3/custom_options/514",- "title": "def"- },- {- "href": "/api/v3/custom_options/515",- "title": "ghi"- }- ]- }- },- "customField34": {- "type": "Boolean",- "name": "Bool Project CF",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField35": {- "type": "String",- "name": "text project cf",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField41": {- "type": "Formattable",- "name": "Long text project cf",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField42": {- "type": "Date",- "name": "Date project cf",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "_links": {}- },- "validationErrors": {- "identifier": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Identifier has already been taken.",- "_embedded": {- "details": {- "attribute": "identifier"- }- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/projects/form",- "method": "post"- },- "validate": {- "href": "/api/v3/projects/form",- "method": "post"- }- }- }--+ 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 project which is a global permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Project update form [/api/v3/projects/{id}/form]--This endpoint returns a form allowing a guided modification of existing projects.-The returned payload part of the form will be contain a merge between the already existing properties' values (as long as they are writeable) and the provided values with the later having precedence.--For more details and all possible responses see the general specification of [Forms](#forms).--## Project update form [POST]--+ Parameters-- + id (required, integer, `1`) ... Project id--+ Request Update project form-- + Body-- {- "identifier": "new_project_identifier",- "name": "New project name",- "customField35": "Text custom field value"- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "identifier": "new_project_identifier",- "name": "New project name",- "active": true,- "public": false,- "description": {- "format": "markdown",- "raw": null,- "html": ""- },- "customField30": null,- "customField34": null,- "customField35": "Text custom field value",- "customField41": {- "format": "markdown",- "raw": "",- "html": ""- },- "customField42": null,- "statusExplanation": {- "format": "markdown",- "raw": "There is some risk of failure",- "html": "<p>There is some risk of failure</p>"- },- "_links": {- "customField26": {- "href": null,- "title": null- },- "customField31": {- "href": null,- "title": null- },- "parent": {- "href": "/api/v3/projects/45"- },- "status": {- "href": "/api/v3/project_statuses/at_risk"- }- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255- },- "identifier": {- "type": "String",- "name": "Identifier",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 100- },- "description": {- "type": "Formattable",- "name": "Description",- "required": false,- "hasDefault": false,- "writable": true- },- "public": {- "type": "Boolean",- "name": "Public",- "required": true,- "hasDefault": false,- "writable": true- },- "active": {- "type": "Boolean",- "name": "Active",- "required": true,- "hasDefault": true,- "writable": true- },- "status": {- "type": "ProjectStatus",- "name": "Status",- "required": false,- "hasDefault": true,- "writable": true,- "_links": {- "allowedValues": [- {- "href": "/api/v3/project_statuses/on_track",- "title": "On track"- },- {- "href": "/api/v3/project_statuses/at_risk",- "title": "At risk"- },- {- "href": "/api/v3/project_statuses/off_track",- "title": "Off track"- }- ]- }- },- "statusExplanation": {- "type": "Formattable",- "name": "Status",- "required": true,- "hasDefault": true,- "writable": true,- },- "parent": {- "type": "Project",- "name": "Subproject of",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {- "allowedValues": {- "href": "/api/v3/projects/available_parent_projects?of=123"- }- }- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "customField26": {- "type": "User",- "name": "Project user",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {- "allowedValues": {- "href": "/api/v3/principals?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22%21%22%2C%22values%22%3A%5B%220%22%2C%223%22%5D%7D%7D%2C%7B%22type%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22User%22%5D%7D%7D%2C%7B%22member%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22%22%5D%7D%7D%5D&pageSize=0"- }- }- },- "customField30": {- "type": "Integer",- "name": "some project cf",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField31": {- "type": "CustomOption",- "name": "list project cf",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_embedded": {- "allowedValues": [- {- "_type": "CustomOption",- "id": 513,- "value": "abc",- "_links": {- "self": {- "href": "/api/v3/custom_options/513",- "title": "abc"- }- }- },- {- "_type": "CustomOption",- "id": 514,- "value": "def",- "_links": {- "self": {- "href": "/api/v3/custom_options/514",- "title": "def"- }- }- },- {- "_type": "CustomOption",- "id": 515,- "value": "ghi",- "_links": {- "self": {- "href": "/api/v3/custom_options/515",- "title": "ghi"- }- }- }- ]- },- "_links": {- "allowedValues": [- {- "href": "/api/v3/custom_options/513",- "title": "abc"- },- {- "href": "/api/v3/custom_options/514",- "title": "def"- },- {- "href": "/api/v3/custom_options/515",- "title": "ghi"- }- ]- }- },- "customField34": {- "type": "Boolean",- "name": "Bool Project CF",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField35": {- "type": "String",- "name": "text project cf",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField41": {- "type": "Formattable",- "name": "Long text project cf",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField42": {- "type": "Date",- "name": "Date project cf",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "_links": {}- },- "validationErrors": {- "identifier": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Identifier has already been taken.",- "_embedded": {- "details": {- "attribute": "identifier"- }- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/projects/5/form",- "method": "post"- },- "validate": {- "href": "/api/v3/projects/5/form",- "method": "post"- }- }- }--+ 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:** edit projects in the project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }---## Project copy form [/api/v3/projects/{id}/copy/form]--This endpoint returns a form allowing a guided copy process of existing projects.-The returned payload part of the form will be contain a merge between the already existing properties' values of the source project (as long as they are writeable) and the provided values to be set for a new project.--For available properties, please see the project endpoint.--The copy form has a `_meta` property that allows defining which associations to copy. Please check the table below-and copy schema embedded in the copy form response for available options.--The embedded schema of this form describes all associations to copy with a human readable string including the total count of associated objects in the source project.--For more details and all possible responses see the general specification of [Forms](#forms).--### Meta parameters--| Meta property | Description | Type | Constraints | Supported operations |Condition |-| :------------------------: | --------------------------------------------------- | ---- | ----------- | -------------------- |----------|-| sendNotifications | Whether to send out notifications | Boolean | not null | READ/WRITE | |-| copyMembers | Whether to copy project members | Boolean | not null | READ/WRITE | |-| copyVersions | Whether to copy project versions | Boolean | not null | READ/WRITE | |-| copyCategories | Whether to copy project categories | Boolean | not null | READ/WRITE | |-| copyWorkPackages | Whether to copy project work packages | Boolean | not null | READ/WRITE | |-| copyWorkPackageAttachments | Whether to copy project attachments of work packages | Boolean | not null | READ/WRITE | |-| copyWiki | Whether to copy project wiki pages | Boolean | not null | READ/WRITE | |-| copyWikiPageAttachments | Whether to copy project wiki page attachments | Boolean | not null | READ/WRITE | |-| copyForums | Whether to copy project forums | Boolean | not null | READ/WRITE | |-| copyQueries | Whether to copy project queries | Boolean | not null | READ/WRITE | |-| copyBoards | Whether to copy project boards | Boolean | not null | READ/WRITE | |-| copyOverview | Whether to copy the project overview page | Boolean | not null | READ/WRITE | |--## Project copy form [POST]--+ Parameters-- + id (required, integer, `1`) ... Project id--+ Request copy project form-- + Body-- {- "identifier": "copied_project_identifier",- "name": "Copied project name",- "customField35": "Text custom field value",- "_meta": {- "copyOverview": false,- "copyWorkPackages": true- }- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "identifier": "copied_project_identifier",- "name": "Copied project name",- "active": true,- "public": false,- "description": {- "format": "markdown",- "raw": null,- "html": ""- },- "customField30": null,- "customField34": null,- "customField35": "Text custom field value",- "customField41": {- "format": "markdown",- "raw": "",- "html": ""- },- "customField42": null,- "statusExplanation": {- "format": "markdown",- "raw": "There is some risk of failure",- "html": "<p>There is some risk of failure</p>"- },- "_links": {- "customField26": {- "href": null,- "title": null- },- "customField31": {- "href": null,- "title": null- },- "parent": null,- "status": {- "href": "/api/v3/project_statuses/at_risk"- }- },- "_meta": {- "copyOverview": false,- "copyBoards": false,- "copyForums": false,- "copyMembers": false,- "copyVersions": false,- "copyWiki": false,- "copyWikiPageAttachments": false,- "copyWorkPackages": false,- "copyWorkPackageAttachments": false,- "copyQueries": false,- "copyCategories": false- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255- },- "identifier": {- "type": "String",- "name": "Identifier",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 100- },- "description": {- "type": "Formattable",- "name": "Description",- "required": false,- "hasDefault": false,- "writable": true- },- "public": {- "type": "Boolean",- "name": "Public",- "required": true,- "hasDefault": false,- "writable": true- },- "active": {- "type": "Boolean",- "name": "Active",- "required": true,- "hasDefault": true,- "writable": true- },- "status": {- "type": "ProjectStatus",- "name": "Status",- "required": false,- "hasDefault": true,- "writable": true,- "_links": {- "allowedValues": [- {- "href": "/api/v3/project_statuses/on_track",- "title": "On track"- },- {- "href": "/api/v3/project_statuses/at_risk",- "title": "At risk"- },- {- "href": "/api/v3/project_statuses/off_track",- "title": "Off track"- }- ]- }- },- "statusExplanation": {- "type": "Formattable",- "name": "Status",- "required": true,- "hasDefault": true,- "writable": true,- },- "parent": {- "type": "Project",- "name": "Subproject of",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {- "allowedValues": {- "href": "/api/v3/projects/available_parent_projects?of=123"- }- }- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "customField26": {- "type": "User",- "name": "Project user",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {- "allowedValues": {- "href": "/api/v3/principals?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22%21%22%2C%22values%22%3A%5B%220%22%2C%223%22%5D%7D%7D%2C%7B%22type%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22User%22%5D%7D%7D%2C%7B%22member%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22%22%5D%7D%7D%5D&pageSize=0"- }- }- },- "customField30": {- "type": "Integer",- "name": "some project cf",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField31": {- "type": "CustomOption",- "name": "list project cf",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_embedded": {- "allowedValues": [- {- "_type": "CustomOption",- "id": 513,- "value": "abc",- "_links": {- "self": {- "href": "/api/v3/custom_options/513",- "title": "abc"- }- }- },- {- "_type": "CustomOption",- "id": 514,- "value": "def",- "_links": {- "self": {- "href": "/api/v3/custom_options/514",- "title": "def"- }- }- },- {- "_type": "CustomOption",- "id": 515,- "value": "ghi",- "_links": {- "self": {- "href": "/api/v3/custom_options/515",- "title": "ghi"- }- }- }- ]- },- "_links": {- "allowedValues": [- {- "href": "/api/v3/custom_options/513",- "title": "abc"- },- {- "href": "/api/v3/custom_options/514",- "title": "def"- },- {- "href": "/api/v3/custom_options/515",- "title": "ghi"- }- ]- }- },- "customField34": {- "type": "Boolean",- "name": "Bool Project CF",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField35": {- "type": "String",- "name": "text project cf",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField41": {- "type": "Formattable",- "name": "Long text project cf",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField42": {- "type": "Date",- "name": "Date project cf",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "copyOverview": {- "type": "Boolean",- "name": "Overview",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyBoards": {- "type": "Boolean",- "name": "Boards",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyForums": {- "type": "Boolean",- "name": "Forums",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyMembers": {- "type": "Boolean",- "name": "Members",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyVersions": {- "type": "Boolean",- "name": "Versions",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyWiki": {- "type": "Boolean",- "name": "Wiki",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyWikiPageAttachments": {- "type": "Boolean",- "name": "Wiki page attachments",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyWorkPackages": {- "type": "Boolean",- "name": "Work packages",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyWorkPackageAttachments": {- "type": "Boolean",- "name": "Work package attachments",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyQueries": {- "type": "Boolean",- "name": "Queries",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "copyCategories": {- "type": "Boolean",- "name": "Categories",- "required": false,- "hasDefault": true,- "writable": true,- "location:" "_meta"- },- "_links": {}- },- "validationErrors": {- "identifier": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Identifier has already been taken.",- "_embedded": {- "details": {- "attribute": "identifier"- }- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/projects/5/copy/form",- "method": "post"- },- "validate": {- "href": "/api/v3/projects/5/copy/form",- "method": "post"- }- }- }--+ 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:** copy projects in the source project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }----## Create project copy [/api/v3/projects/{id}/copy]--This endpoint allows triggering a copy process of an existing project.-The request payload will be passed as attributes to the new project being created. Unset values will be retained from the existing project where possible.--For available properties, please see the project endpoint.--The copy endpoint has a `_meta` property that allows defining which associations to copy. Please check the copy schema embedded in the project copy form response for available options.--## Create project copy [POST]--+ Parameters-- + id (required, integer, `1`) ... Project id---+ Request Create copy project-- + Body-- {- "identifier": "copied_project_identifier",- "name": "Copied project name",- "customField35": "Text custom field value",- "_meta": {- "copyOverview": false,- "copyWorkPackages": true- }- }--+ Response 302 (application/hal+json)-- Returned if the request is successful. It will redirect to the job statuses API with the backend job that got created. You can query that endpoint to check the status of the copy, and eventually get the created project.-- + Body----+ 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:** copy projects in the source project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Name can't be blank.",- "_embedded": {- "details": {- "attribute": "name"- }- }- }----## List available parent project candidates [/api/v3/projects/available_parent_projects{?filters,of,sortBy}]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/projects/available_parent_projects?of=123"- }- },- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded": {- "elements": [- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/6",- "title": "A project"- },- "createWorkPackage": {- "href": "/api/v3/projects/6/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/6/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/6/categories"- },- "versions": {- "href": "/api/v3/projects/6/versions"- },- "status": {- "href": "/api/v3/project_statuses/on_track",- "title": "On track"- }- },- "id": 6,- "identifier": "a_project",- "name": "A project",- "active": true,- "statusExplanation": {- "format": "markdown",- "raw": "Everything **fine**",- "html": "<p>Everything <strong>fine</strong></p>"- },- "public": false,- "description": {- "format": "markdown",- "raw": "Lorem **ipsum** dolor sit amet",- "html": "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"- },- "createdAt": "2015-07-06T13:28:14+00:00",- "updatedAt": "2015-10-01T09:55:02+00:00",- "type": "Customer Project"- },- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/14",- "title": "Another project"- },- "createWorkPackage": {- "href": "/api/v3/projects/14/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/14/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/14/categories"- },- "versions": {- "href": "/api/v3/projects/14/versions"- },- "status": {- "href": "/api/v3/project_statuses/on_track",- "title": "On track"- }- },- "id": 14,- "identifier": "another_project",- "name": "Another project",- "active": true,- "statusExplanation": {- "format": "markdown",- "raw": "Everything super **fine**",- "html": "<p>Everything super <strong>fine</strong></p>"- },- "public": true,- "description": {- "format": "markdown",- "raw": "",- "html": ""- },- "createdAt": "2016-02-29T12:50:20+00:00",- "updatedAt": "2016-02-29T12:50:20+00:00",- "type": null- }- ]- }- }--## List available parent project candidates [GET]--Lists projects which can become parent to another project. Only sound candidates are returned.-For instance a project cannot become parent of itself or it's children.--To specify the project for which a parent is queried for, the `of` parameter can be provided. If no `of`-parameter is provided, a new project is assumed. Then, the check for the hierarchy is omitted as a new project cannot be-part of a hierarchy yet.--Candidates can be filtered. Most commonly one will want to filter by name or identifier.-You can do this through the `filters` parameter which works just like the work package index.--For instance to find all parent candidates with "rollout" in their name:--```-?filters=[{"name_and_identifier":{"operator":"~","values":["rollout"]}}]-```--+ Parameters- + filters (optional, string, `[{ "ancestor": { "operator": "=", "values": ['1'] }" }]`) ... JSON specifying filter conditions.- + of (optional, number or identifier, `123` ... The id or identifier of the project the parent candidate is determined for- + sortBy (optional, string, `[["id", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint and allows all the filters and sortBy supported by the project list end point.--+ Response 200 (application/hal+json)-- [List available parent project candidates][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** edit project in a project or the global add project permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## List projects by version [/api/v3/versions/{id}/projects]--+ Model- + Body-- {- "_links":- {- "self":- {- "href": "/api/v3/versions/2/projects"- }- },- "total": 1,- "count": 1,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/1",- "title": "Lorem"- },- "categories": { "href": "/api/v3/projects/1/categories" },- "versions": { "href": "/api/v3/projects/1/versions" },- "status": {- "href": "/api/v3/project_statuses/on_track",- "title": "On track"- }- },- "id": 1,- "identifier": "project_identifier",- "name": "Project example",- "description": {- "format": "markdown",- "raw": "Lorem **ipsum** dolor sit amet",- "html": "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"- },- "active": true,- "statusExplanation": {- "format": "markdown",- "raw": "Everything **fine**",- "html": "<p>Everything <strong>fine</strong></p>"- },- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }- ]- }- }--## List projects with version [GET]--This endpoint lists the projects where the given version is available.--The projects returned depend on the sharing settings of the given version,-but are also limited to the projects that the current user is allowed to see.--+ Parameters-- + id (required, integer, `1`) ... Version id--+ Response 200 (application/hal+json)-- [List projects by version][]--+ Response 404 (application/hal+json)-- Returned if the version does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view work packages **or** manage versions (any project where the given version is available)-- *Note: A client without sufficient permissions shall not be able to test for the existence of a version.- 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 requested resource could not be found."- }--## View project status--The project status enumerations are a fixed set set status a project can be in: "On track", "At risk" and "Off track". They can be-used to communicate a judgement on the project's likeliness to succeed.--## View project status [/api/v3/project_statuses/{id}]--+ Model- + Body-- {- "_type": "ProjectStatus",- "id": "on_track",- "name": "On track",- "_links": {- "self": {- "href": "/api/v3/project_statuses/on_track"- }- }- }--## View project status [GET]--+ Parameters-- + id (required, string, `on_track`) ... Project status id--+ Response 200 (application/hal+json)-- [View project status][]--+ Response 404 (application/hal+json)-- Returned if the project status does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }diff --git a/docs/api/apiv3/endpoints/queries.apib b/docs/api/apiv3/endpoints/queries.apibdeleted file mode 100644index b71a7b3dd3e..00000000000--- a/docs/api/apiv3/endpoints/queries.apib+++ /dev/null@@ -1,2886 +0,0 @@-# Group Queries--A query defines how work packages can be filtered and displayed. Clients can define a query once, store it, and use it later on to load the same set of filters.--## Actions--| Link | Description | Condition |-|:-------------------:|----------------------------------------------------------------------| --------------------------------------- |-| star | Elevates the query to the status of 'starred' | **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is not yet starred |-| unstar | Removes the 'starred' status | **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is starred |-| update | Use the Form based process to verify the query before persisting | **Permission**: view work packages |-| updateImmediately | Persist the query without using a Form based process for guidance | **Permission**: save queries for own queries, manage public queries for public queries; |--## Linked Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------------: | ------------------------------------------------------ | --------------------- | ------------------------------------------- | -------------------- |-| self | This query | Query | not null | READ |-| user | The user that owns this query | User | not null | READ |-| project | The project on which this query operates | Project | | READ |-| columns | Ordered list of QueryColumns. The columns, when mapped to WorkPackage properties determine which WorkPackage properties to display | []QueryColumn | | READ |-| highlightedAttributes | **Only with valid Enterprise Token available:** List of QueryColumns that should get highlighted when `highlightingMode` is set to `inline`. | []QueryColumn | | READ |-| sortBy | Ordered list of QuerySortBys. Indicates the WorkPackage property the results will be ordered by as well as the direction | []QuerySortBy | | READ |-| groupBy | The WorkPackage property results of this query are grouped by | String | | READ |-| results | The list of work packages returned by applying the filters, sorting and grouping defined in the query | WorkPackageCollection | | READ |-| schema | This query's schema | Schema | | READ |--Please note, that all the properties listed above will also be embedded when individual queries are returned but will not be embedded when a list of queries is returned. Whether the properties are embedded or not may be subject to change in the future.--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | ------------------------------------ | -------------------- |-| id | Query id | Integer | x > 0 | READ |-| name | Query name | String | | READ |-| filters | A set of QueryFilters which will be applied to the work packages to determine the resulting work packages | []QueryFilterInstance | | READ |-| sums | Should sums (of supported properties) be shown? | Boolean | | READ |-| timelineVisible | Should the timeline mode be shown? | Boolean | | READ |-| timelineLabels | Which labels are shown in the timeline, empty when default | QueryTimelineLabels | | READ |-| timelineZoomLevel| Which zoom level should the timeline be rendered in? | String | days, weeks, months, quarters, years | READ |-| highlightingMode | Which highlighting mode should the table have? | String | none, inline, status, priority, type | READ |-| showHierarchies | Should the hierarchy mode be enabled? | Boolean | | READ |-| hidden | Should the query be hidden from the query list? | Boolean | | READ |-| public | Can users besides the owner see the query? | Boolean | | READ |-| starred | Should the query be highlighted to the user? | Boolean | | READ |-| createdAt | Time of creation | DateTime | not null | READ |-| updatedAt | Time of the most recent change to the query | DateTime | not null | READ |--A query that is not assigned to a project (`"project": null`) is called a global query. Global queries filter work packages regardless of the project they are assigned to. As such, a different set of filters exists for those queries.--## Query Filter Instance--A QueryFilterInstance defines a filtering applied to the list of work packages. As such it contains:-* the filter type (`QueryFilter`) used-* the operator (`QueryOperator`) used-* the list of values--The list of values can either consist of a list of links or of a list of strings. If the values are primitive (e.g. Integer, Boolean, Date) they will be displayed as strings and the QueryFilterInstance will have a `values` property.--```- {- "_type": "DueDateQueryFilter",- "name": "Finish date",- "values": [- "1"- ],- "_links": {- "filter": {- "href": "/api/v3/queries/filters/dueDate",- "title": "Finish date"- },- "operator": {- "href": "/api/v3/queries/operators/<t+",- "title": "in less than"- }- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/dueDate"- }- }- }-```--If the values are nonprimitive (e.g. User, Project), they will be listed as objects and the QueryFilterInstance will have a `values` link.-```- {- "_type": "AssigneeQueryFilter",- "name": "Assignee",- "_links": {- "filter": {- "href": "/api/v3/queries/filters/assignee",- "title": "Assignee"- },- "operator": {- "href": "/api/v3/queries/operators/=",- "title": "is"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/assignee"- },- "values": [- {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- }- ]- }- }--```--## Query [/api/v3/queries/{id}{?offset,pageSize,filters,columns,sortBy,groupBy,showSums,timelineVisible,timelineLabels,timelineZoomLevel,highlightingMode,highlightedAttributes,showHierarchies}]--+ Model- + Body-- {- "_type": "Query",- "id": 9,- "name": "fdsfdsfdsf",- "createdAt": "2015-03-20T12:56:56Z",- "updatedAt": "2015-05-20T18:16:53Z",- "filters": [- {- "_type": "StatusQueryFilter",- "name": "Status",- "_links": {- "filter": {- "href": "/api/v3/queries/filters/status",- "title": "Status"- },- "operator": {- "href": "/api/v3/queries/operators/o",- "title": "open"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/status"- },- "values": []- }- },- {- "_type": "DueDateQueryFilter",- "name": "Finish date",- "values": [- "1"- ],- "_links": {- "filter": {- "href": "/api/v3/queries/filters/dueDate",- "title": "Finish date"- },- "operator": {- "href": "/api/v3/queries/operators/<t+",- "title": "in less than"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/dueDate"- }- }- }- ],- "public": false,- "sums": false,- "starred": false,- "_embedded": {- "results": {- "_type": "WorkPackageCollection",- "total": 234,- "count": 30,- "pageSize": 2,- "offset": 1,- "_embedded": {- "elements": [- "<--- shortened for brevity --->"- ]- },- "_links": {- "self": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "jumpTo": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "changeSize": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "createWorkPackage": {- "href": "/api/v3/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/work_packages",- "method": "post"- }- }- },- "highlightedAttributes": []- },- "_links": {- "self": {- "href": "/api/v3/queries/9",- "title": "fdsfdsfdsf"- },- "results": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "columns": [- {- "href": "/api/v3/queries/columns/id",- "title": "ID"- },- {- "href": "/api/v3/queries/columns/subject",- "title": "Subject"- },- {- "href": "/api/v3/queries/columns/type",- "title": "Type"- },- {- "href": "/api/v3/queries/columns/status",- "title": "Status"- },- {- "href": "/api/v3/queries/columns/priority",- "title": "Priority"- },- {- "href": "/api/v3/queries/columns/assignee",- "title": "Assignee"- },- {- "href": "/api/v3/queries/columns/updated_at",- "title": "Updated on"- }- ],- "highlightedAttributes": [],- "groupBy": {- "href": null,- "title": null- },- "sortBy": [- {- "href": "/api/v3/queries/sort_bys/parent-desc",- "title": "Parent (Descending)"- }- ],- "user": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "project": {- "href": "/api/v3/projects/3",- "title": "copy"- }- }- }--## View query [GET]--Retrieve an individual query as identified by the id parameter. Then end point accepts a number of parameters that can be used to override the resources' persisted parameters.--+ Parameters- + id (required, integer, `1`) ... Query id- + filters = `[{ "status_id": { "operator": "o", "values": null }}]` (optional, string, `[{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]`) ... JSON specifying filter conditions.- The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters.- All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`).- + offset = `1` (optional, integer, `25`) ... Page number inside the queries' result collection of work packages.- + pageSize = `DEPENDING ON CONFIGURATION` (optional, integer, `25`) ... Number of elements to display per page for the queries' result collection of work packages.- + columns = `['type', 'priority']` (optional, object, `[]`) ... Selected columns for the table view.- + sortBy = ["id", "asc"] (optional, string, `[["status", "asc"]]`) ... JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria.- + groupBy (optional, string, `status`) ... The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria.- + showSums = `false` (optional, boolean, `true`) ... Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property.- + timelineVisible = `false` (optional, boolean, `true`) ... Indicates whether the timeline should be shown.- + timelineLabels = `{}` (optional, object, `{}`) ... Overridden labels in the timeline view- + highlightingMode = `inline` (optional, object, `inline`) ... Highlighting mode for the table view.- + highlightedAttributes = `['type', 'priority']` (optional, object, `[]`) ... Highlighted attributes mode for the table view when `highlightingMode` is `inline`. When set to `[]` all highlightable attributes will be returned as `highlightedAttributes`.- + showHierarchies = `true` (optional, boolean, `true`) ... Indicates whether the hierarchy mode should be enabled.--+ Response 200 (application/hal+json)-- [Query][]--+ Response 404 (application/hal+json)-- Returned if the query does not exist or the client does not have sufficient permissions to see it.-- **Required condition:** query belongs to user or query is public-- **Required permission:** view work package in queries project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified query does not exist."- }--## Edit Query [PATCH]--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.--+ Parameters- + id (required, integer, `1`) ... Query id--+ Request (application/json)-- {- "name": "New query name"- }--+ Response 200 (application/hal+json)-- [Query][]--+ 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:** edit work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to edit the content of the work package."- }--+ Response 404 (application/hal+json)-- Returned if the query does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work packages in the query's project (unless global)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified query does not exist."- }--+ Response 422 (application/hal+json)-- Returned if:-- * the client tries to modify a read-only property (`PropertyIsReadOnly`)- * a constraint for a property was violated (`PropertyConstraintViolation`)- * the client provides a link to an invalid resource (`ResourceTypeMismatch`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "The name might not be blank.",- "_embedded": {- "details": {- "attribute": "name"- }- }- }--## Delete query [DELETE]--Delete the query identified by the id parameter--+ Parameters- + id (required, integer, `1`) ... Query id--+ Response 204--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** for own queries none; for public queries: manage public queries-- *Note that you will only receive this error, if you are at least allowed to see the corresponding query.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the query does not exist or the client does not have sufficient permissions to see it.-- **Required condition:** query belongs to user or query is public-- **Required permission:** view work package in queries project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }--## Default Query [/api/v3/queries/default{?offset,pageSize,filters,sortBy,groupBy,showSums,timelineVisible,timelineZoomLevel,showHierarchies,highlightingMode,highlightedAttributes}]--+ Model- + Body-- {- "_type": "Query",- "name": "default",- "filters": [- {- "_type": "StatusQueryFilter",- "name": "Status",- "_links": {- "filter": {- "href": "/api/v3/queries/filters/status",- "title": "Status"- },- "operator": {- "href": "/api/v3/queries/operators/o",- "title": "open"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/status"- },- "values": []- }- }- ],- "public": false,- "sums": false,- "timelineVisible": false,- "timelineZoomLevel": "days",- "timelineLabels": {},- "highlightingMode": "inline",- "showHierarchies": true,- "starred": false,- "_embedded": {- "results": {- "_type": "WorkPackageCollection",- "total": 234,- "count": 30,- "pageSize": 2,- "offset": 1,- "_embedded": {- "elements": [- "<--- shortened for brevity --->"- ]- },- "_links": {- "self": {- "href": "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "jumpTo": {- "href": "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "changeSize": {- "href": "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "createWorkPackage": {- "href": "/api/v3/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/work_packages",- "method": "post"- }- },- "highlightedAttributes": []- }- },- "_links": {- "self": {- "href": "/api/v3/queries/default",- "title": "Default"- },- "results": {- "href": "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "columns": [- {- "href": "/api/v3/queries/columns/id",- "title": "ID"- },- {- "href": "/api/v3/queries/columns/subject",- "title": "Subject"- },- {- "href": "/api/v3/queries/columns/type",- "title": "Type"- },- {- "href": "/api/v3/queries/columns/status",- "title": "Status"- },- {- "href": "/api/v3/queries/columns/priority",- "title": "Priority"- },- {- "href": "/api/v3/queries/columns/assignee",- "title": "Assignee"- },- {- "href": "/api/v3/queries/columns/updated_at",- "title": "Updated on"- }- ],- "highlightedAttributes": [],- "groupBy": {- "href": null,- "title": null- },- "sortBy": [- {- "href": "/api/v3/queries/sort_bys/parent-desc",- "title": "Parent (Descending)"- }- ],- "user": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "project": {- "href": null- }- }- }--## View default query [GET]--Same as [viewing an existing, persisted Query](#queries-query-get) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query.--+ Parameters- + filters = `[{ "status_id": { "operator": "o", "values": null }}]` (optional, string, `[{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]`) ... JSON specifying filter conditions.- The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters.- All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`).- + offset = `1` (optional, integer, `25`) ... Page number inside the queries' result collection of work packages.- + pageSize = `DEPENDING ON CONFIGURATION` (optional, integer, `25`) ... Number of elements to display per page for the queries' result collection of work packages.- + sortBy = ["id", "asc"] (optional, string, `[["status", "asc"]]`) ... JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria.- + groupBy (optional, string, `status`) ... The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria.- + showSums = `false` (optional, boolean, `true`) ... Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property.- + timelineVisible = `false` (optional, boolean, `true`) ... Indicates whether the timeline should be shown.- + timelineZoomLevel = `days` (optional, string, `days`) ... Indicates in what zoom level the timeline should be shown. Valid values are `days`, `weeks`, `months`, `quarters`, and `years`.- + showHierarchies = `true` (optional, boolean, `true`) ... Indicates whether the hierarchy mode should be enabled.--+ Response 200 (application/hal+json)-- [Default Query][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see the default query.-- **Required permission:** view work packages in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Default Query for Project [/api/v3/projects/{id}/queries/default{?offset,pageSize,filters,sortBy,groupBy,showSums,timelineVisible,showHierarchies}]--+ Model- + Body-- {- "_type": "Query",- "name": "default",- "filters": [- {- "_type": "StatusQueryFilter",- "name": "Status",- "_links": {- "filter": {- "href": "/api/v3/queries/filters/status",- "title": "Status"- },- "operator": {- "href": "/api/v3/queries/operators/o",- "title": "open"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/status"- },- "values": []- }- }- ],- "public": false,- "sums": false,- "timelineVisible": false,- "timelineZoomLevel": "days",- "showHierarchies": true,- "starred": false,- "_embedded": {- "results": {- "_type": "WorkPackageCollection",- "total": 234,- "count": 30,- "pageSize": 2,- "offset": 1,- "_embedded": {- "elements": [- "<--- shortened for brevity --->"- ]- },- "_links": {- "self": {- "href": "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "jumpTo": {- "href": "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "changeSize": {- "href": "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "createWorkPackage": {- "href": "/api/v3/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/work_packages",- "method": "post"- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/projects/42/queries/default",- "title": "Default"- },- "results": {- "href": "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "columns": [- {- "href": "/api/v3/queries/columns/id",- "title": "ID"- },- {- "href": "/api/v3/queries/columns/subject",- "title": "Subject"- },- {- "href": "/api/v3/queries/columns/type",- "title": "Type"- },- {- "href": "/api/v3/queries/columns/status",- "title": "Status"- },- {- "href": "/api/v3/queries/columns/priority",- "title": "Priority"- },- {- "href": "/api/v3/queries/columns/assignee",- "title": "Assignee"- },- {- "href": "/api/v3/queries/columns/updated_at",- "title": "Updated on"- }- ],- "groupBy": {- "href": null,- "title": null- },- "sortBy": [- {- "href": "/api/v3/queries/sort_bys/parent-desc",- "title": "Parent (Descending)"- }- ],- "user": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "project": {- "href": "/api/v3/projects/42",- "title": "Lorem ipsum project"-- }- }- }--## View default query for project [GET]--Same as [viewing an existing, persisted Query](#queries-query-get) in its response, this resource returns an unpersisted query and by that allows to get the default query configuration. The client may also provide additional parameters which will modify the default query. The query will already be scoped for the project.--+ Parameters- + id (required, integer, `1`) ... Id of the project the default query is requested for- + filters = `[{ "status_id": { "operator": "o", "values": null }}]` (optional, string, `[{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]`) ... JSON specifying filter conditions.- The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters.- All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`).- + offset = `1` (optional, integer, `25`) ... Page number inside the queries' result collection of work packages.- + pageSize = `DEPENDING ON CONFIGURATION` (optional, integer, `25`) ... Number of elements to display per page for the queries' result collection of work packages.- + sortBy = ["id", "asc"] (optional, string, `[["status", "asc"]]`) ... JSON specifying sort criteria. The sort criteria is applied to the query's result collection of work packages overriding the query's persisted sort criteria.- + groupBy (optional, string, `status`) ... The column to group by. The grouping criteria is applied to the to the query's result collection of work packages overriding the query's persisted group criteria.- + showSums = `false` (optional, boolean, `true`) ... Indicates whether properties should be summed up if they support it. The showSums parameter is applied to the to the query's result collection of work packages overriding the query's persisted sums property.- + timelineVisible = `false` (optional, boolean, `true`) ... Indicates whether the timeline should be shown.- + showHierarchies = `true` (optional, boolean, `true`) ... Indicates whether the hierarchy mode should be enabled.--+ Response 200 (application/hal+json)-- [Default Query for Project][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see the default query.-- **Required permission:** view work packages in the project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the client does not have sufficient permissions to see the project.-- **Required permission:** any permission in the project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }--## Star Query [/api/v3/queries/{id}/star]--+ Model- + Body-- {- "_type": "Query",- "id": 9,- "name": "fdsfdsfdsf",- "createdAt": "2015-03-20T12:56:56Z",- "updatedAt": "2015-05-20T18:16:53Z",- "filters": [- {- "_type": "StatusQueryFilter",- "name": "Status",- "_links": {- "filter": {- "href": "/api/v3/queries/filters/status",- "title": "Status"- },- "operator": {- "href": "/api/v3/queries/operators/o",- "title": "open"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/status"- },- "values": []- }- },- {- "_type": "DueDateQueryFilter",- "name": "Finish date",- "values": [- "1"- ],- "_links": {- "filter": {- "href": "/api/v3/queries/filters/dueDate",- "title": "Finish date"- },- "operator": {- "href": "/api/v3/queries/operators/<t+",- "title": "in less than"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/dueDate"- }- }- }- ],- "public": false,- "sums": false,- "starred": true,- "_embedded": {- "results": {- "_type": "WorkPackageCollection",- "total": 234,- "count": 30,- "pageSize": 2,- "offset": 1,- "_embedded": {- "elements": [- "<--- shortened for brevity --->"- ]- },- "_links": {- "self": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "jumpTo": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "changeSize": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "createWorkPackage": {- "href": "/api/v3/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/work_packages",- "method": "post"- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/queries/9",- "title": "fdsfdsfdsf"- },- "results": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "columns": [- {- "href": "/api/v3/queries/columns/id",- "title": "ID"- },- {- "href": "/api/v3/queries/columns/subject",- "title": "Subject"- },- {- "href": "/api/v3/queries/columns/type",- "title": "Type"- },- {- "href": "/api/v3/queries/columns/status",- "title": "Status"- },- {- "href": "/api/v3/queries/columns/priority",- "title": "Priority"- },- {- "href": "/api/v3/queries/columns/assignee",- "title": "Assignee"- },- {- "href": "/api/v3/queries/columns/updated_at",- "title": "Updated on"- }- ],- "groupBy": {- "href": null,- "title": null- },- "sortBy": [- {- "href": "/api/v3/queries/sort_bys/parent-desc",- "title": "Parent (Descending)"- }- ],- "user": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "project": {- "href": "/api/v3/projects/3",- "title": "copy"- }- }- }--## Star query [PATCH]--+ Parameters- + id (required, integer, `1`) ... Query id--+ Response 200 (application/hal+json)-- [Star Query][]--+ Response 400 (application/hal+json)-- Occurs when the client did not send an empty request body.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody",- "message": "The request body was not empty."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** for own queries none; for public queries: manage public queries-- *Note that you will only receive this error, if you are at least allowed to see the corresponding query.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to star this query."- }--+ Response 404 (application/hal+json)-- Returned if the query does not exist or the client does not have sufficient permissions to see it.-- **Required condition:** query belongs to user or query is public-- **Required permission:** view work package in queries project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified query does not exist."- }--## Unstar Query [/api/v3/queries/{id}/unstar]--+ Model- + Body-- {- "_type": "Query",- "id": 9,- "name": "fdsfdsfdsf",- "createdAt": "2015-03-20T12:56:56Z",- "updatedAt": "2015-05-20T18:16:53Z",- "filters": [- {- "_type": "StatusQueryFilter",- "name": "Status",- "_links": {- "filter": {- "href": "/api/v3/queries/filters/status",- "title": "Status"- },- "operator": {- "href": "/api/v3/queries/operators/o",- "title": "open"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/status"- },- "values": []- }- },- {- "_type": "DueDateQueryFilter",- "name": "Finish date",- "values": [- "1"- ],- "_links": {- "filter": {- "href": "/api/v3/queries/filters/dueDate",- "title": "Finish date"- },- "operator": {- "href": "/api/v3/queries/operators/<t+",- "title": "in less than"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/dueDate"- }- }- }- ],- "public": false,- "sums": false,- "starred": false,- "_embedded": {- "results": {- "_type": "WorkPackageCollection",- "total": 234,- "count": 30,- "pageSize": 2,- "offset": 1,- "_embedded": {- "elements": [- "<--- shortened for brevity --->"- ]- },- "_links": {- "self": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "jumpTo": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "changeSize": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "createWorkPackage": {- "href": "/api/v3/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/work_packages",- "method": "post"- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/queries/9",- "title": "fdsfdsfdsf"- },- "results": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "columns": [- {- "href": "/api/v3/queries/columns/id",- "title": "ID"- },- {- "href": "/api/v3/queries/columns/subject",- "title": "Subject"- },- {- "href": "/api/v3/queries/columns/type",- "title": "Type"- },- {- "href": "/api/v3/queries/columns/status",- "title": "Status"- },- {- "href": "/api/v3/queries/columns/priority",- "title": "Priority"- },- {- "href": "/api/v3/queries/columns/assignee",- "title": "Assignee"- },- {- "href": "/api/v3/queries/columns/updated_at",- "title": "Updated on"- }- ],- "groupBy": {- "href": null,- "title": null- },- "sortBy": [- {- "href": "/api/v3/queries/sort_bys/parent-desc",- "title": "Parent (Descending)"- }- ],- "user": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "project": {- "href": "/api/v3/projects/3",- "title": "copy"- }- }- }--## Unstar query [PATCH]--+ Parameters- + id (required, integer, `1`) ... Query id--+ Response 200 (application/hal+json)-- [Unstar Query][]--+ Response 400 (application/hal+json)-- Occurs when the client did not send an empty request body.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody",- "message": "The request body was not empty."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** for own queries none; for public queries: manage public queries-- *Note that you will only receive this error, if you are at least allowed to see the corresponding query.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to unstar this query."- }--+ Response 404 (application/hal+json)-- Returned if the query does not exist or the client does not have sufficient permissions to see it.-- **Required condition:** query belongs to user or query is public-- **Required permission:** view work package in queries project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified query does not exist."- }--## Queries [/api/v3/queries{?filters}]--+ Model- + Body-- {- "_links":- {- "self":- {- "href": "/api/v3/queries"- }- },- "total": 1,- "count": 1,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_type": "Query",- "id": 9,- "name": "fdsfdsfdsf",- "createdAt": "2015-03-20T12:56:56Z",- "updatedAt": "2015-05-20T18:16:53Z",- "filters": [- {- "_type": "StatusQueryFilter",- "name": "Status",- "_links": {- "filter": {- "href": "/api/v3/queries/filters/status",- "title": "Status"- },- "operator": {- "href": "/api/v3/queries/operators/o",- "title": "open"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/status"- },- "values": []- }- },- {- "_type": "DueDateQueryFilter",- "name": "Finish date",- "values": [- "1"- ],- "_links": {- "filter": {- "href": "/api/v3/queries/filters/dueDate",- "title": "Finish date"- },- "operator": {- "href": "/api/v3/queries/operators/<t+",- "title": "in less than"- },- "schema": {- "href": "/api/v3/queries/filter_instance_schemas/dueDate"- }- }- }- ],- "public": false,- "sums": false,- "starred": true,- "_embedded": {- "results": {- "_type": "WorkPackageCollection",- "total": 234,- "count": 30,- "pageSize": 2,- "offset": 1,- "_embedded": {- "elements": [- "<--- shortened for brevity --->"- ]- },- "_links": {- "self": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "jumpTo": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "changeSize": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D",- "templated": true- },- "createWorkPackage": {- "href": "/api/v3/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/work_packages",- "method": "post"- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/queries/9",- "title": "fdsfdsfdsf"- },- "results": {- "href": "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"- },- "columns": [- {- "href": "/api/v3/queries/columns/id",- "title": "ID"- },- {- "href": "/api/v3/queries/columns/subject",- "title": "Subject"- },- {- "href": "/api/v3/queries/columns/type",- "title": "Type"- },- {- "href": "/api/v3/queries/columns/status",- "title": "Status"- },- {- "href": "/api/v3/queries/columns/priority",- "title": "Priority"- },- {- "href": "/api/v3/queries/columns/assignee",- "title": "Assignee"- },- {- "href": "/api/v3/queries/columns/updated_at",- "title": "Updated on"- }- ],- "groupBy": {- "href": null,- "title": null- },- "sortBy": [- {- "href": "/api/v3/queries/sort_bys/parent-desc",- "title": "Parent (Descending)"- }- ],- "user": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin"- },- "project": {- "href": "/api/v3/projects/3",- "title": "copy"- }- }- }- ]- }- }--## List queries [GET]--Returns a collection of queries. The collection can be filtered via query parameters similar to how work packages are filtered. Please note however, that the filters are applied to the queries and not to the work packages the queries in turn might return.--+ Parameters- + filters (optional, string, `[{ "project_id": { "operator": "!*", "values": null }" }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint.- Currently supported filters are:- + project: filters queries by the project they are assigned to. If the project filter is passed with the `!*` (not any) operator, global queries are returned.- + id: filters queries based on their id- + updated_at: filters queries based on the last time they where updated--+ Response 200 (application/hal+json)-- [Queries][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see queries.-- **Required permission:** view work packages or manage public queries in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see the queries."- }--## Create query [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 Query 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.--+ Response 201 (application/hal+json)-- [Query][]--+ 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 422 (application/hal+json)-- Returned if:-- * the client tries to modify a read-only property (`PropertyIsReadOnly`)- * a constraint for a property was violated (`PropertyConstraintViolation`)- * the client provides a link to an invalid resource (`ResourceTypeMismatch`),- e.g. a user, project or operator not found-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Project not found",- "_embedded": {- "details": {- "attribute": "project"- }- }- }--## Query Create Form [/api/v3/queries/form]--This endpoint returns a form to allow a guided creation of a new query.-The returned form will be pre-filled with default values for every property, if available.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Query Create Form [POST]--+ Response 200 (application/hal+json)--Returns the form resource that was created. See [Forms](/docs/api/forms) section for details.---## Schema For Global Queries [/api/v3/queries/schema]--+ Model- + Body-- {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "user": {- "type": "User",- "name": "User",- "required": true,- "hasDefault": true,- "writable": false- },- "project": {- "type": "Project",- "name": "Project",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {}- },- "public": {- "type": "Boolean",- "name": "Public",- "required": false,- "hasDefault": true,- "writable": true- },- "sums": {- "type": "Boolean",- "name": "Sums",- "required": false,- "hasDefault": true,- "writable": true- },- "timelineVisible": {- "type": "Boolean",- "name": "Timeline visible",- "required": false,- "hasDefault": true,- "writable": true- },- "timelineZoomLevel": {- "type": "String",- "name": "Timeline zoom level",- "required": false,- "hasDefault": true,- "writable": true- },- "timelineLabels": {- "type": "QueryTimelineLabels",- "name": "Timeline labels",- "required": false,- "hasDefault": true,- "writable": true- },- "highlightingMode": {- "type": "String",- "name": "Highlighting mode",- "required": false,- "hasDefault": true,- "writable": true- },- "highlightedAttributes": {- "type": "[]QueryColumn",- "name": "Highlighted attributes",- "required": false,- "hasDefault": true,- "writable": true,- "location": "_links"- },- "showHierarchies": {- "type": "Boolean",- "name": "Show hierarchies",- "required": false,- "hasDefault": true,- "writable": true- },- "starred": {- "type": "Boolean",- "name": "Starred",- "required": false,- "hasDefault": true,- "writable": true- },- "columns": {- "type": "[]QueryColumn",- "name": "Columns",- "required": false,- "hasDefault": true,- "writable": true,- "location": "_links",- "_links": {}- },- "filters": {- "type": "[]QueryFilterInstance",- "name": "Filters",- "required": false,- "writable": true,- "hasDefault": true,- "location": "_links",- "_links": {- "allowedValuesSchemas": {- "href": "/api/v3/queries/filter_instance_schemas"- }- }- },- "groupBy": {- "type": "[]QueryGroupBy",- "name": "Group results by",- "required": false,- "hasDefault": false,- "writable": true,- "_links": {}- },- "sortBy": {- "type": "[]QuerySortBy",- "name": "Sort by",- "required": false,- "hasDefault": true,- "writable": true,- "_links": {}- },- "results": {- "type": "WorkPackageCollection",- "name": "Results",- "required": false,- "hasDefault": false,- "writable": false- },- "_embedded": {- "filtersSchemas": {- "_type": "Collection",- "total": 20,- "count": 20,- "_embedded": {- "elements": [- {- "_type": "QueryFilterInstanceSchema",- "_dependencies": [- {- "_type": "SchemaDependency",- "on": "operator",- "dependencies": {- "/api/v3/queries/operators/=": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!*": {},- "/api/v3/queries/operators/*": {}- }- }- ],- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": true,- "writable": false- },- "filter": {- "type": "QueryFilter",- "name": "Filter",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas/assignee"- },- "filter": {- "href": "/api/v3/queries/filters/assignee",- "title": "Assignee"- }- }- },- {- "_type": "QueryFilterInstanceSchema",- "_dependencies": [- {- "_type": "SchemaDependency",- "on": "operator",- "dependencies": {- "/api/v3/queries/operators/=": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- }- }- }- ],- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": true,- "writable": false- },- "filter": {- "type": "QueryFilter",- "name": "Filter",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas/author"- },- "filter": {- "href": "/api/v3/queries/filters/author",- "title": "Author"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas"- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/queries/schema"- }- }- }--## View schema for global queries [GET]--Retrieve the schema for global queries, those, that are not assigned to a project.--+ Response 200 (application/hal+json)-- [Schema For Global Queries][]--+ Response 403 (application/hal+json)-- **Required permission:** view work package in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Schema For Project Queries [/api/v3/projects/{id}/queries/schema]--+ Model- + Body-- {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "user": {- "type": "User",- "name": "User",- "required": true,- "hasDefault": true,- "writable": false- },- "project": {- "type": "Project",- "name": "Project",- "required": false,- "hasDefault": false,- "writable": true,- "_links": {}- },- "public": {- "type": "Boolean",- "name": "Public",- "required": false,- "hasDefault": true,- "writable": true- },- "sums": {- "type": "Boolean",- "name": "Sums",- "required": false,- "hasDefault": true,- "writable": true- },- "timelineVisible": {- "type": "Boolean",- "name": "Timeline visible",- "required": false,- "hasDefault": true,- "writable": true- },- "timelineZoomLevel": {- "type": "String",- "name": "Timeline zoom level",- "required": false,- "hasDefault": true,- "writable": true- },- "showHierarchies": {- "type": "Boolean",- "name": "Show hierarchies",- "required": false,- "hasDefault": true,- "writable": true- },- "starred": {- "type": "Boolean",- "name": "Starred",- "required": false,- "hasDefault": true,- "writable": true- },- "columns": {- "type": "[]QueryColumn",- "name": "Columns",- "required": false,- "hasDefault": true,- "writable": true,- "_links": {}- },- "filters": {- "type": "[]QueryFilterInstance",- "name": "Filters",- "required": false,- "writable": true,- "hasDefault": true,- "_links": {- "allowedValuesSchemas": {- "href": "/api/v3/projects/42/queries/filter_instance_schemas"- }- }- },- "groupBy": {- "type": "[]QueryGroupBy",- "name": "Group results by",- "required": false,- "hasDefault": false,- "writable": true,- "_links": {}- },- "sortBy": {- "type": "[]QuerySortBy",- "name": "Sort by",- "required": false,- "hasDefault": true,- "writable": true,- "_links": {}- },- "results": {- "type": "WorkPackageCollection",- "name": "Results",- "required": false,- "hasDefault": false,- "writable": false- },- "_embedded": {- "filtersSchemas": {- "_type": "Collection",- "total": 20,- "count": 20,- "_embedded": {- "elements": [- {- "_type": "QueryFilterInstanceSchema",- "_dependencies": [- {- "_type": "SchemaDependency",- "on": "operator",- "dependencies": {- "/api/v3/queries/operators/=": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!*": {},- "/api/v3/queries/operators/*": {}- }- }- ],- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": true,- "writable": false- },- "filter": {- "type": "QueryFilter",- "name": "Filter",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas/assignee"- },- "filter": {- "href": "/api/v3/queries/filters/assignee",- "title": "Assignee"- }- }- },- {- "_type": "QueryFilterInstanceSchema",- "_dependencies": [- {- "_type": "SchemaDependency",- "on": "operator",- "dependencies": {- "/api/v3/queries/operators/=": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- }- }- }- ],- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": true,- "writable": false- },- "filter": {- "type": "QueryFilter",- "name": "Filter",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas/author"- },- "filter": {- "href": "/api/v3/queries/filters/author",- "title": "Author"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/projects/42/queries/filter_instance_schemas"- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/projects/42/queries/schema"- }- }- }--## View schema for project queries [GET]--Retrieve the schema for project queries.--+ Parameters-- + id (required, integer, `1`) ... Project id--+ Response 200 (application/hal+json)-- [Schema For Project Queries][]--+ Response 403 (application/hal+json)-- **Required permission:** view work package in the project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }---## Available projects for query [/api/v3/queries/available_projects]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/queries/available_projects"- }- },- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded": {- "elements": [- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/6",- "title": "A project"- },- "createWorkPackage": {- "href": "/api/v3/projects/6/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/6/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/6/categories"- },- "versions": {- "href": "/api/v3/projects/6/versions"- }- },- "id": 6,- "identifier": "a_project",- "name": "A project",- "description": "Eveniet molestias omnis quis aut qui eum adipisci.",- "createdAt": "2015-07-06T13:28:14+00:00",- "updatedAt": "2015-10-01T09:55:02+00:00",- "type": "Customer Project"- },- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/14",- "title": "Another project"- },- "createWorkPackage": {- "href": "/api/v3/projects/14/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/14/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/14/categories"- },- "versions": {- "href": "/api/v3/projects/14/versions"- }- },- "id": 14,- "identifier": "another_project",- "name": "Another project",- "description": "",- "createdAt": "2016-02-29T12:50:20+00:00",- "updatedAt": "2016-02-29T12:50:20+00:00",- "type": null- }- ]- }- }--## Available projects for query [GET]--Gets a list of projects that are available as projects a query can be assigned to.--+ Response 200 (application/hal+json)-- [Available projects for query][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work packages-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--# Group Query Columns--A QueryColumn can be referenced by a Query to denote the work package properties the client should display for the work packages returned as query results. The columns maps to the WorkPackage by the id property. QueryColumns exist in three types: QueryColumn::Property, QueryColumn::RelationToType and QueryColumn::RelationOfType.--## Actions--| Link | Description | Condition |-|:-------------------:|----------------------------------------------------------------------| ---------------------------------------|--As of now, no actions are defined.--## Linked Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |-| self | This query column | QueryColumn::Property, QueryColumn::RelationToType or QueryColumn::RelationOfType | not null | READ |-| type | The type relations point to | Type | not null, exists only on QueryColumn::Relation | READ |--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |-| id | Query column id | String | not null | READ |-| name | Query column name | String | not null | READ |--## Query Column [/api/v3/queries/columns/{id}]--+ Model- + Body-- {- "_type": "QueryColumn::Property",- "id": "priority",- "name": "Priority",- "_links": {- "self": {- "href": "/api/v3/queries/columns/priority",- "title": "Priority"- }- }- }--## View Query Column [GET]--Retrieve an individual QueryColumn as identified by the `id` parameter.--+ Parameters- + id (required, string, `priority`) ... QueryColumn id--+ Response 200 (application/hal+json)-- [Query Column][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see it.-- **Required permission:** view work package in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the QueryColumn does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified query does not exist."- }--# Group Query Filters--A QueryFilter can be referenced by a filter instance defined for a Query to denote the filtering applied to the query's work package results. This resource is not an instance of an applicable filter but rather the type an applicable filter can have.--## Actions--| Link | Description | Condition |-|:-------------------:|----------------------------------------------------------------------| ---------------------------------------|--As of now, no actions are defined.--## Linked Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |-| self | This query filter | QueryFilter | not null | READ |--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |-| id | QueryFilter id | String | not null | READ |--## Query Filter [/api/v3/queries/filters/{id}]--+ Model- + Body-- {- "_type": "QueryFilter",- "id": "status",- "_links": {- "self": {- "href": "/api/v3/queries/filters/status",- "title": "Status"- }- }- }--## View Query Filter [GET]--Retrieve an individual QueryFilter as identified by the id parameter.--+ Parameters- + id (required, string, `status`) ... QueryFilter identifier.--+ Response 200 (application/hal+json)-- [Query Filter][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see it.-- **Required permission:** view work package in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the QueryFilter does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified query does not exist."- }--# Group Query Operators--A QueryOperator can be referenced by a QueryFilter to denote the operator to be applied to the filter relation.--## Actions--| Link | Description | Condition |-|:-------------------:|----------------------------------------------------------------------| ---------------------------------------|--As of now, no actions are defined.--## Linked Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |-| self | This query operator | QueryOperator | not null | READ |--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |-| id | Query operator id | String | not null | READ |-| name | Query operator name | String | not null | READ |--## Query Operator [/api/v3/queries/operators/{id}]--+ Model- + Body-- {- "_type": "QueryOperator",- "id": "!",- "name": "is not",- "_links": {- "self": {- "href": "/api/v3/queries/operators/!",- "title": "is not"- }- }- }--## View Query Operator [GET]--Retrieve an individual QueryOperator as identified by the `id` parameter.--+ Parameters- + id (required, string, `!`) ... QueryOperator id--+ Response 200 (application/hal+json)-- [Query Operator][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see it.-- **Required permission:** view work package in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the QueryOperator does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified query does not exist."- }--# Group Query Sort Bys--A QuerySortBy can be referenced by a Query to denote the sorting applied to the query's work package results. It consists of the columns to sort by as well as the direction (ascending/descending)--## Actions--| Link | Description | Condition |-|:-------------------:|----------------------------------------------------------------------| ---------------------------------------|--As of now, no actions are defined.--## Linked Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |-| self | This query sort by | QuerySortBy | not null | READ |-| column | The QueryColumn to sort on. | QueryColumn | not null | READ |-| direction | The direction the QueryColumn is to be sorted in. This property is identified by a URI (`urn:openproject-org:api:v3:queries:directions:asc` or `urn:openproject-org:api:v3:queries:directions:desc`) instead of by a URL. | | not null | READ |--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |-| id | QuerySortBy id | String | not null | READ |-| name | QuerySortBy name | String | not null | READ |--## Query Sort By [/api/v3/queries/sort_bys/{id}]--+ Model- + Body-- {- "_type": "QuerySortBy",- "id": "status-asc",- "name": "Status (Ascending)",- "_links": {- "self": {- "href": "/api/v3/queries/sort_bys/status-asc",- "title": "Status (Ascending)"- },- "column": {- "href": "/api/v3/queries/columns/status",- "title": "Status"- },- "direction": {- "href": "urn:openproject-org:api:v3:queries:directions:asc",- "title": "Ascending"- }- }- }--## View Query Sort By [GET]--Retrieve an individual QuerySortBy as identified by the id parameter.--+ Parameters- + id (required, string, `status-asc`) ... QuerySortBy identifier. The identifier is a combination of the column identifier and the direction.--+ Response 200 (application/hal+json)-- [Query Sort By][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see it.-- **Required permission:** view work package in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the QuerySortBy does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified query does not exist."- }--## Group Query Filter Instance Schema--A QueryFilterInstanceSchema is a Schema specifically for describing QueryFilterInstances. Because the behaviour of FilterInstances, with regards to the `values` property, differs from one another depending on the chosen Filter, the QueryFilterInstanceSchema explicitly lists the dependencies in its `_dependencies` property. As the property causing the difference is the selected Filter, that property is linked. Apart from that, a QueryFilterInstanceSchema has the same structure a Schema does.--## Linked Properties--| Link | Description | Type | Constraints | Supported operations |-| :-------------------: | ---------------------------------------- | ------------- | -------- | -------------------- |-| self | This QueryFilterInstanceSchema (same as for schema) | QueryFilterInstanceSchema | not null | READ |-| filter | The filter for which this schema is specific | Filter | not null | READ |--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ------------ | -------------------------------- | -------------------- |-| name | Describes the name attribute | Field schema | not null | READ |-| filter | QuerySortBy name | Field schema | not null | READ |---## Query Filter Instance Schema [/api/v3/queries/filter_instance_schemas/{identifier}]--+ Model- + Body-- {- "_type": "QueryFilterInstanceSchema",- "_dependencies": [- {- "_type": "SchemaDependency",- "on": "operator",- "dependencies": {- "/api/v3/queries/operators/=": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- }- }- }- ],- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": true,- "writable": false- },- "filter": {- "type": "QueryFilter",- "name": "Filter",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas/author"- },- "filter": {- "href": "/api/v3/queries/filters/author",- "title": "Author"- }- }- }--## View Query Filter Instance Schema [GET]--Retrieve an individual QueryFilterInstanceSchema as identified by the id parameter.--+ Parameters- + identifier (required, string, `author`) ... QueryFilterInstanceSchema identifier. The identifier is the filter identifier.--+ Response 200 (application/hal+json)-- [Query Filter Instance Schema][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see it.-- **Required permission:** view work package in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the QueryFilterInstanceSchema does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified query does not exist."- }--## Query Filter Instance Schemas [/api/v3/queries/filter_instance_schemas]--+ Model- + Body-- {- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded": {- "elements": [- {- "_type": "QueryFilterInstanceSchema",- "_dependencies": [- {- "_type": "SchemaDependency",- "on": "operator",- "dependencies": {- "/api/v3/queries/operators/=": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!*": {},- "/api/v3/queries/operators/*": {}- }- }- ],- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": true,- "writable": false- },- "filter": {- "type": "QueryFilter",- "name": "Filter",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas/assignee"- },- "filter": {- "href": "/api/v3/queries/filters/assignee",- "title": "Assignee"- }- }- },- {- "_type": "QueryFilterInstanceSchema",- "_dependencies": [- {- "_type": "SchemaDependency",- "on": "operator",- "dependencies": {- "/api/v3/queries/operators/=": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- }- }- }- ],- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": true,- "writable": false- },- "filter": {- "type": "QueryFilter",- "name": "Filter",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas/author"- },- "filter": {- "href": "/api/v3/queries/filters/author",- "title": "Author"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas"- }- }- }--## List Query Filter Instance Schemas [GET]--Returns the list of QueryFilterInstanceSchemas defined for a global query. That is a query not assigned to a project.--+ Response 200 (application/hal+json)-- [Query Filter Instance Schemas][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see it.-- **Required permission:** view work package in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",- "message": "You are not authorized to access this resource."- }--## Query Filter Instance Schemas For Project [/api/v3/projects/{id}/queries/filter_instance_schemas]--+ Model- + Body-- {- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded": {- "elements": [- {- "_type": "QueryFilterInstanceSchema",- "_dependencies": [- {- "_type": "SchemaDependency",- "on": "operator",- "dependencies": {- "/api/v3/queries/operators/=": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!*": {},- "/api/v3/queries/operators/*": {}- }- }- ],- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": true,- "writable": false- },- "filter": {- "type": "QueryFilter",- "name": "Filter",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas/assignee"- },- "filter": {- "href": "/api/v3/queries/filters/assignee",- "title": "Assignee"- }- }- },- {- "_type": "QueryFilterInstanceSchema",- "_dependencies": [- {- "_type": "SchemaDependency",- "on": "operator",- "dependencies": {- "/api/v3/queries/operators/=": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- },- "/api/v3/queries/operators/!": {- "values": {- "type": "[]User",- "name": "Values",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- }- }- }- }- ],- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": true,- "writable": false- },- "filter": {- "type": "QueryFilter",- "name": "Filter",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/queries/filter_instance_schemas/author"- },- "filter": {- "href": "/api/v3/queries/filters/author",- "title": "Author"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/projects/42/queries/filter_instance_schemas"- }- }- }--## List Query Filter Instance Schemas for Project[GET]--Returns the list of QueryFilterInstanceSchemas defined for a query of the specified project.--+ Parameters- + id (required, integer, `1`) ... Id of the project.--+ Response 200 (application/hal+json)-- [Query Filter Instance Schemas For Project][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see it.-- **Required permission:** view work package in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",- "message": "You are not authorized to access this resource."- }diff --git a/docs/api/apiv3/endpoints/relations.apib b/docs/api/apiv3/endpoints/relations.apibdeleted file mode 100644index f37ca7cf7e3..00000000000--- a/docs/api/apiv3/endpoints/relations.apib+++ /dev/null@@ -1,547 +0,0 @@-# Group Relations--Work packages may be related to each other in different ways.--```-+--------------+ +--------------+-| | 1 1 | |-| Work package +-------------+--------------+ Work package |-| | from | to | |-+--------------+ | +--------------+- +------+-------+- | Relation |- +--------------+- | type |- | reverseType |- | description |- | delay |- +--------------+-```--## Actions--| Link | Description | Condition |-|:-------------------:| -------------------------------------------------------------------- | --------------------------------------------- |-| update | Updates the relation between two work packages via a form | **Permission**: manage work package relations |-| updateImmediately | Updates the relation between two work packages | **Permission**: manage work package relations |-| delete | Destroys the relation between the two work packages | **Permission**: manage work package relations |--## Linked Properties-| Link | Description | Type | Constraints | Supported operations | Condition |-|:-------------:|-------------------------------------- | ------------- | ----------- | -------------------- | --------------------------------------------- |-| self | This relation | Relation | not null | READ | **Permission**: view work packages |-| schema | The schema of this relation | Schema | not null | READ | |-| from | The emanating work package | WorkPackage | not null | READ | **Permission**: view work packages |-| to | The work package the relation ends in | WorkPackage | not null | READ | **Permission**: view work packages |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :---------------:| ------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------- | -------------------- |-| id | Relation ID | Integer | x > 0 | READ |-| name | The internationalized name of this kind of relation | String | | READ-| type | Which kind of relation (blocks, precedes, etc.) | String | in: relates, duplicates, duplicated, blocks, blocked, precedes, follows, includes, partof, requires, required | READ / WRITE |-| reverseType | The kind of relation from the other WP's perspective | String | in: relates, duplicates, duplicated, blocks, blocked, precedes, follows, includes, partof, requires, required | READ |-| description | Short text further describing the relation | String | | READ / WRITE |-| delay* | The delay in days between closing of `from` and start of `to` | Integer | x >= 0 | READ / WRITE |--\* Only applicable for some relation types such as "follows". You can check using the relation by schema-endpoint at `/api/v3/relations/schema/{type}`.--## Relation [/api/v3/relations/{id}]--+ Model- + Body-- {- "_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- }--## View Relation [GET]--+ Parameters-- + id (required, integer, `1`) ... Relation id--+ Response 200 (application/hal+json)-- [Relation][]--+ Response 404 (application/hal+json)-- Returned if the relation does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work packages for the involved work packages-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified relation does not exist."- }--## Edit Relation [PATCH]--When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body.-It is only allowed to provide properties or links supporting the **write** operation.--Note that changing the `type` of a relation invariably also changes the respective `reverseType` as well as the "name" of it.-The returned Relation object will reflect that change. For instance if you change a Relation's-`type` to "follows" then the `reverseType` will be changed to `precedes`.--+ Parameters-- + id (required, integer, `1`) ... Relation ID--+ Request Update Relation (application/json)-- + Body-- {- "type": "blocks",- "description": "Actually the supplier has to bend the steel before they can deliver it."- "delay": 3- }--+ Response 200 (application/hal+json)-- [Relation][]--+ 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 404 (application/hal+json)-- Returned if the relation does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** manage work package relations-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified relation does not exist."- }--+ Response 422 (application/hal+json)-- Returned if:-- * the client tries to modify a read-only property (`PropertyIsReadOnly`)- * a constraint for a property was violated (`PropertyConstraintViolation`)- * the client provides a link to an invalid resource (`ResourceTypeMismatch`) or a- work package that does not exist or for which the client does not have sufficient permissions- to see it (**required permissions**: `view work packages` for the involved work packages).-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Delay must be a number greater than or equal to 0",- "_embedded": {- "details": {- "attribute": "delay"- }- }- }--## Delete Relation [DELETE]--Deletes the relation.--+ Parameters-- + id (required, integer, `1`) ... Relation ID--+ Response 204 (application/hal+json)-- Returned if the relation was deleted successfully.- The response body is empty.-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** manage work package relations-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to delete this relation."- }--+ Response 404 (application/hal+json)-- Returned if the relation does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** manage work package relations-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified relation does not exist."- }--## Relation schema [/api/v3/relations/schema]--+ Model- + Body-- {- "_type": "Schema",- "_links": {- "self": { "href": "/api/v3/relations/schema" }- },-- "id": {- "name": "ID",- "type": "Integer",- "writable": false- },- "type": {- "name": "Type",- "type": "String",- "writable": true- },- "reverseType": {- "name": "Reverse Type",- "type": "String",- "writable": false- },- "description": {- "name": "Description",- "type": "String",- "writable": true- },- "from": {- "name": "From work package",- "type": "WorkPackage",- "writable": false- },- "to": {- "name": "To work package",- "type": "WorkPackage",- "writable": false- },- "delay": {- "name": "Delay",- "type": "Integer",- "writable": true- }- }--## View relation schema [GET]--+ Response 200 (application/hal+json)-- [Relation schema][]--## Relation schema for type [/api/v3/relations/schema/{type}]--The exact schema for a relation may depend on it's type.-For instance the "follows" relation has an additional "delay" field which is not-applicable for the other relations.--## View relation schema for type [GET]--+ Parameters-- + type (required, string, `follows`) ... Type of the schema--+ Response 200 (application/hal+json)-- [Relation schema][]--+ Response 404 (application/hal+json)-- Returned if the relation type does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** manage work package relations-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified relation type does not exist."- }--## Relations [/api/v3/relations{?filters,sortBy}]--+ Model- + Body-- {- "_links":- {- "self":- {- "href": "/api/v3/relations"- }- },- "total": 3,- "count": 1,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_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- }- ]- }- }--## List Relations [GET]--Lists all relations according to the given (optional, logically conjunctive) filters and ordered by ID.-The response only includes relations between work packages which the user is allowed to see.--+ Parameters- + filters (optional, string, `[{ "from": { "operator": "=", "values": 42 }" }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint. Valid fields to filter by are:- + id - ID of relation- + from - ID of work package from which the filtered relations emanates.- + to - ID of work package to which this related points.- + involved - ID of either the `from` or the `to` work package.- + type - The type of relation to filter by, e.g. "follows".-- + sortBy (optional, string, `[["type", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint.--+ Response 200 (application/hal+json)-- [Relations][]--## Relation edit form [/api/v3/relations/{id}/form]--This endpoint returns a form to allow a guided creation of a new work package relation.-The returned form will be pre-filled with default values for every property, if available.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/relations/form" },- "validate": {- "href": "/api/v3/relations/form",- "method": "POST"- },- "commit": {- "href": "/api/v3/relations",- "method": "PATCH"- }- },-- "_type": "Form",-- "_embedded": {- "payload": {- "_links": {- "from": { "href": "/api/v3/work_packages/4534" },- "to": { "href": "/api/v3/work_packages/3857" }- },- "_type": "WorkPackage",- "type": "follows",- "delay": 3,- "description": "let it rest for 3 days"- },- "schema": {- "_type": "Schema",- "_links": {- "self": { "href": "/api/v3/relations/schema" }- },-- "id": {- "name": "ID",- "type": "Integer",- "writable": false- },- "type": {- "name": "Type",- "type": "String",- "writable": true,- "allowedValues": [- "relates", "duplicates", "duplicated", "blocks", "blocked",- "precedes", "follows", "includes", "partof", "requires", "required"- ]- },- "reverseType": {- "name": "Reverse Type",- "type": "String",- "writable": false- },- "description": {- "name": "Description",- "type": "String",- "writable": true- },- "from": {- "name": "From work package",- "type": "WorkPackage",- "writeable": false- },- "to": {- "name": "To work package",- "type": "WorkPackage",- "writable": false- },- "delay": {- "name": "Delay",- "type": "Integer",- "writable": true- }- },- "validationErrors": {- "from": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:BadExampleError",- "message": "For the purpose of this example we need a validation error. The remainder of the response pretends there were no errors."- }- }- }- }--## Relation edit form [POST]--+ Request-- {- "_type": "Relation",- "type": "follows",- "description": "let it rest for 3 days",- "delay": 3- }--+ Parameters- + id (required, integer, `1`) ... ID of the relation being modified--+ Response 200 (application/hal+json)-- [Relation edit form][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** manage work package relations-- *Note that you will only receive this error, if you are at least allowed to see the involved work packages.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to edit the specified relation."- }--+ Response 404 (application/hal+json)-- Returned if the relation does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view (involved) work package(s), manage work package relations-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified relation does not exist."- }diff --git a/docs/api/apiv3/endpoints/render.apib b/docs/api/apiv3/endpoints/render.apibdeleted file mode 100644index 60e53be6780..00000000000--- a/docs/api/apiv3/endpoints/render.apib+++ /dev/null@@ -1,93 +0,0 @@-# Group Previewing--Throughout OpenProject user input for many properties can be formatted using *Markdown*.-Using the appropriate rendering endpoint it is possible to render custom formatted inputs into HTML and thus-receive a preview of the rendered text.--The request to a rendering endpoint must always have a MIME-Type of `text/plain`.-The request body is the actual string that shall be rendered as HTML string.--## Markdown [/api/v3/render/markdown{?context}]--+ Model- + Body-- <p>Hello world! <a href="http://example.com">This</a> <strong>is</strong> markdown!</p>--## Preview Markdown document [POST]--+ Parameters- + context (optional, string, `/api/v3/work_packages/42`)- API-Link to the context in which the rendering occurs, for example a specific work package.-- If left out only context-agnostic rendering takes place.- Please note that OpenProject features markdown-extensions on top of the extensions GitHub Flavored Markdown (gfm) already- provides that can only work given a context (e.g. display attached images).-- **Supported contexts:**-- * `/api/v3/work_packages/{id}` - an existing work package--+ Request (text/plain)-- Hello world! "This":http://example.com **is** markdown!--+ Response 200 (text/html)-- [Markdown][]--+ Response 400 (application/json)-- Returned if the context passed by the client is not valid (e.g. unknown).-- Note that this response will also occur when the requesting user- is not allowed to see the context resource (e.g. limited work package visibility).-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRenderContext",- "message": "Could not render markdown string in the given context."- }--+ Response 415 (application/json)-- Returned if the Content-Type indicated in the request is not `text/plain`.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:TypeNotSupported",- "message": "Expected Content-Type to be 'text/plain' but got 'application/json'."- }--## Plain Text [/api/v3/render/plain]--+ Model- + Body-- <p>Hello world! This *is* plain text!</p>--## Preview plain document [POST]--+ Request (text/plain)-- Hello world! This *is* plain text!--+ Response 200 (text/html)-- [Plain Text][]--+ Response 415 (application/json)-- Returned if the Content-Type indicated in the request is not `text/plain`.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:TypeNotSupported",- "message": "Expected Content-Type to be 'text/plain' but got 'application/json'."- }diff --git a/docs/api/apiv3/endpoints/revisions.apib b/docs/api/apiv3/endpoints/revisions.apibdeleted file mode 100644index 147751a145c..00000000000--- a/docs/api/apiv3/endpoints/revisions.apib+++ /dev/null@@ -1,82 +0,0 @@-# Group Revisions--Revisions are sets of updates to files in the context of repositories linked in OpenProject.--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:----------------:| --------------------------------------------------------------------------------------------------| ------------- | ----------- | -------------------- |-| self | This revision | Revision | not null | READ |-| project | The project to which the revision belongs | Project | not null | READ |-| author | The user that added this revision, if the authorName was mapped to a user in OpenProject | User | | READ |-| showRevision | A URL to the repository view (outside APIv3) showing this revision | - | not null | READ |---## Local Properties-| Property | Description | Type | Constraints | Supported operations |-|:-----------------------:| ------------------------------------------------------------------------------------------------------------------------------------------------------------| ----------- | ----------- | -------------------- |-| id | Revision's id, assigned by OpenProject | Integer | x > 0 | READ |-| identifier | The raw SCM identifier of the revision (e.g. full SHA hash) | String | not null | READ |-| formattedIdentifier | The SCM identifier of the revision, formatted (e.g. shortened unambiguous SHA hash). May be identical to identifier in many cases | String | not null | READ |-| authorName | The name of the author that committed this revision. Note that this name is retrieved from the repository and does not identify a user in OpenProject. | String | not null | READ |-| message | The commit message of the revision | Formattable | not null | READ |-| createdAt | The time this revision was committed to the repository | DateTime | not null | READ |--## Revision [/api/v3/revisions/{id}]--+ Model- + Body-- {- "_type": "Revision",- "_links": {- "self": {- "href": "/api/v3/revisions/1"- },- "project": {- "href": "/api/v3/projects/1"- },- "author": {- "href": "/api/v3/users/1"- },- "showRevision": {- "href": "/projects/identifier/repository/revision/11f4b07"- }- },- "id": 1,- "identifier": "11f4b07dff4f4ce9548a52b7d002daca7cd63ec6",- "formattedIdentifier": "11f4b07",- "authorName": "Some Developer",- "message": {- "format": "plain",- "raw": "This revision provides new features\n\nAn elaborate description",- "html": "<p>This revision provides new features<br/><br/>An elaborate description</p>"- },- "createdAt": "2015-07-21T13:36:59Z"- }--## View revision [GET]--+ Parameters- + id (required, integer, `1`) ... Revision id--+ Response 200 (application/hal+json)-- [Revision][]--+ Response 404 (application/hal+json)-- Returned if the revision does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view changesets for the project the repository is created in.-- *Note: A client without sufficient permissions shall not be able to test for the existence of a revision.- 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 revision does not exist."- }diff --git a/docs/api/apiv3/endpoints/roles.apib b/docs/api/apiv3/endpoints/roles.apibdeleted file mode 100644index c413940027b..00000000000--- a/docs/api/apiv3/endpoints/roles.apib+++ /dev/null@@ -1,165 +0,0 @@-# Group Roles--When principals (groups or users) are assigned to a project, they are receive roles in that project. Roles regulate access to specific resources by having permissions configured for them.--Currently, this is only a stub.--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-| :-------------------: | ----------------------------------------- | ------------- | -------------------------------| -------------------- |-| self | This role | Role | not null | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |-| id | Role id | Integer | x > 0 | READ |-| name | Role name | String | not null | READ |---## Role [/api/v3/roles/{id}]--+ Model- + Body-- {- "_type": "Role",- "id": 3,- "name": "Manager",- "_links": {- "self": {- "href": "/api/v3/roles/3",- "title": "Manager"- }- }- }--## View role [GET]--Fetch an individual role.--+ Parameters- + id (required, integer, `1`) ... role id--+ Response 200 (application/hal+json)-- [Role][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see roles.-- **Required permission:** view members **or** manage members-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to view this resource."- }--+ Response 404 (application/hal+json)-- Returned if the role does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }--## Roles [/api/v3/roles{?filters}]--+ Model- + Body-- {- "_type": "Collection",- "total": 5,- "count": 5,- "_embedded": {- "elements": [- {- "_type": "Role",- "id": 3,- "name": "Manager",- "_links": {- "self": {- "href": "/api/v3/roles/3",- "title": "Manager"- }- }- },- {- "_type": "Role",- "id": 2,- "name": "Anonymous",- "_links": {- "self": {- "href": "/api/v3/roles/2",- "title": "Anonymous"- }- }- },- {- "_type": "Role",- "id": 5,- "name": "Reader",- "_links": {- "self": {- "href": "/api/v3/roles/5",- "title": "Reader"- }- }- },- {- "_type": "Role",- "id": 4,- "name": "Member",- "_links": {- "self": {- "href": "/api/v3/roles/4",- "title": "Member"- }- }- },- {- "_type": "Role",- "id": 1,- "name": "Non member",- "_links": {- "self": {- "href": "/api/v3/roles/1",- "title": "Non member"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/roles"- }- }- }--## List roles [GET]--List all defined roles. This includes built in roles like 'Anonymous' and 'Non member'.--+ Parameters- + filters (optional, string, `[{ "unit": { "operator": "=", "values": ["system"] }" }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint.- Currently supported filters are:- + grantable: filters roles based on whether they are selectable for a membership- + unit: filters roles based on the unit ('project' or 'system') for which they are selectable for a membership--+ Response 200 (application/hal+json)-- [Roles][]----diff --git a/docs/api/apiv3/endpoints/root.apib b/docs/api/apiv3/endpoints/root.apibdeleted file mode 100644index 396db5bbe41..00000000000--- a/docs/api/apiv3/endpoints/root.apib+++ /dev/null@@ -1,71 +0,0 @@-# Group Root--The root resource contains links to available resources in the API. By following these links-a client should be able to discover further resources in the API.--*Note: Currently there is no list action for projects available.*-*A client will therefore have to know links to projects and can't (yet) discover them.*--| Link | Description | Type | Nullable | Supported operations | Condition |-| :-------------------: | ------------------------------------------------ | --------------- | -------- | -------------------- | --------- |-| configuration | The configuration of this OpenProject instance | Configuration | | READ | |-| user | The user currently logged-in | User | | READ | logged in |-| userPreferences | The preferences of the logged-in user | UserPreference | | READ | logged in |-| priorities | List of available priorities | Collection | | READ | **Permission** View work packages in any project |-| statuses | List of available work package statuses | Collection | | READ | **Permission** View work packages in any project |-| types | List of available work package types | Collection | | READ | **Permission** View work packages in any project |-| workPackages | List of all work packages | Collection | | READ | **Permission** View work packages in any project |-| users | List of all users | Collection | | READ | **Permission** Administrator |--## Local Properties--| Property | Description | Type | Condition | Supported operations |-| :-----------------------: | ---------------------------------------------------- | ---------- | --------------------------------- | -------------------- |-| instanceName | The name of the OpenProject instance | String | | READ |-| coreVersion | The OpenProject core version number for the instance | String | **Permission** requires admin privileges | READ |--## Root [/api/v3]--+ Model- + Body-- {- "_links": {- "configuration": {- "href" : "/api/v3/configuration"- },- "user": {- "href": "/api/v3/users/1",- "title": "John Sheppard"- },- "userPreferences" : {- "href" : "/api/v3/my_preferences"- },- "priorities" : {- "href" : "/api/v3/priorities"- },- "relations" : {- "href" : "/api/v3/relations"- },- "statuses" : {- "href" : "/api/v3/statuses"- },- "types" : {- "href" : "/api/v3/types"- },- "workPackages" : {- "href" : "/api/v3/work_packages"- },- "users": {- "href" : "/api/v3/users"- }- },- "instanceName" : "My own OpenProject",- "coreVersion" : "10.3.0"- }--## View root [GET]--+ Response 200 (application/hal+json)-- [Root][]diff --git a/docs/api/apiv3/endpoints/schemas.apib b/docs/api/apiv3/endpoints/schemas.apibdeleted file mode 100644index 0ddbceccd74..00000000000--- a/docs/api/apiv3/endpoints/schemas.apib+++ /dev/null@@ -1,228 +0,0 @@-# Group Schemas--The schema provides more detailed information about the properties of a resource.-The schema is represented by a dictionary containing names of resource properties as keys-and objects describing the corresponding property as values.-These objects are called **field schema** and form the core of the schema representation,-each of them can contain its own `_links` and `_embedded` section.---## Linked Properties--| Link | Description | Type | Nullable | Supported operations |-|:-------------------:| ---------------------------------------- | ------------- | -------- | -------------------- |-| self | This schema | Schema | | READ |--## Local Properties--| Property | Description | Type |-| :-----------------: | ---------------------------------------------------------------------------------- | ---------------- |-| _dependencies | A list of dependencies between one property's value and another property | SchemaDependency |--The `_dependencies` property contains the list of dependencies that exist between the value selected for one of the properties of the described resource and the resource's structure. Depending on the value, additional properties might exist or properties might have other values allowed to be assigned. See [SchemaDependency](#schema-dependencies) for more information.--# Field schema--## Linked Properties--| Property | Description | Conditions |-| :--------------: | -------------------------------------------------------------- | --------------------------------------------- |-| allowedValues | List of resources that are assignable by the current user. | Will not exist if `allowedValuesSchemas` is present. |-| allowedValuesSchemas | Link to schemas further describing the property. | Will not exist if `allowedValues` is present. |--The `allowedValues` can either contain a list of canonical links or just a single link to a collection resource.-This is an optimization to allow efficient handling of both small resource lists (that can be enumerated inline) and large-resource lists (requiring one or more separate requests).--The `allowedValuesSchemas` will on rare occasions (e.g. for a [Query](#query)) replace `allowedValues`. This is done when there is no fixed set of allowed values. Instead, the allowed values will have to follow a schema, or one of a list of schemas, in its own right.--Only one of the links (`allowedValues`, `allowedValuesSchemas`) will exist for any given property.--## Local Properties--| Property | Description | Type | Default |-|:-----------------:| ---------------------------------------------------------------------------------- | ------------ | ------- |-| name | Human readable name of the property as it could be displayed in a UI | String | |-| type | The data type of the properties values | MetaType | |-| minLength | The value of the property must at least contain the specified amount of characters | Integer | 0 |-| maxLength | The value of the property must at most contain the specified amount of characters | Integer | ∞ |-| regularExpression | The value of the property must match the given regular expression (if not null) | String | null |-| required | If true this property is not nullable | Boolean | true |-| writable | If false it is not allowed to **change** the properties value | Boolean | true |-| location | If present, contains a reference to the location of the property in the JSON | String | |-| description | If present, contains a formattable, human readable description | Formattable | |--All of the above properties that do not have a default value *must* be present in the schema.-For properties that have a default value, the client can assume the default value, if the property is missing.--Note that regular expressions used in the API follow the rules of [Ruby Regular Expressions](http://www.ruby-doc.org/core-2.2.6/Regexp.html).---### Location property--The location property gives a hint as to where to find the property if it is not contained in the set of local attributes.-For example, for linked properties, the location attribute of the schema will contain `_links`. The property will then be found in the resource-under the path `_links.propertyName`.--For the default attributes to be added on the top level of the resource, the location attribute will not be set.--# Schema Dependencies--A SchemaDependency describes the dependencies between a value chosen for a resource's property and the resource's structure. By that, additional properties or changes in a property are described. A SchemaDependency will never describe a property to disappear, only to appear. As such it always provides additional information. For a property that is depending on another propertie's value, this can result in not being listed in the resource's schema itself at all. This will be the case if the existence of the a property as a whole will be dependent. If only one of the aspects (e.g. *writable*) of the property changes with the selected value, the property itself will already be listed in the schema, but it will lack the dependent aspect.--Given that SchemaDependencies will only add information, and the content type of JSON, a client should be able to join the two objects, the schema and the dependency, into one object easily.--SchemaDependencies are always embedded inside a Schema's `_dependencies` attribute. As such, they are not independently existing resources. Consequently, they do not have a `self` reference.--## Linked Properties--| Link | Description | Type | Nullable | Supported operations |-|:-------------------:| ---------------------------------------- | ------------- | -------- | -------------------- |--A SchemaDependency does not have any links.--## Local Properties--| Property | Description | Type |-| :-----------------: | ---------------------------------------------------------------------------------- | ---------------- |-| on | The name of the property on which the dependency exists | string |-| dependencies | The additions to a schema grouped by the value of the depending property | object |--The following excerpt exemplifies the objects that can be found as a value of the `dependencies` property:--```-{- "_type": "SchemaDependency",- "on": "someProperty",- "dependencies": {- "1": {- "loremIpsum": {- "type": "User",- "name": "Lorem ipsum",- "required": true,- "hasDefault": false,- "writable": true,- "location": "_links",- "description": {- "format": "markdown",- "raw": "A description for field Lorem ipsum. This may contain [links](https://example.com).",- "html": "<p>A description for field Lorem ipsum. This may contain <a href=\"https://exampel.com\">links</a>.</p>"- };- "_links": {- "allowedValues": {- "href": "/api/v3/some/path/to/users"- }- }- }- },- "2": {- "loremIpsum": {- "type": "User",- "name": "Lorem ipsum",- "required": true,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {- "allowedValues": {- "href": "/api/v3/a/totally/different/path/to/other/users"- }- }- }- },- "3": {- "loremIpsum": {- "type": "User",- "name": "Lorem ipsum",- "required": true,- "hasDefault": false,- "writable": false,- "location": "_links",- }- },- "4": {}- }-}-```--Given the example above, the client has to add the property `loremIpsum` to the schema if the depending property is `1`, `2` or `3`.-If it is `4` the property does not exist.-The property will not be writable if the value is `3`.-The values allowed to be set differ between having `1` or `2` selected for the depending property.--Because of the limitation of JSON objects, all keys will be strings, even when the depending value is actually something different (e.g. Integer, Date).-This is also true for resources in which case the url of the resource is used as the key.--## Example Schema [/api/v3/example/schema]--+ Model- + Body-- {- "_type": "Schema",- "_dependencies": [],- "_links": {- "self": { "href": "/api/v3/example/schema" }- },-- "lockVersion": {- "name": "Resource Version",- "type": "Integer",- "writable": false- },- "subject": {- "name": "Subject",- "type": "String",- "minLength": 1,- "maxLength": 255- },- "status": {- "_links": {- "allowedValues": [- { "href": "/api/v3/statuses/1", "title": "New" },- { "href": "/api/v3/statuses/2", "title": "Closed" }- ]- },-- "name": "Status",- "type": "Status",- "location": "_links",-- "_embedded": {- "allowedValues": [- {- "_links": { "self": { "href": "/api/v3/statuses/1" } },- "_type": "Status",- "id": 1,- "name": "New",- "position": 1,- "isDefault": true,- "isClosed": false,- "defaultDoneRatio": 0,- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T09:12:00Z"- },- {- "_links": { "self": { "href": "/api/v3/statuses/2" } },- "_type": "Status",- "id": 2,- "name": "Closed",- "position": 2,- "isDefault": false,- "isClosed": true,- "defaultDoneRatio": 100,- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T09:12:00Z"- }- ]- }- }- }--## view the schema [GET]--This is an example of how a schema might look like. Note that this endpoint does not exist in the actual implementation.--+ Response 200 (application/hal+json)-- [Example Schema][]diff --git a/docs/api/apiv3/endpoints/statuses.apib b/docs/api/apiv3/endpoints/statuses.apibdeleted file mode 100644index 4c788022afc..00000000000--- a/docs/api/apiv3/endpoints/statuses.apib+++ /dev/null@@ -1,203 +0,0 @@-# Group Statuses--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:-------------:|-------------------------- | ------------- | ----------- | -------------------- |-| self | This status | Status | not null | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :--------: | ------------- | ------- | ----------- | -------------------- |-| id | Status id | Integer | x > 0 | READ |-| name | Status name | String | | READ |-| position | Sort index of the status | Integer | | READ |-| isDefault | | Boolean | | READ |-| isClosed | are tickets of this status considered closed? | Boolean | | READ |-| isReadonly | are tickets of this status read only? | Boolean | | READ |-| defaultDoneRatio | The percentageDone being applied when changing to this status | Integer | 0 <= x <= 100 | READ |--## Statuses [/api/v3/statuses]--+ Model- + Body-- {- "_links":- {- "self":- {- "href": "/api/v3/statuses"- }- },- "total": 6,- "count": 6,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_links":- {- "self":- {- "href": "/api/v3/statuses/1"- }- },- "_type": "Status",- "id": 1,- "name": "New",- "position": 1,- "isDefault": true,- "isClosed": false,- "defaultDoneRatio": 0- },- {- "_links":- {- "self":- {- "href": "/api/v3/statuses/3"- }- },- "_type": "Status",- "id": 3,- "name": "Resolved",- "position": 3,- "isDefault": false,- "isClosed": false,- "isReadonly": false,- "defaultDoneRatio": 75- },- {- "_links":- {- "self":- {- "href": "/api/v3/statuses/4"- }- },- "_type": "Status",- "id": 4,- "name": "Feedback",- "position": 4,- "isDefault": false,- "isClosed": false,- "defaultDoneRatio": 25- },- {- "_links":- {- "self":- {- "href": "/api/v3/statuses/5"- }- },- "_type": "Status",- "id": 5,- "name": "Closed",- "position": 5,- "isDefault": false,- "isClosed": true,- "defaultDoneRatio": 100- },- {- "_links":- {- "self":- {- "href": "/api/v3/statuses/6"- }- },- "_type": "Status",- "id": 6,- "name": "Rejected",- "position": 6,- "isDefault": false,- "isClosed": true,- "defaultDoneRatio": 100- },- {- "_links":- {- "self":- {- "href": "/api/v3/statuses/2"- }- },- "_type": "Status",- "id": 2,- "name": "In Progress",- "position": 3,- "isDefault": false,- "isClosed": false,- "defaultDoneRatio": 50- }- ]- }- }--## List all Statuses [GET]--+ Response 200 (application/hal+json)-- [Statuses][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work package (on any project)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see the statuses."- }--## Status [/api/v3/statuses/{id}]--+ Model- + Body-- {- "_links":- {- "self":- {- "href": "/api/v3/statuses/1"- }- },- "_type": "Status",- "id": 1,- "name": "New",- "position": 1,- "isDefault": true,- "isClosed": false,- "defaultDoneRatio": 0- }--## View Status [GET]--+ Parameters- + id (required, integer, `1`) ... status id--+ Response 200 (application/hal+json)-- [Status][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work package (on any project)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see this status."- }-diff --git a/docs/api/apiv3/endpoints/time_entries.apib b/docs/api/apiv3/endpoints/time_entries.apibdeleted file mode 100644index fb1f3fb63e0..00000000000--- a/docs/api/apiv3/endpoints/time_entries.apib+++ /dev/null@@ -1,1323 +0,0 @@-# Group Time Entries--## Actions-| Link | Description | Condition |-|:-------------------:| -------------------------------------------------------------------------- | ---------------------------------------------------------------- |-| updateImmediately | Directly perform edits on this time entry | **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user |-| update | Form endpoint that aids in preparing and performing edits on a TimeEntry | **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user |-| delete | Delete this time entry | **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user |--## Linked Properties-| Link | Description | Type | Constraints | Supported operations | Condition |-| :-----------: | -------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |-| self | This time entry | TimeEntry | not null | READ | |-| project | The project the time entry is bundled in. The project might be different from the work package's project once the workPackage is moved. | Project | not null | READ / WRITE | |-| workPackage | The work package the time entry is created on | WorkPackage | | READ / WRITE | |-| user | The user the time entry tracks expenditures for | User | not null | READ | |-| activity | The time entry activity the time entry is categorized as | TimeEntriesActivity | not null | READ / WRITE | |--Depending on custom fields defined for time entries, additional links might exist.--Time entries are either linked to a work package or to a project. If they are linked to a project, the work package reference is empty. If they are linked to a work package, the project reference is filled up automatically to point to the work package's project.--## Local Properties--| Property | Description | Type | Constraints | Supported operations | Condition |-| :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |-| id | Time entries' id | Integer | x > 0 | READ | |-| comment | A text provided by the user detailing the time entry | String | max 255 characters | READ / WRITE | |-| spentOn | The date the expenditure is booked for | Date | | READ / WRITE | |-| hours | The time quantifying the expenditure | Time | | READ / WRITE | |-| createdAt | The time the time entry was created | DateTime | | READ | |-| updatedAt | The time the time entry was last updated | DateTime | | READ | |--Depending on custom fields defined for time entries, additional properties might exist.--## View time entry [/api/v3/time_entries/{id}]--+ Model- + Body-- {- "_type": "TimeEntry",- "id": 1,- "comment": {- "format": "plain",- "raw": "Some text explaining why the time entry was created",- "html": "<p>Some text explaining why the time entry was created</p>"- },- "spentOn": "2015-03-20",- "hours": "PT5H",- "createdAt": "2015-03-20T12:56:56Z",- "updatedAt": "2015-03-20T12:56:56Z",- "customField12": 5,- "_embedded": {- "project...": {},- "workPackage...": {},- "user...": {},- "activity...": {}- },- "_links": {- "self": {- "href": "/api/v3/time_entries/1"- },- "updateImmediately": {- "href": "/api/v3/time_entries/1",- "method": "patch"- },- "delete": {- "href": "/api/v3/time_entries/1",- "method": "delete"- },- "project": {- "href": "/api/v3/projects/1",- "title": "Some project"- },- "workPackage": {- "href": "/api/v3/work_packages/1",- "title": "Some work package"- },- "user": {- "href": "/api/v3/users/2",- "title": "Some user"- },- "activity": {- "href": "/api/v3/time_entries/activities/18",- "title": "Some time entry activity"- },- "customField4": {- "href": "/api/v3/users/5",- "title": "Some other user"- }- }- }--## View time entry [GET]--+ Parameters- + id (required, integer, `1`) ... time entry id--+ Response 200 (application/hal+json)-- [View time entry][]--+ Response 404 (application/hal+json)-- Returned if the time entry does not exist or if the user does not have permission to view them.-- **Required permission** `view time entries` in the project the time entry is assigned to or `view own time entries` for time entries belonging to the user-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }--## Create time entry [/api/v3/time_entries]--## Create Time entry [POST]--Creates a new time entry applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint.--+ Request Create time entry-- + Body-- {- "_links": {- "project": {- "href": "/api/v3/projects/34"- },- "activity": {- "href": "/api/v3/time_entries/activities/18"- },- "workPackage": {- "href": "/api/v3/work_packages/5"- },- "customField4": {- "href": "/api/v3/users/5"- },- "customField51": {- "href": "/api/v3/custom_options/11"- }- },- "hours": 'PT5H',- "comment": {- "raw": "Some comment"- },- "spentOn": "2017-07-28",- "customField1": {- "raw": "some text custom field value"- },- "customField8": 5- }--+ Response 201-- [View time entry][]--+ 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:** Log time-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Work package is invalid.",- "_embedded": {- "details": {- "attribute": "workPackage"- }- }- }--## Update time entry [/api/v3/time_entries/{id}]--## Update Time entry [PATCH]--Updates the given time entry by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a time entries' attributes and are accepted by the endpoint.--+ Parameters- + id (required, integer, `1`) ... Time entry id--+ Request Update time entry-- + Body-- {- "_links": {- "activity": {- "href": "/api/v3/time_entries/activities/18"- },- "workPackage": {- "href": "/api/v3/work_packages/5"- },- "customField4": {- "href": "/api/v3/users/5"- },- "customField51": {- "href": "/api/v3/custom_options/11"- }- },- "hours": "PT5H",- "comment": {- "raw": "Some comment"- },- "spentOn": "2017-07-28",- "customField1": {- "raw": "some text custom field value"- },- "customField8": 5- }--+ Response 200-- [View time entry][]--+ 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:** Edit (own) time entries, depending on what time entry is being modified.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Work package is invalid.",- "_embedded": {- "details": {- "attribute": "workPackage"- }- }- }--## Delete time entry [/api/v3/time_entries/{id}]--## Delete time entry [DELETE]--Permanently deletes the specified time entry.--+ Parameters- + id (required, integer, `1`) ... Time entry id--+ Response 204-- Returned if the time entry was deleted successfully.-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the time entry does not exist or if the user does not have sufficient permissions to see the time entry.-- **Required permission** `view time entries` in the project the time entry is assigned to or `view own time entries` for time entries belonging to the user-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }---## List time entries [/api/v3/time_entries{?offset,pageSize,filters,sortBy}]--+ Model- + Body-- {- "_type": "Collection",- "total": 39,- "count": 2,- "pageSize": 2,- "offset": 1,- "_embedded": {- "elements": [- {- "_type": "TimeEntry",- "id": 5,- "comment": {- "format": "plain",- "raw": "Some comment",- "html": "<p>Some comment</p>"- },- "spentOn": "2015-03-20",- "hours": "PT5H",- "createdAt": "2015-03-20T12:56:56Z",- "updatedAt": "2015-03-20T12:56:56Z",- "_links": {- "self": {- "href": "/api/v3/time_entries/1"- },- "updateImmediately": {- "href": "/api/v3/time_entries/1",- "method": "patch"- },- "delete": {- "href": "/api/v3/time_entries/1",- "method": "delete"- },- "project": {- "href": "/api/v3/projects/1",- "title": "Some project"- },- "workPackage": {- "href": "/api/v3/work_packages/1",- "title": "Some work package"- },- "user": {- "href": "/api/v3/users/2",- "title": "Some user"- },- "activity": {- "href": "/api/v3/time_entries/activities/18",- "title": "Some time entry activity"- }- }- },- {- "_type": "TimeEntry",- "id": 10,- "comment": {- "format": "plain",- "raw": "Another comment",- "html": "<p>Another comment</p>"- },- "spentOn": "2015-03-21",- "hours": "PT7H",- "createdAt": "2015-03-20T12:56:56Z",- "updatedAt": "2015-03-20T12:56:56Z",- "_links": {- "self": {- "href": "/api/v3/time_entries/2"- },- "project": {- "href": "/api/v3/projects/42",- "title": "Some other project"- },- "workPackage": {- "href": "/api/v3/work_packages/541",- "title": "Some other work package"- },- "user": {- "href": "/api/v3/users/6",- "title": "Some other project"- },- "activity": {- "href": "/api/v3/time_entries/activities/14",- "title": "some other time entry activity"- }- }- }- ]- },- "_links": {- "self": {- "href": "/api/v3/time_entries?offset=1&pageSize=2"- },- "jumpTo": {- "href": "/api/v3/time_entries?offset=%7Boffset%7D&pageSize=2",- "templated": true- },- "changeSize": {- "href": "/api/v3/time_entries?offset=1&pageSize=%7Bsize%7D",- "templated": true- },- "nextByOffset": {- "href": "/api/v3/time_entries?offset=2&pageSize=2"- },- "createTimeEntry": {- "href": "/api/v3/time_entries/form",- "method": "post"- },- "createTimeEntryImmediately": {- "href": "/api/v3/time_entries",- "method": "post"- }- }- }--## List time entries [GET]--Lists time entries. The time entries returned depend on the filters provided and also on the permission of the requesting user.--+ Parameters- + offset = `1` (optional, integer, `25`) ... Page number inside the requested collection.-- + pageSize (optional, integer, `25`) ... Number of elements to display per page.-- + sortBy = ["spent_on", "asc"] (optional, string, `[["spent_on", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:- + id: Sort by primary key- + hours: Sort by logged hours- + spent_on: Sort by spent on date- + created_at: Sort by time entry creation datetime- + updated_at: Sort by the time the time entry was updated last-- + filters (optional, string, `[{ "work_package": { "operator": "=", "values": ["1", "2"] } }, { "project": { "operator": "=", "values": ["1"] } }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:- + work_package: Filter time entries by work package- + project: Filter time entries by project- + user: Filter time entries by users- + spent_on: Filter time entries by spent on date- + created_at: Filter time entries by creation datetime- + updated_at: Filter time entries by the last time they where updated- + activity: Filter time entries by time entry activity--+ Response 200 (application/hal+json)-- [List time entries][]--+ Response 400 (application/hal+json)-- Returned if the client sends invalid request parameters e.g. filters-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidQuery",- "message": [- "Filters Invalid filter does not exist."- ]- }--+ Response 403 (application/hal+json)-- Returned if the client is not logged in and login is required.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to view this resource."- }--## View time entry schema [/api/v3/time_entries/schema]--+ Model- + Body-- {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "spentOn": {- "type": "Date",- "name": "Date",- "required": true,- "hasDefault": false,- "writable": true,- "options": {}- },- "hours": {- "type": "Duration",- "name": "Hours",- "required": true,- "hasDefault": false,- "writable": true,- "options": {}- },- "user": {- "type": "User",- "name": "User",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "workPackage": {- "type": "WorkPackage",- "name": "Work package",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {}- },- "project": {- "type": "Project",- "name": "Project",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {}- },- "activity": {- "type": "TimeEntriesActivity",- "name": "Activity",- "required": true,- "hasDefault": true,- "writable": true,- "location": "_links",- "_links": {}- },- "customField29": {- "type": "String",- "name": "sfsdfsdfsdfsdfdsf",- "required": false,- "hasDefault": false,- "writable": true,- "options": {- "rtl": null- }- },- "_links": {- "self": {- "href": "/api/v3/time_entries/schema"- }- }- }--## View time entry schema [GET]--+ Response 200 (application/hal+json)-- [View time entry schema][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see the schema.-- **Required permission:** *log time* or *view time entries* or *edit time entries* or *edit own time entries* on any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Time entry create form [/api/v3/time_entries/form]--This endpoint returns a form allowing a guided creation of new time entries.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Time entry create form [POST]--+ Request Create time entry form-- + Body-- {- "_links": {- "activity": {- "href": "/api/v3/time_entries/activities/18"- },- "workPackage": {- "href": "/api/v3/work_packages/5"- }- },- "hours": "PT5H",- "comment": {- "raw": "Some comment"- },- "spentOn": "2017-07-28",- "customField1": {- "raw": "some text custom field value"- },- "customField8": 5- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- {- "_links": {- "project": {- "href": "/api/v3/projects/1",- "title": "Some project"- },- "activity": {- "href": "/api/v3/time_entries/activities/18",- "title": "Management"- },- "workPackage": {- "href": "/api/v3/work_packages/5",- "title": "non sed quis id vel quia culpa ipsam"- }- },- "hours": "PT5H",- "comment": {- "format": "plain",- "raw": "Some comment",- "html": "<p>Some comment</p>"- },- "spentOn": "2017-07-28",- "customField1": {- "format": "markdown",- "raw": "some text custom field value"- "html": "<p>some text custom field value</p>"- },- "customField8": 5- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "spentOn": {- "type": "Date",- "name": "Date",- "required": true,- "hasDefault": false,- "writable": true,- "options": {}- },- "hours": {- "type": "Duration",- "name": "Hours",- "required": true,- "hasDefault": false,- "writable": true,- "options": {}- },- "user": {- "type": "User",- "name": "User",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "workPackage": {- "type": "WorkPackage",- "name": "Work package",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {- "allowedValues": {- "href": "/api/v3/work_packages?filters=%5B%7B%22project%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D"- }- }- },- "project": {- "type": "Project",- "name": "Project",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {- "allowedValues": {- "href": "/api/v3/time_entries/available_projects"- }- }- },- "activity": {- "type": "TimeEntriesActivity",- "name": "Activity",- "required": true,- "hasDefault": true,- "writable": true,- "location": "_links",- "_embedded": {- "allowedValues": [- {- "_type": "TimeEntriesActivity",- "id": 18,- "name": "Management",- "position": 1,- "default": true,- "_links": {- "self": {- "href": "/api/v3/time_entries/activities/18",- "title": "Management"- },- "projects": [- {- "href": "/api/v3/projects/some-project",- "title": "Some project"- },- {- "href": "/api/v3/projects/some-other-project",- "title": "Some other project"- }- ]- }- },- {- "_type": "TimeEntriesActivity",- "id": 23,- "name": "Implementation",- "position": 1,- "default": true,- "_links": {- "self": {- "href": "/api/v3/time_entries/activities/23",- "title": "Implementation"- },- "projects": [- {- "href": "/api/v3/projects/some-project",- "title": "Some project"- }- ]- }- }- ]- },- "_links": {- "allowedValues": [- {- "href": "/api/v3/time_entries/activities/18",- "title": "Management"- },- {- "href": "/api/v3/time_entries/activities/23",- "title": "Implementation"- }- ]- }- },- "customField1": {- "type": "Formattable",- "name": "Some formattable",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "options": {- "rtl": null- }- },- "customField8": {- "type": "Integer",- "name": "Some integer",- "required": false,- "hasDefault": false,- "writable": true,- "options": {- "rtl": null- }- },- "_links": {}- },- "validationErrors": {}- },- "_links": {- "self": {- "href": "/api/v3/time_entries/form",- "method": "post"- },- "validate": {- "href": "/api/v3/time_entries/form",- "method": "post"- },- "commit": {- "href": "/api/v3/time_entries",- "method": "post"- }- }- }--+ 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:** *log time* in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Time entry update form [/api/v3/time_entries/:id/form]--This endpoint returns a form allowing a guided update of existing time entries.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Time entry update form [POST]--+ Parameters- + id (required, integer, `1`) ... time entries activity id--+ Request Create time entry form-- + Body-- {- "_links": {- "workPackage": {- "href": "/api/v3/work_packages/9"- }- },- "hours": "PT8H",- "customField1": {- "raw": "some altered text custom field value"- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- {- "_links": {- "project": {- "href": "/api/v3/projects/1",- "title": "Some project"- },- "activity": {- "href": "/api/v3/time_entries/activities/18",- "title": "Management"- },- "workPackage": {- "href": "/api/v3/work_packages/9",- "title": "The updated work package"- }- },- "hours": "PT8H",- "comment": {- "format": "plain",- "raw": "Some comment",- "html": "<p>Some comment</p>"- },- "spentOn": "2017-07-28",- "customField1": {- "format": "markdown",- "raw": "some altered text custom field value"- "html": "<p>some altered text custom field value</p>"- },- "customField8": 5- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "spentOn": {- "type": "Date",- "name": "Date",- "required": true,- "hasDefault": false,- "writable": true,- "options": {}- },- "hours": {- "type": "Duration",- "name": "Hours",- "required": true,- "hasDefault": false,- "writable": true,- "options": {}- },- "user": {- "type": "User",- "name": "User",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "workPackage": {- "type": "WorkPackage",- "name": "Work package",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {- "allowedValues": {- "href": "/api/v3/work_packages?filters=%5B%7B%22project%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D"- }- }- },- "project": {- "type": "Project",- "name": "Project",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "_links": {- "allowedValues": {- "href": "/api/v3/time_entries/available_projects"- }- }- },- "activity": {- "type": "TimeEntriesActivity",- "name": "Activity",- "required": true,- "hasDefault": true,- "writable": true,- "location": "_links",- "_embedded": {- "allowedValues": [- {- "_type": "TimeEntriesActivity",- "id": 18,- "name": "Management",- "position": 1,- "default": true,- "_links": {- "self": {- "href": "/api/v3/time_entries/activities/18",- "title": "Management"- },- "projects": [- {- "href": "/api/v3/projects/some-project",- "title": "Some project"- },- {- "href": "/api/v3/projects/some-other-project",- "title": "Some other project"- }- ]- }- },- {- "_type": "TimeEntriesActivity",- "id": 23,- "name": "Implementation",- "position": 1,- "default": true,- "_links": {- "self": {- "href": "/api/v3/time_entries/activities/23",- "title": "Implementation"- },- "projects": [- {- "href": "/api/v3/projects/some-project",- "title": "Some project"- }- ]- }- }- ]- },- "_links": {- "allowedValues": [- {- "href": "/api/v3/time_entries/activities/18",- "title": "Management"- },- {- "href": "/api/v3/time_entries/activities/23",- "title": "Implementation"- }- ]- }- },- "customField1": {- "type": "Formattable",- "name": "Some formattable",- "required": false,- "hasDefault": false,- "writable": true,- "options": {- "rtl": null- }- },- "customField8": {- "type": "Integer",- "name": "Some integer",- "required": false,- "hasDefault": false,- "writable": true,- "options": {- "rtl": null- }- },- "_links": {}- },- "validationErrors": {}- },- "_links": {- "self": {- "href": "/api/v3/time_entries/42/form",- "method": "post"- },- "validate": {- "href": "/api/v3/time_entries/42/form",- "method": "post"- },- "commit": {- "href": "/api/v3/time_entries/42",- "method": "post"- }- }- }--+ 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 to edit the time entry.-- **Required permission:** *edit time entries* for every time entry of a project, or *edit own time entries* for time entries belonging to the user.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the time entry does not exist or if the client does not have sufficient permissions to view it.-- **Required permission** `view time entries` in the project the time entry is assigned to or `view own time entries` for time entries belonging to the user-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }--## Available projects for time entries [/api/v3/time_entries/available_projects]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/time_entries/available_projects"- }- },- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded": {- "elements": [- {- "_type": "Project..."- },- {- "_type": "Project..."- }- ]- }- }--## Available projects for time entries [GET]--Gets a list of projects in which a time entry can be created in or be assigned to on update. The list contains all projects in which the user issuing the request has the necessary permissions.--+ Response 200 (application/hal+json)-- [Available projects for time entries][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** *log time*, *edit time entries* or *edit own time entries* in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }---# Group Time Entry Activities--Time entries are classified by an activity which is one item of a set of user defined activities (e.g. Design, Specification, Development).--## Actions--None--## Linked Properties-| Link | Description | Type | Constraints | Supported operations | Condition |-| :-----------: | -------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |-| self | This time entry activity | TimeEntriesActivity | not null | READ | |-| projects | List of projects the time entry is active in | []Project | not null | READ / WRITE | |--## Local Properties--| Property | Description | Type | Constraints | Supported operations | Condition |-| :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |-| id | Time entries' id | Integer | x > 0 | READ | |-| name | The human readable name chosen for this activity | String | max 30 characters | READ | |-| position | The rank the activity has in a list of activities | Date | | READ | |-| default | Flag to signal whether this activity is the default activity | Boolean | | READ | |---## View time entries activity [/api/v3/time_entries/activity/{id}]--+ Model- + Body-- {- "_type": "TimeEntriesActivity",- "id": 18,- "name": "a autem",- "position": 10,- "default": false,- "_embedded": {- "projects...": []- },- "_links": {- "self": {- "href": "/api/v3/time_entries/activities/18",- "title": "a autem"- },- "projects": [- {- "href": "/api/v3/projects/seeded_project",- "title": "Seeded Project"- },- {- "href": "/api/v3/projects/working-project",- "title": "Working Project"- }- ]- }- }--## View time entries activity [GET]--+ Parameters- + id (required, integer, `1`) ... time entries activity id--+ Response 200 (application/hal+json)-- [View time entries activity][]--+ Response 404 (application/hal+json)-- Returned if the activity does not exist or if the user does not have permission to view them.-- **Required permission** `view time entries`, `log time`, `edit time entries`, `edit own time entries` or `manage project activities` in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }diff --git a/docs/api/apiv3/endpoints/types.apib b/docs/api/apiv3/endpoints/types.apibdeleted file mode 100644index 63feef53272..00000000000--- a/docs/api/apiv3/endpoints/types.apib+++ /dev/null@@ -1,229 +0,0 @@-# Group Types--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:-------------:|-------------------------- | ------------- | ----------- | -------------------- |-| self | This type | Type | not null | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-|:----------------:| ---------------------------------------------- | -------- | ----------- | -------------------- |-| id | Type id | Integer | x > 0 | READ |-| name | Type name | String | | READ |-| color | The color used to represent this type | Color | | READ |-| position | Sort index of the type | Integer | | READ |-| isDefault | | Boolean | | READ |-| isMilestone | Do tickets of this type represent a milestone? | Boolean | | READ |-| createdAt | Time of creation | DateTime | | READ |-| updatedAt | Time of the most recent change to the user | DateTime | | READ |--## Types [/api/v3/types]--+ Model- + Body-- {- "_links":- {- "self":- {- "href": "/api/v3/types"- }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_links":- {- "self":- {- "href": "/api/v3/types/1"- }- },- "_type": "Type",- "id": 1,- "name": "Bug",- "color": "#ff0000",- "position": 1,- "isDefault": true,- "isMilestone": false,- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- },- {- "_links":- {- "self":- {- "href": "/api/v3/types/2"- }- },- "_type": "Type",- "id": 2,- "name": "Feature",- "color": "#888",- "position": 2,- "isDefault": false,- "isMilestone": false,- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }- ]- }- }--## List all Types [GET]--+ Response 200 (application/hal+json)-- [Types][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work package or manage types (on any project)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see the types."- }--## Types by Project [/api/v3/projects/{project_id}/types]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/projects/11/types" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_links":- {- "self":- {- "href": "/api/v3/types/1"- }- },- "_type": "Type",- "id": 1,- "name": "Bug",- "color": "#ff0000",- "position": 1,- "isDefault": true,- "isMilestone": false,- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- },- {- "_links":- {- "self":- {- "href": "/api/v3/types/2"- }- },- "_type": "Type",- "id": 2,- "name": "Feature",- "color": "#888",- "position": 2,- "isDefault": false,- "isMilestone": false,- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }- ]- }- }--## List types available in a project [GET]--This endpoint lists the types that are *available* in a given project.--+ Parameters- + project_id (required, integer, `1`) ... ID of the project whose types will be listed--+ Response 200 (application/hal+json)-- [Types by 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 work packages **or** manage types (on given 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."- }--## Type [/api/v3/types/{id}]--+ Model- + Body-- {- "_links":- {- "self":- {- "href": "/api/v3/types/1"- }- },- "_type": "Type",- "id": 1,- "name": "Bug",- "color": "#ff0000",- "position": 1,- "isDefault": true,- "isMilestone": false,- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }--## View Type [GET]--+ Parameters- + id (required, integer, `1`) ... type id--+ Response 200 (application/hal+json)-- [Type][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work package or manage types (on any project)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see this type."- }-diff --git a/docs/api/apiv3/endpoints/user-preferences.apib b/docs/api/apiv3/endpoints/user-preferences.apibdeleted file mode 100644index cad22329ae7..00000000000--- a/docs/api/apiv3/endpoints/user-preferences.apib+++ /dev/null@@ -1,112 +0,0 @@-# Group UserPreferences--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:---------:|----------------------------------------------------------| -------------- | --------------------- | -------------------- |-| self | This UserPreferences | UserPreferences| not null | READ |-| user | The user that this preference belongs to | User | not null | READ |--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-|:----------------------:| -----------------------------------------------------------| ---------- | ----------- | -------------------- |-| hideMail | Hide mail address from other users | Boolean | | READ / WRITE |-| timeZone | Current selected time zone | String | | READ / WRITE |-| commentSortDescending | Sort comments in descending order | Boolean | | READ / WRITE |-| warnOnLeavingUnsaved | Issue warning when leaving a page with unsaved text | Boolean | | READ / WRITE |-| accessibilityMode | Enable accessibility mode | Boolean | | READ / WRITE |--## UserPreferences [/api/v3/my_preferences]--+ Model- + Body-- {- "_type": "UserPreferences",- "_links": {- "self": {- "href": "/api/v3/my_preferences"- },- "user": {- "href": "/api/v3/users/1",- "title": "John Sheppard"- }- },- "hideMail": false,- "timeZone": "Europe/Berlin",- "commentSortDescending": true,- "warnOnLeavingUnsaved": true,- "accessibilityMode": false- }---## Show my preferences [GET]--+ Response 200 (application/hal+json)-- [UserPreferences][]--+ Response 401 (application/hal+json)-- Returned if no user is currently authenticated-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",- "message": "You need to be authenticated to access this resource."- }--## Update UserPreferences [PATCH]--When calling this endpoint the client provides a single object, containing the properties that it wants to change, in the body.--+ Request (application/json)-- {- "accessibilityMode": true,- "timeZone": "Europe/Paris"- }--+ Response 200 (application/hal+json)-- [UserPreferences][]--+ 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 401 (application/hal+json)-- Returned if no user is currently authenticated-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:Unauthenticated",- "message": "You need to be authenticated to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if the update contains invalid properties.- Reasons are:- * Specifying an invalid type- * Using an unknown time zone-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Time zone is not set to one of the allowed values."- }diff --git a/docs/api/apiv3/endpoints/users.apib b/docs/api/apiv3/endpoints/users.apibdeleted file mode 100644index e7eaac08c7a..00000000000--- a/docs/api/apiv3/endpoints/users.apib+++ /dev/null@@ -1,1252 +0,0 @@-# Group Users--## Actions-| Link | Description | Condition |-|:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- |-| lock | Restrict the user from logging in and performing any actions | not locked; **Permission**: Administrator |-| show | Link to the OpenProject user page (HTML) | |-| unlock | Allow a locked user to login and act again | locked; **Permission**: Administrator |-| updateImmediately | Updates the user's attributes. | **Permission**: Administrator, manage_user global permission |-| delete | Permanently remove a user from the instance | **Permission**: Administrator, self-delete |--## Linked Properties-| Link | Description | Type | Constraints | Supported operations | Condition |-|:-----------:|-------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |-| self | This user | User | not null | READ | |-| auth_source | Link to the user's auth source (endpoint not yet implemented) | AuthSource | | READ / WRITE | **Permission**: Administrator |-| members | Link to collection of all the user's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions. | MemberCollection | | READ | **Permission**: view members or manage members in any project |--Depending on custom fields defined for users, additional links might exist.----## Local Properties--| Property | Description | Type | Constraints | Supported operations | Condition |-| :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |-| id | User's id | Integer | x > 0 | READ | |-| login | User's login name | String | unique, 256 max length | READ / WRITE | **Permission**: Administrator, manage_user global permission |-| firstName | User's first name | String | 30 max length | READ / WRITE | **Permission**: Administrator, manage_user global permission |-| lastName | User's last name | String | 30 max length | READ / WRITE | **Permission**: Administrator, manage_user global permission |-| name | User's full name, formatting depends on instance settings | String | | READ | |-| email | User's email address | String | unique, 60 max length | READ / WRITE | E-Mail address not hidden, **Permission**: Administrator, manage_user global permission |-| admin | Flag indicating whether or not the user is an admin | Boolean | in: [true, false] | READ / WRITE | **Permission**: Administrator |-| avatar | URL to user's avatar | Url | | READ | |-| status | The current activation status of the user (see below) | String | in: ["active", "registered", "locked", "invited"] | READ | |-| language | User's language | String | ISO 639-1 | READ / WRITE | **Permission**: Administrator, manage_user global permission |-| password | User's password for the default password authentication | String | | WRITE | **Permission**: Administrator |-| identity_url | User's identity_url for OmniAuth authentication | String | | READ / WRITE | **Permission**: Administrator |-| createdAt | Time of creation | DateTime | | READ | |-| updatedAt | Time of the most recent change to the user | DateTime | | READ | |--Depending on custom fields defined for users, additional properties might exist.----The `status` of a user can be one of:--* `active` - the user can log in with the account right away-* `invited` - the user is invited and is pending registration--If the user's `status` is set to `active` during creation a means of authentication-has to be provided which is one of the following:--* `password` - The password with which the user logs in.-* `auth_source` - Link to an LDAP auth source.-* `identity_url` - The identity URL of an OmniAuth authentication provider.--If all of these are missing the creation will fail with an "missing password" error.--The `language` is limited to those activated in the system.--Due to data privacy, the user's properties are limited to reveal as little about the user as possible.-Thus `login`, `firstName`, `lastName`, `language`, `createdAt` and `updatedAt` are hidden for all-users except for admins or the user themselves.--Please note that custom fields are not yet supported by the api although the backend supports them.--## View user [/api/v3/users/{id}]--+ Model- + Body-- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/1",- "title": "j.sheppard"- },- "show": {- "href": "/users/1",- "type": "text/html"- },- "lock": {- "href": "/api/v3/users/1/lock",- "method": "POST"- },- "updateImmediately": {- "href": "/api/v3/users/1",- "method": "PATCH"- },- "delete": {- "href": "/api/v3/users/1",- "method": "DELETE"- }- },- "id": 1,- "login": "j.sheppard",- "firstName": "John",- "lastName": "Sheppard",- "email": "[email protected]",- "admin": true,- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "language": "en",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }--## View user [GET]--+ Parameters-- + id (required, integer or `me`, `1`) ... User id. Use `me` to reference current user, if any.--+ Response 200 (application/hal+json)-- [View user][]--+ Response 404 (application/hal+json)-- Returned if the user does not exist or if the API user does not have permission to view them.-- **Required permission** The user needs to be locked in if the installation is configured to prevent anonymous access-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified user does not exist or you do not have permission to view them."- }--## Create User [/api/v3/users]--## Create User [POST]--Creates a new user. Only administrators and users with manage_user global permission are allowed to do so.-When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body.--Valid values for `status`:--1) "active" - In this case a password has to be provided in addition to the other attributes.-2) "invited" - In this case nothing but the email address is required. The rest is optional. An invitation will be sent to the user.--+ Request Create User (application/json)-- + Body-- {- "login": "h.wurst",- "email": "[email protected]",- "firstName": "Hans",- "lastName": "Wurst",- "admin": false,- "language": "de",- "status": "active",- "password": "hunter5"- }--+ Request Invite User (application/json)-- + Body-- {- "email": "[email protected]",- "firstName": "Hanz",- "status": "invited"- }--+ Response 201-- [View user][]--+ 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:** Administrator-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to create new users."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "The email address is already taken.",- "_embedded": {- "details": {- "attribute": "email"- }- }- }--##------## Update User [/api/v3/users/{id}]--## Update user [PATCH]--Updates the user's writable attributes.-When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body.--+ Parameters-- + id (required, integer, `1`) ... User id--+ Request Update User (application/json)-- + Body-- {- "login": "h.wurst",- "email": "[email protected]",- "firstName": "Hans",- "lastName": "Wurst",- "admin": true,- "language": "en"- }--+ Response 200-- [View user][]--+ 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:** Administrators, manage_user global permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to update the account of this user."- }--+ Response 404 (application/hal+json)-- Returned if the user does not exist or if the API user does not have the necessary permissions to update it.-- **Required permission:** Administrators only (exception: users may update their own accounts)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified user does not exist or you do not have permission to view them."- }---+ Response 422 (application/hal+json)-- Returned if:-- * the client tries to modify a read-only property (`PropertyIsReadOnly`)- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "The email address is already taken.",- "_embedded": {- "details": {- "attribute": "email"- }- }- }--## Delete User [/api/v3/users/{id}]--## Delete user [DELETE]--Permanently deletes the specified user account.--+ Parameters-- + id (required, integer, `1`) ... User id--+ Response 202-- Returned if the account was deleted successfully.-- Note that the response body is empty as of now. In future versions of the API a body- *might* be returned, indicating the progress of deletion.-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions or if deletion of users was disabled in the instance wide settings.-- **Required permission:** Administrators only (exception: users might be able to delete their own accounts)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to delete the account of this user."- }--+ Response 404 (application/hal+json)-- Returned if the user does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified user does not exist."- }--## Lock user [/api/v3/users/{id}/lock]--## Lock user [POST]--+ Parameters-- + id (required, integer, `1`) ... User id--+ Response 200 (application/hal+json)-- [View user][]--+ Response 400 (application/hal+json)-- Returned if the client tries to lock a user account whose current status does not allow this transition.-- **Required permission:** Administrators only-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidUserStatusTransition",- "message": "The current user account status does not allow this operation."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions for locking a user.-- **Required permission:** Administrators only-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to lock the account of this user."- }--+ Response 404 (application/hal+json)-- Returned if the user does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified user does not exist."- }--## Unlock user [/api/v3/users/{id}/lock]--## Unlock user [DELETE]--+ Parameters-- + id (required, integer, `1`) ... User id--+ Response 200 (application/hal+json)-- [View user][]--+ Response 400 (application/hal+json)-- Returned if the client tries to unlock a user account whose current status does not allow this transition.-- **Required permission:** Administrators only-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidUserStatusTransition",- "message": "The current user account status does not allow this operation."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions for unlocking a user.-- **Required permission:** Administrators only-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to unlock the account of this user."- }--+ Response 404 (application/hal+json)-- Returned if the user does not exist.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified user does not exist."- }--## Users [/api/v3/users{?offset,pageSize,filters,sortBy}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/users" }- },- "total": 2,- "count": 1,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/1",- "title": "John Sheppard - j.sheppard"- },- "showUser": {- "href": "/users/1",- "type": "text/html"- },- "lock": {- "href": "/api/v3/users/1/lock",- "title": "Set lock on j.sheppard",- "method": "POST"- },- "update": {- "href": "/api/v3/users/1",- "title": "Update j.sheppard",- "method": "PATCH"- },- "delete": {- "href": "/api/v3/users/1",- "title": "Delete j.sheppard",- "method": "DELETE"- }- },- "id": 1,- "login": "j.sheppard",- "firstName": "John",- "lastName": "Sheppard",- "email": "[email protected]",- "admin": true,- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "language": "en",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }- ]- }- }--## List Users [GET]--Lists users. Only administrators or users with manage_user global permission have permission to do this.--+ Parameters- + offset = `1` (optional, integer, `25`) ... Page number inside the requested collection.-- + pageSize (optional, integer, `25`) ... Number of elements to display per page.-- + filters (optional, string, `[{ "status": { "operator": "=", "values": ["invited"] } }, { "group": { "operator": "=", "values": ["1"] } }, { "name": { "operator": "=", "values": ["[email protected]"] } }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:- + status: Status the user has- + group: Name of the group in which to-be-listed users are members.- + name: Filter users in whose first or last names, or email addresses the given string occurs.- + login: User's login-- + sortBy (optional, string, `[["status", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint.--+ Response 200 (application/hal+json)-- [Users][]--+ Response 400 (application/hal+json)-- Returned if the client sends an unknown sort column.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidQuery",- "message": "Unknown sort column."- }---+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** Administrator-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to list users."- }--## View user schema [/api/v3/users/schemas]--+ Model- + Body-- {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "login": {- "type": "String",- "name": "Username",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "admin": {- "type": "Boolean",- "name": "Administrator",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "mail": {- "type": "String",- "name": "Email",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "firstName": {- "type": "String",- "name": "First name",- "required": true,- "hasDefault": false,- "writable": false,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "lastName": {- "type": "String",- "name": "Last name",- "required": true,- "hasDefault": false,- "writable": false,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "avatar": {- "type": "String",- "name": "Avatar",- "required": false,- "hasDefault": false,- "writable": false,- "options": {}- },- "status": {- "type": "String",- "name": "Status",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "identityUrl": {- "type": "String",- "name": "Identity url",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "language": {- "type": "String",- "name": "Language",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "password": {- "type": "Password",- "name": "Password",- "required": false,- "hasDefault": false,- "writable": false,- "options": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "customField1": {- "type": "String",- "name": "User String CF",- "required": false,- "hasDefault": false,- "writable": true- },- "customField2": {- "type": "CustomOption",- "name": "User List cf",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links"- },- "_links": {- "self": {- "href": "/api/v3/users/schema"- }- }- }--## View user schema [GET]--The schema response use two exemplary custom fields that extend the schema response. Depending on your instance and custom field configuration, the response will look somewhat different.--+ Response 200 (application/hal+json)-- [View user schema][]---## User create form [/api/v3/users/{id}/form]--This endpoint returns a form allowing a guided creation of new users.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Users create form [POST]--+ Request Create user form-- + Body-- {- "mail": "[email protected]",- "status": "invited",- "customField1": "Custom field text value",- "_links" {- "customField2" : {- "href": "/api/v3/custom_options/123"- }- }- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "firstName": "bar",- "lastname": " @example.com",- "_links": {}- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "login": {- "type": "String",- "name": "Username",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "admin": {- "type": "Boolean",- "name": "Administrator",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "mail": {- "type": "String",- "name": "Email",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "firstName": {- "type": "String",- "name": "First name",- "required": true,- "hasDefault": false,- "writable": false,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "lastName": {- "type": "String",- "name": "Last name",- "required": true,- "hasDefault": false,- "writable": false,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "avatar": {- "type": "String",- "name": "Avatar",- "required": false,- "hasDefault": false,- "writable": false,- "options": {}- },- "status": {- "type": "String",- "name": "Status",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "identityUrl": {- "type": "String",- "name": "Identity url",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "language": {- "type": "String",- "name": "Language",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "password": {- "type": "Password",- "name": "Password",- "required": false,- "hasDefault": false,- "writable": false,- "options": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "customField1": {- "type": "String",- "name": "User String CF",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField2": {- "type": "CustomOption",- "name": "User List cf",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_embedded": {- "allowedValues": [{- "_type": "CustomOption",- "id": 123,- "value": "abc",- "_links": {- "self": {- "href": "/api/v3/custom_options/123",- "title": "abc"- }- }- },- {- "_type": "CustomOption",- "id": 124,- "value": "foo",- "_links": {- "self": {- "href": "/api/v3/custom_options/124",- "title": "foo"- }- }- }- ]- },- "_links": {- "allowedValues": [{- "href": "/api/v3/custom_options/123",- "title": "abc"- },- {- "href": "/api/v3/custom_options/124",- "title": "foo"- }- ]- }- },- "_links": {}- },- "validationErrors": {}- },- "_links": {- "self": {- "href": "/api/v3/users/form",- "method": "post"- },- "validate": {- "href": "/api/v3/users/form",- "method": "post"- },- "commit": {- "href": "/api/v3/users",- "method": "post"- }- }- }--+ 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:** manage_user global permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }------## User update form [/api/v3/users/{id}/form]--This endpoint returns a form allowing a guided modification of existing users.-The returned payload part of the form will be contain a merge between the already existing properties' values (as long as they are writeable) and the provided values with the later having precedence.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## User update form [POST]--+ Parameters-- + id (required, integer, `1`) ... User id--+ Request Update user form-- + Body-- {- "firstName": "Matthew"- "customField1": "An exemplary text custom field value",- "_links" {- "customField2" : {- "href": "/api/v3/custom_options/123"- }- }- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "firstName": "Matthew",- "lastName": "Mercer",- "login": "[email protected]",- "admin": false,- "email": "[email protected]",- "identityUrl": null,- "language": "en",- "customField1": "An exemplary text custom field value",- "_links" {- "customField2" : {- "href": "/api/v3/custom_options/123"- }- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "login": {- "type": "String",- "name": "Username",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "admin": {- "type": "Boolean",- "name": "Administrator",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "mail": {- "type": "String",- "name": "Email",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "firstName": {- "type": "String",- "name": "First name",- "required": true,- "hasDefault": false,- "writable": false,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "lastName": {- "type": "String",- "name": "Last name",- "required": true,- "hasDefault": false,- "writable": false,- "minLength": 1,- "maxLength": 255,- "options": {}- },- "avatar": {- "type": "String",- "name": "Avatar",- "required": false,- "hasDefault": false,- "writable": false,- "options": {}- },- "status": {- "type": "String",- "name": "Status",- "required": false,- "hasDefault": false,- "writable": false,- "options": {}- },- "identityUrl": {- "type": "String",- "name": "Identity url",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "language": {- "type": "String",- "name": "Language",- "required": false,- "hasDefault": false,- "writable": true,- "options": {}- },- "password": {- "type": "Password",- "name": "Password",- "required": false,- "hasDefault": false,- "writable": false,- "options": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false,- "options": {}- },- "customField1": {- "type": "String",- "name": "User String CF",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField2": {- "type": "CustomOption",- "name": "User List cf",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_embedded": {- "allowedValues": [{- "_type": "CustomOption",- "id": 123,- "value": "abc",- "_links": {- "self": {- "href": "/api/v3/custom_options/123",- "title": "abc"- }- }- },- {- "_type": "CustomOption",- "id": 124,- "value": "foo",- "_links": {- "self": {- "href": "/api/v3/custom_options/124",- "title": "foo"- }- }- }- ]- },- "_links": {- "allowedValues": [{- "href": "/api/v3/custom_options/123",- "title": "abc"- },- {- "href": "/api/v3/custom_options/124",- "title": "foo"- }- ]- }- },- "_links": {}- },- "validationErrors": {}- },- "_links": {- "self": {- "href": "/api/v3/users/70917/form",- "method": "post"- },- "validate": {- "href": "/api/v3/users/70917/form",- "method": "post"- },- "commit": {- "href": "/api/v3/users/70917",- "method": "patch"- }- }- }--+ 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:** manage_user global permission-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the request user can not be found.-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a membership. 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 requested resource could not be found."- }-diff --git a/docs/api/apiv3/endpoints/versions.apib b/docs/api/apiv3/endpoints/versions.apibdeleted file mode 100644index 8c89ed413c2..00000000000--- a/docs/api/apiv3/endpoints/versions.apib+++ /dev/null@@ -1,1303 +0,0 @@-# Group Versions--Work Packages can be assigned to a version. As such, versions serve to group Work Packages into logical units where each group comprises all the work packages that needs to be finished in order for the version to be finished.--## Actions--| Link | Description | Condition |-|:-------------------:|--------------------------------------------------------------------------| ---------------------------------------|-| update | Form endpoint that aids in preparing and performing edits on the version | **Permission**: manage versions |-| updateImmediately | Directly perform edits on the version | **Permission**: manage versions |--## Linked Properties-| Link | Description | Type | Constraints | Supported operations |-|:-------------------:|----------------------------------------- | ------------- | -------------------------------------------------------------- | -------------------- |-| self | This version | Version | not null | READ |-| definingProject | The project to which the version belongs | Project | only present if the project is visible for the current user | READ |-| availableInProjects | Projects where this version can be used | Projects | not null | READ |--Depending on custom fields defined for versions, additional linked properties might exist.--## Local Properties-| Property | Description | Type | Constraints | Supported operations |-| :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |-| id | Version id | Integer | x > 0 | READ |-| name | Version name | String | not null, may not exceed 60 characters | READ / WRITE |-| description | | Formattable | | READ / WRITE |-| startDate | | Date | | READ / WRITE |-| endDate | | Date | | READ / WRITE |-| status | The current status of the version | String | not null, only 'open', 'finished', 'closed' | READ / WRITE |-| sharing | The current status of the version | String | not null, limited to fixed set as defined by form | READ / WRITE |-| createdAt | Time of creation | DateTime | not null | READ |-| updatedAt | Time of the most recent change to the version | DateTime | not null | READ |--Depending on custom fields defined for versions, additional properties might exist.--## Version [/api/v3/versions/{id}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/versions/11" },- "update": { "href": "/api/v3/versions/11/form", "method": "POST" },- "updateImmediately": { "href": "/api/v3/versions/11", "method": "PATCH" },- "definingProject": { "href": "/api/v3/projects/11" },- "availableInProjects": { "href": "/api/v3/versions/11/projects" },- "customField4": {- "href": "/api/v3/custom_options/5",- "title": "Custom field option"- }- },- "_type": "Version",- "id": 11,- "name": "v3.0 Alpha",- "description": {- "format": "plain",- "raw": "This version has a description",- "html": "This version has a description"- },- "startDate": "2014-11-20",- "endDate": null,- "status": "open",- "sharing": "system",- "customField14": "1234567890"- }--## View version [GET]--+ Parameters- + id (required, integer, `1`) ... version id--+ Response 200 (application/hal+json)-- [Version][]--+ Response 404 (application/hal+json)-- Returned if the version does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view work packages **or** manage versions (any project where the version is available)-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a version. 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 requested resource could not be found."- }--## Update Versions [PATCH]--Updates the given version by applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint.---+ Parameters- + id (required, integer, `1`) ... Version id--+ Request Update version-- + Body-- {- "endDate": "2018-01-10",- "startDate": "2018-01-01",- "status": "closed",- "sharing": "system",- "customField14": "blubs",- "_links": {- "definingProject": {- "href": "/api/v3/projects/1"- }- }- }--+ Response 200-- [Version][]--+ 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:** Manage versions in the version's project.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the version does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view work packages **or** manage versions (any project where the version is available)-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a version. 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 requested resource could not be found."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Name cannot be blank.",- "_embedded": {- "details": {- "attribute"=>"name"- }- }- }--## Delete Version [DELETE]--Deletes the version. Work packages associated to the version will no longer be assigned to it.--+ Parameters- + id (required, integer, `1`) ... Version id--+ Response 204 (application/hal+json)-- Returned if the version was successfully deleted-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** manage versions-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the version does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view work packages **or** manage versions (any project where the version is available)-- *Note: A client without sufficient permissions shall not be able to test for the existence of- a version. 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 requested resource could not be found."- }---## Versions [/api/v3/versions{?filters}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/versions" }- },- "total": 3,- "count": 3,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_links": {- "self": { "href": "/api/v3/versions/11" },- "definingProject": { "href": "/api/v3/projects/12" },- "availableInProjects": { "href": "/api/v3/versions/11/projects" }- },- "_type": "Version",- "id": 11,- "name": "v3.0 Alpha",- "description": {- "format": "plain",- "raw": "This version has a description",- "html": "This version has a description"- },- "startDate": "2014-11-20",- "endDate": null,- "status": "Open"- },- {- "_links": {- "self": { "href": "/api/v3/versions/12" },- "definingProject": { "href": "/api/v3/projects/11" },- "availableInProjects": { "href": "/api/v3/versions/12/projects" }- },- "_type": "Version",- "id": 12,- "name": "v2.0",- "description": {- "format": "plain",- "raw": "",- "html": ""- },- "startDate": null,- "endDate": null,- "status": "Closed"- },- {- "_links": {- "self": { "href": "/api/v3/versions/10" },- "definingProject": { "href": "/api/v3/projects/13" },- "availableInProjects": { "href": "/api/v3/versions/13/projects" }- },- "_type": "Version",- "id": 10,- "name": "v1.0",- "description": {- "format": "plain",- "raw": "",- "html": ""- },- "startDate": null,- "endDate": null,- "status": "Open"- }- ]- }- }--## List versions [GET]--Returns a collection of versions. The client can choose to filter the versions similar to how work packages are filtered. In addition to the provided filters, the server will reduce the result set to only contain versions, for which the requesting client has sufficient permissions (*view_work_packages*).--+ Parameters- + filters (optional, string, `[{ "sharing": { "operator": "*", "values": ["system"] }" }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint.- Currently supported filters are:- + sharing: filters versions by how they are shared within the server (*none*, *descendants*, *hierarchy*, *tree*, *system*).--+ Response 200 (application/hal+json)-- [Versions][]--## Create versions [POST]--Creates a new version applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint.--You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation.--+ Request Create version-- + Body-- {- "_links": {- "definingProject": { "href": "/api/v3/projects/11" },- "customField4": {- "href": "/api/v3/custom_options/5",- "title" "Custom field option"- }- },- "name": "v3.0 Alpha",- "description": {- "raw": "This version has a description",- },- "startDate": "2014-11-20",- "endDate": null,- "status": "Open",- "customField14": "1234567890",- }--+ Response 201-- [Version][]--+ 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:** Manage versions-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 422 (application/hal+json)-- Returned if:-- * a constraint for a property was violated (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "name cannot be empty.",- "_embedded": {- "details": {- "attribute"=>"name"- }- }- }--## Version schema [/api/v3/versions/schemas]--+ Model- + Body-- {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 60- },- "description": {- "type": "Formattable",- "name": "Description",- "required": false,- "hasDefault": false,- "writable": true- },- "startDate": {- "type": "Date",- "name": "Start date",- "required": false,- "hasDefault": false,- "writable": true- },- "endDate": {- "type": "Date",- "name": "Finish date",- "required": false,- "hasDefault": false,- "writable": false- },- "status": {- "type": "String",- "name": "Status",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default",- "_links": {}- },- "sharing": {- "type": "String",- "name": "Sharing",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default",- "_links": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "definingProject": {- "type": "Project",- "name": "Project",- "required": true,- "hasDefault": false,- "writable": true,- "_links": {}- },- "customField14": {- "type": "String",- "name": "text CF",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField40": {- "type": "CustomOption",- "name": "List CF",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_links": {}- },- "_links": {- "self": {- "href": "/api/v3/versions/schema"- }- }- }--## View version schema [GET]--+ Response 200 (application/hal+json)-- [Version schema][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to see the schema.-- **Required permission:** view work packages or manage versions on any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Version create form [/api/v3/versions/form]--This endpoint returns a form allowing a guided creation of new versions.-The returned payload part of the form will be pre-filled with default values for every property (e.g. 'status' and 'sharing'), if available.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Version create form [POST]--+ Request Create version form-- + Body-- {- "endDate": "2018-01-10",- "startDate": "2018-01-01",- "status": "closed",- "sharing": "system",- "customField14": "blubs",- "_links": {- "definingProject": {- "href": "/api/v3/projects/1"- }- }- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "name": "",- "description": {- "format": "plain",- "raw": "",- "html": ""- },- "startDate": "2018-01-01",- "endDate": "2018-01-10",- "status": "closed",- "sharing": "system",- "customField14": "blubs",- "_links": {- "definingProject": {- "href": "/api/v3/projects/1",- "title": "Seeded Project"- },- "customField40": {- "href": null,- "title": null- }- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 60- },- "description": {- "type": "Formattable",- "name": "Description",- "required": false,- "hasDefault": false,- "writable": true- },- "startDate": {- "type": "Date",- "name": "Start date",- "required": false,- "hasDefault": false,- "writable": true- },- "endDate": {- "type": "Date",- "name": "Finish date",- "required": false,- "hasDefault": false,- "writable": false- },- "status": {- "type": "String",- "name": "Status",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default",- "_embedded": {- "allowedValues": [- "open",- "locked",- "closed"- ]- },- "_links": {}- },- "sharing": {- "type": "String",- "name": "Sharing",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default",- "_embedded": {- "allowedValues": [- "none",- "descendants",- "hierarchy",- "tree",- "system"- ]- },- "_links": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "definingProject": {- "type": "Project",- "name": "Project",- "required": true,- "hasDefault": false,- "writable": true,- "location": "_links",- "_embedded": {- "allowedValues": [- {- -- List of projects; abbreviated --- }- ]- },- "_links": {- "allowedValues": [- {- "href": "/api/v3/projects/19",- "title": "aaaaa"- },- {- "href": "/api/v3/projects/3",- "title": "bbbb"- },- {- "href": "/api/v3/projects/7",- "title": "zzzz"- }- ]- }- },- "customField14": {- "type": "String",- "name": "text CF",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField40": {- "type": "CustomOption",- "name": "List CF",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_embedded": {- "allowedValues": [- {- "_type": "CustomOption",- "id": 516,- "value": "First option",- "_links": {- "self": {- "href": "/api/v3/custom_options/516",- "title": "First option"- }- }- },- {- "_type": "CustomOption",- "id": 517,- "value": "Second option",- "_links": {- "self": {- "href": "/api/v3/custom_options/517",- "title": "Second option"- }- }- },- {- "_type": "CustomOption",- "id": 518,- "value": "Third option",- "_links": {- "self": {- "href": "/api/v3/custom_options/518",- "title": "Third option"- }- }- }- ]- },- "_links": {- "allowedValues": [- {- "href": "/api/v3/custom_options/516",- "title": "First option"- },- {- "href": "/api/v3/custom_options/517",- "title": "Second option"- },- {- "href": "/api/v3/custom_options/518",- "title": "Third option"- }- ]- }- },- "_links": {}- },- "validationErrors": {- "name": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Name can't be blank.",- "_embedded": {- "details": {- "attribute": "name"- }- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/versions/form",- "method": "post"- },- "validate": {- "href": "/api/v3/versions/form",- "method": "post"- }- }- }--+ 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:** manage versions in any project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Version update form [/api/v3/versions/{id}/form]--This endpoint returns a form allowing a guided modification of existing versions.-The returned payload part of the form will be contain a merge between the already existing properties' values (as long as they are writeable) and the provided values with the later having precedence.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Version update form [POST]--+ Parameters-- + id (required, integer, `1`) ... Project id--+ Request Update version form-- + Body-- {- "name": ""- "endDate": "2018-01-10",- "startDate": "2018-01-01",- "status": "closed",- "sharing": "system",- "customField14": "blubs"- }--+ Response 200 (application/hal+json)-- + Body-- {- "_type": "Form",- "_embedded": {- "payload": {- "name": "",- "description": {- "raw": "",- },- "startDate": "2018-01-01",- "endDate": "2018-01-10",- "status": "closed",- "sharing": "system",- "customField14": "blubs",- "_links":- "customField40": {- "href": null,- "title": null- }- }- },- "schema": {- "_type": "Schema",- "_dependencies": [],- "id": {- "type": "Integer",- "name": "ID",- "required": true,- "hasDefault": false,- "writable": false- },- "name": {- "type": "String",- "name": "Name",- "required": true,- "hasDefault": false,- "writable": true,- "minLength": 1,- "maxLength": 60- },- "description": {- "type": "Formattable",- "name": "Description",- "required": false,- "hasDefault": false,- "writable": true- },- "startDate": {- "type": "Date",- "name": "Start date",- "required": false,- "hasDefault": false,- "writable": true- },- "endDate": {- "type": "Date",- "name": "Finish date",- "required": false,- "hasDefault": false,- "writable": false- },- "status": {- "type": "String",- "name": "Status",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default",- "_embedded": {- "allowedValues": [- "open",- "locked",- "closed"- ]- },- "_links": {}- },- "sharing": {- "type": "String",- "name": "Sharing",- "required": true,- "hasDefault": false,- "writable": true,- "visibility": "default",- "_embedded": {- "allowedValues": [- "none",- "descendants",- "hierarchy",- "tree",- "system"- ]- },- "_links": {}- },- "createdAt": {- "type": "DateTime",- "name": "Created on",- "required": true,- "hasDefault": false,- "writable": false- },- "updatedAt": {- "type": "DateTime",- "name": "Updated on",- "required": true,- "hasDefault": false,- "writable": false- },- "definingProject": {- "type": "Project",- "name": "Project",- "required": true,- "hasDefault": false,- "writable": false,- "_links": {}- },- "customField14": {- "type": "String",- "name": "text CF",- "required": false,- "hasDefault": false,- "writable": true,- "visibility": "default"- },- "customField40": {- "type": "CustomOption",- "name": "List CF",- "required": false,- "hasDefault": false,- "writable": true,- "location": "_links",- "visibility": "default",- "_embedded": {- "allowedValues": [- {- "_type": "CustomOption",- "id": 516,- "value": "First option",- "_links": {- "self": {- "href": "/api/v3/custom_options/516",- "title": "First option"- }- }- },- {- "_type": "CustomOption",- "id": 517,- "value": "Second option",- "_links": {- "self": {- "href": "/api/v3/custom_options/517",- "title": "Second option"- }- }- },- {- "_type": "CustomOption",- "id": 518,- "value": "Third option",- "_links": {- "self": {- "href": "/api/v3/custom_options/518",- "title": "Third option"- }- }- }- ]- },- "_links": {- "allowedValues": [- {- "href": "/api/v3/custom_options/516",- "title": "First option"- },- {- "href": "/api/v3/custom_options/517",- "title": "Second option"- },- {- "href": "/api/v3/custom_options/518",- "title": "Third option"- }- ]- }- },- "_links": {}- },- "validationErrors": {- "name": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Name can't be blank.",- "_embedded": {- "details": {- "attribute": "name"- }- }- }- }- },- "_links": {- "self": {- "href": "/api/v3/versions/form",- "method": "post"- },- "validate": {- "href": "/api/v3/versions/form",- "method": "post"- }- }- }--+ 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:** manage versions in the version's project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--## Versions by Project [/api/v3/projects/{project_id}/versions]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/projects/11/versions" }- },- "total": 3,- "count": 3,- "_type": "Collection",- "_embedded":- {- "elements": [- {- "_links": {- "self": { "href": "/api/v3/versions/11" },- "definingProject": { "href": "/api/v3/projects/11" },- "availableInProjects": { "href": "/api/v3/versions/11/projects" }- },- "_type": "Version",- "id": 11,- "name": "v3.0 Alpha",- "description": {- "format": "plain",- "raw": "This version has a description",- "html": "This version has a description"- },- "startDate": "2014-11-20",- "endDate": null,- "status": "Open"- },- {- "_links": {- "self": { "href": "/api/v3/versions/12" },- "definingProject": { "href": "/api/v3/projects/11" },- "availableInProjects": { "href": "/api/v3/versions/12/projects" }- },- "_type": "Version",- "id": 12,- "name": "v2.0",- "description": {- "format": "plain",- "raw": "",- "html": ""- },- "startDate": null,- "endDate": null,- "status": "Closed"- },- {- "_links": {- "self": { "href": "/api/v3/versions/10" },- "definingProject": { "href": "/api/v3/projects/11" },- "availableInProjects": { "href": "/api/v3/versions/10/projects" }- },- "_type": "Version",- "id": 10,- "name": "v1.0",- "description": {- "format": "plain",- "raw": "",- "html": ""- },- "startDate": null,- "endDate": null,- "status": "Open"- }- ]- }- }---## List versions available in a project [GET]--This endpoint lists the versions that are *available* in a given project.-Note that due to sharing this might be more than the versions *defined* by that project.--+ Parameters- + project_id (required, integer, `1`) ... ID of the project whose versions will be listed--+ Response 200 (application/hal+json)-- [Versions by 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 work packages **or** manage versions (on given 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."- }--## Available projects for versions [/api/v3/versions/available_projects]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/versions/available_projects"- }- },- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded": {- "elements": [- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/6",- "title": "A project"- },- "editWorkPackage": {- "href": "/api/v3//work_packages/{work_package_id}/form",- "templated": true,- "method": "post"- },- "createWorkPackage": {- "href": "/api/v3/projects/6/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/6/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/6/categories"- },- "versions": {- "href": "/api/v3/projects/6/versions"- }- },- "id": 6,- "identifier": "a_project",- "name": "A project",- "description": "Eveniet molestias omnis quis aut qui eum adipisci. Atque aut aut in exercitationem adipisci amet. Nisi asperiores quia ratione veritatis enim exercitationem magnam. Aut fuga architecto adipisci nihil. Et repellat pariatur. Aliquam et sed perferendis nostrum quaerat. Fugit doloremque voluptatem.",- "createdAt": "2015-07-06T13:28:14+00:00",- "updatedAt": "2015-10-01T09:55:02+00:00",- "type": "Customer Project"- },- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/14",- "title": "Another project"- },- "createWorkPackage": {- "href": "/api/v3/projects/14/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/14/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/14/categories"- },- "versions": {- "href": "/api/v3/projects/14/versions"- }- },- "id": 14,- "identifier": "another_project",- "name": "Another project",- "description": "",- "createdAt": "2016-02-29T12:50:20+00:00",- "updatedAt": "2016-02-29T12:50:20+00:00",- "type": null- }- ]- }- }--## Available projects for versions [GET]--Gets a list of projects in which a version can be created in. The list contains all projects in which the user issuing the request has the manage versions permissions.--+ Response 200 (application/hal+json)-- [Available projects for versions][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** manage versions-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }diff --git a/docs/api/apiv3/endpoints/wiki_pages.apib b/docs/api/apiv3/endpoints/wiki_pages.apibdeleted file mode 100644index 1f18ac37c09..00000000000--- a/docs/api/apiv3/endpoints/wiki_pages.apib+++ /dev/null@@ -1,84 +0,0 @@-# Group Wiki Pages--Represents an individual page in a project's wiki.--*This resource is currently a stub*--## Actions--| Link | Description | Condition |-|:-------------------:|----------------------------------------------------------------------| --------------------------------------- |-| addAttachment | Attach a file to the wiki page | **Permission**: edit wiki page |--## Linked Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------------------ | ----------- | -------------- | -------------------- |-| self | This wiki page | WikiPage | not null | READ |-| attachments | The files attached to this wiki page | Collection | | READ |-| project | The project the wiki page belongs to | Project | not null | READ |--## Local Properties--| Property | Description | Type | Constraints | Supported operations |-| :--------------: | ------------------------------------------- | ----------- | ------------------------------------ | -------------------- |-| id | Identifier of this wiki page | Integer | x > 0 | READ |-| title | The wiki page's title | String | not null | READ |--## Wiki Page [/api/v3/wiki_pages/{id}]--+ Model- + Body-- {- "_type": "WikiPage",- "id": 72,- "title": "A wiki page with a name",- "_embedded": {- "project": {- "_type": "Project...",- "id": 12- }- },- "_links": {- "self": {- "href": "/api/v3/wiki_pages/72"- },- "attachments": {- "href": "/api/v3/wiki_pages/72/attachments"- },- "addAttachment": {- "href": "/api/v3/wiki_pages/72/attachments",- "method": "post"- },- "project": {- "href": "/api/v3/projects/12",- "title": "some project"- }- }- }--## View Wiki Page [GET]--Retrieve an individual wiki page as identified by the id parameter--+ Parameters- + id (required, integer, `1`) ... Wiki page identifier--+ Response 200 (application/hal+json)-- [Wiki Page][]--+ Response 404 (application/hal+json)-- Returned if the wiki page does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view wiki page in the page's project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The requested resource could not be found."- }diff --git a/docs/api/apiv3/endpoints/work-packages.apib b/docs/api/apiv3/endpoints/work-packages.apibdeleted file mode 100644index 66707e12f88..00000000000--- a/docs/api/apiv3/endpoints/work-packages.apib+++ /dev/null@@ -1,2342 +0,0 @@-# Group Work Packages--## Actions--| Link | Description | Condition |-|:-------------------:|--------------------------------------------------------------------------| ---------------------------------------|-| addAttachment | Attach a file to the WP | **Permission**: edit work package |-| addComment | Post comment to WP | **Permission**: add work package notes |-| addRelation | Adds a relation to this work package. | **Permission**: manage wp relations |-| addWatcher | Add any user to WP watchers | **Permission**: add watcher |-| customActions | Collection of predefined changes that can be applied to the work package | |-| previewMarkup | Post markup (in markdown) here to receive an HTML-rendered response | |-| removeWatcher | Remove any user from WP watchers | **Permission**: delete watcher |-| unwatch | Remove current user from WP watchers | logged in; watching |-| update | Form endpoint that aids in preparing and performing edits on a WP | **Permission**: edit work package |-| updateImmediately | Directly perform edits on a work package | **Permission**: edit work package |-| watch | Add current user to WP watchers | logged in; not watching |--## Linked Properties--| Link | Description | Type | Constraints | Supported operations | Condition |-| :----------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------ | --------------------- | ----------------------------------------- |-| self | This work package | WorkPackage | not null | READ | |-| schema | The schema of this work package | Schema | not null | READ | |-| ancestors | Array of all visible ancestors of the work package, with the root node being the first element | Collection | not null | READ | **Permission** view work packages |-| attachments | The files attached to this work package | Collection | not null | READ / WRITE | |-| author | The person that created the work package | User | not null | READ | |-| assignee | The person that is intended to work on the work package | User | | READ / WRITE | |-| availableWatchers | All users that can be added to the work package as watchers. | User | | READ | **Permission** add work package watchers |-| budget | The budget this work package is associated to | Budget | | READ / WRITE | **Permission** view cost objects |-| category | The category of the work package | Category | | READ / WRITE | |-| children | Array of all visible children of the work package | Collection | not null | READ | **Permission** view work packages |-| parent | Parent work package | WorkPackage | Needs to be visible (to the current user) | READ / WRITE | |-| priority | The priority of the work package | Priority | not null | READ / WRITE | |-| project | The project to which the work package belongs | Project | not null | READ / WRITE | |-| responsible | The person that is responsible for the overall outcome | User | | READ / WRITE | |-| relations | Relations this work package is involved in | Relation | | READ | **Permission** view work packages |-| revisions | Revisions that are referencing the work package | Revision | | READ | **Permission** view changesets |-| status | The current status of the work package | Status | not null | READ / WRITE | |-| timeEntries | All time entries logged on the work package. Please note that this is a link to an HTML resource for now and as such, the link is subject to change. | N/A | | READ | **Permission** view time entries |-| type | The type of the work package | Type | not null | READ / WRITE | |-| version | The version associated to the work package | Version | | READ / WRITE | |-| watchers | All users that are currently watching this work package | Collection | | READ | **Permission** view work package watchers |--## Local Properties--| Property | Description | Type | Constraints | Supported operations | Condition |-| :--------------: | ------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------ | -------------------- | -------------------------------- |-| id | Work package id | Integer | x > 0 | READ | |-| lockVersion | The version of the item as used for optimistic locking | Integer | | READ | |-| subject | Work package subject | String | not null; 1 <= length <= 255 | READ / WRITE | |-| type | Name of the work package's type | String | not null | READ | |-| description | The work package description | Formattable | | READ / WRITE | |-| scheduleManually | If false (default) schedule automatically. | Boolean | | READ / WRITE | |-| startDate | Scheduled beginning of a work package | Date | Cannot be set for parent work packages; must be equal or greater than the earliest possible start date; Exists only on work packages of a non milestone type | READ / WRITE | |-| dueDate | Scheduled end of a work package | Date | Cannot be set for parent work packages; must be greater than or equal to the start date; Exists only on work packages of a non milestone type | READ / WRITE | |-| date | Date on which a milestone is achieved | Date | Exists only on work packages of a milestone type | READ / WRITE | |-| derivedStartDate | Similar to start date but is not set by a client but rather deduced by the work packages's descendants. If manual scheduleManually is active, the two dates can deviate. | Date | | READ | |-| derivedDueDate | Similar to due date but is not set by a client but rather deduced by the work packages's descendants. If manual scheduleManually is active, the two dates can deviate. | Date | | READ | |-| estimatedTime | Time a work package likely needs to be completed excluding its descendants | Duration | | READ / WRITE | |-| derivedEstimatedTime | Time a work package likely needs to be completed including its descendants | Duration | | READ | |-| spentTime | The time booked for this work package by users working on it | Duration | | READ | **Permission** view time entries |-| percentageDone | Amount of total completion for a work package | Integer | 0 <= x <= 100; Cannot be set for parent work packages | READ / WRITE | |-| createdAt | Time of creation | DateTime | | READ | |-| updatedAt | Time of the most recent change to the work package | DateTime | | READ | |--Note that the properties listed here only cover the built-in properties of the OpenProject Core.-Using plug-ins and custom fields a work package might contain various additional properties.-A client can consult the schema information to which the work package links. The schema will contain information about-all properties of the linking work package, including properties added by plug-ins and custom fields.--Custom fields are identified by a key in the form of `customFieldN`, where `N` is an integer. Depending on their type,-they can occur as properties or as linked properties. A client has to consult the schema to resolve-the human readable name of custom fields.--Properties that cannot be set directly on parent work packages are inferred from their children instead:--* `startDate` is the earliest start date from its children if manual scheduling is activated.-* `dueDate` is the latest finish date from its children if manual scheduling is activated.-* `estimatedTime` is the sum of estimated times from its children-* `percentageDone` is the weighted average of the sum of its children percentages done. The weight is given by the average of its children estimatedHours. However, if the percentage done is given by a work package's status, then only the status matters and no value is inferred.--`startDate` can also not be earlier than a finish date of any predecessor.--While attachments are returned as a link which's content is to be fetched separately, clients can choose to-replace the work package's attachments by providing an array of already uploaded [Attachment resources](#attachments) on [create](#work-packages-work-packages-post)-and [update](#work-packages-work-package-patch). The attachments the work package has had prior to the request will be removed.--## Work Package [/api/v3/work_packages/{id}{?notify}]--+ Model- + Body-- {- "_type": "WorkPackage",- "_links": {- "self": {- "href": "/api/v3/work_packages/1528",- "title": "Develop API"- },- "schema": { "href": "/api/v3/work_packages/schemas/11-2" },- "update": {- "href": "/api/v3/work_packages/1528",- "method": "patch",- "title": "Update Develop API"- },- "delete": {- "href": "/work_packages/bulk?ids=1528",- "method": "delete",- "title": "Delete Develop API"- },- "logTime": {- "href": "/work_packages/1528/time_entries/new",- "type": "text/html",- "title": "Log time on Develop API"- },- "move": {- "href": "/work_packages/1528/move/new",- "type": "text/html",- "title": "Move Develop API"- },- "attachments": {- "href": "/api/v3/work_packages/1528/attachments"- },- "addAttachment": {- "href": "/api/v3/work_packages/1528/attachments",- "method": "post"- },- "author": {- "href": "/api/v3/users/1",- "title": "OpenProject Admin - admin"- },- "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"- }- ],- "responsible": {- "href": "/api/v3/users/23",- "title": "Laron Leuschke - Alaina5788"- },- "relations": {- "href": "/api/v3/work_packages/1528/relations",- "title": "Show relations"- },- "revisions": {- "href": "/api/v3/work_packages/1528/revisions"- },- "assignee": {- "href": "/api/v3/users/11",- "title": "Emmie Okuneva - Adele5450"- },- "priority": {- "href": "/api/v3/priorities/2",- "title": "Normal"- },- "project": {- "href": "/api/v3/projects/1",- "title": "A Test Project"- },- "status": {- "href": "/api/v3/statuses/1",- "title": "New"- },- "type": {- "href": "/api/v3/types/1",- "title": "A Type"- },- "version": {- "href": "/api/v3/versions/1",- "title": "Version 1"- },- "availableWatchers": {- "href": "/api/v3/work_packages/1528/available_watchers"- },- "watch": {- "href": "/api/v3/work_packages/1528/watchers",- "method": "post",- "payload": {- "user": { "href": "/api/v3/users/1" }- }- },- "addWatcher": {- "href": "/api/v3/work_packages/1528/watchers",- "method": "post",- "payload": {- "user": { "href": "/api/v3/users/{user_id}" }- },- "templated": true- },- "removeWatcher": {- "href": "/api/v3/work_packages/1528/watchers/{user_id}",- "method": "delete",- "templated": true- },- "addRelation": {- "href": "/api/v3/relations",- "method": "post",- "title": "Add relation"- },- "changeParent": {- "href": "/api/v3/work_packages/694",- "method": "patch",- "title": "Change parent of Bug in OpenProject"- },- "addComment": {- "href": "/api/v3/work_packages/1528/activities",- "method": "post",- "title": "Add comment"- },- "parent": {- "href": "/api/v3/work_packages/1298",- "title": "nisi eligendi officiis eos delectus quis voluptas dolores"- },- "category": {- "href": "/api/v3/categories/1298",- "title": "eligend isi"- },- "children": [- {- "href": "/api/v3/work_packages/1529",- "title": "Write API documentation"- }- ],- "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"- }- ],- "timeEntries": {- "href": "/work_packages/1528/time_entries",- "type": "text/html",- "title": "Time entries"- },- "watchers": {- "href": "/api/v3/work_packages/1528/watchers"- },- "customField3": {- "href": "api/v3/users/14"- }- },- "id": 1528,- "subject": "Develop API",- "description": {- "format": "markdown",- "raw": "Develop super cool OpenProject API.",- "html": "<p>Develop super cool OpenProject API.</p>"- },- "scheduleManually": false,- "startDate": null,- "dueDate": null,- "derivedStartDate": null,- "derivedDueDate": null,- "estimatedTime": "PT2H",- "derivedEstimatedTime": "PT10H",- "percentageDone": 0,- "customField1": "Foo",- "customField2": 42,- "createdAt": "2014-08-29T12:40:53Z",- "updatedAt": "2014-08-29T12:44:41Z"- }--## View Work Package [GET]--+ Parameters- + id (required, integer, `1`) ... Work package id--+ Response 200 (application/hal+json)-- [Work Package][]--+ Response 404 (application/hal+json)-- Returned if the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--## Edit Work Package [PATCH]--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.--Additionally to the fields the client wants to change, it is mandatory to provide the value of `lockVersion` which was received-by the `GET` request this change originates from.--The value of `lockVersion` is used to implement [optimistic locking](http://en.wikipedia.org/wiki/Optimistic_concurrency_control).--+ Parameters- + id (required, integer, `1`) ... Work package 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.--+ Request (application/json)-- {- "lockVersion": 13,- "subject": "Lorem",- "_links": {- "parent": {- "href": "/api/v3/work_packages/42"- }- }- }--+ Response 200 (application/hal+json)-- [Work Package][]--+ 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:** edit work package, assign version, manage subtasks or move work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to edit the content of the work package."- }--+ Response 404 (application/hal+json)-- Returned if the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--+ Response 409 (application/hal+json)-- Returned if the resource was changed since the client requested it. This is determined using the `lockVersion` property.-- + Body-- {- "_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."- }--+ Response 422 (application/hal+json)-- Returned if:-- * the client tries to modify a read-only property (`PropertyIsReadOnly`)- * a constraint for a property was violated (`PropertyConstraintViolation`)- * the client provides a link to an invalid resource (`ResourceTypeMismatch`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "The subject might not be blank.",- "_embedded": {- "details": {- "attribute": "Subject"- }- }- }--## Delete Work Package [DELETE]--Deletes the work package, as well as:--* all associated time entries-* its hierarchy of child work packages--+ Parameters- + id (required, integer, `1`) ... Work package id--+ Response 204 (application/hal+json)-- Returned if the work package was deleted successfully.-- 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.-- + Body--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** delete work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to delete this work package."- }--+ Response 404 (application/hal+json)-- Returned if the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--## Work Package Schema [/api/v3/work_packages/schemas/{identifier}]--## View Work Package Schema [GET]--+ Parameters- + identifier (required, string, `12-13`) ... Identifier of the schema--+ Response 200 (application/hal+json)-- Returns the work package schema resource. See [Schemas](schemas) section for details.--+ Response 404 (application/hal+json)-- Returned if the schema does not exist or the client does not have sufficient permissions- to see it.-- **Required permission:** view work packages (on the project where this schema is used)-- *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 schema does not exist."- }--## Work Package Schemas [/api/v3/work_packages/schemas/{?filters}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/work_packages/schemas" }- },- "total": 5,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "Schema...",- "_links": {- "self": { "href": "/api/v3/work_packages/schemas/13-1" }- }- },- {- "_type": "Schema...",- "_links": {- "self": { "href": "/api/v3/work_packages/schemas/7-6" }- }- }- ]- }- }--## List Work Package Schemas [GET]--List work package schemas.--+ Parameters- + filters (required, string, `[{ "id": { "operator": "=", "values": ["12-1", "14-2"] } }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:- + id: The schema's id--+ Response 200 (application/hal+json)-- [Work Package Schemas][]--+ Response 400 (application/hal+json)-- Returned if the client sends invalid request.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidQuery",- "message": "Unknown filter."- }---+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** View work packages in any project.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to list schemas."- }--## Work Package Edit Form [/api/v3/work_packages/{id}/form]--This endpoint returns a form to allow a guided modification of an existing work package.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Work Package Edit Form [POST]--+ Parameters- + id (required, integer, `1`) ... ID of the work package being modified--+ Response 200 (application/hal+json)--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** edit work package, assign version, manage subtasks or move work package-- *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to edit the specified work package."- }--+ Response 404 (application/hal+json)-- Returned if the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--## Work Packages [/api/v3/work_packages{?notify,offset,pageSize,filters,sortBy,groupBy,showSums}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/work_packages" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "WorkPackage",- "_links": {- "self": {- "href": "/api/v3/work_packages/1"- }- },- "id": 1,- "subject": "Skipped other properties for brevity"- },- {- "_type": "WorkPackage",- "_links": {- "self": {- "href": "/api/v3/work_packages/2"- }- },- "id": 2,- "subject": "Skipped other properties for brevity"- }]- }- }--## List work packages [GET]--+ Parameters- + offset = `1` (optional, integer, `25`) ... Page number inside the requested collection.-- + pageSize = DEPENDING ON CONFIGURATION (optional, integer, `25`) ... Number of elements to display per page.-- + filters = `[{ "status_id": { "operator": "o", "values": null }}]` (optional, string, `[{ "type_id": { "operator": "=", "values": ['1', '2'] }}]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint. If no filter is to be applied, the client should send an empty array (`[]`).-- + sortBy = ["id", "asc"] (optional, string, `[["status", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint.-- + groupBy (optional, string, `status`) ... The column to group by.-- + showSums = `false` (optional, boolean, `true`) ... Indicates whether properties should be summed up if they support it.--+ Response 200 (application/hal+json)-- [Work Packages][]--+ Response 400 (application/hal+json)-- Returned if the client sends a query parameter, that the server knows, but does not understand.- E.g. by providing a syntactically incorrect `filters` parameter.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidQuery",- "message": "Operator can't be blank."- }---+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work packages (globally or in any project)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see work packages."- }--## Create Work Package [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.--A project link must be set when creating work packages through this route.--+ Parameters- + 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.--+ Request (application/json)-- {- "subject": "Lorem",- "customField41": 8,- "startDate": "2048-01-03",- "_links": {- "project": {- "href": "/api/v3/project/42"- },- "type": {- "href": "/api/v3/type/123"- },- "assignee": {- "href": "/api/v3/users/8"- },- "customField32": {- "href": "/api/v3/users/3"- }- }- }--+ Response 200 (application/hal+json)-- [Work Package][]--+ 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/work_packages/form]--This endpoint returns a form to allow a guided creation of a new work package.-The returned form will be pre-filled with default values for every property, if available.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).-A project link must be set when creating work packages through this route.--## Work Package Create Form [POST]--+ Response 200 (application/hal+json)--Returns the form resource that was created. See [Forms](/docs/api/forms) section for details.---## Work Packages by Project [/api/v3/projects/{id}/work_packages{?offset,pageSize,filters,sortBy,groupBy,showSums,notify}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/projects/14/work_packages" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "WorkPackage",- "_links": {- "self": {- "href": "/api/v3/work_packages/1"- }- },- "id": 1,- "subject": "Skipped other properties for brevity"- },- {- "_type": "WorkPackage",- "_links": {- "self": {- "href": "/api/v3/work_packages/2"- }- },- "id": 2,- "subject": "Skipped other properties for brevity"- }]- }- }--## List work packages by project [GET]--+ Parameters- + id (required, integer, `1`) ... Project id-- + offset = `1` (optional, integer, `25`) ... Page number inside the requested collection.-- + pageSize = DEPENDING ON CONFIGURATION (optional, integer, `25`) ... Number of elements to display per page.-- + filters = `[{ "status_id": { "operator": "o", "values": null }}]` (optional, string, `[{ "type_id": { "operator": "=", "values": ['1', '2'] }}]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint. If no filter is to be applied, the client should send an empty array (`[]`).-- + sortBy = ["id", "asc"] (optional, string, `[["status", "asc"]]`) ... JSON specifying sort criteria.- Accepts the same format as returned by the [queries](#queries) endpoint.-- + groupBy (optional, string, `status`) ... The column to group by.-- + showSums = `false` (optional, boolean, `true`) ... Indicates whether properties should be summed up if they support it.--+ Response 200 (application/hal+json)-- [Work Packages by Project][]--+ Response 400 (application/hal+json)-- Returned if the client sends a query parameter, that the server knows, but does not understand.- E.g. by providing a syntactically incorrect `filters` parameter.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidQuery",- "message": "Operator can't be blank."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view 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 see the work packages of 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 permission:** view project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified project does not exist."- }--## Create work package 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)-- [Work Package][]--+ 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 For Project [/api/v3/projects/{id}/work_packages/form]--This endpoint returns a form to allow a guided creation of a new work package.-The returned form will be pre-filled with default values for every property, if available.--For more details and all possible responses see the general specification of [Forms](/docs/api/forms).--## Work Package Create Form For Project [POST]--+ Parameters- + id (required, integer, `1`) ... ID of the project in which the work package will be created--+ Response 200 (application/hal+json)-- Returns the form resource that was updated. See [Forms](/docs/api/forms) section for details.--## Relations [/api/v3/work_packages/{work_package_id}/relations]--## Create Relation [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 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.--+ Parameters- + work_package_id (required, integer, `1`) ... Work package id--+ Request Create Relation (application/json)-- + Body-- {- "_links":- {- "from": { "href": "/api/v3/work_packages/42" },- "to": { "href": "/api/v3/work_packages/84" }- }- "type": "duplicates",- "description": "This is the same thing. Let's track it in one place only, shall we?"- }--+ Response 201 (application/hal+json)--Returns the relation resource. See [Relations](relations) for more information.--+ 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:** manage work package relations-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to create a relation."- }--+ Response 409 (application/hal+json)-- Returned if there already exists a relation between the given work packages of **any** type- or if the relation is not allowed.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:UpdateConflict",- "message": "Couldn't update the resource because of conflicting modifications."- }--+ Response 422 (application/hal+json)-- 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`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",- "message": "Delay must be a number greater than or equal to 0",- "_embedded": {- "details": {- "attribute": "delay"- }- }- }--## List relations [GET]--Lists all relations this work package is involved in.--+ Parameters- + work_package_id (required, integer, `1`) ... Work package id--+ Response 302 (text/plain)-- + Headers-- Location: /api/v3/relations?involved={work_package_id}-- + Body-- You are being redirected to /api/v3/relations?involved={work_package_id}--## Work Package Relation Form [/api/v3/work_packages/{id}/relations/form]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/relations/form" },- "validate": {- "href": "/api/v3/relations/form",- "method": "POST"- },- "commit": {- "href": "/api/v3/relations",- "method": "PATCH"- }- },-- "_type": "Form",-- "_embedded": {- "payload": {- "_links": {- "from": { "href": "/api/v3/work_packages/4534" },- "to": { "href": "/api/v3/work_packages/3857" }- },- "_type": "WorkPackage",- "type": "follows",- "delay": 3,- "description": "let it rest for 3 days"- },- "schema": {- "_type": "Schema",-- "id": {- "name": "ID",- "type": "Integer",- "writable": false- },- "type": {- "name": "Type",- "type": "String",- "writable": true,- "allowedValues": [- "relates", "duplicates", "duplicated", "blocks", "blocked",- "precedes", "follows", "includes", "partof", "requires", "required"- ]- },- "reverseType": {- "name": "Reverse Type",- "type": "String",- "writable": false- },- "description": {- "name": "Description",- "type": "String",- "writable": true- },- "from": {- "_links": {- "allowedValues": [- { "href": "/api/v3/work_packages/{id}" }- ]- },-- "name": "From work package",- "type": "WorkPackage",- "writable": true- },- "to": {- "_links": {- "allowedValues": {- "href": "/api/v3/work_packages/{id}/available_relation_candidates",- "title": "Available work packages to relate to"- }- },-- "name": "To work package",- "type": "WorkPackage",- "writable": true- },- "delay": {- "name": "Delay",- "type": "Integer",- "writable": true- }- },- "validationErrors": {- "from": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:BadExampleError",- "message": "For the purpose of this example we need a validation error. The remainder of the response pretends there were no errors."- }- }- }- }--## Relation create form [POST]--+ Request-- {- "_type": "Relation",- "type": "follows",- "from": { "href": "/api/v3/work_packages/3493" },- "to": { "href": "/api/v3/work_packages/4582" },- "description": "let it rest for 3 days",- "delay": 3- }--+ Parameters- + id (required, integer, `1`) ... ID of the relation being modified--+ Response 200 (application/hal+json)-- [Work Package Relation Form][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** manage work package relations-- *Note that you will only receive this error, if you are at least allowed to see the involved work packages.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to edit the specified relation."- }--+ Response 404 (application/hal+json)-- Returned if the relation does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view (involved) work package(s), manage work package relations-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified relation does not exist."- }--## Watchers [/api/v3/work_packages/{work_package_id}/watchers]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/work_packages/14/watchers" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/1",- "title": "John Sheppard - j.sheppard"- },- "showUser": {- "href": "/users/1",- "type": "text/html"- },- "lock": {- "href": "/api/v3/users/1/lock",- "title": "Set lock on j.sheppard",- "method": "POST"- },- "delete": {- "href": "/api/v3/users/1",- "title": "Delete j.sheppard",- "method": "DELETE"- }- },- "id": 1,- "login": "j.sheppard",- "firstName": "John",- "lastName": "Sheppard",- "mail": "[email protected]",- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- },- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/2",- "title": "Jim Sheppard - j.sheppard2"- },- "lock": {- "href": "/api/v3/users/2/lock",- "title": "Set lock on j.sheppard2",- "method": "POST"- },- "delete": {- "href": "/api/v3/users/2",- "title": "Delete j.sheppard2",- "method": "DELETE"- }- },- "id": 2,- "login": "j.sheppard2",- "firstName": "Jim",- "lastName": "Sheppard",- "mail": "[email protected]",- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }]- }- }--## List watchers [GET]--+ Parameters- + work_package_id (required, integer, `1`) ... Work package id--+ Response 200 (application/hal+json)-- [Watchers][]--+ Response 403 (application/hal+json)-- 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.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see the watchers of this work package."- }--+ Response 404 (application/hal+json)-- 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.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--## Add watcher [POST]--Adds a watcher to the specified work package.--The request is expected to contain a single JSON object, that contains a link object under the `user` key.--The response will be user added as watcher.-In case the user was already watching the work package an `HTTP 200` is returned, an-`HTTP 201` if the user was added as a new watcher.--+ Parameters- + work_package_id (required, integer, `1`) ... Work package id--+ Request (application/json)-- {- "user": { "href": "/api/v3/users/1" }- }--+ Response 200 (application/hal+json)--Returns the user resource--+ Response 201 (application/hal+json)--Returns the user resource--+ Response 400 (application/hal+json)-- Occurs when the client did not send a valid JSON object in the request body.-- For example:-- * The request did not contain a single JSON object- * The JSON object did not contain the key `user`- * The value of `users` was not a link object-- + 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 permissions:**-- * view work package (for self)- * 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.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to add watchers to this work package."- }--+ Response 404 (application/hal+json)-- 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.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--+ Response 422 (application/hal+json)-- Returned if:-- * the client tries to specify a link to a resource that is not a user (`ResourceTypeMismatch`)- * the user specified is not allowed to watch that work package (`PropertyConstraintViolation`)- * the user specified does not exist (`PropertyConstraintViolation`)-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:ResourceTypeMismatch",- "message": "Expected resource of type 'User', but got a 'Status'.",- }--## Remove Watcher [/api/v3/work_packages/{work_package_id}/watchers/{id}]--## Remove watcher [DELETE]--Removes the specified user from the list of watchers for the given work package.--If the request succeeds, the specified user is not watching the work package anymore.--*Note: This might also be the case, if the specified user did not watch the work package prior to the request.*--+ Parameters- + work_package_id (required, integer, `1`) ... Work package id- + id (required, integer, `1`) ... User id--+ Response 204--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** delete work package watchers-- *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to remove watchers from this work package."- }--+ Response 404 (application/hal+json)-- Returned in one of the following cases:-- Either the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- Or the specified user does not exist at all.-- *Note that you will effectively not be able to change the watchers of a work package without being able to see the work package.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--## Available relation candidates [/api/v3/work_packages/{id}/available_relation_candidates{?filters,query,type,pageSize}]--Lists work packages with which this work package can be in a relation.-Only sound candidates are returned. For instance a work package cannot stand in relation to itself,-and a work package that follows another cannot precede it.--Candidates can be filtered. Most commonly one will want to filter by subject.-You can do this through the `filters` parameter which works just like the work package index.--For instance to find all work packages with "rollout" in their subject:--```-?filters=[{"subject":{"operator":"~","values":["rollout"]}}]-```--For convenience there is also a simple `query` parameter which is a shortcut for listing work packages-whose ID or subject contain the given string.--While the endpoint does support the pageSize parameter to limit the number of results it-**does not** support the offset parameter.--```-?query=112-```--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/projects/14/work_packages" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "WorkPackage",- "_links": {- "self": {- "href": "/api/v3/work_packages/1"- }- },- "id": 1,- "subject": "Skipped other properties for brevity"- },- {- "_type": "WorkPackage",- "_links": {- "self": {- "href": "/api/v3/work_packages/2"- }- },- "id": 2,- "subject": "Skipped other properties for brevity"- }]- }- }--## Available relation candidates [GET]--+ Parameters- + id (required, integer, `1`) ... Project id-- + pageSize (optional, integer, `25`) ... Maximum number of candidates to list (default 10)-- + filters (optional, string, `[{ "status_id": { "operator": "o", "values": null } }]`) ... JSON specifying filter conditions.- Accepts the same format as returned by the [queries](#queries) endpoint.-- + query (optional, string, `"rollout"`) ... Shortcut for filtering by ID or subject-- + type (optional, string, `"follows"`) ... Type of relation to find candidates for (default "relates")--+ Response 200 (application/hal+json)-- [Available relation candidates][]--## Available Watchers [/api/v3/work_packages/{id}/available_watchers]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/work_packages/1/available_watchers" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/1",- "title": "John Sheppard - j.sheppard"- },- "lock": {- "href": "/api/v3/users/1/lock",- "title": "Set lock on j.sheppard",- "method": "POST"- },- "delete": {- "href": "/api/v3/users/1",- "title": "Delete j.sheppard",- "method": "DELETE"- }- },- "id": 1,- "login": "j.sheppard",- "firstName": "John",- "lastName": "Sheppard",- "email": "[email protected]",- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- },- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/2",- "title": "Jim Sheppard - j.sheppard2"- },- "lock": {- "href": "/api/v3/users/2/lock",- "title": "Set lock on j.sheppard2",- "method": "POST"- },- "delete": {- "href": "/api/v3/users/2",- "title": "Delete j.sheppard2",- "method": "DELETE"- }- },- "id": 2,- "login": "j.sheppard2",- "firstName": "Jim",- "lastName": "Sheppard",- "email": "[email protected]",- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }]- }- }--## Available watchers [GET]--Gets a list of users that are able to be watchers of the specified work package.--+ Parameters- + id (required, integer, `1`) ... work package id--+ Response 200 (application/hal+json)-- [Available Watchers][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** add work package watchers-- *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--## Available projects for work package [/api/v3/work_packages/{id}/available_projects]--+ Model- + Body-- {- "_links": {- "self": {- "href": "/api/v3/work_packages/5/available_projects"- }- },- "_type": "Collection",- "total": 2,- "count": 2,- "_embedded": {- "elements": [- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/6",- "title": "A project"- },- "editWorkPackage": {- "href": "/api/v3//work_packages/{work_package_id}/form",- "templated": true,- "method": "post"- },- "createWorkPackage": {- "href": "/api/v3/projects/6/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/6/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/6/categories"- },- "versions": {- "href": "/api/v3/projects/6/versions"- }- },- "id": 6,- "identifier": "a_project",- "name": "A project",- "description": "Eveniet molestias omnis quis aut qui eum adipisci. Atque aut aut in exercitationem adipisci amet. Nisi asperiores quia ratione veritatis enim exercitationem magnam. Aut fuga architecto adipisci nihil. Et repellat pariatur. Aliquam et sed perferendis nostrum quaerat. Fugit doloremque voluptatem.",- "createdAt": "2015-07-06T13:28:14+00:00",- "updatedAt": "2015-10-01T09:55:02+00:00",- "type": "Customer Project"- },- {- "_type": "Project",- "_links": {- "self": {- "href": "/api/v3/projects/14",- "title": "Another project"- },- "createWorkPackage": {- "href": "/api/v3/projects/14/work_packages/form",- "method": "post"- },- "createWorkPackageImmediate": {- "href": "/api/v3/projects/14/work_packages",- "method": "post"- },- "categories": {- "href": "/api/v3/projects/14/categories"- },- "versions": {- "href": "/api/v3/projects/14/versions"- }- },- "id": 14,- "identifier": "another_project",- "name": "Another project",- "description": "",- "createdAt": "2016-02-29T12:50:20+00:00",- "updatedAt": "2016-02-29T12:50:20+00:00",- "type": null- }- ]- }- }--## Available projects for work package [GET]--Gets a list of projects that are available as projects to which the work package can be moved.--+ Parameters- + id (required, integer, `1`) ... work package id--+ Response 200 (application/hal+json)-- [Available projects for work package][]--+ Response 403 (application/hal+json)-- 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.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not authorized to access this resource."- }--+ Response 404 (application/hal+json)-- Returned if the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }------## Revisions [/api/v3/work_packages/{id}/revisions]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/work_packages/42/revisions" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "Revision",- "_links": {- "self": {- "href": "/api/v3/revisions/13"- },- "project": {- "href": "/api/v3/projects/1",- "title": "A Test Project"- },- "author": {- "href": "/api/v3/users/1",- "title": "John Sheppard - j.sheppard"- },- "showRevision": {- "href": "/projects/identifier/repository/revision/11f4b07"- }- },- "id": 13,- "identifier": "11f4b07dff4f4ce9548a52b7d002daca7cd63ec6",- "formattedIdentifier": "11f4b07",- "authorName": "John Sheppard",- "message": {- "format": "plain",- "raw": "This revision provides new features\n\nAn elaborate description",- "html": "<p>This revision provides new features<br/><br/>An elaborate description</p>"- },- "createdAt": "2015-07-21T13:36:59Z"- },- {- "_type": "Revision",- "_links": {- "self": {- "href": "/api/v3/revisions/14"- },- "project": {- "href": "/api/v3/projects/1",- "title": "A Test Project"- },- "author": {- "href": "/api/v3/users/2",- "title": "Jim Sheppard - j.sheppard"- },- "showRevision": {- "href": "/projects/identifier/repository/revision/029ed72a"- }- },- "id": 13,- "identifier": "029ed72a3b7b7c4ab332b1f6eaa6576e7c946059",- "formattedIdentifier": "029ed72a",- "authorName": "j1msheppard",- "message": {- "format": "plain",- "raw": "This revision fixes some stuff\n\nMore information here",- "html": "<p>This revision fixes some stuff<br/><br/>More information here</p>"- },- "createdAt": "2015-06-30T08:47:00Z"- }- ]- }- }---## Revisions [GET]--Gets a list of revisions that are linked to this work package, e.g., because it is referenced in the commit message of the revision.-Only linked revisions from repositories are shown if the user has the view changesets permission in the defining project.--+ Parameters- + id (required, integer, `1`) ... work package id--+ Response 200 (application/hal+json)-- [Revisions][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view work packages for the project the work package is contained in.-- *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to see linked revisions for this work package."- }--+ Response 404 (application/hal+json)-- Returned if the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work project does not exist."- }---## Work Package activities [/api/v3/work_packages/{id}/activities{?notify}]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/work_packages/1/revisions" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "Activity",- "_links": {- "self": {- "href": "/api/v3/activity/1"- },- "workPackage": {- "href": "/api/v3/work_packages/1"- },- "user": {- "href": "/api/v3/users/1"- }- },- "id": 1,- "details": [ ],- "comment": {- "format": "markdown",- "raw": "Lorem ipsum dolor sit amet.",- "html": "<p>Lorem ipsum dolor sit amet.</p>"- },- "createdAt": "2014-05-21T08:51:20Z",- "version": 1- },- {- "_type": "Activity",- "_links": {- "self": {- "href": "/api/v3/activity/2"- },- "workPackage": {- "href": "/api/v3/work_packages/1"- },- "user": {- "href": "/api/v3/users/1"- }- },- "id": 2,- "details": [ ],- "comment": {- "format": "markdown",- "raw": "Lorem ipsum dolor sit amet.",- "html": "<p>Lorem ipsum dolor sit amet.</p>"- },- "createdAt": "2014-05-21T08:51:22Z",- "version": 2- }]- }- }--## List work package activities [GET]--+ Parameters- + id (required, integer, `1`) ... Work package id--+ Response 200 (application/hal+json)-- [Work Package activities][]--+ Response 404 (application/hal+json)-- Returned if the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--## Comment work package [POST]--Creates an activity for the selected work package and, on success, returns the-updated activity.--+ Parameters- + id (required, integer, `1`) ... Work package 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.--+ Request (application/json)-- {- "comment": { "raw": "I think this is awesome!" }- }--+ Response 201 (application/hal+json)--Returns the activity resource--+ 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:** create journals-- *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to create a comment here."- }--+ Response 404 (application/hal+json)-- Returned if the work package does not exist or the client does not have sufficient permissions to see it.-- **Required permission:** view work package-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified work package does not exist."- }--## Available Assignees [/api/v3/projects/{project_id}/available_assignees]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/projects/42/available_assignees" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/1",- "title": "John Sheppard - j.sheppard"- },- "lock": {- "href": "/api/v3/users/1/lock",- "title": "Set lock on j.sheppard",- "method": "POST"- },- "delete": {- "href": "/api/v3/users/1",- "title": "Delete j.sheppard",- "method": "DELETE"- }- },- "id": 1,- "login": "j.sheppard",- "firstName": "John",- "lastName": "Sheppard",- "email": "[email protected]",- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- },- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/2",- "title": "Jim Sheppard - j.sheppard2"- },- "lock": {- "href": "/api/v3/users/2/lock",- "title": "Set lock on j.sheppard2",- "method": "POST"- },- "delete": {- "href": "/api/v3/users/2",- "title": "Delete j.sheppard2",- "method": "DELETE"- }- },- "id": 2,- "login": "j.sheppard2",- "firstName": "Jim",- "lastName": "Sheppard",- "email": "[email protected]",- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }]- }- }--## Available assignees [GET]--Gets a list of users that can be assigned to work packages in the given project.--+ Parameters- + project_id (required, integer, `1`) ... Project id--+ Response 200 (application/hal+json)-- [Available Assignees][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view 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 see the assignable users for 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 permission:** view project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified project does not exist."- }--## Available Responsibles [/api/v3/projects/{project_id}/available_responsibles]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/projects/42/available_responsibles" }- },- "total": 2,- "count": 2,- "_type": "Collection",- "_embedded": {- "elements": [- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/1",- "title": "John Sheppard - j.sheppard"- },- "lock": {- "href": "/api/v3/users/1/lock",- "title": "Set lock on j.sheppard",- "method": "POST"- },- "delete": {- "href": "/api/v3/users/1",- "title": "Delete j.sheppard",- "method": "DELETE"- }- },- "id": 1,- "login": "j.sheppard",- "firstName": "John",- "lastName": "Sheppard",- "email": "[email protected]",- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- },- {- "_type": "User",- "_links": {- "self": {- "href": "/api/v3/users/2",- "title": "Jim Sheppard - j.sheppard2"- },- "lock": {- "href": "/api/v3/users/2/lock",- "title": "Set lock on j.sheppard2",- "method": "POST"- },- "delete": {- "href": "/api/v3/users/2",- "title": "Delete j.sheppard2",- "method": "DELETE"- }- },- "id": 2,- "login": "j.sheppard2",- "firstName": "Jim",- "lastName": "Sheppard",- "email": "[email protected]",- "avatar": "https://example.org/users/1/avatar",- "status": "active",- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T08:51:20Z"- }]- }- }--## Available responsibles [GET]--Gets a list of users that can be assigned as the responsible of a work package in the given project.--+ Parameters- + project_id (required, integer, `1`) ... Project id--+ Response 200 (application/hal+json)-- [Available Responsibles][]--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions.-- **Required permission:** view 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 see the users available as responsible for 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 permission:** view project-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:NotFound",- "message": "The specified project does not exist."- }diff --git a/docs/api/apiv3/filters.apib b/docs/api/apiv3/filters.apibdeleted file mode 100644index 8b7caf9c8e0..00000000000--- a/docs/api/apiv3/filters.apib+++ /dev/null@@ -1,130 +0,0 @@-# Group Filters--Filter objects can be added to a number of endpoints in the OpenProject APIv3. With them, you can create powerful queries to endpoints to return the data that you want.--They all share the following basic properties:--- They consist of three items: A property to filter or a specific filter name, one or more values, and a filter operator that defines what query to produce with the given values-- You can combine any number of distinct filters can be added to the endpoint definitions in this API documentation-- A combination of filter objects are treated as an AND filter. OR filters are not yet possible in a single query, but this feature is tracked in https://community.openproject.com/wp/26837----## Filter syntax--The filter syntax is a JSON object that can be passed as a GET parameter to the endpoints as an URL-encoded JSON string looks like the following:----```-[- { "<filter name>": { "operator": "<operator>", "values": [<value>, ...] },- ...-]-```----**Example**--Filtering the work packages API endpoint for a work package that matches the subject or ID "12" and has a status with the ID=5.--```-[- { "subjectOrId": { "operator": "**", values: ["12"] } },- { "status": { "operator": "=", values: ["5"] } }-]-```----With the above JSON stringified and URL-encoded, this can be added to the `/api/v3/work_packages` endpoint using the `filter` parameter to form the URL:--```-https://community.openproject.com/api/v3/work_packages?filters=%5B%7B%22subjectOrId%22:%7B%22operator%22:%22**%22,%22values%22:%5B%2212%22%5D%7D%7D,%7B%22status%22:%7B%22operator%22:%22=%22,%22values%22:%5B%225%22%5D%7D%7D%5D-```--## Compression--As the above can become quite long, especially if a lot of filter values are included, the API offers to wrap all query props into a zlib compressed and base64 encoded property (`eprops`).-The property will then not only include the filter but the complete query props set (e.g. `pageSize`, `offset` and `columns`. So `eprops` is then a JSON object that is compressed and encoded.--**Example**--Instead of the request--```-https://community.openproject.com/api/v3/work_packages?filters=[%7B%22subjectOrId%22:%7B%22operator%22:%22**%22,%22values%22:[%2212%22]%7D%7D,%7B%22status%22:%7B%22operator%22:%22=%22,%22values%22:[%225%22]%7D%7D]&pageSize=10&sortBy=[[%22id%22,%20%22asc%22]]-```--Which in a non URL encoded style would be--```-https://community.openproject.com/api/v3/work_packages?filters=[{"subjectOrId":{"operator":"**","values":["12"]}},{"status":{"operator":"=","values":["5"]}}]&pageSize=10&sortBy=[["id", "asc"]]-```--All of the props can be put inside a json object--```-{- "filters": "[{\"subjectOrId\":{\"operator\":\"**\",\"values\":[\"12\"]}},{\"status\":{\"operator\":\"=\",\"values\":[\"5\"]}}]",- "sortBy": "[[\"id\",\"asc\"]]",- "pageSize": 10-}-```--Please note, that all objects that have to be json (e.g `filters`) will be double encoded.--That json object can then be compressed and encoded and the result sent over as the combined `eprops` parameter:--```-https://community.openproject.com/api/v3/work_packages?eprops=eJxtjTELwjAUhP%2FLjSWDFVwCLt2cHBz7OsT2VSKFlLwXQUv%2Bu0lXHe%2B7%2B7gN%0As1%2BUo8Ci3wiS7k8e9RovE8EWEFaOTkMsidA0BEN4uSWxFNIT2iNhyNlUV50m%0A%2BaOdf6zTLg0wkBC1e9f3gv20L52Mpa%2Ft6h588x%2BGbQ%2F5C12YN%2BM%3D%0A-```--## Available filters--The availability of filters depend on the endpoint you're querying and will be listed in each endpoint definition. For work packages, you can also [start using filters in the work packages module](https://community.openproject.com/projects/openproject/work_packages) to build your query and then simply copy the URL from your browser to get the resulting filter values and their operators.----## Available operators--The following table is a list of all available operators. Not all endpoints and parameters support all values, but this list serves as a lookup table for identifying and using the operators. When building a filter object, you use the **symbol** listed below.----| Symbol | Description of filtered properties | Values array contains |-| ------ | ------------------------------------------------------------ | -------------------------- |-| `=` | are equal to one of the given value(s) | At least one typed value |-| `!` | are not equal one of the given value(s) | At least one typed value |-| `>=` | are greater or equal than the given value | One numerical value |-| `<=` | are lesser or equal than the given value | One numerical value |-| `t-` | are the given number of days in the past | 1 integer (days) |-| `t+` | are the given number of days in the future | 1 integer (days) |-| `<t+` | are *less than* the given number of days in the future | 1 integer (days) |-| `>t+` | are *more than* the given number of days in the future | 1 integer (days) |-| `>t-` | are *less than* the given number of days in the past | 1 integer (days) |-| `<t-` | are *more than* the given number of days in the past | 1 integer (days) |-| `*` | are not NULL | *nothing, values is empty* |-| `!*` | are NULL | *nothing, values is empty* |-| `**` | searches the given string in all string-based attributes | One string value |-| `=d` | are on the given date | 1 ISO8601 date/datetime |-| `<>d` | are between the two given dates. | 2 ISO8601 date/datetimes |-| `w` | are in this week | *nothing, values is empty* |-| `t` | are today | *nothing, values is empty* |-| `~` | are containing the given words (SQL LIKE) in that order | At least one string value |-| `!~` | are *not* containing the given words (SQL LIKE) in that order | At least one string value |----**Special operators for work packages**--There are some additional operators only in use for work packages:--| Symbol | Description of filtered properties | Values array contains |-| ------ | ------------------------------------------ | -------------------------- |-| `o` | the status of the work package is *open* | *nothing, values is empty* |-| `c` | the status of the work package is *closed* | *nothing, values is empty* |-| `ow` | the work packages have a manual sort order | *nothing, values is empty* |--There are also relation filters for work packages that have the symbols `blocks/blocked` `children/parent` `follows/precedes` `duplicates/duplicated` `partof/includes` `relates` `requires/required` depending on the direction of the relation and take as value the work package ID that is the target node of the relation.diff --git a/docs/api/apiv3/forms.apib b/docs/api/apiv3/forms.apibdeleted file mode 100644index cec6661a76c..00000000000--- a/docs/api/apiv3/forms.apib+++ /dev/null@@ -1,237 +0,0 @@-# Group Forms--This API provides forms as a concept to aid in editing or creating resources. The goal of forms is to:--* make writable properties of a resource discoverable-* show to which values a property can be set-* validate changes to a resource and indicate validation errors--These benefits aside, a client can freely choose to immediately edit a resource without prior validation by a form.-In the case of an invalid request the edit will fail and return appropriate errors nevertheless.--A form is associated to a single resource and aids in performing changes on that resource.-When posting to a form endpoint with an empty request body or an empty JSON object,-you will receive an initial form for the associated resource.-Subsequent calls to the form should contain a single JSON object as described by the form.--## Actions--| Link | Description | Condition |-|:-------------------:| --------------------------------------------------------------------- | -------------------------------- |-| validate | Validate changes, show errors and allowed values for changed resource | |-| commit | Actually perform changes to the resource | form content is valid |-| previewMarkup | Post markup (e.g. markdown) here to receive an HTML-rendered response | |--## Linked Properties--| Link | Description | Type | Nullable | Supported operations |-|:-------------------:| ------------------------------------------------ | ------------- | -------- | -------------------- |-| self | This form | Form | | READ |--## Embedded Properties:--Apart from the linked properties, forms contain always three other embedded properties:--* `payload`-* `schema`-* `validationErrors`--Their purpose is explained below.--### Payload--The payload contains an edited version of the resource that will be modified when committing the form.-This representation contains all writable properties of the resource and reflects all changes that the latest call to **validate** included,-thereby acting as a preview for the changes.--In case the client tries to set the value to something invalid, the invalid change is also reflected here. However a validation error (see below)-indicates that a commit of this payload would fail.--It might happen that setting one property affects the allowed values for another property. Thus by changing a property A-the current value of another property B might become invalid. If the client did not yet touch the value of B, the payload will-contain a default value for that property. Nevertheless the client will also receive an appropriate validation error for value B.--The content of this element *can* be used as a template for the request body of a call to **validate** or **commit**.--A call to **validate** and **commit** does not need to include all properties that were defined in the `payload` section.-It is only necessary to include the properties that you want to change, as well as the `lockVersion` if one is present.-However you *may* include all the properties sent in the `payload` section.--### Schema--The schema embedded in a form is a normal [schema describing the underlying resource](#schema).-However, the embedded schema can change with each revalidation of the form.-For example it might be possible, that changing the type of a work package affects its available properties,-as well as possible values for certain properties.-As this makes the embedded schema very dynamic, it is not included as a static link.--### Validation Errors--Like a [schema](#schema) the validation errors build a dictionary where the key is a property name.-Each value is an error object that indicates the error that occurred validating the corresponding property.-There are only key value pairs for properties that failed validation, the element is empty if all validations succeeded.--However note that even in the case of validation errors, the response you receive from the form endpoint will be an HTTP 200.-That is because the main purpose of a form is helping the client to sort out validation errors.--### Meta object--Form resources may have an additional `_meta` object that contains parameters to be sent together with the resource,-but that do not belong to the resource itself. For example, parameters on if and how to send notifications for the action-performed with the API request can be sent.--Each individual endpoint will describe their meta properties, if available.--## Example Form [/api/v3/example/form]--+ Model- + Body-- {- "_links": {- "self": { "href": "/api/v3/example/form" },- "validate": {- "href": "/api/v3/example/form",- "method": "POST"- },- "previewMarkup": {- "href": "/api/v3/render/markdown",- "method": "POST"- },- "commit": {- "href": "/api/v3/example",- "method": "PATCH"- }- },-- "_type": "Form",-- "_embedded": {- "payload": {- "_links": {- "status": { "href": "/api/v3/statuses/1" }- },- "_type": "Example",- "lockVersion": 5,- "subject": "An example title"- },- "schema": {- "_type": "Schema",- "_links": {- "self": { "href": "/api/v3/example/schema" }- },-- "lockVersion": {- "type": "Integer",- "writable": false- },- "subject": {- "type": "String",- "minLength": 1,- "maxLength": 255- },- "status": {- "_links": {- "allowedValues": [- { "href": "/api/v3/statuses/1", "title": "New" },- { "href": "/api/v3/statuses/2", "title": "Closed" }- ]- },-- "type": "Status",-- "_embedded": {- "allowedValues": [- {- "_links": { "self": { "href": "/api/v3/statuses/1" } },- "_type": "Status",- "id": 1,- "name": "New",- "position": 1,- "isDefault": true,- "isClosed": false,- "defaultDoneRatio": 0,- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T09:12:00Z"- },- {- "_links": { "self": { "href": "/api/v3/statuses/2" } },- "_type": "Status",- "id": 2,- "name": "Closed",- "position": 2,- "isDefault": false,- "isClosed": true,- "defaultDoneRatio": 100,- "createdAt": "2014-05-21T08:51:20Z",- "updatedAt": "2014-05-21T09:12:00Z"- }- ]- }- }- },- "validationErrors": {- "subject": {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:BadExampleError",- "message": "For the purpose of this example we need a validation error. The remainder of the response pretends there were no errors."- }- }- }- }--## show or validate form [POST]--This is an example of how a form might look like. Note that this endpoint does not exist in the actual implementation.--+ Request (application/json)-- {- "lockVersion": 5,- "_type": "Example",- "subject": "An example title"- }--+ Response 200 (application/hal+json)-- [Example Form][]--+ Response 400 (application/hal+json)-- Occurs when the client did not send a valid JSON object in the request body and the request body- was not empty.-- Note that this error only occurs when the content is not at all a single JSON object.- It **does not occur** for requests containing undefined properties or invalid property values.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:InvalidRequestBody",- "message": "The request body was neither empty, nor did it contain a single JSON object."- }--+ Response 403 (application/hal+json)-- Returned if the client does not have sufficient permissions to modify the associated resource.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:MissingPermission",- "message": "You are not allowed to edit example resources."- }--+ Response 409 (application/hal+json)-- Returned if underlying resource was changed since the client requested the form. This is determined using the `lockVersion` property.-- + Body-- {- "_type": "Error",- "errorIdentifier": "urn:openproject-org:api:v3:errors:UpdateConflict",- "message": "The resource you are about to edit was changed in the meantime."- }diff --git a/docs/api/apiv3/group-objects.apib b/docs/api/apiv3/group-objects.apibdeleted file mode 100644index 5f246e872e5..00000000000--- a/docs/api/apiv3/group-objects.apib+++ /dev/null@@ -1,229 +0,0 @@-# Group Collections--Whenever a client calls a resource that can return more than one element, it will receive a collection of elements.-However as collections can become quite large, the API will **not** simply return a JSON array, but a special collection-object that will contain the actual elements in its embedded property `elements`.--Collections *may* be paginated, this means that a single response from the server will not contain all elements of the collection,-but only a subset. In this case the client can issue further requests to retrieve the remaining elements.-There are two ways to access the result pages of a paginated collection:--* offset based pagination-* cursor based pagination--The available ways of pagination depend on the collection queried. Some collections feature no pagination at all, meaning they-will always return all elements. Others might only offer one of the two pagination methods or both of them.-An explanation of [offset](#collections-offset-based-pagination) and [cursor](#collections-cursor-based-pagination) based-pagination can be found below the links table.--A collection also carries meta information like the total count of elements in the collection or - in case of a paginated collection --the amount of elements returned in this response and action links to retrieve the remaining elements.--## Local Properties--| Property | Description | Type | Availability |-|:--------:| --------------------------------------------------------------- | ------- | --------------------------- |-| total | The total amount of elements available in the collection | Integer | always |-| pageSize | Amount of elements that a response will hold | Integer | when paginated |-| count | Actual amount of elements in this response | Integer | always |-| offset | The page number that is requested from paginated collection | Integer | when offset based available |-| groups | Summarized information about aggregation groups | Object | when grouping |-| totalSums| Aggregations of supported values for elements of the collection | Object | when showing sums |--## Links--| Link | Description | Availability |-|:----------------:| ------------------------------------------------------------------------ | --------------------------- |-| self | Link to the current page in the collection | always |-| changeSize | Templated link to change the page size, might change relative position | when paginated |-| jumpTo | Templated link to jump to a specified offset | when offset based available |-| nextByOffset | Link to retrieve the following page of elements (offset based) | when offset based available |-| previousByOffset | Link to retrieve the preceding page of elements (offset based) | when offset based available |-| nextByCursor | Link to retrieve the elements following the current page (cursor based) | when cursor based available |-| previousByCursor | Link to retrieve the elements preceding the current page (cursor based) | when cursor based available |--## Offset based pagination [/api/v3/examples{?offset,pageSize}]--Offset based pagination works by specifying two values: the **offset** and the **pageSize**. The page size determines how many items there will-be in a single response at most. The offset determines which page is returned as response, with 1 being the first page (one-indexed).-Note that the server might not allow arbitrarily large page sizes, a client should therefore always check the page size accepted by the server-using the **pageSize** property of the response.--The benefit of offset based pagination is that the total number of pages can be easily determined and that it is possible to jump-to arbitrary pages within the collection. Offset based pagination is therefore well suited when a result is displayed to the end user-in the form of multiple pages anyway.--A drawback of offset based pagination comes with concurrent modification of the collection. If the collection is modified-between two page requests, it is possible that the client receives elements close to the page boundaries twice or does not see them at all.--## view offset based [GET]--+ Parameters- + offset = `1` (optional, integer, `25`) ... Page number inside the requested collection.-- + pageSize (optional, integer, `25`) ... Number of elements to display per page.--+ Response 200 (application/hal+json)-- + Body-- {- "_links": {- "self": { "href": "/api/v3/examples?offset=25&pageSize=25" },- "jumpTo": {- "href": "/api/v3/examples?offset={offset}&pageSize=25",- "templated": true- },- "changeSize": {- "href": "/api/v3/examples?offset=25&pageSize={size}",- "templated": true- },- "previousByOffset": { "href": "/api/v3/examples?offset=0&pageSize=25" },- "previousByCursor": { "href": "/api/v3/examples?before=bar&pageSize=25" }- },- "_type": "Collection",- "total": 27,- "pageSize": 25,- "count": 2,- "offset": 25,- "_embedded": {- "elements": [- { "foo": "bar" },- { "foo": "baz" }- ]- }- }--## Cursor based pagination [/api/v3/examples{?before,after,pageSize}]--Cursor based pagination is intended to be used, when the client needs a consistent and complete (sub-) range of the collection,-e.g. in infinite scrolling scenarios. In cursor based pagination the client will receive a link to the next and-the previous page in the result set. The guarantee is, that the boundaries of that page will align with the boundaries of the current page,-regardless of changes to the collection.--The drawback for cursor based pagination is, that it is not immediately determinable how many "next" and how many "previous" pages there are.-Cursor based pagination is therefore less suited for use cases where you want to directly "jump" to an arbitrary page.--## view cursor based [GET]--+ Parameters- + before (optional, string, `bar`) ... Display the elements preceding the given element.- Note that the value of this parameter is very specific to the collection, a client should not- try to infer values, but use the **previous** link offered by the collection.-- + after (optional, string, `buz`) ... Display the elements succeeding the given element.- Note that the value of this parameter is very specific to the collection, a client should not- try to infer values, but use the **next** link offered by the collection.-- + pageSize (optional, integer, `25`) ... Number of elements to display per page.--+ Response 200 (application/hal+json)-- + Body-- {- "_links": {- "self": { "href": "/api/v3/examples?after=buz&pageSize=25" },- "changeSize": {- "href": "/api/v3/examples?after=buz&pageSize={size}",- "templated": true- },- "previousByCursor": { "href": "/api/v3/examples?before=bar&pageSize=25" }- },- "_type": "Collection",- "total": 27,- "pageSize": 25,- "count": 2,- "_embedded": {- "elements": [- { "foo": "bar" },- { "foo": "baz" }- ]- }- }--## Aggregations [/api/v3/examples{?groupBy,showSums}]--Collections may support different kinds of aggregations.-Some properties can be summed up. If requested the collection will include the `totalSums` property,-which is a dictionary, where the keys represent the names of the summed properties and the values represent their sums.-Note that you have to mark a column as summable in the instance settings, to be able to retrieve its sums.--It is also possible to group the contents of a collection. In this case:--* the `elements` will be ordered by the specified group key (so that the client receives one group after another)-* The `groups` property will contain a collection of group objects--A group object contains aggregation data for the elements of a group:--### Local Properties--| Property | Description | Type | Availability |-|:--------:| ------------------------------------------------------------------- | ---------- | --------------------------- |-| value | The value to which the group belongs (e.g. the Status' name) | String | always |-| count | Actual amount of elements in this response | Integer | always |-| sums | A dictionary with property sums inside this group (see `totalSums`) | Dictionary | when sums requested |--## Links--| Link | Description | Availability |-|:----------------:| ------------------------------------------------------------| ------------------------------------- |-| valueLink | Link to the corresponding grouping object (e.g. the Status) | only if grouping by a linkable object |--Note that you will always receive a `value`, but only receive a `valueLink` if the grouping was performed-on a linkable property.--## view aggregated result [GET]--+ Parameters- + groupBy (optional, string, `status`) ... The column to group by.- Note: Aggregation is as of now only supported by the work package collection.- You can pass any column name as returned by the [queries](#queries) endpoint.-- + showSums = `false` (optional), boolean, `true` ... Indicates whether properties should be summed up if they support it.--+ Response 200 (application/hal+json)-- + Body-- {- "_links": {- "self": { "href": "/api/v3/examples?groupBy=foo&showSums=true" },- "changeSize": {- "href": "/api/v3/examples?after=buz&pageSize={size}",- "templated": true- }- },- "_type": "Collection",- "total": 5,- "pageSize": 25,- "count": 5,- "_embedded": {- "elements": [- { "foo": "bar", "i": 1 },- { "foo": "bar", "i": 2 },- { "foo": "bar", "i": 3 },- { "foo": "baz", "i": 4 },- { "foo": "baz", "i": 5 }- ],- "groups": [- {- "value : "bar",- "count": 3,- "sums": {- "i": 6- }- },- {- "value : "baz",- "count": 2,- "sums": {- "i": 9- }- }- ],- "totalSums": {- "i": 15- }- }- }diff --git a/docs/api/apiv3/index.apib b/docs/api/apiv3/index.apibdeleted file mode 100644index 4884fa7f289..00000000000--- a/docs/api/apiv3/index.apib+++ /dev/null@@ -1,39 +0,0 @@-<!-- include(introduction.apib) -->-<!-- include(basic-objects.apib) -->-<!-- include(group-objects.apib) -->-<!-- include(filters.apib) -->-<!-- include(forms.apib) -->--<!-- include(endpoints/actions.apib) -->-<!-- include(endpoints/activities.apib) -->-<!-- include(endpoints/attachments.apib) -->-<!-- include(endpoints/budgets.apib) -->-<!-- include(endpoints/categories.apib) -->-<!-- include(endpoints/configuration.apib) -->-<!-- include(endpoints/custom-actions.apib) -->-<!-- include(endpoints/custom-options.apib) -->-<!-- include(endpoints/documents.apib) -->-<!-- include(endpoints/grids.apib) -->-<!-- include(endpoints/groups.apib) -->-<!-- include(endpoints/help_texts.apib) -->-<!-- include(endpoints/members.apib) -->-<!-- include(endpoints/news.apib) -->-<!-- include(endpoints/posts.apib) -->-<!-- include(endpoints/principals.apib) -->-<!-- include(endpoints/priorities.apib) -->-<!-- include(endpoints/projects.apib) -->-<!-- include(endpoints/queries.apib) -->-<!-- include(endpoints/relations.apib) -->-<!-- include(endpoints/render.apib) -->-<!-- include(endpoints/revisions.apib) -->-<!-- include(endpoints/roles.apib) -->-<!-- include(endpoints/root.apib) -->-<!-- include(endpoints/schemas.apib) -->-<!-- include(endpoints/statuses.apib) -->-<!-- include(endpoints/time_entries.apib) -->-<!-- include(endpoints/types.apib) -->-<!-- include(endpoints/user-preferences.apib) -->-<!-- include(endpoints/users.apib) -->-<!-- include(endpoints/versions.apib) -->-<!-- include(endpoints/wiki_pages.apib) -->-<!-- include(endpoints/work-packages.apib) -->diff --git a/docs/api/apiv3/introduction.apib b/docs/api/apiv3/introduction.apibdeleted file mode 100644index 0902bf7e803..00000000000--- a/docs/api/apiv3/introduction.apib+++ /dev/null@@ -1,113 +0,0 @@-## Introduction--The APIv3 is a hypermedia REST API, a shorthand for "Hypermedia As The Engine Of Application State" (HATEOAS).-This means that each endpoint of this API will have links to other resources or actions defined in the resulting body.--These related resources and actions for any given resource will be context sensitive. For example, only actions that the-authenticated user can take are being rendered. This can be used to dynamically identify actions that the user might take for any-given response.--As an example, if you fetch a work package through the [Work Package endpoint](#work-packages), the `update` link will only-be present when the user you authenticated has been granted a permission to update the work package in the assigned project.--## HAL+JSON--HAL is a simple format that gives a consistent and easy way to hyperlink between resources in your API.-Read more in the following specification: https://tools.ietf.org/html/draft-kelly-json-hal-08--**OpenProject API implementation of HAL+JSON format** enriches JSON and introduces a few meta properties:-- - `_type` - specifies the type of the resource (e.g.: WorkPackage, Project)- - `_links` - contains all related resource and action links available for the resource- - `_embedded` - contains all embedded objects--HAL does not guarantee that embedded resources are embedded in their full representation, they might as well be-partially represented (e.g. some properties can be left out).-However in this API you have the guarantee that whenever a resource is **embedded**, it is embedded in its **full representation**.--## API response structure--All API responses contain a single HAL+JSON object, even collections of objects are technically represented by-a single HAL+JSON object that itself contains its members. More details on collections can be found-in the [Collections Section](#collections).--# Authentication--The API supports the following authentication schemes: OAuth2, session based authentication, and basic auth.--Depending on the settings of the OpenProject instance many resources can be accessed without being authenticated.-In case the instance requires authentication on all requests the client will receive an **HTTP 401** status code-in response to any request.--Otherwise unauthenticated clients have all the permissions of the anonymous user.--## Session-based Authentication--This means you have to login to OpenProject via the Web-Interface to be authenticated in the API.-This method is well-suited for clients acting within the browser, like the Angular-Client built into OpenProject.--In this case, you always need to pass the HTTP header `X-Requested-With "XMLHttpRequest"` for authentication.--## API Key through Basic Auth--Users can authenticate towards the API v3 using basic auth with `apikey` (as a string, NOT your API key) as the user name and their API key as the password.-Users can find their API key on their account page.--Example:--```bash-API_KEY=2519132cdf62dcf5a66fd96394672079f9e9cad1-curl -u apikey:$API_KEY https://community.openproject.com/api/v3/users/42-```--## OAuth2.0 authentication--OpenProject allows authentication and authorization with OAuth2 with *Authorization code flow*, as well as *Client credentials* operation modes.--To get started, you first need to register an application in the OpenProject OAuth administration section of your installation.-This will save an entry for your application with a client unique identifier (`client_id`) and an accompanying secret key (`client_secret`).--You can then use one the following guides to perform the supported OAuth 2.0 flows:--- [Authorization code flow](https://oauth.net/2/grant-types/authorization-code)-- [Client credentials](https://oauth.net/2/grant-types/client-credentials/) - Requires an application to be bound to an impersonating user for non-public access--## Why not username and password?--The simplest way to do basic auth would be to use a user's username and password naturally.-However, OpenProject already has supported API keys in the past for the API v2, though not through basic auth.--Using **username and password** directly would have some advantages:--* It is intuitive for the user who then just has to provide those just as they would when logging into OpenProject.-* No extra logic for token management necessary.--On the other hand using **API keys** has some advantages too, which is why we went for that:--* If compromised while saved on an insecure client the user only has to regenerate the API key instead of changing their password, too.-* They are naturally long and random which makes them invulnerable to dictionary attacks and harder to crack in general.--Most importantly users may not actually have a password to begin with. Specifically when they have registered-through an OpenID Connect provider.--# Cross-Origin Resource Sharing (CORS)--By default, the OpenProject API is _not_ responding with any CORS headers.-If you want to allow cross-domain AJAX calls against your OpenProject instance, you need to enable CORS headers being returned.--Please see [our API settings documentation](https://docs.openproject.org/system-admin-guide/system-settings/api-settings/) on-how to selectively enable CORS.---# Allowed HTTP methods--- `GET` - Get a single resource or collection of resources-- `POST` - Create a new resource or perform-- `PATCH` - Update a resource-- `DELETE` - Delete a resource--# Compression--Responses are compressed if requested by the client. Currently [gzip](http://www.gzip.org/) and [deflate](https://tools.ietf.org/html/rfc1951)-are supported. The client signals the desired compression by setting the [`Accept-Encoding` header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3).-If no `Accept-Encoding` header is send, `Accept-Encoding: identity` is assumed which will result in the API responding uncompressed.diff --git a/docs/api/apiv3/openapi-spec.yml b/docs/api/apiv3/openapi-spec.ymlnew file mode 100644index 00000000000..60a58d5b2f0--- /dev/null+++ b/docs/api/apiv3/openapi-spec.yml@@ -0,0 +1,767 @@+---+openapi: 3.0.0+info:+ description: |-+ You're looking at the current **stable** documentation of the OpenProject APIv3. If you're interested in the current+ development version, please go to https://docs.openproject.org/api/++ ## Introduction++ The APIv3 is a hypermedia REST API, a shorthand for "Hypermedia As The Engine Of Application State" (HATEOAS).+ This means that each endpoint of this API will have links to other resources or actions defined in the resulting body.++ These related resources and actions for any given resource will be context sensitive. For example, only actions that the+ authenticated user can take are being rendered. This can be used to dynamically identify actions that the user might take for any+ given response.++ As an example, if you fetch a work package through the [Work Package endpoint](#work-packages), the `update` link will only+ be present when the user you authenticated has been granted a permission to update the work package in the assigned project.++ ## HAL+JSON++ HAL is a simple format that gives a consistent and easy way to hyperlink between resources in your API.+ Read more in the following specification: https://tools.ietf.org/html/draft-kelly-json-hal-08++ **OpenProject API implementation of HAL+JSON format** enriches JSON and introduces a few meta properties:++ - `_type` - specifies the type of the resource (e.g.: WorkPackage, Project)+ - `_links` - contains all related resource and action links available for the resource+ - `_embedded` - contains all embedded objects++ HAL does not guarantee that embedded resources are embedded in their full representation, they might as well be+ partially represented (e.g. some properties can be left out).+ However in this API you have the guarantee that whenever a resource is **embedded**, it is embedded in its **full representation**.++ ## API response structure++ All API responses contain a single HAL+JSON object, even collections of objects are technically represented by+ a single HAL+JSON object that itself contains its members. More details on collections can be found+ in the [Collections Section](#collections).++ # Authentication++ The API supports the following authentication schemes: OAuth2, session based authentication, and basic auth.++ Depending on the settings of the OpenProject instance many resources can be accessed without being authenticated.+ In case the instance requires authentication on all requests the client will receive an **HTTP 401** status code+ in response to any request.++ Otherwise unauthenticated clients have all the permissions of the anonymous user.++ ## Session-based Authentication++ This means you have to login to OpenProject via the Web-Interface to be authenticated in the API.+ This method is well-suited for clients acting within the browser, like the Angular-Client built into OpenProject.++ In this case, you always need to pass the HTTP header `X-Requested-With "XMLHttpRequest"` for authentication.++ ## API Key through Basic Auth++ Users can authenticate towards the API v3 using basic auth with `apikey` (as a string, NOT your API key) as the user name and their API key as the password.+ Users can find their API key on their account page.++ Example:++ ```bash+ API_KEY=2519132cdf62dcf5a66fd96394672079f9e9cad1+ curl -u apikey:$API_KEY https://community.openproject.com/api/v3/users/42+ ```++ ## OAuth2.0 authentication++ OpenProject allows authentication and authorization with OAuth2 with *Authorization code flow*, as well as *Client credentials* operation modes.++ To get started, you first need to register an application in the OpenProject OAuth administration section of your installation.+ This will save an entry for your application with a client unique identifier (`client_id`) and an accompanying secret key (`client_secret`).++ You can then use one the following guides to perform the supported OAuth 2.0 flows:++ - [Authorization code flow](https://oauth.net/2/grant-types/authorization-code)++ - [Client credentials](https://oauth.net/2/grant-types/client-credentials/) - Requires an application to be bound to an impersonating user for non-public access++ ## Why not username and password?++ The simplest way to do basic auth would be to use a user's username and password naturally.+ However, OpenProject already has supported API keys in the past for the API v2, though not through basic auth.++ Using **username and password** directly would have some advantages:++ * It is intuitive for the user who then just has to provide those just as they would when logging into OpenProject.++ * No extra logic for token management necessary.++ On the other hand using **API keys** has some advantages too, which is why we went for that:++ * If compromised while saved on an insecure client the user only has to regenerate the API key instead of changing their password, too.++ * They are naturally long and random which makes them invulnerable to dictionary attacks and harder to crack in general.++ Most importantly users may not actually have a password to begin with. Specifically when they have registered+ through an OpenID Connect provider.++ # Cross-Origin Resource Sharing (CORS)++ By default, the OpenProject API is _not_ responding with any CORS headers.+ If you want to allow cross-domain AJAX calls against your OpenProject instance, you need to enable CORS headers being returned.++ Please see [our API settings documentation](https://docs.openproject.org/system-admin-guide/system-settings/api-settings/) on+ how to selectively enable CORS.++ # Allowed HTTP methods++ - `GET` - Get a single resource or collection of resources++ - `POST` - Create a new resource or perform++ - `PATCH` - Update a resource++ - `DELETE` - Delete a resource++ # Compression++ Responses are compressed if requested by the client. Currently [gzip](http://www.gzip.org/) and [deflate](https://tools.ietf.org/html/rfc1951)+ are supported. The client signals the desired compression by setting the [`Accept-Encoding` header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3).+ If no `Accept-Encoding` header is send, `Accept-Encoding: identity` is assumed which will result in the API responding uncompressed.+ title: OpenProject API V3 (Stable)+ version: ''+servers: []+paths:+ "/api/v3":+ "$ref": "./paths/root.yml"+ "/api/v3/actions":+ "$ref": "./paths/actions.yml"+ "/api/v3/actions/{id}":+ "$ref": "./paths/action.yml"+ "/api/v3/activities/{id}":+ "$ref": "./paths/activity.yml"+ "/api/v3/attachments":+ "$ref": "./paths/attachments.yml"+ "/api/v3/attachments/{id}":+ "$ref": "./paths/attachment.yml"+ "/api/v3/budgets/{id}":+ "$ref": "./paths/budget.yml"+ "/api/v3/capabilities":+ "$ref": "./paths/capabilities.yml"+ "/api/v3/capabilities/context/global":+ "$ref": "./paths/capabilities_context_global.yml"+ "/api/v3/capabilities/{id}":+ "$ref": "./paths/capability.yml"+ "/api/v3/categories/{id}":+ "$ref": "./paths/category.yml"+ "/api/v3/configuration":+ "$ref": "./paths/configuration.yml"+ "/api/v3/custom_actions/{custom_action_id}":+ "$ref": "./paths/custom_action.yml"+ "/api/v3/custom_actions/{custom_action_id}/execute":+ "$ref": "./paths/custom_action_execute.yml"+ "/api/v3/custom_objects/{id}":+ "$ref": "./paths/custom_object.yml"+ "/api/v3/documents":+ "$ref": "./paths/documents.yml"+ "/api/v3/documents/{id}":+ "$ref": "./paths/document.yml"+ "/api/v3/example/form":+ "$ref": "./paths/example_form.yml"+ "/api/v3/example/schema":+ "$ref": "./paths/example_schema.yml"+ "/api/v3/examples":+ "$ref": "./paths/examples.yml"+ "/api/v3/grids":+ "$ref": "./paths/grids.yml"+ "/api/v3/grids/form":+ "$ref": "./paths/grids_form.yml"+ "/api/v3/grids/{id}":+ "$ref": "./paths/grid.yml"+ "/api/v3/grids/{id}/form":+ "$ref": "./paths/grid_form.yml"+ "/api/v3/groups":+ "$ref": "./paths/groups.yml"+ "/api/v3/groups/{id}":+ "$ref": "./paths/group.yml"+ "/api/v3/help_texts":+ "$ref": "./paths/help_texts.yml"+ "/api/v3/help_texts/{id}":+ "$ref": "./paths/help_text.yml"+ "/api/v3/memberships":+ "$ref": "./paths/memberships.yml"+ "/api/v3/memberships/available_projects":+ "$ref": "./paths/memberships_available_projects.yml"+ "/api/v3/memberships/form":+ "$ref": "./paths/memberships_form.yml"+ "/api/v3/memberships/schemas":+ "$ref": "./paths/memberships_schemas.yml"+ "/api/v3/memberships/{id}":+ "$ref": "./paths/membership.yml"+ "/api/v3/memberships/{id}/form":+ "$ref": "./paths/membership_form.yml"+ "/api/v3/my_preferences":+ "$ref": "./paths/my_preferences.yml"+ "/api/v3/news":+ "$ref": "./paths/news.yml"+ "/api/v3/news/{id}":+ "$ref": "./paths/news_item.yml"+ "/api/v3/posts/{id}":+ "$ref": "./paths/post.yml"+ "/api/v3/posts/{id}/attachments":+ "$ref": "./paths/post_attachments.yml"+ "/api/v3/principals":+ "$ref": "./paths/principals.yml"+ "/api/v3/priorities":+ "$ref": "./paths/priorities.yml"+ "/api/v3/priorities/{id}":+ "$ref": "./paths/priority.yml"+ "/api/v3/project_statuses/{id}":+ "$ref": "./paths/project_status.yml"+ "/api/v3/projects":+ "$ref": "./paths/projects.yml"+ "/api/v3/projects/available_parent_projects":+ "$ref": "./paths/projects_available_parent_projects.yml"+ "/api/v3/projects/form":+ "$ref": "./paths/projects_form.yml"+ "/api/v3/projects/schemas":+ "$ref": "./paths/projects_schemas.yml"+ "/api/v3/projects/{id}":+ "$ref": "./paths/project.yml"+ "/api/v3/projects/{id}/budgets":+ "$ref": "./paths/project_budgets.yml"+ "/api/v3/projects/{id}/copy":+ "$ref": "./paths/project_copy.yml"+ "/api/v3/projects/{id}/copy/form":+ "$ref": "./paths/project_copy_form.yml"+ "/api/v3/projects/{id}/form":+ "$ref": "./paths/project_form.yml"+ "/api/v3/projects/{id}/queries/default":+ "$ref": "./paths/project_queries_default.yml"+ "/api/v3/projects/{id}/queries/filter_instance_schemas":+ "$ref": "./paths/project_queries_filter_instance_schemas.yml"+ "/api/v3/projects/{id}/queries/schema":+ "$ref": "./paths/project_queries_schema.yml"+ "/api/v3/projects/{id}/work_packages":+ "$ref": "./paths/project_work_packages.yml"+ "/api/v3/projects/{id}/work_packages/form":+ "$ref": "./paths/project_work_packages_form.yml"+ "/api/v3/projects/{project_id}/available_assignees":+ "$ref": "./paths/project_available_assignees.yml"+ "/api/v3/projects/{project_id}/available_responsibles":+ "$ref": "./paths/project_available_responsibles.yml"+ "/api/v3/projects/{project_id}/categories":+ "$ref": "./paths/project_categories.yml"+ "/api/v3/projects/{project_id}/types":+ "$ref": "./paths/project_types.yml"+ "/api/v3/projects/{project_id}/versions":+ "$ref": "./paths/project_versions.yml"+ "/api/v3/queries":+ "$ref": "./paths/queries.yml"+ "/api/v3/queries/available_projects":+ "$ref": "./paths/queries_available_projects.yml"+ "/api/v3/queries/columns/{id}":+ "$ref": "./paths/queries_column.yml"+ "/api/v3/queries/default":+ "$ref": "./paths/queries_default.yml"+ "/api/v3/queries/filter_instance_schemas":+ "$ref": "./paths/queries_filter_instance_schemas.yml"+ "/api/v3/queries/filter_instance_schemas/{identifier}":+ "$ref": "./paths/queries_filter_instance_schemas_{identifier}.yml"+ "/api/v3/queries/filters/{id}":+ "$ref": "./paths/queries_filter.yml"+ "/api/v3/queries/form":+ "$ref": "./paths/queries_form.yml"+ "/api/v3/queries/operators/{id}":+ "$ref": "./paths/queries_operator.yml"+ "/api/v3/queries/schema":+ "$ref": "./paths/queries_schema.yml"+ "/api/v3/queries/sort_bys/{id}":+ "$ref": "./paths/queries_sort_by.yml"+ "/api/v3/queries/{id}":+ "$ref": "./paths/query.yml"+ "/api/v3/queries/{id}/star":+ "$ref": "./paths/query_star.yml"+ "/api/v3/queries/{id}/unstar":+ "$ref": "./paths/query_unstar.yml"+ "/api/v3/relations":+ "$ref": "./paths/relations.yml"+ "/api/v3/relations/schema":+ "$ref": "./paths/relations_schema.yml"+ "/api/v3/relations/schema/{type}":+ "$ref": "./paths/relations_schema_{type}.yml"+ "/api/v3/relations/{id}":+ "$ref": "./paths/relation.yml"+ "/api/v3/relations/{id}/form":+ "$ref": "./paths/relation_form.yml"+ "/api/v3/render/markdown":+ "$ref": "./paths/render_markdown.yml"+ "/api/v3/render/plain":+ "$ref": "./paths/render_plain.yml"+ "/api/v3/revisions/{id}":+ "$ref": "./paths/revision.yml"+ "/api/v3/roles":+ "$ref": "./paths/roles.yml"+ "/api/v3/roles/{id}":+ "$ref": "./paths/role.yml"+ "/api/v3/statuses":+ "$ref": "./paths/statuses.yml"+ "/api/v3/statuses/{id}":+ "$ref": "./paths/status.yml"+ "/api/v3/time_entries":+ "$ref": "./paths/time_entries.yml"+ "/api/v3/time_entries/:id/form":+ "$ref": "./paths/time_entries_:id_form.yml"+ "/api/v3/time_entries/activity/{id}":+ "$ref": "./paths/time_entries_activity_item.yml"+ "/api/v3/time_entries/available_projects":+ "$ref": "./paths/time_entries_available_projects.yml"+ "/api/v3/time_entries/form":+ "$ref": "./paths/time_entries_form.yml"+ "/api/v3/time_entries/schema":+ "$ref": "./paths/time_entries_schema.yml"+ "/api/v3/time_entries/{id}":+ "$ref": "./paths/time_entry.yml"+ "/api/v3/types":+ "$ref": "./paths/types.yml"+ "/api/v3/types/{id}":+ "$ref": "./paths/type.yml"+ "/api/v3/users":+ "$ref": "./paths/users.yml"+ "/api/v3/users/schemas":+ "$ref": "./paths/users_schemas.yml"+ "/api/v3/users/{id}":+ "$ref": "./paths/user.yml"+ "/api/v3/users/{id}/form":+ "$ref": "./paths/user_form.yml"+ "/api/v3/users/{id}/lock":+ "$ref": "./paths/user_lock.yml"+ "/api/v3/versions":+ "$ref": "./paths/versions.yml"+ "/api/v3/versions/available_projects":+ "$ref": "./paths/versions_available_projects.yml"+ "/api/v3/versions/form":+ "$ref": "./paths/versions_form.yml"+ "/api/v3/versions/schemas":+ "$ref": "./paths/versions_schemas.yml"+ "/api/v3/versions/{id}":+ "$ref": "./paths/version.yml"+ "/api/v3/versions/{id}/form":+ "$ref": "./paths/version_form.yml"+ "/api/v3/versions/{id}/projects":+ "$ref": "./paths/version_projects.yml"+ "/api/v3/wiki_pages/{id}":+ "$ref": "./paths/wiki_page.yml"+ "/api/v3/wiki_pages/{id}/attachments":+ "$ref": "./paths/wiki_page_attachments.yml"+ "/api/v3/work_packages":+ "$ref": "./paths/work_packages.yml"+ "/api/v3/work_packages/form":+ "$ref": "./paths/work_packages_form.yml"+ "/api/v3/work_packages/schemas/":+ "$ref": "./paths/work_packages_schemas.yml"+ "/api/v3/work_packages/schemas/{identifier}":+ "$ref": "./paths/work_packages_schemas_{identifier}.yml"+ "/api/v3/work_packages/{id}":+ "$ref": "./paths/work_package.yml"+ "/api/v3/work_packages/{id}/activities":+ "$ref": "./paths/work_package_activities.yml"+ "/api/v3/work_packages/{id}/attachments":+ "$ref": "./paths/work_package_attachments.yml"+ "/api/v3/work_packages/{id}/available_projects":+ "$ref": "./paths/work_package_available_projects.yml"+ "/api/v3/work_packages/{id}/available_relation_candidates":+ "$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}/form":+ "$ref": "./paths/work_package_form.yml"+ "/api/v3/work_packages/{id}/relations/form":+ "$ref": "./paths/work_package_relations_form.yml"+ "/api/v3/work_packages/{id}/revisions":+ "$ref": "./paths/work_package_revisions.yml"+ "/api/v3/work_packages/{work_package_id}/relations":+ "$ref": "./paths/work_package_relations.yml"+ "/api/v3/work_packages/{work_package_id}/watchers":+ "$ref": "./paths/work_package_watchers.yml"+ "/api/v3/work_packages/{work_package_id}/watchers/{id}":+ "$ref": "./paths/work_package_watcher.yml"+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:+ "$ref": "./components/schemas/attachments_by_post_model.yml"+ Attachments_by_wiki_page:+ "$ref": "./components/schemas/attachments_by_wiki_page.yml"+ Attachments_by_wiki_pageModel:+ "$ref": "./components/schemas/attachments_by_wiki_page_model.yml"+ Attachments_by_work_package:+ "$ref": "./components/schemas/attachments_by_work_package.yml"+ Attachments_by_work_packageModel:+ "$ref": "./components/schemas/attachments_by_work_package_model.yml"+ Available_AssigneesModel:+ "$ref": "./components/schemas/available_assignees_model.yml"+ Available_ResponsiblesModel:+ "$ref": "./components/schemas/available_responsibles_model.yml"+ Available_WatchersModel:+ "$ref": "./components/schemas/available_watchers_model.yml"+ Available_projects_for_membershipsModel:+ "$ref": "./components/schemas/available_projects_for_memberships_model.yml"+ Available_projects_for_queryModel:+ "$ref": "./components/schemas/available_projects_for_query_model.yml"+ Available_projects_for_time_entriesModel:+ "$ref": "./components/schemas/available_projects_for_time_entries_model.yml"+ Available_projects_for_versionsModel:+ "$ref": "./components/schemas/available_projects_for_versions_model.yml"+ Available_projects_for_work_packageModel:+ "$ref": "./components/schemas/available_projects_for_work_package_model.yml"+ Available_relation_candidatesModel:+ "$ref": "./components/schemas/available_relation_candidates_model.yml"+ BudgetModel:+ "$ref": "./components/schemas/budget_model.yml"+ Budgets_by_ProjectModel:+ "$ref": "./components/schemas/budgets_by_project_model.yml"+ Categories_by_ProjectModel:+ "$ref": "./components/schemas/categories_by_project_model.yml"+ CategoryModel:+ "$ref": "./components/schemas/category_model.yml"+ CollectionModel:+ "$ref": "./components/schemas/collection_model.yml"+ ConfigurationModel:+ "$ref": "./components/schemas/configuration_model.yml"+ Create_User:+ "$ref": "./components/schemas/create_user.yml"+ Create_group:+ "$ref": "./components/schemas/create_group.yml"+ Create_membership:+ "$ref": "./components/schemas/create_membership.yml"+ Create_project:+ "$ref": "./components/schemas/create_project.yml"+ Create_project_copy:+ "$ref": "./components/schemas/create_project_copy.yml"+ Create_time_entry:+ "$ref": "./components/schemas/create_time_entry.yml"+ Cursor_based_pagination:+ "$ref": "./components/schemas/cursor_based_pagination.yml"+ Custom_ActionModel:+ "$ref": "./components/schemas/custom_action_model.yml"+ Custom_ObjectModel:+ "$ref": "./components/schemas/custom_object_model.yml"+ CustomactionModel:+ "$ref": "./components/schemas/customaction_model.yml"+ Default_QueryModel:+ "$ref": "./components/schemas/default_query_model.yml"+ Default_Query_for_ProjectModel:+ "$ref": "./components/schemas/default_query_for_project_model.yml"+ Delete_User:+ "$ref": "./components/schemas/delete_user.yml"+ Delete_group:+ "$ref": "./components/schemas/delete_group.yml"+ Delete_membership:+ "$ref": "./components/schemas/delete_membership.yml"+ Delete_project:+ "$ref": "./components/schemas/delete_project.yml"+ Delete_time_entry:+ "$ref": "./components/schemas/delete_time_entry.yml"+ DocumentModel:+ "$ref": "./components/schemas/document_model.yml"+ DocumentsModel:+ "$ref": "./components/schemas/documents_model.yml"+ Example_FormModel:+ "$ref": "./components/schemas/example_form_model.yml"+ Example_SchemaModel:+ "$ref": "./components/schemas/example_schema_model.yml"+ Execute_custom_action:+ "$ref": "./components/schemas/execute_custom_action.yml"+ FormModel:+ "$ref": "./components/schemas/form_model.yml"+ Formattable:+ "$ref": "./components/schemas/formattable.yml"+ GridModel:+ "$ref": "./components/schemas/grid_model.yml"+ Grid_Create_Form:+ "$ref": "./components/schemas/grid_create_form.yml"+ Grid_Update_Form:+ "$ref": "./components/schemas/grid_update_form.yml"+ GridsModel:+ "$ref": "./components/schemas/grids_model.yml"+ GroupModel:+ "$ref": "./components/schemas/group_model.yml"+ Help_textModel:+ "$ref": "./components/schemas/help_text_model.yml"+ Help_textsModel:+ "$ref": "./components/schemas/help_texts_model.yml"+ HelptextModel:+ "$ref": "./components/schemas/helptext_model.yml"+ Link:+ "$ref": "./components/schemas/link.yml"+ List_actionsModel:+ "$ref": "./components/schemas/list_actions_model.yml"+ List_available_parent_project_candidatesModel:+ "$ref": "./components/schemas/list_available_parent_project_candidates_model.yml"+ List_capabilitiesModel:+ "$ref": "./components/schemas/list_capabilities_model.yml"+ List_groupsModel:+ "$ref": "./components/schemas/list_groups_model.yml"+ List_membershipsModel:+ "$ref": "./components/schemas/list_memberships_model.yml"+ List_of_NewsModel:+ "$ref": "./components/schemas/list_of_news_model.yml"+ List_projectsModel:+ "$ref": "./components/schemas/list_projects_model.yml"+ List_projects_by_versionModel:+ "$ref": "./components/schemas/list_projects_by_version_model.yml"+ List_time_entriesModel:+ "$ref": "./components/schemas/list_time_entries_model.yml"+ Lock_user:+ "$ref": "./components/schemas/lock_user.yml"+ Markdown:+ "$ref": "./components/schemas/markdown.yml"+ MarkdownModel:+ "$ref": "./components/schemas/markdown_model.yml"+ MembershipModel:+ "$ref": "./components/schemas/membership_model.yml"+ Membership_create_form:+ "$ref": "./components/schemas/membership_create_form.yml"+ Membership_update_form:+ "$ref": "./components/schemas/membership_update_form.yml"+ NewsModel:+ "$ref": "./components/schemas/news_model.yml"+ Offset_based_pagination:+ "$ref": "./components/schemas/offset_based_pagination.yml"+ Plain_Text:+ "$ref": "./components/schemas/plain_text.yml"+ Plain_TextModel:+ "$ref": "./components/schemas/plain_text_model.yml"+ PostModel:+ "$ref": "./components/schemas/post_model.yml"+ PreviewingModel:+ "$ref": "./components/schemas/previewing_model.yml"+ PrincipalModel:+ "$ref": "./components/schemas/principal_model.yml"+ PrincipalsModel:+ "$ref": "./components/schemas/principals_model.yml"+ PrioritiesModel:+ "$ref": "./components/schemas/priorities_model.yml"+ PriorityModel:+ "$ref": "./components/schemas/priority_model.yml"+ ProjectModel:+ "$ref": "./components/schemas/project_model.yml"+ Project_copy_form:+ "$ref": "./components/schemas/project_copy_form.yml"+ Project_create_form:+ "$ref": "./components/schemas/project_create_form.yml"+ Project_update_form:+ "$ref": "./components/schemas/project_update_form.yml"+ Projects_schemaModel:+ "$ref": "./components/schemas/projects_schema_model.yml"+ QueriesModel:+ "$ref": "./components/schemas/queries_model.yml"+ QueryModel:+ "$ref": "./components/schemas/query_model.yml"+ Query_ColumnModel:+ "$ref": "./components/schemas/query_column_model.yml"+ Query_Create_Form:+ "$ref": "./components/schemas/query_create_form.yml"+ Query_FilterModel:+ "$ref": "./components/schemas/query_filter_model.yml"+ Query_Filter_Instance_SchemaModel:+ "$ref": "./components/schemas/query_filter_instance_schema_model.yml"+ Query_Filter_Instance_SchemasModel:+ "$ref": "./components/schemas/query_filter_instance_schemas_model.yml"+ Query_Filter_Instance_Schemas_For_ProjectModel:+ "$ref": "./components/schemas/query_filter_instance_schemas_for_project_model.yml"+ Query_OperatorModel:+ "$ref": "./components/schemas/query_operator_model.yml"+ Query_Sort_ByModel:+ "$ref": "./components/schemas/query_sort_by_model.yml"+ RelationModel:+ "$ref": "./components/schemas/relation_model.yml"+ Relation_edit_formModel:+ "$ref": "./components/schemas/relation_edit_form_model.yml"+ Relation_schemaModel:+ "$ref": "./components/schemas/relation_schema_model.yml"+ Relation_schema_for_type:+ "$ref": "./components/schemas/relation_schema_for_type.yml"+ RelationsModel:+ "$ref": "./components/schemas/relations_model.yml"+ Remove_Watcher:+ "$ref": "./components/schemas/remove_watcher.yml"+ RevisionModel:+ "$ref": "./components/schemas/revision_model.yml"+ RevisionsModel:+ "$ref": "./components/schemas/revisions_model.yml"+ RoleModel:+ "$ref": "./components/schemas/role_model.yml"+ RolesModel:+ "$ref": "./components/schemas/roles_model.yml"+ RootModel:+ "$ref": "./components/schemas/root_model.yml"+ SchemaModel:+ "$ref": "./components/schemas/schema_model.yml"+ Schema_For_Global_QueriesModel:+ "$ref": "./components/schemas/schema_for_global_queries_model.yml"+ Schema_For_Project_QueriesModel:+ "$ref": "./components/schemas/schema_for_project_queries_model.yml"+ Star_QueryModel:+ "$ref": "./components/schemas/star_query_model.yml"+ StatusModel:+ "$ref": "./components/schemas/status_model.yml"+ StatusesModel:+ "$ref": "./components/schemas/statuses_model.yml"+ Time_EntryModel:+ "$ref": "./components/schemas/time_entry_model.yml"+ Time_Entry_ActivityModel:+ "$ref": "./components/schemas/time_entry_activity_model.yml"+ Time_entry_create_form:+ "$ref": "./components/schemas/time_entry_create_form.yml"+ Time_entry_update_form:+ "$ref": "./components/schemas/time_entry_update_form.yml"+ TypeModel:+ "$ref": "./components/schemas/type_model.yml"+ TypesModel:+ "$ref": "./components/schemas/types_model.yml"+ Types_by_ProjectModel:+ "$ref": "./components/schemas/types_by_project_model.yml"+ Unlock_user:+ "$ref": "./components/schemas/unlock_user.yml"+ Unstar_QueryModel:+ "$ref": "./components/schemas/unstar_query_model.yml"+ Update_User:+ "$ref": "./components/schemas/update_user.yml"+ Update_group:+ "$ref": "./components/schemas/update_group.yml"+ Update_membership:+ "$ref": "./components/schemas/update_membership.yml"+ Update_project:+ "$ref": "./components/schemas/update_project.yml"+ Update_time_entry:+ "$ref": "./components/schemas/update_time_entry.yml"+ UserModel:+ "$ref": "./components/schemas/user_model.yml"+ UserPreferencesModel:+ "$ref": "./components/schemas/user_preferences_model.yml"+ User_PreferenceModel:+ "$ref": "./components/schemas/user_preference_model.yml"+ User_create_form:+ "$ref": "./components/schemas/user_create_form.yml"+ User_update_form:+ "$ref": "./components/schemas/user_update_form.yml"+ UsersModel:+ "$ref": "./components/schemas/users_model.yml"+ VersionModel:+ "$ref": "./components/schemas/version_model.yml"+ Version_create_form:+ "$ref": "./components/schemas/version_create_form.yml"+ Version_schemaModel:+ "$ref": "./components/schemas/version_schema_model.yml"+ Version_update_form:+ "$ref": "./components/schemas/version_update_form.yml"+ VersionsModel:+ "$ref": "./components/schemas/versions_model.yml"+ Versions_by_ProjectModel:+ "$ref": "./components/schemas/versions_by_project_model.yml"+ View_actionModel:+ "$ref": "./components/schemas/view_action_model.yml"+ View_capabilitiesModel:+ "$ref": "./components/schemas/view_capabilities_model.yml"+ View_global_contextModel:+ "$ref": "./components/schemas/view_global_context_model.yml"+ View_groupModel:+ "$ref": "./components/schemas/view_group_model.yml"+ View_membershipModel:+ "$ref": "./components/schemas/view_membership_model.yml"+ View_membership_schemaModel:+ "$ref": "./components/schemas/view_membership_schema_model.yml"+ View_projectModel:+ "$ref": "./components/schemas/view_project_model.yml"+ View_project_statusModel:+ "$ref": "./components/schemas/view_project_status_model.yml"+ View_time_entries_activityModel:+ "$ref": "./components/schemas/view_time_entries_activity_model.yml"+ View_time_entryModel:+ "$ref": "./components/schemas/view_time_entry_model.yml"+ View_time_entry_schemaModel:+ "$ref": "./components/schemas/view_time_entry_schema_model.yml"+ View_userModel:+ "$ref": "./components/schemas/view_user_model.yml"+ View_user_schemaModel:+ "$ref": "./components/schemas/view_user_schema_model.yml"+ WatchersModel:+ "$ref": "./components/schemas/watchers_model.yml"+ Wiki_PageModel:+ "$ref": "./components/schemas/wiki_page_model.yml"+ Work_PackageModel:+ "$ref": "./components/schemas/work_package_model.yml"+ Work_Package_Create_Form:+ "$ref": "./components/schemas/work_package_create_form.yml"+ Work_Package_Create_Form_For_Project:+ "$ref": "./components/schemas/work_package_create_form_for_project.yml"+ Work_Package_Edit_Form:+ "$ref": "./components/schemas/work_package_edit_form.yml"+ Work_Package_Relation_FormModel:+ "$ref": "./components/schemas/work_package_relation_form_model.yml"+ Work_Package_Schema:+ "$ref": "./components/schemas/work_package_schema.yml"+ Work_Package_SchemasModel:+ "$ref": "./components/schemas/work_package_schemas_model.yml"+ Work_Package_activitiesModel:+ "$ref": "./components/schemas/work_package_activities_model.yml"+ Work_PackagesModel:+ "$ref": "./components/schemas/work_packages_model.yml"+ Work_Packages_by_ProjectModel:+ "$ref": "./components/schemas/work_packages_by_project_model.yml"+ securitySchemes:+ BasicAuth:+ type: http+ scheme: basic+tags:+- "$ref": "./tags/basic_objects.yml"+- "$ref": "./tags/collections.yml"+- "$ref": "./tags/filters.yml"+- "$ref": "./tags/forms.yml"+- "$ref": "./tags/actions_and_capabilities.yml"+- "$ref": "./tags/activities.yml"+- "$ref": "./tags/attachments.yml"+- "$ref": "./tags/budgets.yml"+- "$ref": "./tags/categories.yml"+- "$ref": "./tags/configuration.yml"+- "$ref": "./tags/custom_actions.yml"+- "$ref": "./tags/custom_objects.yml"+- "$ref": "./tags/documents.yml"+- "$ref": "./tags/grids.yml"+- "$ref": "./tags/groups.yml"+- "$ref": "./tags/help_texts.yml"+- "$ref": "./tags/memberships.yml"+- "$ref": "./tags/news.yml"+- "$ref": "./tags/posts.yml"+- "$ref": "./tags/principals.yml"+- "$ref": "./tags/priorities.yml"+- "$ref": "./tags/projects.yml"+- "$ref": "./tags/queries.yml"+- "$ref": "./tags/query_columns.yml"+- "$ref": "./tags/query_filters.yml"+- "$ref": "./tags/query_operators.yml"+- "$ref": "./tags/query_sort_bys.yml"+- "$ref": "./tags/query_filter_instance_schema.yml"+- "$ref": "./tags/relations.yml"+- "$ref": "./tags/previewing.yml"+- "$ref": "./tags/revisions.yml"+- "$ref": "./tags/roles.yml"+- "$ref": "./tags/root.yml"+- "$ref": "./tags/schemas.yml"+- "$ref": "./tags/statuses.yml"+- "$ref": "./tags/time_entries.yml"+- "$ref": "./tags/time_entry_activities.yml"+- "$ref": "./tags/types.yml"+- "$ref": "./tags/userpreferences.yml"+- "$ref": "./tags/users.yml"+- "$ref": "./tags/versions.yml"+- "$ref": "./tags/wiki_pages.yml"+- "$ref": "./tags/work_packages.yml"+security:+- BasicAuth: []diff --git a/docs/api/apiv3/paths/action.yml b/docs/api/apiv3/paths/action.ymlnew file mode 100644index 00000000000..127a4a336ce--- /dev/null+++ b/docs/api/apiv3/paths/action.yml@@ -0,0 +1,50 @@+# /api/v3/actions/{id}+---+get:+ parameters:+ - description: action id which is the name of the action+ example: work_packages/create+ in: path+ name: id+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/actions/work_packages/create"+ title: Add work package+ _type: Action+ description: Creating a work package within a project including the+ uploading of attachments. Some attributes might not be selected,+ e.g version which requires a second permission+ id: work_packages/create+ modules:+ - work_packages+ name: Add work package+ schema:+ "$ref": "../components/schemas/view_action_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: Returned if the action does not exist.+ headers: {}+ tags:+ - Actions & Capabilities+ description: Returns an individual action.+ operationId: View_action+ summary: View actiondiff --git a/docs/api/apiv3/paths/actions.yml b/docs/api/apiv3/paths/actions.ymlnew file mode 100644index 00000000000..13014e9242b--- /dev/null+++ b/docs/api/apiv3/paths/actions.yml@@ -0,0 +1,80 @@+# /api/v3/actions+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ Currently supported filters are:++ + id: Returns only the action having the id or all actions except those having the id(s).+ example: '[{ "id": { "operator": "=", "values": ["memberships/create"] }" }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:++ + *No sort supported yet*+ example: '[["id", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["id", "asc"]'+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/actions/work_packages/create"+ title: Add work package+ _type: Action+ description: Creating a work package within a project including+ the uploading of attachments. Some attributes might not be selected,+ e.g version which requires a second permission+ id: work_packages/create+ modules:+ - work_packages+ name: Add work package+ - _links:+ self:+ href: "/api/v3/actions/work_packages/assign_versions"+ title: Assigning version+ _type: Action+ description: Assigning a work package to a version when creating/updating+ a work package. Only principals having this permission can assign+ a value to the version property of the work package resource.+ id: work_packages/assign_versions+ modules:+ - work_packages+ - versions+ name: Assign version+ _links:+ self:+ href: "/api/v3/actions"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/list_actions_model.yml"+ description: OK+ headers: {}+ tags:+ - Actions & Capabilities+ description: |-+ Returns a collection of actions. The client can choose to filter the actions similar to how work packages are filtered.+ In addition to the provided filters, the server will reduce the result set to only contain actions, for which the requesting client+ has sufficient permissions.+ operationId: List_actions+ summary: List actionsdiff --git a/docs/api/apiv3/paths/activity.yml b/docs/api/apiv3/paths/activity.ymlnew file mode 100644index 00000000000..ca82de54b6e--- /dev/null+++ b/docs/api/apiv3/paths/activity.yml@@ -0,0 +1,150 @@+# /api/v3/activities/{id}+---+get:+ parameters:+ - description: Activity id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/activity/1"+ title: Priority changed from High to Low+ user:+ href: "/api/v3/users/1"+ title: John Sheppard - admin+ workPackage:+ href: "/api/v3/work_packages/1"+ title: quis numquam qui voluptatum quia praesentium blanditiis+ nisi+ _type: Activity::Comment+ comment:+ format: markdown+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ raw: Lorem ipsum dolor sit amet.+ createdAt: '2014-05-21T08:51:20Z'+ details:+ - format: markdown+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ raw: Lorem ipsum dolor sit amet.+ id: 1+ version: 31+ schema:+ "$ref": "../components/schemas/activity_model.yml"+ description: OK+ headers: {}+ tags:+ - Activities+ description: ''+ operationId: View_activity+ summary: View activity+patch:+ parameters:+ - description: Activity id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/activity/1"+ title: Priority changed from High to Low+ user:+ href: "/api/v3/users/1"+ title: John Sheppard - admin+ workPackage:+ href: "/api/v3/work_packages/1"+ title: quis numquam qui voluptatum quia praesentium blanditiis+ nisi+ _type: Activity::Comment+ comment:+ format: markdown+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ raw: Lorem ipsum dolor sit amet.+ createdAt: '2014-05-21T08:51:20Z'+ details:+ - format: markdown+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ raw: Lorem ipsum dolor sit amet.+ id: 1+ version: 31+ schema:+ "$ref": "../components/schemas/activity_model.yml"+ description: OK+ 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 edit the comment of this journal entry.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit journals+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyIsReadOnly+ message: The ID of an activity can't be changed.+ description: Returned if the client tries to modify a read-only property.+ headers: {}+ tags:+ - Activities+ description: Updates an activity's comment and, on success, returns the updated+ activity.+ operationId: Update_activity+ requestBody:+ content:+ application/json:+ schema:+ example:+ comment:+ raw: The updated comment+ properties:+ comment:+ properties:+ raw:+ type: string+ type: object+ type: object+ summary: Update activitydiff --git a/docs/api/apiv3/paths/attachment.yml b/docs/api/apiv3/paths/attachment.ymlnew file mode 100644index 00000000000..6617d8c5707--- /dev/null+++ b/docs/api/apiv3/paths/attachment.yml@@ -0,0 +1,125 @@+# /api/v3/attachments/{id}+---+delete:+ parameters:+ - description: Attachment id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: |-+ Returned if the attachment was deleted successfully.++ 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: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not allowed to delete this attachment.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit permission for the container of the attachment or being the author for attachments without container++ *Note that you will only receive this error, if you are at least allowed to see the attachment.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified attachment does not exist.+ description: |-+ Returned if the attachment does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view permission for the container of the attachment or being the author for attachments without container++ *Note: A client without sufficient permissions shall not be able to test for the existence of an attachment.+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Attachments+ description: Permanently deletes the specified attachment.+ operationId: Delete_attachment+ summary: Delete attachment+get:+ parameters:+ - description: Attachment id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ author:+ href: "/api/v3/users/1"+ container:+ href: "/api/v3/work_packages/1"+ downloadLocation:+ href: "/some/remote/aws/url/image.png"+ self:+ href: "/api/v3/attachments/1"+ staticDownloadLocation:+ href: "/api/v3/attachments/1/download"+ _type: Attachment+ contentType: image/png+ createdAt: '2014-05-21T08:51:20Z'+ description:+ format: plain+ html: "<p>A picture of a cute cat</p>"+ raw: A picture of a cute cat+ digest:+ algorithm: md5+ hash: 64c26a8403cd796ea4cf913cda2ee4a9+ fileName: cat.png+ filesize: 24+ id: 1+ schema:+ "$ref": "../components/schemas/attachment_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified attachment does not exist.+ description: |-+ Returned if the attachment does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view permission for the container of the attachment or being the author for attachments without container++ *Note: A client without sufficient permissions shall not be able to test for the existence of an attachment.+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Attachments+ description: ''+ operationId: View_attachment+ summary: View attachmentdiff --git a/docs/api/apiv3/paths/attachments.yml b/docs/api/apiv3/paths/attachments.ymlnew file mode 100644index 00000000000..091ad695b20--- /dev/null+++ b/docs/api/apiv3/paths/attachments.yml@@ -0,0 +1,105 @@+# /api/v3/attachments+---+post:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ author:+ href: "/api/v3/users/1"+ container:+ href: "/api/v3/work_packages/1"+ downloadLocation:+ href: "/some/remote/aws/url/image.png"+ self:+ href: "/api/v3/attachments/1"+ staticDownloadLocation:+ href: "/api/v3/attachments/1/download"+ _type: Attachment+ contentType: image/png+ createdAt: '2014-05-21T08:51:20Z'+ description:+ format: plain+ html: "<p>A picture of a cute cat</p>"+ raw: A picture of a cute cat+ digest:+ algorithm: md5+ hash: 64c26a8403cd796ea4cf913cda2ee4a9+ fileName: cat.png+ filesize: 24+ id: 1+ schema:+ "$ref": "../components/schemas/attachment_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody+ message: The request could not be parsed as JSON.+ description: |-+ Returned if the client sends a not understandable request. Reasons include:++ * Omitting one of the required parts (metadata and file)++ * sending unparsable JSON in the metadata part+ 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 delete this attachment.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** At least one permission in any project: edit work package, add work package, edit messages, edit wiki pages (plugins might extend this list)+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: File is too large (maximum size is 5242880 Bytes).+ description: |-+ Returned if the client tries to send an invalid attachment.+ Reasons are:++ * Omitting the file name (`fileName` property of metadata part)++ * Sending a file that is too large+ headers: {}+ tags:+ - Attachments+ description: |-+ Clients can create attachments without a container first and attach them later on.+ This is useful if the container does not exist at the time the attachment is uploaded.+ After the upload, the client can then claim such containerless attachments for any resource eligible (e.g. WorkPackage) on subsequent requests.+ The upload and the claiming *must* be done for the same user account. Attachments uploaded by another user cannot be claimed and+ once claimed for a resource, they cannot be claimed by another.++ The upload request must be of type `multipart/form-data` with exactly two parts.++ The first part *must* be called `metadata`. Its content type is expected to be `application/json`,+ the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`.++ The second part *must* be called `file`, its content type *should* match the mime type of the file.+ The body *must* be the raw content of the file.+ Note that a `filename` *must* be indicated in the `Content-Disposition` of this part, although it will be ignored.+ Instead the `fileName` inside the JSON of the metadata part will be used.+ operationId: Create_Attachment+ summary: Create Attachmentdiff --git a/docs/api/apiv3/paths/budget.yml b/docs/api/apiv3/paths/budget.ymlnew file mode 100644index 00000000000..fa23d63a108--- /dev/null+++ b/docs/api/apiv3/paths/budget.yml@@ -0,0 +1,48 @@+# /api/v3/budgets/{id}+---+get:+ parameters:+ - description: Budget id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/budgets/1"+ title: Q3 2015+ _type: Budget+ id: 1+ subject: Q3 2015+ schema:+ "$ref": "../components/schemas/budget_model.yml"+ description: OK+ 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 see this budget.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work packages **or** view budgets (on the budgets project)+ headers: {}+ tags:+ - Budgets+ description: ''+ operationId: view_Budget+ summary: view Budgetdiff --git a/docs/api/apiv3/paths/capabilities.yml b/docs/api/apiv3/paths/capabilities.ymlnew file mode 100644index 00000000000..2026d883110--- /dev/null+++ b/docs/api/apiv3/paths/capabilities.yml@@ -0,0 +1,117 @@+# /api/v3/capabilities+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint.++ + action: Get all capabilities of a certain action++ + principal: Get all capabilities of a principal++ + context: Get all capabilities within a context. Note that for a project context the client needs to provide `p{id}`, e.g. `p5` and for the global context a `g`+ example: '[{ "principal": { "operator": "=", "values": ["1"] }" }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:++ + id: Sort by the capabilities id+ example: '[["id", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["id", "asc"]'+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ action:+ href: "/api/v3/actions/work_packages/create"+ title: Add work package+ context:+ href: "/api/v3/projects/123"+ title: A project+ principal:+ href: "/api/v3/users/567"+ title: Some user+ self:+ href: "/api/v3/capabilities/work_packages/create/p123-567"+ _type: Capability+ id: work_packages/create/p123-567+ - _links:+ action:+ href: "/api/v3/actions/work_packages/assignee"+ context:+ href: "/api/v3/projects/123"+ title: A project+ principal:+ href: "/api/v3/users/567"+ title: Some user+ self:+ href: "/api/v3/capabilities/work_packages/assignee/p123-567"+ _type: Capability+ id: work_packages/assignee/p123-567+ - _links:+ action:+ href: "/api/v3/actions/memberships/create"+ context:+ href: "/api/v3/projects/345"+ title: A project+ principal:+ href: "/api/v3/users/821"+ title: Some user+ self:+ href: "/api/v3/capabilities/memberships/create/p345-821"+ title: Create members+ _type: Capability+ id: memberships/create/p345-821+ - _links:+ context:+ href: "/api/v3/capabilities/context/global"+ title: Global+ principal:+ href: "/api/v3/users/567"+ title: Some user+ self:+ href: "/api/v3/capabilities/users/delete/g-567"+ title: Delete user+ _type: Capability+ id: users/delete/g-567+ _links:+ changeSize:+ href: "/api/v3/capabilities?pageSize={size}"+ templated: true+ jumpTo:+ href: "/api/v3/capabilities?offset={offset}"+ templated: true+ self:+ href: "/api/v3/capabilities"+ _type: Collection+ count: 4+ total: 4+ schema:+ "$ref": "../components/schemas/list_capabilities_model.yml"+ description: OK+ headers: {}+ tags:+ - Actions & Capabilities+ description: Returns a collection of actions assigned to a principal in a context.+ The client can choose to filter the actions similar to how work packages are filtered.+ In addition to the provided filters, the server will reduce the result set to+ only contain actions, for which the requesting client has sufficient permissions+ operationId: List_capabilities+ summary: List capabilitiesdiff --git a/docs/api/apiv3/paths/capabilities_context_global.yml b/docs/api/apiv3/paths/capabilities_context_global.ymlnew file mode 100644index 00000000000..7b72131b1f1--- /dev/null+++ b/docs/api/apiv3/paths/capabilities_context_global.yml@@ -0,0 +1,36 @@+# /api/v3/capabilities/context/global+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/capabilities/context/global"+ _type: CapabilityContext::Global+ id: global+ schema:+ "$ref": "../components/schemas/view_global_context_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: Returned if the action does not exist.+ headers: {}+ tags:+ - Actions & Capabilities+ description: Returns the global capability context. This context is necessary to+ consistently link to a context even if the context is not a project.+ operationId: View_global_context+ summary: View global contextdiff --git a/docs/api/apiv3/paths/capability.yml b/docs/api/apiv3/paths/capability.ymlnew file mode 100644index 00000000000..f76b3785fcd--- /dev/null+++ b/docs/api/apiv3/paths/capability.yml@@ -0,0 +1,52 @@+# /api/v3/capabilities/{id}+---+get:+ parameters:+ - description: capability id+ example: work_packages/create/p123-567+ in: path+ name: id+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ action:+ href: "/api/v3/actions/work_packages/create"+ title: Add work package+ context:+ href: "/api/v3/projects/123"+ title: A project+ principal:+ href: "/api/v3/users/567"+ title: Some user+ self:+ href: "/api/v3/capabilities/work_packages/create/p123-567"+ _type: Capability+ id: work_packages/create/p123-567+ schema:+ "$ref": "../components/schemas/view_capabilities_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: Returned if the capability does not exist.+ headers: {}+ tags:+ - Actions & Capabilities+ description: ''+ operationId: View_capabilities+ summary: View capabilitiesdiff --git a/docs/api/apiv3/paths/category.yml b/docs/api/apiv3/paths/category.ymlnew file mode 100644index 00000000000..a5e17d22f7b--- /dev/null+++ b/docs/api/apiv3/paths/category.yml@@ -0,0 +1,58 @@+# /api/v3/categories/{id}+---+get:+ parameters:+ - description: category id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ defaultAssignee:+ href: "/api/v3/users/42"+ title: John Sheppard+ project:+ href: "/api/v3/projects/11"+ title: Example project+ self:+ href: "/api/v3/categories/10"+ title: Category with assignee+ _type: Category+ id: 10+ name: Foo+ schema:+ "$ref": "../components/schemas/category_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified category does not exist.+ description: |-+ Returned if the category does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view project (defining the category)++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a category. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Categories+ description: ''+ operationId: View_Category+ summary: View Categorydiff --git a/docs/api/apiv3/paths/configuration.yml b/docs/api/apiv3/paths/configuration.ymlnew file mode 100644index 00000000000..c488c2d9af5--- /dev/null+++ b/docs/api/apiv3/paths/configuration.yml@@ -0,0 +1,30 @@+# /api/v3/configuration+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/configuration"+ userPreferences:+ href: "/api/v3/my_preferences"+ _type: Configuration+ maximumAttachmentFileSize: 5242880+ perPageOptions:+ - 1+ - 10+ - 100+ schema:+ "$ref": "../components/schemas/configuration_model.yml"+ description: OK+ headers: {}+ tags:+ - Configuration+ description: ''+ operationId: View_configuration+ summary: View configurationdiff --git a/docs/api/apiv3/paths/custom_action.yml b/docs/api/apiv3/paths/custom_action.ymlnew file mode 100644index 00000000000..24b1068def9--- /dev/null+++ b/docs/api/apiv3/paths/custom_action.yml@@ -0,0 +1,63 @@+# /api/v3/custom_actions/{custom_action_id}+---+get:+ parameters:+ - description: The id of the custom action to fetch+ example: '1'+ in: path+ name: custom_action_id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ executeImmediately:+ href: "/apiChanges project and type in one go"+ method: post+ title: Execute Change project and type+ self:+ href: "/api/v3/custom_actions/2"+ title: Change project and type+ _type: CustomAction+ description: Changes project and type in one go+ name: Change project and type+ schema:+ "$ref": "../components/schemas/custom_action_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit work packages in any project+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: Returned if the custom action does not exist.+ headers: {}+ tags:+ - Custom actions+ description: ''+ operationId: View_custom_action+ summary: View custom actiondiff --git a/docs/api/apiv3/paths/custom_action_execute.yml b/docs/api/apiv3/paths/custom_action_execute.ymlnew file mode 100644index 00000000000..5b59ddcbc78--- /dev/null+++ b/docs/api/apiv3/paths/custom_action_execute.yml@@ -0,0 +1,107 @@+# /api/v3/custom_actions/{custom_action_id}/execute+---+post:+ parameters:+ - description: The id of the custom action to execute+ example: '1'+ in: path+ name: custom_action_id+ required: true+ schema:+ type: integer+ responses:+ '200':+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit work packages - Additional permissions might be required based on the custom action.+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: Returned if the custom action does not exist.+ 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 the client provided an outdated lockVersion or no lockVersion+ at all.+ 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 custom action was not executed successfully e.g.+ when a constraint on a work package property was violated.+ headers: {}+ tags:+ - Custom actions+ description: |-+ A POST to this end point executes the custom action on the work package provided in the payload. The altered work package will be returned. In order to avoid executing+ the custom action unbeknown to a change that has already taken place, the client has to provide the work package's current lockVersion.+ operationId: Execute_custom_action+ requestBody:+ content:+ application/json:+ schema:+ example:+ _links:+ workPackage:+ href: "/api/v3/work_packages/42"+ lockVersion: '3'+ properties:+ _links:+ properties:+ workPackage:+ properties:+ href:+ type: string+ type: object+ type: object+ lockVersion:+ type: string+ type: object+ summary: Execute custom actiondiff --git a/docs/api/apiv3/paths/custom_object.yml b/docs/api/apiv3/paths/custom_object.ymlnew file mode 100644index 00000000000..8d989ecd53d--- /dev/null+++ b/docs/api/apiv3/paths/custom_object.yml@@ -0,0 +1,46 @@+# /api/v3/custom_objects/{id}+---+get:+ parameters:+ - description: The custom object's identifier+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/custom_objects/1"+ _type: CustomObject+ value: Foo+ schema:+ "$ref": "../components/schemas/custom_object_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the custom object does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work package in any project the custom object's custom field is active in.+ headers: {}+ tags:+ - Custom Objects+ description: ''+ operationId: View_Custom_Object+ summary: View Custom Objectdiff --git a/docs/api/apiv3/paths/document.yml b/docs/api/apiv3/paths/document.ymlnew file mode 100644index 00000000000..e7f9c512b38--- /dev/null+++ b/docs/api/apiv3/paths/document.yml@@ -0,0 +1,83 @@+# /api/v3/documents/{id}+---+get:+ parameters:+ - description: document id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ attachments:+ _embedded...:+ elements: []+ _links:+ self:+ href: "/api/v3/documents/1/attachments"+ _type: Collection+ count: 2+ total: 2+ project:+ _type: Project...+ _links:+ addAttachment:+ href: "/api/v3/documents/1/attachments"+ method: post+ attachments:+ href: "/api/v3/documents/1/attachments"+ project:+ href: "/api/v3/projects/19"+ title: Some project+ self:+ href: "/api/v3/documents/1"+ title: Some document+ _type: Document+ createdAt: '2018-12-10T20:53:39Z'+ description:+ format: markdown+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia est+ quia pariatur vorago vallum. Calco autem atavus accusamus conscendo+ cornu ulterius. Tam patria ago consectetur ventito sustineo nihil+ caecus. Supra officiis eos velociter somniculosus tonsor qui.+ Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto+ sortitus cresco apud vestrum qui.</p>"+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est quia+ pariatur vorago vallum. Calco autem atavus accusamus conscendo+ cornu ulterius. Tam patria ago consectetur ventito sustineo nihil+ caecus. Supra officiis eos velociter somniculosus tonsor qui.+ Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto+ sortitus cresco apud vestrum qui.+ id: 1+ title: Some other document+ schema:+ "$ref": "../components/schemas/document_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the document does not exist or if the user does not have permission to view it.++ **Required permission** `view documents` in the project the document belongs to+ headers: {}+ tags:+ - Documents+ description: ''+ operationId: View_document+ summary: View documentdiff --git a/docs/api/apiv3/paths/documents.yml b/docs/api/apiv3/paths/documents.ymlnew file mode 100644index 00000000000..28cab844597--- /dev/null+++ b/docs/api/apiv3/paths/documents.yml@@ -0,0 +1,148 @@+# /api/v3/documents+---+get:+ parameters:+ - description: Page number inside the requested collection.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:++ + id: Sort by primary key++ + created_at: Sort by document creation datetime+ example: '[["created_at", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ addAttachment:+ href: "/api/v3/documents/1/attachments"+ method: post+ attachments:+ href: "/api/v3/documents/1/attachments"+ project:+ href: "/api/v3/projects/19"+ title: Some project+ self:+ href: "/api/v3/documents/1"+ title: Some document+ _type: Document+ createdAt: '2018-12-10T20:53:39Z'+ description:+ format: markdown+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia+ est quia pariatur vorago vallum. Calco autem atavus accusamus+ conscendo cornu ulterius. Tam patria ago consectetur ventito+ sustineo nihil caecus. Supra officiis eos velociter somniculosus+ tonsor qui. Suffragium aduro arguo angustus cogito quia tolero+ vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est+ quia pariatur vorago vallum. Calco autem atavus accusamus+ conscendo cornu ulterius. Tam patria ago consectetur ventito+ sustineo nihil caecus. Supra officiis eos velociter somniculosus+ tonsor qui. Suffragium aduro arguo angustus cogito quia tolero+ vulnus. Supplanto sortitus cresco apud vestrum qui.+ id: 1+ title: Some other document+ - _links:+ addAttachment:+ href: "/api/v3/documents/2/attachments"+ method: post+ attachments:+ href: "/api/v3/documents/2/attachments"+ project:+ href: "/api/v3/projects/29"+ title: Some other project+ self:+ href: "/api/v3/documents/2"+ title: Some other document+ _type: Document+ createdAt: '2018-12-10T20:55:54Z'+ description:+ format: markdown+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia+ est quia pariatur vorago vallum. Calco autem atavus accusamus+ conscendo cornu ulterius. Tam patria ago consectetur ventito+ sustineo nihil caecus. Supra officiis eos velociter somniculosus+ tonsor qui. Suffragium aduro arguo angustus cogito quia tolero+ vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est+ quia pariatur vorago vallum. Calco autem atavus accusamus+ conscendo cornu ulterius. Tam patria ago consectetur ventito+ sustineo nihil caecus. Supra officiis eos velociter somniculosus+ tonsor qui. Suffragium aduro arguo angustus cogito quia tolero+ vulnus. Supplanto sortitus cresco apud vestrum qui.+ id: 2+ title: Some other document+ _links:+ changeSize:+ href: "/api/v3/documents?offset=1&pageSize=%7Bsize%7D"+ templated: true+ jumpTo:+ href: "/api/v3/documents?offset=%7Boffset%7D&pageSize=30"+ templated: true+ self:+ href: "/api/v3/documents?offset=1&pageSize=30"+ _type: Collection+ count: 2+ offset: 1+ pageSize: 30+ total: 2+ schema:+ "$ref": "../components/schemas/documents_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery+ message:+ - Filters Invalid filter does not exist.+ description: Returned if the client sends invalid request parameters e.g. filters+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to view this resource.+ description: Returned if the client is not logged in and login is required.+ headers: {}+ tags:+ - Documents+ description: The documents returned depend on the provided parameters and also on+ the requesting user's permissions.+ operationId: List_Documents+ summary: List Documentsdiff --git a/docs/api/apiv3/paths/example_form.yml b/docs/api/apiv3/paths/example_form.ymlnew file mode 100644index 00000000000..6a822c4fe2e--- /dev/null+++ b/docs/api/apiv3/paths/example_form.yml@@ -0,0 +1,151 @@+# /api/v3/example/form+---+post:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ payload:+ _links:+ status:+ href: "/api/v3/statuses/1"+ _type: Example+ lockVersion: 5+ subject: An example title+ schema:+ _links:+ self:+ href: "/api/v3/example/schema"+ _type: Schema+ lockVersion:+ type: Integer+ writable: false+ status:+ _embedded:+ allowedValues:+ - _links:+ self:+ href: "/api/v3/statuses/1"+ _type: Status+ createdAt: '2014-05-21T08:51:20Z'+ defaultDoneRatio: 0+ id: 1+ isClosed: false+ isDefault: true+ name: New+ position: 1+ updatedAt: '2014-05-21T09:12:00Z'+ - _links:+ self:+ href: "/api/v3/statuses/2"+ _type: Status+ createdAt: '2014-05-21T08:51:20Z'+ defaultDoneRatio: 100+ id: 2+ isClosed: true+ isDefault: false+ name: Closed+ position: 2+ updatedAt: '2014-05-21T09:12:00Z'+ _links:+ allowedValues:+ - href: "/api/v3/statuses/1"+ title: New+ - href: "/api/v3/statuses/2"+ title: Closed+ type: Status+ subject:+ maxLength: 255+ minLength: 1+ type: String+ validationErrors:+ subject:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:BadExampleError+ message: For the purpose of this example we need a validation+ error. The remainder of the response pretends there were no+ errors.+ _links:+ commit:+ href: "/api/v3/example"+ method: PATCH+ previewMarkup:+ href: "/api/v3/render/markdown"+ method: POST+ self:+ href: "/api/v3/example/form"+ validate:+ href: "/api/v3/example/form"+ method: POST+ _type: Form+ schema:+ "$ref": "../components/schemas/example_form_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody+ message: The request body was neither empty, nor did it contain a+ single JSON object.+ description: |-+ Occurs when the client did not send a valid JSON object in the request body and the request body+ was not empty.++ Note that this error only occurs when the content is not at all a single JSON object.+ It **does not occur** for requests containing undefined properties or invalid property values.+ 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 edit example resources.+ description: Returned if the client does not have sufficient permissions to+ modify the associated resource.+ headers: {}+ '409':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:UpdateConflict+ message: The resource you are about to edit was changed in the meantime.+ description: Returned if underlying resource was changed since the client requested+ the form. This is determined using the `lockVersion` property.+ headers: {}+ tags:+ - Forms+ description: This is an example of how a form might look like. Note that this endpoint+ does not exist in the actual implementation.+ operationId: show_or_validate_form+ requestBody:+ content:+ application/json:+ schema:+ example:+ _type: Example+ lockVersion: 5+ subject: An example title+ properties:+ _type:+ type: string+ lockVersion:+ type: number+ subject:+ type: string+ type: object+ summary: show or validate formdiff --git a/docs/api/apiv3/paths/example_schema.yml b/docs/api/apiv3/paths/example_schema.ymlnew file mode 100644index 00000000000..9f6efb46250--- /dev/null+++ b/docs/api/apiv3/paths/example_schema.yml@@ -0,0 +1,70 @@+# /api/v3/example/schema+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _dependencies: []+ _links:+ self:+ href: "/api/v3/example/schema"+ _type: Schema+ lockVersion:+ name: Resource Version+ type: Integer+ writable: false+ status:+ _embedded:+ allowedValues:+ - _links:+ self:+ href: "/api/v3/statuses/1"+ _type: Status+ createdAt: '2014-05-21T08:51:20Z'+ defaultDoneRatio: 0+ id: 1+ isClosed: false+ isDefault: true+ name: New+ position: 1+ updatedAt: '2014-05-21T09:12:00Z'+ - _links:+ self:+ href: "/api/v3/statuses/2"+ _type: Status+ createdAt: '2014-05-21T08:51:20Z'+ defaultDoneRatio: 100+ id: 2+ isClosed: true+ isDefault: false+ name: Closed+ position: 2+ updatedAt: '2014-05-21T09:12:00Z'+ _links:+ allowedValues:+ - href: "/api/v3/statuses/1"+ title: New+ - href: "/api/v3/statuses/2"+ title: Closed+ location: _links+ name: Status+ type: Status+ subject:+ maxLength: 255+ minLength: 1+ name: Subject+ type: String+ schema:+ "$ref": "../components/schemas/example_schema_model.yml"+ description: OK+ headers: {}+ tags:+ - Schemas+ description: This is an example of how a schema might look like. Note that this+ endpoint does not exist in the actual implementation.+ operationId: view_the_schema+ summary: view the schemadiff --git a/docs/api/apiv3/paths/examples.yml b/docs/api/apiv3/paths/examples.ymlnew file mode 100644index 00000000000..ae736bc5c60--- /dev/null+++ b/docs/api/apiv3/paths/examples.yml@@ -0,0 +1,30 @@+# /api/v3/examples+---+get:+ parameters:+ - description: |-+ The column to group by.+ Note: Aggregation is as of now only supported by the work package collection.+ You can pass any column name as returned by the [queries](#queries) endpoint.+ example: status+ in: query+ name: groupBy+ required: false+ schema:+ type: string+ - description: ''+ in: query+ name: showSums+ required: false+ schema:+ default: 'false'+ type: string+ responses:+ '200':+ description: OK+ headers: {}+ tags:+ - Collections+ description: ''+ operationId: view_aggregated_result+ summary: view aggregated resultdiff --git a/docs/api/apiv3/paths/grid.yml b/docs/api/apiv3/paths/grid.ymlnew file mode 100644index 00000000000..40c33e8a1ad--- /dev/null+++ b/docs/api/apiv3/paths/grid.yml@@ -0,0 +1,78 @@+# /api/v3/grids/{id}+---+get:+ parameters:+ - description: grid id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ scope:+ href: "/my/page"+ type: text/html+ self:+ href: "/api/v3/grids/2"+ update:+ href: "/api/v3/grids/2/form"+ method: post+ updateImmediately:+ href: "/api/v3/grids/2"+ method: patch+ _type: Grid+ columnCount: 5+ createdAt: '2018-12-03T16:58:30Z'+ id: 2+ rowCount: 8+ updatedAt: '2018-12-13T19:36:40Z'+ widgets:+ - _type: GridWidget+ endColumn: 3+ endRow: 8+ identifier: time_entries_current_user+ startColumn: 1+ startRow: 1+ - _type: GridWidget+ endColumn: 5+ endRow: 8+ identifier: news+ startColumn: 4+ startRow: 3+ - _type: GridWidget+ endColumn: 6+ endRow: 3+ identifier: documents+ startColumn: 3+ startRow: 1+ schema:+ "$ref": "../components/schemas/grid_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the Grid does not exist or if the user does not have permission to view it.++ **Required permission** depends on the page the grid is defined for+ headers: {}+ tags:+ - Grids+ description: ''+ operationId: View_grid+ summary: View griddiff --git a/docs/api/apiv3/paths/grid_form.yml b/docs/api/apiv3/paths/grid_form.ymlnew file mode 100644index 00000000000..39305803a55--- /dev/null+++ b/docs/api/apiv3/paths/grid_form.yml@@ -0,0 +1,152 @@+# /api/v3/grids/{id}/form+---+post:+ parameters:+ - description: ID of the grid being modified+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ payload:+ columnCount: 5+ rowCount: 6+ widgets:+ - _type: GridWidget+ endColumn: 3+ endRow: 8+ identifier: time_entries_current_user+ startColumn: 1+ startRow: 1+ - _type: GridWidget+ endColumn: 5+ endRow: 8+ identifier: news+ startColumn: 4+ startRow: 3+ - _type: GridWidget+ endColumn: 6+ endRow: 3+ identifier: documents+ startColumn: 3+ startRow: 1+ schema:+ _links: {}+ _type: Schema+ columnCount:+ hasDefault: false+ name: Number of columns+ required: true+ type: Integer+ writable: true+ createdAt:+ hasDefault: false+ name: Created on+ required: true+ type: DateTime+ writable: false+ id:+ hasDefault: false+ name: ID+ required: true+ type: Integer+ writable: false+ rowCount:+ hasDefault: false+ name: Number of rows+ required: true+ type: Integer+ writable: true+ scope:+ _links: {}+ hasDefault: false+ name: Page+ required: true+ type: Href+ writable: false+ updatedAt:+ hasDefault: false+ name: Updated on+ required: true+ type: DateTime+ writable: false+ widgets:+ _links: {}+ hasDefault: false+ name: Widgets+ required: true+ type: "[]GridWidget"+ writable: true+ validationErrors:+ widgets:+ _embedded:+ errors:+ - _embedded:+ details:+ attribute: widgets+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Widgets is outside of the grid.+ - _embedded:+ details:+ attribute: widgets+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Widgets is outside of the grid.+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MultipleErrors+ message: Multiple field constraints have been violated.+ _links:+ self:+ href: "/api/v3/grids/2/form"+ method: post+ validate:+ href: "/api/v3/grids/2/form"+ method: post+ _type: Form+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** depends on the page the grid is defined for.++ *Note that you will only receive this error, if you are at least allowed to see the corresponding grid.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the grid does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work package+ headers: {}+ tags:+ - Grids+ description: ''+ operationId: Grid_Update_Form+ summary: Grid Update Formdiff --git a/docs/api/apiv3/paths/grids.yml b/docs/api/apiv3/paths/grids.ymlnew file mode 100644index 00000000000..1ef99867929--- /dev/null+++ b/docs/api/apiv3/paths/grids.yml@@ -0,0 +1,206 @@+# /api/v3/grids+---+get:+ parameters:+ - description: Page number inside the requested collection.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:++ + page: Filter grid by work package+ example: '[{ "page": { "operator": "=", "values": ["/my/page"] } }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ scope:+ href: "/my/page"+ type: text/html+ self:+ href: "/api/v3/grids/2"+ update:+ href: "/api/v3/grids/2/form"+ method: post+ updateImmediately:+ href: "/api/v3/grids/2"+ method: patch+ _type: Grid+ columnCount: 5+ createdAt: '2018-12-03T16:58:30Z'+ id: 2+ rowCount: 8+ updatedAt: '2018-12-13T19:36:40Z'+ widgets:+ - _type: GridWidget+ endColumn: 3+ endRow: 8+ identifier: time_entries_current_user+ startColumn: 1+ startRow: 1+ - _type: GridWidget+ endColumn: 5+ endRow: 8+ identifier: news+ startColumn: 4+ startRow: 3+ - _type: GridWidget+ endColumn: 6+ endRow: 3+ identifier: documents+ startColumn: 3+ startRow: 1+ schema:+ "$ref": "../components/schemas/grid_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery+ message:+ - Filters Invalid filter does not exist.+ description: Returned if the client sends invalid request parameters e.g. filters+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to view this resource.+ description: Returned if the client is not logged in and login is required.+ headers: {}+ tags:+ - Grids+ description: Lists all grids matching the provided filters and being part of the+ selected query page. The grids returned will also depend on the permissions of+ the requesting user.+ operationId: List_Grids+ summary: List Grids+patch:+ responses:+ '200':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/grid_model.yml"+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** The permission depends on the page the grid is placed in.+ headers: {}+ '422':+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Grids+ description: Updates the given grid by applying the attributes provided in the body. The+ constraints applied to the grid depend on the page the grid is placed in which+ is why the create form end point should be used to be guided when wanting to update+ a grid.+ operationId: Update_Grid+ summary: Update Grid+post:+ responses:+ '201':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/grid_model.yml"+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Depends on the page the grid is defined for.+ headers: {}+ '422':+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Grids+ description: Creates a new grid applying the attributes provided in the body. The+ constraints applied to the grid depend on the page the grid is placed in which+ is why the create form end point should be used to be guided when wanting to create+ a grid.+ operationId: Create_Grid+ summary: Create Griddiff --git a/docs/api/apiv3/paths/grids_form.yml b/docs/api/apiv3/paths/grids_form.ymlnew file mode 100644index 00000000000..9e0df12f5e1--- /dev/null+++ b/docs/api/apiv3/paths/grids_form.yml@@ -0,0 +1,12 @@+# /api/v3/grids/form+---+post:+ responses:+ '200':+ description: OK+ headers: {}+ tags:+ - Grids+ description: ''+ operationId: Grid_Create_Form+ summary: Grid Create Formdiff --git a/docs/api/apiv3/paths/group.yml b/docs/api/apiv3/paths/group.ymlnew file mode 100644index 00000000000..0363c6ae804--- /dev/null+++ b/docs/api/apiv3/paths/group.yml@@ -0,0 +1,204 @@+# /api/v3/groups/{id}+---+delete:+ parameters:+ - description: Group id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '202':+ description: |-+ Returned if the group was successfully deleted++ Note that the response body is empty as of now. In future versions of the API a body+ *might* be returned, indicating the progress of deletion.+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Administrator+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the group does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** Administrator++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a version. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Groups+ description: Deletes the group.+ operationId: Delete_group+ summary: Delete group+get:+ parameters:+ - description: Group id.+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ delete:+ href: "/api/v3/group/9"+ method: delete+ members:+ - href: "/api/v3/users/363"+ title: First user+ - href: "/api/v3/users/60"+ title: Second user+ memberships:+ href: /api/v3/memberships?filters=[{"principal":{"operator":"=","values":["9"]}}]+ title: Memberships+ self:+ href: "/api/v3/groups/9"+ title: The group+ updateImmediately:+ href: "/api/v3/group/9"+ method: patch+ _type: Group+ createdAt: '2015-09-23T11:06:36Z'+ id: 9+ name: The group+ updatedAt: '2015-09-23T11:06:36Z'+ schema:+ "$ref": "../components/schemas/view_group_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the group does not exist or if the API user does not have permission to view them.++ **Required permission** If the user has the *manage members* permission in at least one project the user will be able to query all groups. If not, the user+ will be able to query all groups which are members in projects, he has the *view members* permission in.+ headers: {}+ tags:+ - Groups+ description: ''+ operationId: View_group+ summary: View group+patch:+ parameters:+ - description: Group id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_group_model.yml"+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Administrator+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the membership does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission** If the user has the *manage members* permission in at least one project the user will be able to query all groups. If not, the user+ will be able to query all groups which are members in projects, he has the *view members* permission in.++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a version. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: members+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Member is already taken.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Groups+ description: Updates the given group by applying the attributes provided in the+ body.+ operationId: Update_group+ summary: Update groupdiff --git a/docs/api/apiv3/paths/groups.yml b/docs/api/apiv3/paths/groups.ymlnew file mode 100644index 00000000000..4ae3124df9b--- /dev/null+++ b/docs/api/apiv3/paths/groups.yml@@ -0,0 +1,152 @@+# /api/v3/groups+---+get:+ parameters:+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:++ + id: Sort by primary key++ + created_at: Sort by group creation datetime++ + updated_at: Sort by the time the group was updated last+ example: '[["id", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["id", "asc"]'+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ members:+ - href: "/api/v3/users/363"+ title: First user+ - href: "/api/v3/users/60"+ title: Second user+ memberships:+ href: /api/v3/memberships?filters=[{"principal":{"operator":"=","values":["9"]}}]+ title: Memberships+ self:+ href: "/api/v3/groups/9"+ title: The group+ _type: Group+ createdAt: '2015-09-23T11:06:36Z'+ id: 9+ name: The group+ updatedAt: '2015-09-23T11:06:36Z'+ - _links:+ members:+ - href: "/api/v3/users/343"+ title: Third user+ - href: "/api/v3/users/60"+ title: Second user+ memberships:+ href: /api/v3/memberships?filters=[{"principal":{"operator":"=","values":["123"]}}]+ title: Memberships+ self:+ href: "/api/v3/groups/123"+ title: Another group+ _type: Group+ createdAt: '2018-09-23T11:06:36Z'+ id: 123+ name: Another group+ updatedAt: '2019-09-23T11:06:36Z'+ _links:+ self:+ href: "/api/v3/groups"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/list_groups_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** View members or manage members in any project+ headers: {}+ tags:+ - Groups+ description: Returns a collection of groups. The client can choose to filter the+ groups similar to how work packages are filtered. In addition to the provided+ filters, the server will reduce the result set to only contain groups, for which+ the requesting client has sufficient permissions (*view_members*, *manage_members*).+ operationId: List_groups+ summary: List groups+post:+ responses:+ '201':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_group_model.yml"+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Administrator+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: name+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Name can't be blank.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Groups+ description: Creates a new group applying the attributes provided in the body.+ operationId: Create_group+ summary: Create groupdiff --git a/docs/api/apiv3/paths/help_text.yml b/docs/api/apiv3/paths/help_text.ymlnew file mode 100644index 00000000000..4b0f9670a5a--- /dev/null+++ b/docs/api/apiv3/paths/help_text.yml@@ -0,0 +1,42 @@+# /api/v3/help_texts/{id}+---+get:+ parameters:+ - description: Help text id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ editText:+ href: "/admin/attribute_help_texts/1/edit"+ type: text/html+ self:+ href: "/api/v3/help_texts/1"+ _type: HelpText+ attribute: id+ attributeCaption: ID+ helpText:+ format: markdown+ html: "<p>Help text for id attribute.</p>"+ raw: Help text for id attribute.+ id: 1+ scope: WorkPackage+ schema:+ "$ref": "../components/schemas/help_text_model.yml"+ description: OK+ headers: {}+ tags:+ - Help texts+ description: ''+ operationId: View_help_text+ summary: View help textdiff --git a/docs/api/apiv3/paths/help_texts.yml b/docs/api/apiv3/paths/help_texts.ymlnew file mode 100644index 00000000000..94f88f00af1--- /dev/null+++ b/docs/api/apiv3/paths/help_texts.yml@@ -0,0 +1,51 @@+# /api/v3/help_texts+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/help_texts/1"+ _type: HelpText+ attribute: id+ attributeCaption: ID+ helpText:+ format: markdown+ html: "<p>Help text for id attribute.</p>"+ raw: Help text for id attribute.+ id: 1+ scope: WorkPackage+ - _links:+ self:+ href: "/api/v3/help_texts/2"+ _type: HelpText+ attribute: status+ attributeCaption: Status+ helpText:+ format: markdown+ html: "<p>Help text for status attribute.</p>"+ raw: Help text for status attribute.+ id: 2+ scope: WorkPackage+ _links:+ self:+ href: "/api/v3/help_texts"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/help_texts_model.yml"+ description: OK+ headers: {}+ tags:+ - Help texts+ description: ''+ operationId: List_all_help_texts+ summary: List all help textsdiff --git a/docs/api/apiv3/paths/membership.yml b/docs/api/apiv3/paths/membership.ymlnew file mode 100644index 00000000000..118dfcd292a--- /dev/null+++ b/docs/api/apiv3/paths/membership.yml@@ -0,0 +1,213 @@+# /api/v3/memberships/{id}+---+delete:+ parameters:+ - description: Membership id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: Returned if the membership was successfully deleted+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage members+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the membership does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view members++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a version. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Memberships+ description: Deletes the membership.+ operationId: Delete_membership+ summary: Delete membership+get:+ parameters:+ - description: membership id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ principal...: {}+ project...: {}+ roles...: []+ _links:+ principal:+ href: "/api/v3/users/4"+ title: Some user+ project:+ href: "/api/v3/projects/3"+ title: A project+ roles:+ - href: "/api/v3/roles/5"+ title: Member+ - href: "/api/v3/roles/4"+ title: Reader+ schema:+ href: "/api/v3/memberships/schema"+ self:+ href: "/api/v3/memberships/11"+ title: Some user+ update:+ href: "/api/v3/memberships/11/form"+ method: post+ updateImmediately:+ href: "/api/v3/memberships/11"+ method: patch+ _type: Membership+ createdAt: '2015-03-20T12:56:56Z'+ id: 11+ updatedAt: '2018-12-20T18:16:11Z'+ schema:+ "$ref": "../components/schemas/view_membership_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the membership does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view members **or** manage members++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a membership. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Memberships+ description: ''+ operationId: View_membership+ summary: View membership+patch:+ parameters:+ - description: Membership id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_membership_model.yml"+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Manage members in the membership's project.+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the membership does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view member++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a version. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: roles+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Roles has an unassignable role.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Memberships+ description: |-+ Updates the given membership by applying the attributes provided in the body.++ By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user+ of the updated membership. In case of a group, the message will be sent to every user belonging to the group.+ operationId: Update_membership+ summary: Update membershipdiff --git a/docs/api/apiv3/paths/membership_form.yml b/docs/api/apiv3/paths/membership_form.ymlnew file mode 100644index 00000000000..bda219b8568--- /dev/null+++ b/docs/api/apiv3/paths/membership_form.yml@@ -0,0 +1,126 @@+# /api/v3/memberships/{id}/form+---+post:+ parameters:+ - description: Membership id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ payload:+ _links:+ roles:+ - href: "/api/v3/roles/4"+ title: A role+ _meta:+ notificationMessage:+ raw: Alice, you can now also create work packages.+ schema:+ _dependencies: []+ _links: {}+ _type: Schema+ createdAt:+ hasDefault: false+ name: Created on+ required: true+ type: DateTime+ writable: false+ id:+ hasDefault: false+ name: ID+ required: true+ type: Integer+ writable: false+ notificationMessage:+ hasDefault: false+ location: _meta+ name: Message+ options: {}+ required: false+ type: Formattable+ writable: true+ principal:+ _links: {}+ hasDefault: false+ name: Principal+ required: true+ type: Principal+ writable: false+ project:+ _links: {}+ hasDefault: false+ name: Project+ required: false+ type: Project+ writable: false+ roles:+ _links:+ allowedValues:+ href: "/api/v3/roles?filters=%5B%7B%22unit%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22project%22%5D%7D%7D%5D"+ hasDefault: false+ location: _links+ name: Role+ required: true+ type: "[]Role"+ writable: true+ updatedAt:+ hasDefault: false+ name: Updated on+ required: true+ type: DateTime+ writable: false+ validationErrors: {}+ _links:+ commit:+ href: "/api/v3/memberships/5"+ method: patch+ self:+ href: "/api/v3/memberships/5/form"+ method: post+ validate:+ href: "/api/v3/memberships/5/form"+ method: post+ _type: Form+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage versions in the version's project+ headers: {}+ tags:+ - Memberships+ description: ''+ operationId: Membership_update_form+ summary: Membership update formdiff --git a/docs/api/apiv3/paths/memberships.yml b/docs/api/apiv3/paths/memberships.ymlnew file mode 100644index 00000000000..ae1a04228e0--- /dev/null+++ b/docs/api/apiv3/paths/memberships.yml@@ -0,0 +1,182 @@+# /api/v3/memberships+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ Currently supported filters are:++ + any_name_attribute: filters memberships based on the name of the principal. All possible name variants (and also email and login) are searched.++ + blocked: reduces the result set to all memberships that are temporarily blocked or that are not blocked temporarily.++ + group: filters memberships based on the name of a group. The group however is not the principal used for filtering. Rather, the memberships of the group are used as the filter values.++ + name: filters memberships based on the name of the principal. Note that only the name is used which depends on a setting in the OpenProject instance.++ + principal: filters memberships based on the id of the principal.++ + project: filters memberships based on the id of the project.++ + role: filters memberships based on the id of any role assigned to the membership.++ + status: filters memberships based on the status of the principal.++ + created_at: filters memberships based on the time the membership was created.++ + updated_at: filters memberships based on the time the membership was updated last.+ example: '[{ "name": { "operator": "=", "values": ["A User"] }" }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:++ + id: Sort by primary key++ + name: Sort by the name of the principal. Note that this depends on the setting for how the name is to be displayed at least for users.++ + email: Sort by the email address of the principal. Groups and principal users, which do not have an email, are sorted last.++ + status: Sort by the status of the principal. Groups and principal users, which do not have a status, are sorted together with the active users.++ + created_at: Sort by membership creation datetime++ + updated_at: Sort by the time the membership was updated last+ example: '[["id", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["id", "asc"]'+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ principal:+ href: "/api/v3/users/5"+ title: A user+ project:+ href: "/api/v3/projects/3"+ title: A Project+ roles:+ - href: "/api/v3/roles/4"+ title: Reader+ schema:+ href: "/api/v3/memberships/schema"+ self:+ href: "/api/v3/memberships/11"+ _type: Membership+ createdAt: '2015-03-20T12:56:56Z'+ id: 11+ updatedAt: '2018-12-20T18:16:11Z'+ - _links:+ principal:+ href: "/api/v3/groups/5"+ title: A group+ project:+ href: "/api/v3/projects/6"+ title: Another Project+ roles:+ - href: "/api/v3/roles/8"+ title: Project admin+ schema:+ href: "/api/v3/memberships/schema"+ self:+ href: "/api/v3/memberships/41"+ _type: Membership+ createdAt: '2019-12-22T12:56:06Z'+ id: 41+ updatedAt: '2020-12-20T18:16:12Z'+ _links:+ self:+ href: "/api/v3/memberships"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/list_memberships_model.yml"+ description: OK+ headers: {}+ tags:+ - Memberships+ description: Returns a collection of memberships. The client can choose to filter+ the memberships similar to how work packages are filtered. In addition to the+ provided filters, the server will reduce the result set to only contain memberships,+ for which the requesting client has sufficient permissions (*view_members*, *manage_members*).+ operationId: List_memberships+ summary: List memberships+post:+ responses:+ '201':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_membership_model.yml"+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Manage members+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: project+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Project can't be blank.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Memberships+ description: |-+ Creates a new membership applying the attributes provided in the body.++ You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation.++ By providing a `notificationMessage` within the `_meta` block of the payload, the client can include a customized message to the user+ of the newly created membership. In case of a group, the message will be sent to every user belonging to the group.+ operationId: Create_membership+ summary: Create membershipdiff --git a/docs/api/apiv3/paths/memberships_available_projects.yml b/docs/api/apiv3/paths/memberships_available_projects.ymlnew file mode 100644index 00000000000..03157dcff7f--- /dev/null+++ b/docs/api/apiv3/paths/memberships_available_projects.yml@@ -0,0 +1,95 @@+# /api/v3/memberships/available_projects+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ categories:+ href: "/api/v3/projects/6/categories"+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ editWorkPackage:+ href: "/api/v3//work_packages/{work_package_id}/form"+ method: post+ templated: true+ memberships:+ href: "/api/v3/projects/6/memberships"+ self:+ href: "/api/v3/projects/6"+ title: A project+ _type: Project+ createdAt: '2015-07-06T13:28:14+00:00'+ description: Eveniet molestias omnis quis aut qui eum adipisci.+ Atque aut aut in exercitationem adipisci amet. Nisi asperiores+ quia ratione veritatis enim exercitationem magnam. Aut fuga+ architecto adipisci nihil. Et repellat pariatur. Aliquam et+ sed perferendis nostrum quaerat. Fugit doloremque voluptatem.+ id: 6+ identifier: a_project+ name: A project+ type: Customer Project+ updatedAt: '2015-10-01T09:55:02+00:00'+ - _links:+ categories:+ href: "/api/v3/projects/14/categories"+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ memberships:+ href: "/api/v3/projects/14/memberships"+ self:+ href: "/api/v3/projects/14"+ title: Another project+ _type: Project+ createdAt: '2016-02-29T12:50:20+00:00'+ description: ''+ id: 14+ identifier: another_project+ name: Another project+ type:+ updatedAt: '2016-02-29T12:50:20+00:00'+ _links:+ self:+ href: "/api/v3/memberships/available_projects"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/available_projects_for_memberships_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage members+ headers: {}+ tags:+ - Memberships+ description: Gets a list of projects in which a membership can be created in. The+ list contains all projects in which the user issuing the request has the manage+ members permissions.+ operationId: Available_projects_for_memberships+ summary: Available projects for membershipsdiff --git a/docs/api/apiv3/paths/memberships_form.yml b/docs/api/apiv3/paths/memberships_form.ymlnew file mode 100644index 00000000000..4fed3d099a5--- /dev/null+++ b/docs/api/apiv3/paths/memberships_form.yml@@ -0,0 +1,38 @@+# /api/v3/memberships/form+---+post:+ responses:+ '200':+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage memberships in any project+ headers: {}+ tags:+ - Memberships+ description: ''+ operationId: Membership_create_form+ summary: Membership create formdiff --git a/docs/api/apiv3/paths/memberships_schemas.yml b/docs/api/apiv3/paths/memberships_schemas.ymlnew file mode 100644index 00000000000..7496aaf3672--- /dev/null+++ b/docs/api/apiv3/paths/memberships_schemas.yml@@ -0,0 +1,88 @@+# /api/v3/memberships/schemas+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _dependencies: []+ _links:+ self:+ href: "/api/v3/memberships/schema"+ _type: Schema+ createdAt:+ hasDefault: false+ name: Created on+ required: true+ type: DateTime+ writable: false+ id:+ hasDefault: false+ name: ID+ required: true+ type: Integer+ writable: false+ notificationMessage:+ hasDefault: false+ location: _meta+ name: Message+ options: {}+ required: false+ type: Formattable+ writable: true+ principal:+ _links: {}+ hasDefault: false+ location: _links+ name: Principal+ required: true+ type: Principal+ writable: true+ project:+ _links: {}+ hasDefault: false+ location: _links+ name: Project+ required: false+ type: Project+ writable: true+ roles:+ _links: {}+ hasDefault: false+ location: _links+ name: Role+ required: true+ type: "[]Role"+ writable: true+ updatedAt:+ hasDefault: false+ name: Updated on+ required: true+ type: DateTime+ writable: false+ schema:+ "$ref": "../components/schemas/view_membership_schema_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see the schema.++ **Required permission:** manage members or view memberships on any project+ headers: {}+ tags:+ - Memberships+ description: ''+ operationId: View_membership_schema+ summary: View membership schemadiff --git a/docs/api/apiv3/paths/my_preferences.yml b/docs/api/apiv3/paths/my_preferences.ymlnew file mode 100644index 00000000000..605ca35bcc4--- /dev/null+++ b/docs/api/apiv3/paths/my_preferences.yml@@ -0,0 +1,125 @@+# /api/v3/my_preferences+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/my_preferences"+ user:+ href: "/api/v3/users/1"+ title: John Sheppard+ _type: UserPreferences+ accessibilityMode: false+ commentSortDescending: true+ hideMail: false+ timeZone: Europe/Berlin+ warnOnLeavingUnsaved: true+ schema:+ "$ref": "../components/schemas/user_preferences_model.yml"+ description: OK+ headers: {}+ '401':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated+ message: You need to be authenticated to access this resource.+ description: Returned if no user is currently authenticated+ headers: {}+ tags:+ - UserPreferences+ description: ''+ operationId: Show_my_preferences+ summary: Show my preferences+patch:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/my_preferences"+ user:+ href: "/api/v3/users/1"+ title: John Sheppard+ _type: UserPreferences+ accessibilityMode: false+ commentSortDescending: true+ hideMail: false+ timeZone: Europe/Berlin+ warnOnLeavingUnsaved: true+ schema:+ "$ref": "../components/schemas/user_preferences_model.yml"+ description: OK+ 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: {}+ '401':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated+ message: You need to be authenticated to access this resource.+ description: Returned if no user is currently authenticated+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Time zone is not set to one of the allowed values.+ description: |-+ Returned if the update contains invalid properties.+ Reasons are:++ * Specifying an invalid type++ * Using an unknown time zone+ headers: {}+ tags:+ - UserPreferences+ description: When calling this endpoint the client provides a single object, containing+ the properties that it wants to change, in the body.+ operationId: Update_UserPreferences+ requestBody:+ content:+ application/json:+ schema:+ example:+ accessibilityMode: true+ timeZone: Europe/Paris+ properties:+ accessibilityMode:+ type: boolean+ timeZone:+ type: string+ type: object+ summary: Update UserPreferencesdiff --git a/docs/api/apiv3/paths/news.yml b/docs/api/apiv3/paths/news.ymlnew file mode 100644index 00000000000..d05aa81a49f--- /dev/null+++ b/docs/api/apiv3/paths/news.yml@@ -0,0 +1,158 @@+# /api/v3/news+---+get:+ parameters:+ - description: Page number inside the requested collection.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:++ + id: Sort by primary key++ + created_at: Sort by news creation datetime+ example: '[["created_at", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ type: string+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:++ + project_id: Filter news by project+ example: '[{ "project_id": { "operator": "=", "values": ["1", "2"] } }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ author:+ href: "/api/v3/users/2"+ title: Peggie Feeney+ project:+ href: "/api/v3/projects/1"+ title: Seeded Project+ self:+ href: "/api/v3/news/1"+ title: asperiores possimus nam doloribus ab+ _type: News+ createdAt: '2015-03-20T12:57:01Z'+ description:+ format: markdown+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia+ est quia pariatur vorago vallum. Calco autem atavus accusamus+ conscendo cornu ulterius. Tam patria ago consectetur ventito+ sustineo nihil caecus. Supra officiis eos velociter somniculosus+ tonsor qui. Suffragium aduro arguo angustus cogito quia tolero+ vulnus. Supplanto sortitus cresco apud vestrum qui.</p>"+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est+ quia pariatur vorago vallum. Calco autem atavus accusamus+ conscendo cornu ulterius. Tam patria ago consectetur ventito+ sustineo nihil caecus. Supra officiis eos velociter somniculosus+ tonsor qui. Suffragium aduro arguo angustus cogito quia tolero+ vulnus. Supplanto sortitus cresco apud vestrum qui.+ id: 1+ summary: Celebrer spiculum colo viscus claustrum atque. Id nulla+ culpa sumptus. Comparo crapula depopulo demonstro.+ title: asperiores possimus nam doloribus ab+ - _links:+ author:+ href: "/api/v3/users/2"+ title: Peggie Feeney+ project:+ href: "/api/v3/projects/1"+ title: Seeded Project+ self:+ href: "/api/v3/news/2"+ title: terminatio tutamen. Officia adeptio sp+ _type: News+ createdAt: '2015-03-20T12:57:01Z'+ description:+ format: markdown+ html: "<p>Amicitia alius cattus voluntarius. Virgo viduo terminatio+ tutamen. Officia adeptio spectaculum atavus nisi cum concido+ bis. Harum caecus auxilium sol theatrum eaque consequatur.+ Omnis aeger suus adipisci cicuta. Cur delicate alias curto+ cursim atqui talio fugiat.</p>"+ raw: Amicitia alius cattus voluntarius. Virgo viduo terminatio+ tutamen. Officia adeptio spectaculum atavus nisi cum concido+ bis. Harum caecus auxilium sol theatrum eaque consequatur.+ Omnis aeger suus adipisci cicuta. Cur delicate alias curto+ cursim atqui talio fugiat.+ id: 2+ summary: Consequatur sequi surculus creo tui aequitas.+ title: terminatio tutamen. Officia adeptio sp+ _links:+ changeSize:+ href: "/api/v3/news?offset=1&pageSize=%7Bsize%7D"+ templated: true+ jumpTo:+ href: "/api/v3/news?offset=%7Boffset%7D&pageSize=2"+ templated: true+ nextByOffset:+ href: "/api/v3/news?offset=2&pageSize=2"+ self:+ href: "/api/v3/news?offset=1&pageSize=2"+ _type: Collection+ count: 2+ offset: 1+ pageSize: 2+ total: 78+ schema:+ "$ref": "../components/schemas/list_of_news_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery+ message:+ - Filters Invalid filter does not exist.+ description: Returned if the client sends invalid request parameters e.g. filters+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to view this resource.+ description: Returned if the client is not logged in and login is required.+ headers: {}+ tags:+ - News+ description: Lists news. The news returned depend on the provided parameters and+ also on the requesting user's permissions.+ operationId: List_News+ summary: List Newsdiff --git a/docs/api/apiv3/paths/news_item.yml b/docs/api/apiv3/paths/news_item.ymlnew file mode 100644index 00000000000..638cf8a5332--- /dev/null+++ b/docs/api/apiv3/paths/news_item.yml@@ -0,0 +1,76 @@+# /api/v3/news/{id}+---+get:+ parameters:+ - description: news id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ author:+ _type: User...+ project:+ _type: Project...+ _links:+ author:+ href: "/api/v3/users/2"+ title: Peggie Feeney+ project:+ href: "/api/v3/projects/1"+ title: A project+ self:+ href: "/api/v3/news/1"+ title: asperiores possimus nam doloribus ab+ _type: News+ createdAt: '2015-03-20T12:57:01Z'+ description:+ format: markdown+ html: "<p>Videlicet deserunt aequitas cognatus. Concedo quia est+ quia pariatur vorago vallum. Calco autem atavus accusamus conscendo+ cornu ulterius. Tam patria ago consectetur ventito sustineo nihil+ caecus. Supra officiis eos velociter somniculosus tonsor qui.+ Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto+ sortitus cresco apud vestrum qui.</p>"+ raw: Videlicet deserunt aequitas cognatus. Concedo quia est quia+ pariatur vorago vallum. Calco autem atavus accusamus conscendo+ cornu ulterius. Tam patria ago consectetur ventito sustineo nihil+ caecus. Supra officiis eos velociter somniculosus tonsor qui.+ Suffragium aduro arguo angustus cogito quia tolero vulnus. Supplanto+ sortitus cresco apud vestrum qui.+ id: 1+ summary: Celebrer spiculum colo viscus claustrum atque. Id nulla culpa+ sumptus. Comparo crapula depopulo demonstro.+ title: asperiores possimus nam doloribus ab+ schema:+ "$ref": "../components/schemas/news_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the news does not exist or if the user does not have permission to view it.++ **Required permission** being member of the project the news belongs to+ headers: {}+ tags:+ - News+ description: ''+ operationId: View_news+ summary: View newsdiff --git a/docs/api/apiv3/paths/post.yml b/docs/api/apiv3/paths/post.ymlnew file mode 100644index 00000000000..5cebfd5d1ff--- /dev/null+++ b/docs/api/apiv3/paths/post.yml@@ -0,0 +1,58 @@+# /api/v3/posts/{id}+---+get:+ parameters:+ - description: Post's identifier+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ project:+ _type: Project...+ _links:+ addAttachment:+ href: "/api/v3/posts/1/attachments"+ method: post+ attachments:+ href: "/api/v3/posts/1/attachments"+ project:+ href: "/api/v3/projects/1"+ title: A project with a title+ self:+ href: "/api/v3/posts/1"+ _type: Post+ id: 1+ subject: A post with a subject+ schema:+ "$ref": "../components/schemas/post_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the post does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view messages in the post's project+ headers: {}+ tags:+ - Posts+ description: Retrieve an individual post as identified by the id parameter+ operationId: View_Post+ summary: View Postdiff --git a/docs/api/apiv3/paths/post_attachments.yml b/docs/api/apiv3/paths/post_attachments.ymlnew file mode 100644index 00000000000..c62e0ba1cbe--- /dev/null+++ b/docs/api/apiv3/paths/post_attachments.yml@@ -0,0 +1,247 @@+# /api/v3/posts/{id}/attachments+---+get:+ parameters:+ - description: ID of the post whose attachments will be listed+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ author:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ container:+ href: "/api/v3/posts/72"+ title: wiki+ delete:+ href: "/api/v3/attachments/376"+ method: delete+ downloadLocation:+ href: "/api/v3/attachments/376/content"+ self:+ href: "/api/v3/attachments/376"+ title: 200.gif+ _type: Attachment+ contentType: image/gif+ createdAt: '2018-06-01T07:24:19Z'+ description:+ format: plain+ html: ''+ raw: ''+ digest:+ algorithm: md5+ hash: 7ac9c97ef73d47127f590788b84c0c1c+ fileName: some.gif+ fileSize: 3521772+ id: 376+ _links:+ self:+ href: "/api/v3/posts/72/attachments"+ _type: Collection+ count: 1+ total: 1+ schema:+ "$ref": "../components/schemas/attachments_by_post_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the post does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view messages++ *Note: A client without sufficient permissions shall not be able to test for the existence of a post.+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Attachments+ description: ''+ operationId: List_attachments_by_post+ summary: List attachments by post+post:+ parameters:+ - description: ID of the post to receive the attachment+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ author:+ _links:+ lock:+ href: "/api/v3/users/1/lock"+ method: post+ title: Set lock on admin+ self:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ showUser:+ href: "/users/1"+ type: text/html+ updateImmediately:+ href: "/api/v3/users/1"+ method: patch+ title: Update admin+ _type: User+ admin: true+ avatar: ''+ createdAt: '2015-03-20T12:56:52Z'+ email:+ firstName: OpenProject+ id: 1+ identityUrl:+ lastName: Admin+ login: admin+ name: OpenProject Admin+ status: active+ updatedAt: '2018-05-29T13:57:44Z'+ container:+ _links:+ addAttachment:+ href: "/api/v3/posts/150/attachments"+ method: post+ attachments:+ href: "/api/v3/posts/150/attachments"+ project:+ href: "/api/v3/projects/12"+ title: Demo project+ self:+ href: "/api/v3/posts/150"+ _type: Post+ id: 150+ subject: sfsdfsdfsdfsdf+ _links:+ author:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ container:+ href: "/api/v3/posts/150"+ title: sfsdfsdfsdfsdf+ delete:+ href: "/api/v3/attachments/377"+ method: delete+ downloadLocation:+ href: "/api/v3/attachments/377/content"+ self:+ href: "/api/v3/attachments/377"+ title: 200.gif+ _type: Attachment+ contentType: image/gif+ createdAt: '2018-06-01T07:53:36Z'+ description:+ format: plain+ html: ''+ raw: ''+ digest:+ algorithm: md5+ hash: 7ac9c97ef73d47127f590788b84c0c1c+ fileName: some.gif+ fileSize: 3521772+ id: 377+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody+ message: The request could not be parsed as JSON.+ description: |-+ Returned if the client sends a not understandable request. Reasons include:++ * Omitting one of the required parts (metadata and file)++ * sending unparsable JSON in the metadata part+ 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 delete this attachment.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit messages++ *Note that you will only receive this error, if you are at least allowed to see the wiki page*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the post does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view messages++ *Note: A client without sufficient permissions shall not be able to test for the existence of a post.+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: File is too large (maximum size is 5242880 Bytes).+ description: |-+ Returned if the client tries to send an invalid attachment.+ Reasons are:++ * Omitting the file name (`fileName` property of metadata part)++ * Sending a file that is too large+ headers: {}+ tags:+ - Attachments+ description: |-+ Adds an attachment with the post as it's container.++ See [the general specification for uploading attachments](#attachments-attachments) for details.+ operationId: Add_attachment_to_post+ summary: Add attachment to postdiff --git a/docs/api/apiv3/paths/principals.yml b/docs/api/apiv3/paths/principals.ymlnew file mode 100644index 00000000000..1986e942bea--- /dev/null+++ b/docs/api/apiv3/paths/principals.yml@@ -0,0 +1,133 @@+# /api/v3/principals+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ Currently supported filters are:++ + type: filters principals by their type (*User*, *Group*, *PlaceholderUser*).++ + member: filters principals by the projects they are members in.++ + name: filters principals by the user or group name.++ + any_name_attribute: filters principals by the user or group first- and last name, email or login.++ + status: filters principals by their status number (active = *1*, registered = *2*, locked = *3*, invited = *4*)+ example: '[{ "type": { "operator": "=", "values": ["User"] } }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ delete:+ href: "/api/v3/users/4"+ method: delete+ title: Delete Eliza92778+ lock:+ href: "/api/v3/users/4/lock"+ method: post+ title: Set lock on Eliza92778+ self:+ href: "/api/v3/users/4"+ title: Danika O'Keefe+ showUser:+ href: "/users/4"+ type: text/html+ updateImmediately:+ href: "/api/v3/users/4"+ method: patch+ title: Update Eliza92778+ _type: User+ admin: false+ avatar: https://example.org/users/4/avatar+ createdAt: '2015-03-20T12:57:02Z'+ email: [email protected]+ firstName: Danika+ id: 4+ identityUrl:+ lastName: O'Keefe+ login: Eliza92778+ name: Danika O'Keefe+ status: active+ updatedAt: '2015-06-16T15:28:14Z'+ - _links:+ delete:+ href: "/api/v3/users/2"+ method: delete+ title: Delete Sebastian9686+ lock:+ href: "/api/v3/users/2/lock"+ method: post+ title: Set lock on Sebastian9686+ self:+ href: "/api/v3/users/2"+ title: Peggie Feeney+ showUser:+ href: "/users/2"+ type: text/html+ updateImmediately:+ href: "/api/v3/users/2"+ method: patch+ title: Update Sebastian9686+ _type: User+ admin: false+ avatar: https://example.org/users/4/avatar+ createdAt: '2015-03-20T12:56:55Z'+ email:+ firstName: Peggie+ id: 2+ identityUrl:+ lastName: Feeney+ login: Sebastian9686+ name: Peggie Feeney+ status: active+ updatedAt: '2015-03-20T12:56:55Z'+ - _links:+ self:+ href: "/api/v3/groups/9"+ title: The group+ _type: Group+ createdAt: '2015-09-23T11:06:36Z'+ id: 9+ name: The group+ updatedAt: '2015-09-23T11:06:36Z'+ - _links:+ self:+ href: "/api/v3/placeholder_users/29"+ title: UX Designer+ _type: PlaceholderUser+ createdAt: '2018-09-23T11:06:36Z'+ id: 29+ name: UX Designer+ updatedAt: '2019-10-23T11:06:36Z'+ _links:+ self:+ href: "/api/v3/principals"+ _type: Collection+ count: 4+ total: 4+ schema:+ "$ref": "../components/schemas/principals_model.yml"+ description: OK+ headers: {}+ tags:+ - Principals+ description: List all principals. The client can choose to filter the principals+ similar to how work packages are filtered. In addition to the provided filters,+ the server will reduce the result set to only contain principals who are members+ in projects the client is allowed to see.+ operationId: List_principals+ summary: List principalsdiff --git a/docs/api/apiv3/paths/priorities.yml b/docs/api/apiv3/paths/priorities.ymlnew file mode 100644index 00000000000..ebce1645d07--- /dev/null+++ b/docs/api/apiv3/paths/priorities.yml@@ -0,0 +1,81 @@+# /api/v3/priorities+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/priorities/1"+ title: Low+ _type: Priority+ id: 1+ isActive: true+ isDefault: false+ name: Low+ position: 1+ - _links:+ self:+ href: "/api/v3/priorities/2"+ title: Normal+ _type: Priority+ id: 2+ isActive: true+ isDefault: true+ name: Normal+ position: 2+ - _links:+ self:+ href: "/api/v3/priorities/3"+ title: High+ _type: Priority+ id: 3+ isActive: true+ isDefault: false+ name: High+ position: 3+ - _links:+ self:+ href: "/api/v3/priorities/4"+ title: Immediate+ _type: Priority+ id: 4+ isActive: true+ isDefault: false+ name: Immediate+ position: 5+ _links:+ self:+ href: "/api/v3/priorities"+ _type: Collection+ count: 4+ total: 4+ schema:+ "$ref": "../components/schemas/priorities_model.yml"+ description: OK+ 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 see the priorities.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work package (on any project)+ headers: {}+ tags:+ - Priorities+ description: ''+ operationId: List_all_Priorities+ summary: List all Prioritiesdiff --git a/docs/api/apiv3/paths/priority.yml b/docs/api/apiv3/paths/priority.ymlnew file mode 100644index 00000000000..b54b92b2aca--- /dev/null+++ b/docs/api/apiv3/paths/priority.yml@@ -0,0 +1,51 @@+# /api/v3/priorities/{id}+---+get:+ parameters:+ - description: Priority id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/priorities/1"+ title: Low+ _type: Priority+ id: 1+ isActive: true+ isDefault: false+ name: Low+ position: 1+ schema:+ "$ref": "../components/schemas/priority_model.yml"+ description: OK+ 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 see this priority.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work package (on any project)+ headers: {}+ tags:+ - Priorities+ description: ''+ operationId: View_Priority+ summary: View Prioritydiff --git a/docs/api/apiv3/paths/project.yml b/docs/api/apiv3/paths/project.ymlnew file mode 100644index 00000000000..8a9168059a9--- /dev/null+++ b/docs/api/apiv3/paths/project.yml@@ -0,0 +1,246 @@+# /api/v3/projects/{id}+---+delete:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: |-+ Returned if the project was successfully deleted. There is currently no end point to query for the actual deletion status.+ Such an end point _might_ be added in the future.+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** admin+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ 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 version. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: base+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Work packages in non descendant projects reference versions+ of the project or its descendants.+ description: |-+ Returned if the project cannot be deleted. This can happen when there are still references to the project in other projects+ that need to be severed at first.+ headers: {}+ tags:+ - Projects+ description: |-+ Deletes the project permanently. As this is a lengthy process, the actual deletion is carried out asynchronously.+ So the project might exist well after the request has returned successfully. To prevent unwanted changes to+ the project scheduled for deletion, it is archived at once.+ operationId: Delete_Project+ summary: Delete Project+get:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ categories:+ href: "/api/v3/projects/1/categories"+ createWorkPackage:+ href: "/api/v3/projects/1/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/1/work_packages"+ method: post+ customField456:+ href: "/api/v3/users/315"+ method: A user+ memberships:+ href: /api/v3/memberships?filters=[{"project":{"operator":"=","values":["1"]}}]+ projects:+ href: "/api/v3/projects/123"+ self:+ href: "/api/v3/projects/1"+ title: Lorem+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ types:+ href: "/api/v3/projects/1/types"+ versions:+ href: "/api/v3/projects/1/versions"+ workPackages:+ href: "/api/v3/projects/1/work_packages"+ _type: Project+ active: true+ createdAt: '2014-05-21T08:51:20Z'+ customField123: 123+ description:+ format: markdown+ html: "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"+ raw: Lorem **ipsum** dolor sit amet+ id: 1+ identifier: project_identifier+ name: Project example+ public: false+ statusExplanation:+ format: markdown+ html: "<p>Everything <strong>fine</strong></p>"+ raw: Everything **fine**+ updatedAt: '2014-05-21T08:51:20Z'+ schema:+ "$ref": "../components/schemas/view_project_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ 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.*+ headers: {}+ tags:+ - Projects+ description: ''+ operationId: View_project+ summary: View project+patch:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_project_model.yml"+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit project for the project to be altered+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ 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 version. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: name+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Name can't be blank.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Projects+ description: Updates the given project by applying the attributes provided in the+ body.+ operationId: Update_Project+ summary: Update Projectdiff --git a/docs/api/apiv3/paths/project_available_assignees.yml b/docs/api/apiv3/paths/project_available_assignees.ymlnew file mode 100644index 00000000000..b458a653d88--- /dev/null+++ b/docs/api/apiv3/paths/project_available_assignees.yml@@ -0,0 +1,111 @@+# /api/v3/projects/{project_id}/available_assignees+---+get:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: project_id+ required: true+ schema:+ type: integer+ responses:+ '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+ _type: User+ avatar: https://example.org/users/1/avatar+ createdAt: '2014-05-21T08:51:20Z'+ email: [email protected]+ firstName: John+ id: 1+ lastName: Sheppard+ login: j.sheppard+ 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'+ email: [email protected]+ firstName: Jim+ id: 2+ lastName: Sheppard+ login: j.sheppard2+ status: active+ updatedAt: '2014-05-21T08:51:20Z'+ _links:+ self:+ href: "/api/v3/projects/42/available_assignees"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/available_assignees_model.yml"+ description: OK+ 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 see the assignable users for this+ project.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work packages++ *Note that you will only receive this error, if you are at least allowed to see the corresponding project.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified project does not exist.+ description: |-+ Returned if the project does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view project+ headers: {}+ tags:+ - Work Packages+ description: Gets a list of users that can be assigned to work packages in the given+ project.+ operationId: Available_assignees+ summary: Available assigneesdiff --git a/docs/api/apiv3/paths/project_available_responsibles.yml b/docs/api/apiv3/paths/project_available_responsibles.ymlnew file mode 100644index 00000000000..2d57711cad3--- /dev/null+++ b/docs/api/apiv3/paths/project_available_responsibles.yml@@ -0,0 +1,111 @@+# /api/v3/projects/{project_id}/available_responsibles+---+get:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: project_id+ required: true+ schema:+ type: integer+ responses:+ '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+ _type: User+ avatar: https://example.org/users/1/avatar+ createdAt: '2014-05-21T08:51:20Z'+ email: [email protected]+ firstName: John+ id: 1+ lastName: Sheppard+ login: j.sheppard+ 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'+ email: [email protected]+ firstName: Jim+ id: 2+ lastName: Sheppard+ login: j.sheppard2+ status: active+ updatedAt: '2014-05-21T08:51:20Z'+ _links:+ self:+ href: "/api/v3/projects/42/available_responsibles"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/available_responsibles_model.yml"+ description: OK+ 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 see the users available as responsible+ for this project.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work packages++ *Note that you will only receive this error, if you are at least allowed to see the corresponding project.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified project does not exist.+ description: |-+ Returned if the project does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view project+ headers: {}+ tags:+ - Work Packages+ description: Gets a list of users that can be assigned as the responsible of a work+ package in the given project.+ operationId: Available_responsibles+ summary: Available responsiblesdiff --git a/docs/api/apiv3/paths/project_budgets.yml b/docs/api/apiv3/paths/project_budgets.ymlnew file mode 100644index 00000000000..299bedab3e4--- /dev/null+++ b/docs/api/apiv3/paths/project_budgets.yml@@ -0,0 +1,89 @@+# /api/v3/projects/{id}/budgets+---+get:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/budgets/1"+ title: Q3 2015+ _type: Budget+ id: 1+ subject: Q3 2015+ - _links:+ self:+ href: "/api/v3/budgets/2"+ title: Q4 2015+ _type: Budget+ id: 2+ subject: Q4 2015+ _links:+ self:+ href: "/api/v3/projects/1/budgets"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/budgets_by_project_model.yml"+ description: OK+ 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 see the budgets of this project.+ description: |-+ Returned if the client does not have sufficient permissions to see the budgets of the given+ project.++ **Required permission:** view work packages **or** view budgets++ *Note that you will only receive this error, if you are at least allowed to see the corresponding project.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified project does not exist.+ description: |-+ Returned if either:++ * the project does not exist++ * the client does not have sufficient permissions to see the project++ * the costs module is not enabled on the given project++ **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.*+ headers: {}+ tags:+ - Budgets+ description: ''+ operationId: view_Budgets_of_a_Project+ summary: view Budgets of a Projectdiff --git a/docs/api/apiv3/paths/project_categories.yml b/docs/api/apiv3/paths/project_categories.ymlnew file mode 100644index 00000000000..5cf8125d49e--- /dev/null+++ b/docs/api/apiv3/paths/project_categories.yml@@ -0,0 +1,74 @@+# /api/v3/projects/{project_id}/categories+---+get:+ parameters:+ - description: ID of the project whose categories will be listed+ example: '1'+ in: path+ name: project_id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ defaultAssignee:+ href: "/api/v3/users/42"+ title: John Sheppard+ project:+ href: "/api/v3/projects/11"+ title: Example project+ self:+ href: "/api/v3/categories/10"+ title: Category with assignee+ _type: Category+ id: 10+ name: Foo+ - _links:+ project:+ href: "/api/v3/projects/11"+ self:+ href: "/api/v3/categories/11"+ _type: Category+ id: 11+ name: Bar+ _links:+ self:+ href: "/api/v3/projects/11/categories"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/categories_by_project_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified project does not exist.+ description: |-+ 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.*+ headers: {}+ tags:+ - Categories+ description: ''+ operationId: List_categories_of_a_project+ summary: List categories of a projectdiff --git a/docs/api/apiv3/paths/project_copy.yml b/docs/api/apiv3/paths/project_copy.ymlnew file mode 100644index 00000000000..a57096f95a2--- /dev/null+++ b/docs/api/apiv3/paths/project_copy.yml@@ -0,0 +1,65 @@+# /api/v3/projects/{id}/copy+---+post:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '302':+ description: Returned if the request is successful. It will redirect to the+ job statuses API with the backend job that got created. You can query that+ endpoint to check the status of the copy, and eventually get the created project.+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** copy projects in the source project+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: name+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Name can't be blank.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Projects+ description: ''+ operationId: Create_project_copy+ summary: Create project copydiff --git a/docs/api/apiv3/paths/project_copy_form.yml b/docs/api/apiv3/paths/project_copy_form.ymlnew file mode 100644index 00000000000..cf2faca4094--- /dev/null+++ b/docs/api/apiv3/paths/project_copy_form.yml@@ -0,0 +1,46 @@+# /api/v3/projects/{id}/copy/form+---+post:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** copy projects in the source project+ headers: {}+ tags:+ - Projects+ description: ''+ operationId: Project_copy_form+ summary: Project copy formdiff --git a/docs/api/apiv3/paths/project_form.yml b/docs/api/apiv3/paths/project_form.ymlnew file mode 100644index 00000000000..5f23b06925e--- /dev/null+++ b/docs/api/apiv3/paths/project_form.yml@@ -0,0 +1,46 @@+# /api/v3/projects/{id}/form+---+post:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit projects in the project+ headers: {}+ tags:+ - Projects+ description: ''+ operationId: Project_update_form+ summary: Project update formdiff --git a/docs/api/apiv3/paths/project_queries_default.yml b/docs/api/apiv3/paths/project_queries_default.ymlnew file mode 100644index 00000000000..97af883747b--- /dev/null+++ b/docs/api/apiv3/paths/project_queries_default.yml@@ -0,0 +1,210 @@+# /api/v3/projects/{id}/queries/default+---+get:+ parameters:+ - description: Id of the project the default query is requested for+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ - description: |-+ JSON specifying filter conditions.+ The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters.+ All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`).+ example: '[{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]'+ in: query+ name: filters+ required: false+ schema:+ default: '[{ "status_id": { "operator": "o", "values": null }}]'+ type: string+ - description: Page number inside the queries' result collection of work packages.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page for the queries' result collection+ of work packages.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: JSON specifying sort criteria. The sort criteria is applied to the+ query's result collection of work packages overriding the query's persisted+ sort criteria.+ example: '[["status", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["id", "asc"]'+ type: string+ - description: The column to group by. The grouping criteria is applied to the to+ the query's result collection of work packages overriding the query's persisted+ group criteria.+ example: status+ in: query+ name: groupBy+ required: false+ schema:+ type: string+ - description: Indicates whether properties should be summed up if they support+ it. The showSums parameter is applied to the to the query's result collection+ of work packages overriding the query's persisted sums property.+ example: 'true'+ in: query+ name: showSums+ required: false+ schema:+ default: 'false'+ type: boolean+ - description: Indicates whether the timeline should be shown.+ example: 'true'+ in: query+ name: timelineVisible+ required: false+ schema:+ default: 'false'+ type: boolean+ - description: Indicates whether the hierarchy mode should be enabled.+ example: 'true'+ in: query+ name: showHierarchies+ required: false+ schema:+ default: 'true'+ type: boolean+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ results:+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ changeSize:+ href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ jumpTo:+ href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ self:+ href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ _type: WorkPackageCollection+ count: 30+ offset: 1+ pageSize: 2+ total: 234+ _links:+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ project:+ href: "/api/v3/projects/42"+ title: Lorem ipsum project+ results:+ href: "/api/v3/projects/42/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ self:+ href: "/api/v3/projects/42/queries/default"+ title: Default+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ _type: Query+ filters:+ - _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ _type: StatusQueryFilter+ name: Status+ name: default+ public: false+ showHierarchies: true+ starred: false+ sums: false+ timelineVisible: false+ timelineZoomLevel: days+ schema:+ "$ref": "../components/schemas/default_query_for_project_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see the default query.++ **Required permission:** view work packages in the project+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the client does not have sufficient permissions to see the project.++ **Required permission:** any permission in the project+ headers: {}+ tags:+ - Queries+ description: Same as [viewing an existing, persisted Query](#queries-query-get)+ in its response, this resource returns an unpersisted query and by that allows+ to get the default query configuration. The client may also provide additional+ parameters which will modify the default query. The query will already be scoped+ for the project.+ operationId: View_default_query_for_project+ summary: View default query for projectdiff --git a/docs/api/apiv3/paths/project_queries_filter_instance_schemas.yml b/docs/api/apiv3/paths/project_queries_filter_instance_schemas.ymlnew file mode 100644index 00000000000..a802ff74a4f--- /dev/null+++ b/docs/api/apiv3/paths/project_queries_filter_instance_schemas.yml@@ -0,0 +1,132 @@+# /api/v3/projects/{id}/queries/filter_instance_schemas+---+get:+ parameters:+ - description: Id of the project.+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _dependencies:+ - _type: SchemaDependency+ dependencies:+ "/api/v3/queries/operators/!":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ "/api/v3/queries/operators/!*": {}+ "/api/v3/queries/operators/*": {}+ "/api/v3/queries/operators/=":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ 'on': operator+ _links:+ filter:+ href: "/api/v3/queries/filters/assignee"+ title: Assignee+ self:+ href: "/api/v3/queries/filter_instance_schemas/assignee"+ _type: QueryFilterInstanceSchema+ filter:+ _links: {}+ hasDefault: false+ name: Filter+ required: true+ type: QueryFilter+ writable: true+ name:+ hasDefault: true+ name: Name+ required: true+ type: String+ writable: false+ - _dependencies:+ - _type: SchemaDependency+ dependencies:+ "/api/v3/queries/operators/!":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ "/api/v3/queries/operators/=":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ 'on': operator+ _links:+ filter:+ href: "/api/v3/queries/filters/author"+ title: Author+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ _type: QueryFilterInstanceSchema+ filter:+ _links: {}+ hasDefault: false+ name: Filter+ required: true+ type: QueryFilter+ writable: true+ name:+ hasDefault: true+ name: Name+ required: true+ type: String+ writable: false+ _links:+ self:+ href: "/api/v3/projects/42/queries/filter_instance_schemas"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/query_filter_instance_schemas_for_project_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see it.++ **Required permission:** view work package in any project+ headers: {}+ tags:+ - Query Filter Instance Schema+ description: Returns the list of QueryFilterInstanceSchemas defined for a query+ of the specified project.+ operationId: List_Query_Filter_Instance_Schemas_for_Project+ summary: List Query Filter Instance Schemas for Projectdiff --git a/docs/api/apiv3/paths/project_queries_schema.yml b/docs/api/apiv3/paths/project_queries_schema.ymlnew file mode 100644index 00000000000..245d458c622--- /dev/null+++ b/docs/api/apiv3/paths/project_queries_schema.yml@@ -0,0 +1,246 @@+# /api/v3/projects/{id}/queries/schema+---+get:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _dependencies: []+ _embedded:+ filtersSchemas:+ _embedded:+ elements:+ - _dependencies:+ - _type: SchemaDependency+ dependencies:+ "/api/v3/queries/operators/!":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ "/api/v3/queries/operators/!*": {}+ "/api/v3/queries/operators/*": {}+ "/api/v3/queries/operators/=":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ 'on': operator+ _links:+ filter:+ href: "/api/v3/queries/filters/assignee"+ title: Assignee+ self:+ href: "/api/v3/queries/filter_instance_schemas/assignee"+ _type: QueryFilterInstanceSchema+ filter:+ _links: {}+ hasDefault: false+ name: Filter+ required: true+ type: QueryFilter+ writable: true+ name:+ hasDefault: true+ name: Name+ required: true+ type: String+ writable: false+ - _dependencies:+ - _type: SchemaDependency+ dependencies:+ "/api/v3/queries/operators/!":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ "/api/v3/queries/operators/=":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ 'on': operator+ _links:+ filter:+ href: "/api/v3/queries/filters/author"+ title: Author+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ _type: QueryFilterInstanceSchema+ filter:+ _links: {}+ hasDefault: false+ name: Filter+ required: true+ type: QueryFilter+ writable: true+ name:+ hasDefault: true+ name: Name+ required: true+ type: String+ writable: false+ _links:+ self:+ href: "/api/v3/projects/42/queries/filter_instance_schemas"+ _type: Collection+ count: 20+ total: 20+ _links:+ self:+ href: "/api/v3/projects/42/queries/schema"+ _type: Schema+ columns:+ _links: {}+ hasDefault: true+ name: Columns+ required: false+ type: "[]QueryColumn"+ writable: true+ createdAt:+ hasDefault: false+ name: Created on+ required: true+ type: DateTime+ writable: false+ filters:+ _links:+ allowedValuesSchemas:+ href: "/api/v3/projects/42/queries/filter_instance_schemas"+ hasDefault: true+ name: Filters+ required: false+ type: "[]QueryFilterInstance"+ writable: true+ groupBy:+ _links: {}+ hasDefault: false+ name: Group results by+ required: false+ type: "[]QueryGroupBy"+ writable: true+ id:+ hasDefault: false+ name: ID+ required: true+ type: Integer+ writable: false+ name:+ hasDefault: false+ maxLength: 255+ minLength: 1+ name: Name+ required: true+ type: String+ writable: true+ project:+ _links: {}+ hasDefault: false+ name: Project+ required: false+ type: Project+ writable: true+ public:+ hasDefault: true+ name: Public+ required: false+ type: Boolean+ writable: true+ results:+ hasDefault: false+ name: Results+ required: false+ type: WorkPackageCollection+ writable: false+ showHierarchies:+ hasDefault: true+ name: Show hierarchies+ required: false+ type: Boolean+ writable: true+ sortBy:+ _links: {}+ hasDefault: true+ name: Sort by+ required: false+ type: "[]QuerySortBy"+ writable: true+ starred:+ hasDefault: true+ name: Starred+ required: false+ type: Boolean+ writable: true+ sums:+ hasDefault: true+ name: Sums+ required: false+ type: Boolean+ writable: true+ timelineVisible:+ hasDefault: true+ name: Timeline visible+ required: false+ type: Boolean+ writable: true+ timelineZoomLevel:+ hasDefault: true+ name: Timeline zoom level+ required: false+ type: String+ writable: true+ updatedAt:+ hasDefault: false+ name: Updated on+ required: true+ type: DateTime+ writable: false+ user:+ hasDefault: true+ name: User+ required: true+ type: User+ writable: false+ schema:+ "$ref": "../components/schemas/schema_for_project_queries_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: "**Required permission:** view work package in the project"+ headers: {}+ tags:+ - Queries+ description: Retrieve the schema for project queries.+ operationId: View_schema_for_project_queries+ summary: View schema for project queriesdiff --git a/docs/api/apiv3/paths/project_status.yml b/docs/api/apiv3/paths/project_status.ymlnew file mode 100644index 00000000000..8249c998f90--- /dev/null+++ b/docs/api/apiv3/paths/project_status.yml@@ -0,0 +1,44 @@+# /api/v3/project_statuses/{id}+---+get:+ parameters:+ - description: Project status id+ example: on_track+ in: path+ name: id+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/project_statuses/on_track"+ _type: ProjectStatus+ id: on_track+ name: On track+ schema:+ "$ref": "../components/schemas/view_project_status_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: Returned if the project status does not exist.+ headers: {}+ tags:+ - Projects+ description: ''+ operationId: View_project_status+ summary: View project statusdiff --git a/docs/api/apiv3/paths/project_types.yml b/docs/api/apiv3/paths/project_types.ymlnew file mode 100644index 00000000000..dbdce991258--- /dev/null+++ b/docs/api/apiv3/paths/project_types.yml@@ -0,0 +1,77 @@+# /api/v3/projects/{project_id}/types+---+get:+ parameters:+ - description: ID of the project whose types will be listed+ example: '1'+ in: path+ name: project_id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/types/1"+ _type: Type+ color: "#ff0000"+ createdAt: '2014-05-21T08:51:20Z'+ id: 1+ isDefault: true+ isMilestone: false+ name: Bug+ position: 1+ updatedAt: '2014-05-21T08:51:20Z'+ - _links:+ self:+ href: "/api/v3/types/2"+ _type: Type+ color: "#888"+ createdAt: '2014-05-21T08:51:20Z'+ id: 2+ isDefault: false+ isMilestone: false+ name: Feature+ position: 2+ updatedAt: '2014-05-21T08:51:20Z'+ _links:+ self:+ href: "/api/v3/projects/11/types"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/types_by_project_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified project does not exist.+ description: |-+ Returned if the project does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view work packages **or** manage types (on given 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.*+ headers: {}+ tags:+ - Types+ description: This endpoint lists the types that are *available* in a given project.+ operationId: List_types_available_in_a_project+ summary: List types available in a projectdiff --git a/docs/api/apiv3/paths/project_versions.yml b/docs/api/apiv3/paths/project_versions.ymlnew file mode 100644index 00000000000..d9b645674d2--- /dev/null+++ b/docs/api/apiv3/paths/project_versions.yml@@ -0,0 +1,106 @@+# /api/v3/projects/{project_id}/versions+---+get:+ parameters:+ - description: ID of the project whose versions will be listed+ example: '1'+ in: path+ name: project_id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ availableInProjects:+ href: "/api/v3/versions/11/projects"+ definingProject:+ href: "/api/v3/projects/11"+ self:+ href: "/api/v3/versions/11"+ _type: Version+ description:+ format: plain+ html: This version has a description+ raw: This version has a description+ endDate:+ id: 11+ name: v3.0 Alpha+ startDate: '2014-11-20'+ status: Open+ - _links:+ availableInProjects:+ href: "/api/v3/versions/12/projects"+ definingProject:+ href: "/api/v3/projects/11"+ self:+ href: "/api/v3/versions/12"+ _type: Version+ description:+ format: plain+ html: ''+ raw: ''+ endDate:+ id: 12+ name: v2.0+ startDate:+ status: Closed+ - _links:+ availableInProjects:+ href: "/api/v3/versions/10/projects"+ definingProject:+ href: "/api/v3/projects/11"+ self:+ href: "/api/v3/versions/10"+ _type: Version+ description:+ format: plain+ html: ''+ raw: ''+ endDate:+ id: 10+ name: v1.0+ startDate:+ status: Open+ _links:+ self:+ href: "/api/v3/projects/11/versions"+ _type: Collection+ count: 3+ total: 3+ schema:+ "$ref": "../components/schemas/versions_by_project_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified project does not exist.+ description: |-+ Returned if the project does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view work packages **or** manage versions (on given 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.*+ headers: {}+ tags:+ - Versions+ description: |-+ This endpoint lists the versions that are *available* in a given project.+ Note that due to sharing this might be more than the versions *defined* by that project.+ operationId: List_versions_available_in_a_project+ summary: List versions available in a projectdiff --git a/docs/api/apiv3/paths/project_work_packages.yml b/docs/api/apiv3/paths/project_work_packages.ymlnew file mode 100644index 00000000000..04e679de22c--- /dev/null+++ b/docs/api/apiv3/paths/project_work_packages.yml@@ -0,0 +1,384 @@+# /api/v3/projects/{id}/work_packages+---+get:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ - description: Page number inside the requested collection.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint. If no filter is to be applied, the client should send an empty array (`[]`).+ example: '[{ "type_id": { "operator": "=", "values": [''1'', ''2''] }}]'+ in: query+ name: filters+ required: false+ schema:+ default: '[{ "status_id": { "operator": "o", "values": null }}]'+ type: string+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ example: '[["status", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["id", "asc"]'+ type: string+ - description: The column to group by.+ example: status+ in: query+ name: groupBy+ required: false+ schema:+ type: string+ - description: Indicates whether properties should be summed up if they support+ it.+ example: 'true'+ in: query+ name: showSums+ required: false+ schema:+ default: 'false'+ type: boolean+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/work_packages/1"+ _type: WorkPackage+ id: 1+ subject: Skipped other properties for brevity+ - _links:+ self:+ href: "/api/v3/work_packages/2"+ _type: WorkPackage+ id: 2+ subject: Skipped other properties for brevity+ _links:+ self:+ href: "/api/v3/projects/14/work_packages"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/work_packages_by_project_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery+ message: Operator can't be blank.+ description: |-+ Returned if the client sends a query parameter, that the server knows, but does not understand.+ E.g. by providing a syntactically incorrect `filters` parameter.+ 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 see the work packages of this project.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work packages++ *Note that you will only receive this error, if you are at least allowed to see the corresponding project.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified project does not exist.+ description: |-+ Returned if the project does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view project+ headers: {}+ tags:+ - Work Packages+ description: ''+ operationId: List_work_packages_by_project+ summary: List work packages by project+post:+ parameters:+ - description: Project 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+ responses:+ '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:+ 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'+ schema:+ "$ref": "../components/schemas/work_package_model.yml"+ description: OK+ 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 add work packages to this project.+ description: |-+ 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.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified project does not exist.+ description: |-+ 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.*+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: Subject+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: The subject might not be blank.+ description: |-+ 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+ 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 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.+ operationId: Create_work_package_in_project+ summary: Create work package in projectdiff --git a/docs/api/apiv3/paths/project_work_packages_form.yml b/docs/api/apiv3/paths/project_work_packages_form.ymlnew file mode 100644index 00000000000..57c6280d48e--- /dev/null+++ b/docs/api/apiv3/paths/project_work_packages_form.yml@@ -0,0 +1,20 @@+# /api/v3/projects/{id}/work_packages/form+---+post:+ parameters:+ - description: ID of the project in which the work package will be created+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ description: OK+ headers: {}+ tags:+ - Work Packages+ description: ''+ operationId: Work_Package_Create_Form_For_Project+ summary: Work Package Create Form For Projectdiff --git a/docs/api/apiv3/paths/projects.yml b/docs/api/apiv3/paths/projects.ymlnew file mode 100644index 00000000000..061d06563e4--- /dev/null+++ b/docs/api/apiv3/paths/projects.yml@@ -0,0 +1,218 @@+# /api/v3/projects+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ Currently supported filters are:++ + active: based on the active property of the project++ + ancestor: filters projects by their ancestor. A project is not considered to be it's own ancestor.++ + created_at: based on the time the project was created++ + latest_activity_at: based on the time the last activity was registered on a project.++ + name_and_identifier: based on both the name and the identifier.++ + parent_id: filters projects by their parent.++ + principal: based on members of the project.++ + type_id: based on the types active in a project.++ + user_action: based on the actions (see [Actions](#actions)) the current user has in the project.++ + id: based on projects' id.++ + visible: based on the visibility for the user (id) provided as the filter value. This filter is useful for admins to identify the projects visible to a user.+ There might also be additional filters based on the custom fields that have been configured.+ example: '[{ "ancestor": { "operator": "=", "values": [''1''] }" }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ - description: |-+ JSON specifying sort criteria.+ Currently supported orders are:++ + id++ + name++ + created_at++ + public++ + latest_activity_at++ + required_disk_space+ There might also be additional orders based on the custom fields that have been configured.+ example: '[["id", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ categories:+ href: "/api/v3/projects/6/categories"+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ projects:+ href: "/api/v3/projects/123"+ self:+ href: "/api/v3/projects/6"+ title: A project+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ versions:+ href: "/api/v3/projects/6/versions"+ _type: Project+ active: true+ createdAt: '2015-07-06T13:28:14+00:00'+ description:+ format: markdown+ html: "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"+ raw: Lorem **ipsum** dolor sit amet+ id: 6+ identifier: a_project+ name: A project+ public: false+ statusExplanation:+ format: markdown+ html: "<p>Everything <strong>fine</strong></p>"+ raw: Everything **fine**+ type: Customer Project+ updatedAt: '2015-10-01T09:55:02+00:00'+ - _links:+ categories:+ href: "/api/v3/projects/14/categories"+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ projects:+ href:+ self:+ href: "/api/v3/projects/14"+ title: Another project+ status:+ href: "/api/v3/project_statuses/off_track"+ title: Off track+ versions:+ href: "/api/v3/projects/14/versions"+ _type: Project+ active: false+ createdAt: '2016-02-29T12:50:20+00:00'+ description:+ format: markdown+ html: ''+ raw: ''+ id: 14+ identifier: another_project+ name: Another project+ public: true+ statusExplanation:+ format: markdown+ html: "<p>Uh <strong>oh</strong></p>"+ raw: Uh **oh**+ type:+ updatedAt: '2016-02-29T12:50:20+00:00'+ _links:+ self:+ href: "/api/v3/projects"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/list_projects_model.yml"+ description: OK+ headers: {}+ tags:+ - Projects+ description: Returns a collection of projects. The collection can be filtered via+ query parameters similar to how work packages are filtered. In addition to the+ provided filter, the result set is always limited to only contain projects the+ client is allowed to see.+ operationId: List_projects+ summary: List projects+post:+ responses:+ '201':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_project_model.yml"+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** add project which is a global permission+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: name+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Name can't be blank.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Projects+ description: |-+ Creates a new project, applying the attributes provided in the body.++ You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation.+ operationId: Create_project+ summary: Create projectdiff --git a/docs/api/apiv3/paths/projects_available_parent_projects.yml b/docs/api/apiv3/paths/projects_available_parent_projects.ymlnew file mode 100644index 00000000000..f0d7f262fcf--- /dev/null+++ b/docs/api/apiv3/paths/projects_available_parent_projects.yml@@ -0,0 +1,149 @@+# /api/v3/projects/available_parent_projects+---+get:+ parameters:+ - description: JSON specifying filter conditions.+ example: '[{ "ancestor": { "operator": "=", "values": [''1''] }" }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ - description: The id or identifier of the project the parent candidate is determined+ for+ example: '123'+ in: query+ name: of+ required: false+ schema:+ type: string+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint and allows all the filters and sortBy supported by the project list end point.+ example: '[["id", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ categories:+ href: "/api/v3/projects/6/categories"+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ self:+ href: "/api/v3/projects/6"+ title: A project+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ versions:+ href: "/api/v3/projects/6/versions"+ _type: Project+ active: true+ createdAt: '2015-07-06T13:28:14+00:00'+ description:+ format: markdown+ html: "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"+ raw: Lorem **ipsum** dolor sit amet+ id: 6+ identifier: a_project+ name: A project+ public: false+ statusExplanation:+ format: markdown+ html: "<p>Everything <strong>fine</strong></p>"+ raw: Everything **fine**+ type: Customer Project+ updatedAt: '2015-10-01T09:55:02+00:00'+ - _links:+ categories:+ href: "/api/v3/projects/14/categories"+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ self:+ href: "/api/v3/projects/14"+ title: Another project+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ versions:+ href: "/api/v3/projects/14/versions"+ _type: Project+ active: true+ createdAt: '2016-02-29T12:50:20+00:00'+ description:+ format: markdown+ html: ''+ raw: ''+ id: 14+ identifier: another_project+ name: Another project+ public: true+ statusExplanation:+ format: markdown+ html: "<p>Everything super <strong>fine</strong></p>"+ raw: Everything super **fine**+ type:+ updatedAt: '2016-02-29T12:50:20+00:00'+ _links:+ self:+ href: "/api/v3/projects/available_parent_projects?of=123"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/list_available_parent_project_candidates_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit project in a project or the global add project permission+ headers: {}+ tags:+ - Projects+ description: |-+ Lists projects which can become parent to another project. Only sound candidates are returned.+ For instance a project cannot become parent of itself or it's children.++ To specify the project for which a parent is queried for, the `of` parameter can be provided. If no `of`+ parameter is provided, a new project is assumed. Then, the check for the hierarchy is omitted as a new project cannot be+ part of a hierarchy yet.++ Candidates can be filtered. Most commonly one will want to filter by name or identifier.+ You can do this through the `filters` parameter which works just like the work package index.++ For instance to find all parent candidates with "rollout" in their name:++ ```+ ?filters=[{"name_and_identifier":{"operator":"~","values":["rollout"]}}]+ ```+ operationId: List_available_parent_project_candidates+ summary: List available parent project candidatesdiff --git a/docs/api/apiv3/paths/projects_form.yml b/docs/api/apiv3/paths/projects_form.ymlnew file mode 100644index 00000000000..6cbe42043e3--- /dev/null+++ b/docs/api/apiv3/paths/projects_form.yml@@ -0,0 +1,264 @@+# /api/v3/projects/form+---+post:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ payload:+ _links:+ customField26:+ href:+ title:+ customField31:+ href:+ title:+ parent:+ href:+ status:+ href:+ active: true+ customField30:+ customField34:+ customField35: Text custom field value+ customField41:+ format: markdown+ html: ''+ raw: ''+ customField42:+ description:+ format: markdown+ html: ''+ raw:+ identifier: new_project_identifier+ name: New project name+ public: false+ statusExplanation:+ format: markdown+ html: "<p></p>"+ raw:+ schema:+ _dependencies: []+ _links: {}+ _type: Schema+ active:+ hasDefault: true+ name: Active+ required: true+ type: Boolean+ writable: true+ createdAt:+ hasDefault: false+ name: Created on+ required: true+ type: DateTime+ writable: false+ customField26:+ _links:+ allowedValues:+ href: "/api/v3/principals?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22%21%22%2C%22values%22%3A%5B%220%22%2C%223%22%5D%7D%7D%2C%7B%22type%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22User%22%5D%7D%7D%2C%7B%22member%22%3A%7B%22operator%22%3A%22%3D%22%2C%22values%22%3A%5B%22%22%5D%7D%7D%5D&pageSize=0"+ hasDefault: false+ location: _links+ name: Project user+ required: false+ type: User+ visibility: default+ writable: true+ customField30:+ hasDefault: false+ name: some project cf+ required: false+ type: Integer+ visibility: default+ writable: true+ customField31:+ _embedded:+ allowedValues:+ - _links:+ self:+ href: "/api/v3/custom_options/513"+ title: abc+ _type: CustomOption+ id: 513+ value: abc+ - _links:+ self:+ href: "/api/v3/custom_options/514"+ title: def+ _type: CustomOption+ id: 514+ value: def+ - _links:+ self:+ href: "/api/v3/custom_options/515"+ title: ghi+ _type: CustomOption+ id: 515+ value: ghi+ _links:+ allowedValues:+ - href: "/api/v3/custom_options/513"+ title: abc+ - href: "/api/v3/custom_options/514"+ title: def+ - href: "/api/v3/custom_options/515"+ title: ghi+ hasDefault: false+ location: _links+ name: list project cf+ required: false+ type: CustomOption+ visibility: default+ writable: true+ customField34:+ hasDefault: false+ name: Bool Project CF+ required: false+ type: Boolean+ visibility: default+ writable: true+ customField35:+ hasDefault: false+ name: text project cf+ required: true+ type: String+ visibility: default+ writable: true+ customField41:+ hasDefault: false+ name: Long text project cf+ required: false+ type: Formattable+ visibility: default+ writable: true+ customField42:+ hasDefault: false+ name: Date project cf+ required: false+ type: Date+ visibility: default+ writable: true+ description:+ hasDefault: false+ name: Description+ required: false+ type: Formattable+ writable: true+ id:+ hasDefault: false+ name: ID+ required: true+ type: Integer+ writable: false+ identifier:+ hasDefault: false+ maxLength: 100+ minLength: 1+ name: Identifier+ required: true+ type: String+ writable: true+ name:+ hasDefault: false+ maxLength: 255+ minLength: 1+ name: Name+ required: true+ type: String+ writable: true+ parent:+ _links:+ allowedValues:+ href: "/api/v3/projects/available_parent_projects"+ hasDefault: false+ location: _links+ name: Subproject of+ required: false+ type: Project+ visibility: default+ writable: true+ public:+ hasDefault: false+ name: Public+ required: true+ type: Boolean+ writable: true+ status:+ _links:+ allowedValues:+ - href: "/api/v3/project_statuses/on_track"+ title: On track+ - href: "/api/v3/project_statuses/at_risk"+ title: At risk+ - href: "/api/v3/project_statuses/off_track"+ title: Off track+ hasDefault: true+ name: Status+ required: false+ type: ProjectStatus+ writable: true+ statusExplanation:+ hasDefault: false+ name: Status explanation+ required: false+ type: Formattable+ writable: true+ updatedAt:+ hasDefault: false+ name: Updated on+ required: true+ type: DateTime+ writable: false+ validationErrors:+ identifier:+ _embedded:+ details:+ attribute: identifier+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Identifier has already been taken.+ _links:+ self:+ href: "/api/v3/projects/form"+ method: post+ validate:+ href: "/api/v3/projects/form"+ method: post+ _type: Form+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** add project which is a global permission+ headers: {}+ tags:+ - Projects+ description: ''+ operationId: Project_create_form+ summary: Project create formdiff --git a/docs/api/apiv3/paths/projects_schemas.yml b/docs/api/apiv3/paths/projects_schemas.ymlnew file mode 100644index 00000000000..f15190f751c--- /dev/null+++ b/docs/api/apiv3/paths/projects_schemas.yml@@ -0,0 +1,144 @@+# /api/v3/projects/schemas+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _dependencies: []+ _links:+ self:+ href: "/api/v3/projects/schema"+ _type: Schema+ active:+ hasDefault: true+ name: Active+ required: true+ type: Boolean+ writable: true+ createdAt:+ hasDefault: false+ name: Created on+ required: true+ type: DateTime+ writable: false+ customField30:+ hasDefault: false+ name: Integer project custom field+ required: false+ type: Integer+ visibility: default+ writable: true+ customField31:+ _links: {}+ hasDefault: false+ location: _links+ name: List project custom field+ required: false+ type: CustomOption+ visibility: default+ writable: true+ customField32:+ _links: {}+ hasDefault: false+ location: _links+ name: Version project custom field+ required: false+ type: Version+ visibility: default+ writable: true+ customField34:+ hasDefault: false+ name: Boolean project custom field+ required: false+ type: Boolean+ visibility: default+ writable: true+ customField35:+ hasDefault: false+ name: Text project custom field+ required: true+ type: String+ visibility: default+ writable: true+ description:+ hasDefault: false+ name: Description+ required: false+ type: Formattable+ writable: true+ id:+ hasDefault: false+ name: ID+ required: true+ type: Integer+ writable: false+ identifier:+ hasDefault: false+ maxLength: 100+ minLength: 1+ name: Identifier+ required: true+ type: String+ writable: true+ name:+ hasDefault: false+ maxLength: 255+ minLength: 1+ name: Name+ required: true+ type: String+ writable: true+ parent:+ _links: {}+ hasDefault: false+ location: _links+ name: Subproject of+ required: false+ type: Project+ visibility: default+ writable: true+ public:+ hasDefault: false+ name: Public+ required: true+ type: Boolean+ writable: true+ status:+ _links:+ allowedValues:+ - href: "/api/v3/project_statuses/on_track"+ title: On track+ - href: "/api/v3/project_statuses/at_risk"+ title: At risk+ - href: "/api/v3/project_statuses/off_track"+ title: Off track+ hasDefault: true+ name: Status+ required: false+ type: ProjectStatus+ writable: true+ statusExplanation:+ hasDefault: false+ name: Status explanation+ required: false+ type: Formattable+ writable: true+ updatedAt:+ hasDefault: false+ name: Updated on+ required: true+ type: DateTime+ writable: false+ schema:+ "$ref": "../components/schemas/projects_schema_model.yml"+ description: OK+ headers: {}+ tags:+ - Projects+ description: ''+ operationId: View_project_schema+ summary: View project schemadiff --git a/docs/api/apiv3/paths/queries.yml b/docs/api/apiv3/paths/queries.ymlnew file mode 100644index 00000000000..a51a7bc83ef--- /dev/null+++ b/docs/api/apiv3/paths/queries.yml@@ -0,0 +1,301 @@+# /api/v3/queries+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ Currently supported filters are:++ + project: filters queries by the project they are assigned to. If the project filter is passed with the `!*` (not any) operator, global queries are returned.++ + id: filters queries based on their id++ + updated_at: filters queries based on the last time they where updated+ example: '[{ "project_id": { "operator": "!*", "values": null }" }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _embedded:+ results:+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ _type: WorkPackageCollection+ count: 30+ offset: 1+ pageSize: 2+ total: 234+ _links:+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ project:+ href: "/api/v3/projects/3"+ title: copy+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ _type: Query+ createdAt: '2015-03-20T12:56:56Z'+ filters:+ - _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ _type: StatusQueryFilter+ name: Status+ - _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ id: 9+ name: fdsfdsfdsf+ public: false+ starred: true+ sums: false+ updatedAt: '2015-05-20T18:16:53Z'+ _links:+ self:+ href: "/api/v3/queries"+ _type: Collection+ count: 1+ total: 1+ schema:+ "$ref": "../components/schemas/queries_model.yml"+ description: OK+ 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 see the queries.+ description: |-+ Returned if the client does not have sufficient permissions to see queries.++ **Required permission:** view work packages or manage public queries in any project+ headers: {}+ tags:+ - Queries+ description: Returns a collection of queries. The collection can be filtered via+ query parameters similar to how work packages are filtered. Please note however,+ that the filters are applied to the queries and not to the work packages the queries+ in turn might return.+ operationId: List_queries+ summary: List queries+post:+ responses:+ '201':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ highlightedAttributes: []+ results:+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ _type: WorkPackageCollection+ count: 30+ offset: 1+ pageSize: 2+ total: 234+ _links:+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ highlightedAttributes: []+ project:+ href: "/api/v3/projects/3"+ title: copy+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ _type: Query+ createdAt: '2015-03-20T12:56:56Z'+ filters:+ - _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ _type: StatusQueryFilter+ name: Status+ - _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ id: 9+ name: fdsfdsfdsf+ public: false+ starred: false+ sums: false+ updatedAt: '2015-05-20T18:16:53Z'+ schema:+ "$ref": "../components/schemas/query_model.yml"+ 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: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: project+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Project not found+ description: |-+ Returned if:++ * the client tries to modify a read-only property (`PropertyIsReadOnly`)++ * a constraint for a property was violated (`PropertyConstraintViolation`)++ * the client provides a link to an invalid resource (`ResourceTypeMismatch`),+ e.g. a user, project or operator not found+ headers: {}+ tags:+ - Queries+ 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 Query 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_query+ summary: Create querydiff --git a/docs/api/apiv3/paths/queries_available_projects.yml b/docs/api/apiv3/paths/queries_available_projects.ymlnew file mode 100644index 00000000000..e20f98cb490--- /dev/null+++ b/docs/api/apiv3/paths/queries_available_projects.yml@@ -0,0 +1,86 @@+# /api/v3/queries/available_projects+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ categories:+ href: "/api/v3/projects/6/categories"+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ self:+ href: "/api/v3/projects/6"+ title: A project+ versions:+ href: "/api/v3/projects/6/versions"+ _type: Project+ createdAt: '2015-07-06T13:28:14+00:00'+ description: Eveniet molestias omnis quis aut qui eum adipisci.+ id: 6+ identifier: a_project+ name: A project+ type: Customer Project+ updatedAt: '2015-10-01T09:55:02+00:00'+ - _links:+ categories:+ href: "/api/v3/projects/14/categories"+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ self:+ href: "/api/v3/projects/14"+ title: Another project+ versions:+ href: "/api/v3/projects/14/versions"+ _type: Project+ createdAt: '2016-02-29T12:50:20+00:00'+ description: ''+ id: 14+ identifier: another_project+ name: Another project+ type:+ updatedAt: '2016-02-29T12:50:20+00:00'+ _links:+ self:+ href: "/api/v3/queries/available_projects"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/available_projects_for_query_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work packages+ headers: {}+ tags:+ - Queries+ description: Gets a list of projects that are available as projects a query can+ be assigned to.+ operationId: Available_projects_for_query+ summary: Available projects for querydiff --git a/docs/api/apiv3/paths/queries_column.yml b/docs/api/apiv3/paths/queries_column.ymlnew file mode 100644index 00000000000..3c79e630565--- /dev/null+++ b/docs/api/apiv3/paths/queries_column.yml@@ -0,0 +1,59 @@+# /api/v3/queries/columns/{id}+---+get:+ parameters:+ - description: QueryColumn id+ example: priority+ in: path+ name: id+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/queries/columns/priority"+ title: Priority+ _type: QueryColumn::Property+ id: priority+ name: Priority+ schema:+ "$ref": "../components/schemas/query_column_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see it.++ **Required permission:** view work package in any project+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified query does not exist.+ description: Returned if the QueryColumn does not exist.+ headers: {}+ tags:+ - Query Columns+ description: Retrieve an individual QueryColumn as identified by the `id` parameter.+ operationId: View_Query_Column+ summary: View Query Columndiff --git a/docs/api/apiv3/paths/queries_default.yml b/docs/api/apiv3/paths/queries_default.ymlnew file mode 100644index 00000000000..2d5617b7646--- /dev/null+++ b/docs/api/apiv3/paths/queries_default.yml@@ -0,0 +1,200 @@+# /api/v3/queries/default+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters.+ All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`).+ example: '[{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]'+ in: query+ name: filters+ required: false+ schema:+ default: '[{ "status_id": { "operator": "o", "values": null }}]'+ type: string+ - description: Page number inside the queries' result collection of work packages.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page for the queries' result collection+ of work packages.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: JSON specifying sort criteria. The sort criteria is applied to the+ query's result collection of work packages overriding the query's persisted+ sort criteria.+ example: '[["status", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["id", "asc"]'+ type: string+ - description: The column to group by. The grouping criteria is applied to the to+ the query's result collection of work packages overriding the query's persisted+ group criteria.+ example: status+ in: query+ name: groupBy+ required: false+ schema:+ type: string+ - description: Indicates whether properties should be summed up if they support+ it. The showSums parameter is applied to the to the query's result collection+ of work packages overriding the query's persisted sums property.+ example: 'true'+ in: query+ name: showSums+ required: false+ schema:+ default: 'false'+ type: boolean+ - description: Indicates whether the timeline should be shown.+ example: 'true'+ in: query+ name: timelineVisible+ required: false+ schema:+ default: 'false'+ type: boolean+ - description: Indicates in what zoom level the timeline should be shown. Valid+ values are `days`, `weeks`, `months`, `quarters`, and `years`.+ example: days+ in: query+ name: timelineZoomLevel+ required: false+ schema:+ default: days+ type: string+ - description: Indicates whether the hierarchy mode should be enabled.+ example: 'true'+ in: query+ name: showHierarchies+ required: false+ schema:+ default: 'true'+ type: boolean+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ results:+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ changeSize:+ href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ jumpTo:+ href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ self:+ href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ _type: WorkPackageCollection+ count: 30+ highlightedAttributes: []+ offset: 1+ pageSize: 2+ total: 234+ _links:+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ highlightedAttributes: []+ project:+ href:+ results:+ href: "/api/v3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ self:+ href: "/api/v3/queries/default"+ title: Default+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ _type: Query+ filters:+ - _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ _type: StatusQueryFilter+ name: Status+ highlightingMode: inline+ name: default+ public: false+ showHierarchies: true+ starred: false+ sums: false+ timelineLabels: {}+ timelineVisible: false+ timelineZoomLevel: days+ schema:+ "$ref": "../components/schemas/default_query_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see the default query.++ **Required permission:** view work packages in any project+ headers: {}+ tags:+ - Queries+ description: Same as [viewing an existing, persisted Query](#queries-query-get)+ in its response, this resource returns an unpersisted query and by that allows+ to get the default query configuration. The client may also provide additional+ parameters which will modify the default query.+ operationId: View_default_query+ summary: View default querydiff --git a/docs/api/apiv3/paths/queries_filter.yml b/docs/api/apiv3/paths/queries_filter.ymlnew file mode 100644index 00000000000..2e890708668--- /dev/null+++ b/docs/api/apiv3/paths/queries_filter.yml@@ -0,0 +1,58 @@+# /api/v3/queries/filters/{id}+---+get:+ parameters:+ - description: QueryFilter identifier.+ example: status+ in: path+ name: id+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/queries/filters/status"+ title: Status+ _type: QueryFilter+ id: status+ schema:+ "$ref": "../components/schemas/query_filter_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see it.++ **Required permission:** view work package in any project+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified query does not exist.+ description: Returned if the QueryFilter does not exist.+ headers: {}+ tags:+ - Query Filters+ description: Retrieve an individual QueryFilter as identified by the id parameter.+ operationId: View_Query_Filter+ summary: View Query Filterdiff --git a/docs/api/apiv3/paths/queries_filter_instance_schemas.yml b/docs/api/apiv3/paths/queries_filter_instance_schemas.ymlnew file mode 100644index 00000000000..93c06cc010f--- /dev/null+++ b/docs/api/apiv3/paths/queries_filter_instance_schemas.yml@@ -0,0 +1,124 @@+# /api/v3/queries/filter_instance_schemas+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _dependencies:+ - _type: SchemaDependency+ dependencies:+ "/api/v3/queries/operators/!":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ "/api/v3/queries/operators/!*": {}+ "/api/v3/queries/operators/*": {}+ "/api/v3/queries/operators/=":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ 'on': operator+ _links:+ filter:+ href: "/api/v3/queries/filters/assignee"+ title: Assignee+ self:+ href: "/api/v3/queries/filter_instance_schemas/assignee"+ _type: QueryFilterInstanceSchema+ filter:+ _links: {}+ hasDefault: false+ name: Filter+ required: true+ type: QueryFilter+ writable: true+ name:+ hasDefault: true+ name: Name+ required: true+ type: String+ writable: false+ - _dependencies:+ - _type: SchemaDependency+ dependencies:+ "/api/v3/queries/operators/!":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ "/api/v3/queries/operators/=":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ 'on': operator+ _links:+ filter:+ href: "/api/v3/queries/filters/author"+ title: Author+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ _type: QueryFilterInstanceSchema+ filter:+ _links: {}+ hasDefault: false+ name: Filter+ required: true+ type: QueryFilter+ writable: true+ name:+ hasDefault: true+ name: Name+ required: true+ type: String+ writable: false+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/query_filter_instance_schemas_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see it.++ **Required permission:** view work package in any project+ headers: {}+ tags:+ - Query Filter Instance Schema+ description: Returns the list of QueryFilterInstanceSchemas defined for a global+ query. That is a query not assigned to a project.+ operationId: List_Query_Filter_Instance_Schemas+ summary: List Query Filter Instance Schemasdiff --git a/docs/api/apiv3/paths/queries_filter_instance_schemas_{identifier}.yml b/docs/api/apiv3/paths/queries_filter_instance_schemas_{identifier}.ymlnew file mode 100644index 00000000000..5223366a6d8--- /dev/null+++ b/docs/api/apiv3/paths/queries_filter_instance_schemas_{identifier}.yml@@ -0,0 +1,94 @@+# /api/v3/queries/filter_instance_schemas/{identifier}+---+get:+ parameters:+ - description: QueryFilterInstanceSchema identifier. The identifier is the filter+ identifier.+ example: author+ in: path+ name: identifier+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _dependencies:+ - _type: SchemaDependency+ dependencies:+ "/api/v3/queries/operators/!":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ "/api/v3/queries/operators/=":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ 'on': operator+ _links:+ filter:+ href: "/api/v3/queries/filters/author"+ title: Author+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ _type: QueryFilterInstanceSchema+ filter:+ _links: {}+ hasDefault: false+ name: Filter+ required: true+ type: QueryFilter+ writable: true+ name:+ hasDefault: true+ name: Name+ required: true+ type: String+ writable: false+ schema:+ "$ref": "../components/schemas/query_filter_instance_schema_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see it.++ **Required permission:** view work package in any project+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified query does not exist.+ description: Returned if the QueryFilterInstanceSchema does not exist.+ headers: {}+ tags:+ - Query Filter Instance Schema+ description: Retrieve an individual QueryFilterInstanceSchema as identified by the+ id parameter.+ operationId: View_Query_Filter_Instance_Schema+ summary: View Query Filter Instance Schemadiff --git a/docs/api/apiv3/paths/queries_form.yml b/docs/api/apiv3/paths/queries_form.ymlnew file mode 100644index 00000000000..7ef78ceb869--- /dev/null+++ b/docs/api/apiv3/paths/queries_form.yml@@ -0,0 +1,12 @@+# /api/v3/queries/form+---+post:+ responses:+ '200':+ description: OK+ headers: {}+ tags:+ - Queries+ description: ''+ operationId: Query_Create_Form+ summary: Query Create Formdiff --git a/docs/api/apiv3/paths/queries_operator.yml b/docs/api/apiv3/paths/queries_operator.ymlnew file mode 100644index 00000000000..48a4e3f6f78--- /dev/null+++ b/docs/api/apiv3/paths/queries_operator.yml@@ -0,0 +1,59 @@+# /api/v3/queries/operators/{id}+---+get:+ parameters:+ - description: QueryOperator id+ example: "!"+ in: path+ name: id+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/queries/operators/!"+ title: is not+ _type: QueryOperator+ id: "!"+ name: is not+ schema:+ "$ref": "../components/schemas/query_operator_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see it.++ **Required permission:** view work package in any project+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified query does not exist.+ description: Returned if the QueryOperator does not exist.+ headers: {}+ tags:+ - Query Operators+ description: Retrieve an individual QueryOperator as identified by the `id` parameter.+ operationId: View_Query_Operator+ summary: View Query Operatordiff --git a/docs/api/apiv3/paths/queries_schema.yml b/docs/api/apiv3/paths/queries_schema.ymlnew file mode 100644index 00000000000..66c6b5a5283--- /dev/null+++ b/docs/api/apiv3/paths/queries_schema.yml@@ -0,0 +1,261 @@+# /api/v3/queries/schema+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _dependencies: []+ _embedded:+ filtersSchemas:+ _embedded:+ elements:+ - _dependencies:+ - _type: SchemaDependency+ dependencies:+ "/api/v3/queries/operators/!":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ "/api/v3/queries/operators/!*": {}+ "/api/v3/queries/operators/*": {}+ "/api/v3/queries/operators/=":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ 'on': operator+ _links:+ filter:+ href: "/api/v3/queries/filters/assignee"+ title: Assignee+ self:+ href: "/api/v3/queries/filter_instance_schemas/assignee"+ _type: QueryFilterInstanceSchema+ filter:+ _links: {}+ hasDefault: false+ name: Filter+ required: true+ type: QueryFilter+ writable: true+ name:+ hasDefault: true+ name: Name+ required: true+ type: String+ writable: false+ - _dependencies:+ - _type: SchemaDependency+ dependencies:+ "/api/v3/queries/operators/!":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ "/api/v3/queries/operators/=":+ values:+ _links: {}+ hasDefault: false+ name: Values+ required: true+ type: "[]User"+ writable: true+ 'on': operator+ _links:+ filter:+ href: "/api/v3/queries/filters/author"+ title: Author+ self:+ href: "/api/v3/queries/filter_instance_schemas/author"+ _type: QueryFilterInstanceSchema+ filter:+ _links: {}+ hasDefault: false+ name: Filter+ required: true+ type: QueryFilter+ writable: true+ name:+ hasDefault: true+ name: Name+ required: true+ type: String+ writable: false+ _links:+ self:+ href: "/api/v3/queries/filter_instance_schemas"+ _type: Collection+ count: 20+ total: 20+ _links:+ self:+ href: "/api/v3/queries/schema"+ _type: Schema+ columns:+ _links: {}+ hasDefault: true+ location: _links+ name: Columns+ required: false+ type: "[]QueryColumn"+ writable: true+ createdAt:+ hasDefault: false+ name: Created on+ required: true+ type: DateTime+ writable: false+ filters:+ _links:+ allowedValuesSchemas:+ href: "/api/v3/queries/filter_instance_schemas"+ hasDefault: true+ location: _links+ name: Filters+ required: false+ type: "[]QueryFilterInstance"+ writable: true+ groupBy:+ _links: {}+ hasDefault: false+ name: Group results by+ required: false+ type: "[]QueryGroupBy"+ writable: true+ highlightedAttributes:+ hasDefault: true+ location: _links+ name: Highlighted attributes+ required: false+ type: "[]QueryColumn"+ writable: true+ highlightingMode:+ hasDefault: true+ name: Highlighting mode+ required: false+ type: String+ writable: true+ id:+ hasDefault: false+ name: ID+ required: true+ type: Integer+ writable: false+ name:+ hasDefault: false+ maxLength: 255+ minLength: 1+ name: Name+ required: true+ type: String+ writable: true+ project:+ _links: {}+ hasDefault: false+ location: _links+ name: Project+ required: false+ type: Project+ writable: true+ public:+ hasDefault: true+ name: Public+ required: false+ type: Boolean+ writable: true+ results:+ hasDefault: false+ name: Results+ required: false+ type: WorkPackageCollection+ writable: false+ showHierarchies:+ hasDefault: true+ name: Show hierarchies+ required: false+ type: Boolean+ writable: true+ sortBy:+ _links: {}+ hasDefault: true+ name: Sort by+ required: false+ type: "[]QuerySortBy"+ writable: true+ starred:+ hasDefault: true+ name: Starred+ required: false+ type: Boolean+ writable: true+ sums:+ hasDefault: true+ name: Sums+ required: false+ type: Boolean+ writable: true+ timelineLabels:+ hasDefault: true+ name: Timeline labels+ required: false+ type: QueryTimelineLabels+ writable: true+ timelineVisible:+ hasDefault: true+ name: Timeline visible+ required: false+ type: Boolean+ writable: true+ timelineZoomLevel:+ hasDefault: true+ name: Timeline zoom level+ required: false+ type: String+ writable: true+ updatedAt:+ hasDefault: false+ name: Updated on+ required: true+ type: DateTime+ writable: false+ user:+ hasDefault: true+ name: User+ required: true+ type: User+ writable: false+ schema:+ "$ref": "../components/schemas/schema_for_global_queries_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: "**Required permission:** view work package in any project"+ headers: {}+ tags:+ - Queries+ description: Retrieve the schema for global queries, those, that are not assigned+ to a project.+ operationId: View_schema_for_global_queries+ summary: View schema for global queriesdiff --git a/docs/api/apiv3/paths/queries_sort_by.yml b/docs/api/apiv3/paths/queries_sort_by.ymlnew file mode 100644index 00000000000..53e28a032dd--- /dev/null+++ b/docs/api/apiv3/paths/queries_sort_by.yml@@ -0,0 +1,66 @@+# /api/v3/queries/sort_bys/{id}+---+get:+ parameters:+ - description: QuerySortBy identifier. The identifier is a combination of the column+ identifier and the direction.+ example: status-asc+ in: path+ name: id+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ column:+ href: "/api/v3/queries/columns/status"+ title: Status+ direction:+ href: urn:openproject-org:api:v3:queries:directions:asc+ title: Ascending+ self:+ href: "/api/v3/queries/sort_bys/status-asc"+ title: Status (Ascending)+ _type: QuerySortBy+ id: status-asc+ name: Status (Ascending)+ schema:+ "$ref": "../components/schemas/query_sort_by_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:Unauthenticated+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see it.++ **Required permission:** view work package in any project+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified query does not exist.+ description: Returned if the QuerySortBy does not exist.+ headers: {}+ tags:+ - Query Sort Bys+ description: Retrieve an individual QuerySortBy as identified by the id parameter.+ operationId: View_Query_Sort_By+ summary: View Query Sort Bydiff --git a/docs/api/apiv3/paths/query.yml b/docs/api/apiv3/paths/query.ymlnew file mode 100644index 00000000000..6f2b75eba5b--- /dev/null+++ b/docs/api/apiv3/paths/query.yml@@ -0,0 +1,487 @@+# /api/v3/queries/{id}+---+delete:+ parameters:+ - description: Query id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: No Content+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** for own queries none; for public queries: manage public queries++ *Note that you will only receive this error, if you are at least allowed to see the corresponding query.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the query does not exist or the client does not have sufficient permissions to see it.++ **Required condition:** query belongs to user or query is public++ **Required permission:** view work package in queries project+ headers: {}+ tags:+ - Queries+ description: Delete the query identified by the id parameter+ operationId: Delete_query+ summary: Delete query+get:+ parameters:+ - description: Query id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ - description: |-+ JSON specifying filter conditions.+ The filters provided as parameters are not applied to the query but are instead used to override the query's persisted filters.+ All filters also accepted by the work packages endpoint are accepted. If no filter is to be applied, the client should send an empty array (`[]`).+ example: '[{ "assignee": { "operator": "=", "values": ["1", "5"] }" }]'+ in: query+ name: filters+ required: false+ schema:+ default: '[{ "status_id": { "operator": "o", "values": null }}]'+ type: string+ - description: Page number inside the queries' result collection of work packages.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page for the queries' result collection+ of work packages.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: Selected columns for the table view.+ example: "[]"+ in: query+ name: columns+ required: false+ schema:+ default: "['type', 'priority']"+ type: string+ - description: JSON specifying sort criteria. The sort criteria is applied to the+ query's result collection of work packages overriding the query's persisted+ sort criteria.+ example: '[["status", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["id", "asc"]'+ type: string+ - description: The column to group by. The grouping criteria is applied to the to+ the query's result collection of work packages overriding the query's persisted+ group criteria.+ example: status+ in: query+ name: groupBy+ required: false+ schema:+ type: string+ - description: Indicates whether properties should be summed up if they support+ it. The showSums parameter is applied to the to the query's result collection+ of work packages overriding the query's persisted sums property.+ example: 'true'+ in: query+ name: showSums+ required: false+ schema:+ default: 'false'+ type: boolean+ - description: Indicates whether the timeline should be shown.+ example: 'true'+ in: query+ name: timelineVisible+ required: false+ schema:+ default: 'false'+ type: boolean+ - description: Overridden labels in the timeline view+ example: "{}"+ in: query+ name: timelineLabels+ required: false+ schema:+ default: "{}"+ type: string+ - description: Highlighting mode for the table view.+ example: inline+ in: query+ name: highlightingMode+ required: false+ schema:+ default: inline+ type: string+ - description: Highlighted attributes mode for the table view when `highlightingMode`+ is `inline`. When set to `[]` all highlightable attributes will be returned+ as `highlightedAttributes`.+ example: "[]"+ in: query+ name: highlightedAttributes+ required: false+ schema:+ default: "['type', 'priority']"+ type: string+ - description: Indicates whether the hierarchy mode should be enabled.+ example: 'true'+ in: query+ name: showHierarchies+ required: false+ schema:+ default: 'true'+ type: boolean+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ highlightedAttributes: []+ results:+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ _type: WorkPackageCollection+ count: 30+ offset: 1+ pageSize: 2+ total: 234+ _links:+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ highlightedAttributes: []+ project:+ href: "/api/v3/projects/3"+ title: copy+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ _type: Query+ createdAt: '2015-03-20T12:56:56Z'+ filters:+ - _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ _type: StatusQueryFilter+ name: Status+ - _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ id: 9+ name: fdsfdsfdsf+ public: false+ starred: false+ sums: false+ updatedAt: '2015-05-20T18:16:53Z'+ schema:+ "$ref": "../components/schemas/query_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified query does not exist.+ description: |-+ Returned if the query does not exist or the client does not have sufficient permissions to see it.++ **Required condition:** query belongs to user or query is public++ **Required permission:** view work package in queries project+ headers: {}+ tags:+ - Queries+ description: Retrieve an individual query as identified by the id parameter. Then+ end point accepts a number of parameters that can be used to override the resources'+ persisted parameters.+ operationId: View_query+ summary: View query+patch:+ parameters:+ - description: Query id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ highlightedAttributes: []+ results:+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ _type: WorkPackageCollection+ count: 30+ offset: 1+ pageSize: 2+ total: 234+ _links:+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ highlightedAttributes: []+ project:+ href: "/api/v3/projects/3"+ title: copy+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ _type: Query+ createdAt: '2015-03-20T12:56:56Z'+ filters:+ - _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ _type: StatusQueryFilter+ name: Status+ - _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ id: 9+ name: fdsfdsfdsf+ public: false+ starred: false+ sums: false+ updatedAt: '2015-05-20T18:16:53Z'+ schema:+ "$ref": "../components/schemas/query_model.yml"+ description: OK+ 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 edit the content of the work package.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit work package+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified query does not exist.+ description: |-+ Returned if the query does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work packages in the query's project (unless global)+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: name+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: The name might not be blank.+ description: |-+ Returned if:++ * the client tries to modify 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:+ - Queries+ description: |-+ 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.+ operationId: Edit_Query+ requestBody:+ content:+ application/json:+ schema:+ example:+ name: New query name+ properties:+ name:+ type: string+ type: object+ summary: Edit Querydiff --git a/docs/api/apiv3/paths/query_star.yml b/docs/api/apiv3/paths/query_star.ymlnew file mode 100644index 00000000000..9f1d2b20053--- /dev/null+++ b/docs/api/apiv3/paths/query_star.yml@@ -0,0 +1,162 @@+# /api/v3/queries/{id}/star+---+patch:+ parameters:+ - description: Query id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ results:+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ _type: WorkPackageCollection+ count: 30+ offset: 1+ pageSize: 2+ total: 234+ _links:+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ project:+ href: "/api/v3/projects/3"+ title: copy+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ _type: Query+ createdAt: '2015-03-20T12:56:56Z'+ filters:+ - _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ _type: StatusQueryFilter+ name: Status+ - _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ id: 9+ name: fdsfdsfdsf+ public: false+ starred: true+ sums: false+ updatedAt: '2015-05-20T18:16:53Z'+ schema:+ "$ref": "../components/schemas/star_query_model.yml"+ description: OK+ 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 empty.+ description: Occurs when the client did not send an empty 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 star this query.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** for own queries none; for public queries: manage public queries++ *Note that you will only receive this error, if you are at least allowed to see the corresponding query.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified query does not exist.+ description: |-+ Returned if the query does not exist or the client does not have sufficient permissions to see it.++ **Required condition:** query belongs to user or query is public++ **Required permission:** view work package in queries project+ headers: {}+ tags:+ - Queries+ description: ''+ operationId: Star_query+ summary: Star querydiff --git a/docs/api/apiv3/paths/query_unstar.yml b/docs/api/apiv3/paths/query_unstar.ymlnew file mode 100644index 00000000000..c08b6762b74--- /dev/null+++ b/docs/api/apiv3/paths/query_unstar.yml@@ -0,0 +1,162 @@+# /api/v3/queries/{id}/unstar+---+patch:+ parameters:+ - description: Query id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ results:+ _embedded:+ elements:+ - "<--- shortened for brevity --->"+ _links:+ changeSize:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=%7Bsize%7D&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ createWorkPackage:+ href: "/api/v3/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/work_packages"+ method: post+ jumpTo:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=%7Boffset%7D&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ templated: true+ self:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ _type: WorkPackageCollection+ count: 30+ offset: 1+ pageSize: 2+ total: 234+ _links:+ columns:+ - href: "/api/v3/queries/columns/id"+ title: ID+ - href: "/api/v3/queries/columns/subject"+ title: Subject+ - href: "/api/v3/queries/columns/type"+ title: Type+ - href: "/api/v3/queries/columns/status"+ title: Status+ - href: "/api/v3/queries/columns/priority"+ title: Priority+ - href: "/api/v3/queries/columns/assignee"+ title: Assignee+ - href: "/api/v3/queries/columns/updated_at"+ title: Updated on+ groupBy:+ href:+ title:+ project:+ href: "/api/v3/projects/3"+ title: copy+ results:+ href: "/api/v3/projects/3/work_packages?filters=%5B%7B%22status%22%3A%7B%22operator%22%3A%22o%22%2C%22values%22%3A%5B%5D%7D%7D%2C%7B%22dueDate%22%3A%7B%22operator%22%3A%22%3Ct%2B%22%2C%22values%22%3A%5B%221%22%5D%7D%7D%5D&offset=1&pageSize=2&sortBy=%5B%5B%22parent%22%2C%22desc%22%5D%5D"+ self:+ href: "/api/v3/queries/9"+ title: fdsfdsfdsf+ sortBy:+ - href: "/api/v3/queries/sort_bys/parent-desc"+ title: Parent (Descending)+ user:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ _type: Query+ createdAt: '2015-03-20T12:56:56Z'+ filters:+ - _links:+ filter:+ href: "/api/v3/queries/filters/status"+ title: Status+ operator:+ href: "/api/v3/queries/operators/o"+ title: open+ schema:+ href: "/api/v3/queries/filter_instance_schemas/status"+ values: []+ _type: StatusQueryFilter+ name: Status+ - _links:+ filter:+ href: "/api/v3/queries/filters/dueDate"+ title: Finish date+ operator:+ href: "/api/v3/queries/operators/<t+"+ title: in less than+ schema:+ href: "/api/v3/queries/filter_instance_schemas/dueDate"+ _type: DueDateQueryFilter+ name: Finish date+ values:+ - '1'+ id: 9+ name: fdsfdsfdsf+ public: false+ starred: false+ sums: false+ updatedAt: '2015-05-20T18:16:53Z'+ schema:+ "$ref": "../components/schemas/unstar_query_model.yml"+ description: OK+ 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 empty.+ description: Occurs when the client did not send an empty 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 unstar this query.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** for own queries none; for public queries: manage public queries++ *Note that you will only receive this error, if you are at least allowed to see the corresponding query.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified query does not exist.+ description: |-+ Returned if the query does not exist or the client does not have sufficient permissions to see it.++ **Required condition:** query belongs to user or query is public++ **Required permission:** view work package in queries project+ headers: {}+ tags:+ - Queries+ description: ''+ operationId: Unstar_query+ summary: Unstar querydiff --git a/docs/api/apiv3/paths/relation.yml b/docs/api/apiv3/paths/relation.ymlnew file mode 100644index 00000000000..894cf7acd59--- /dev/null+++ b/docs/api/apiv3/paths/relation.yml@@ -0,0 +1,219 @@+# /api/v3/relations/{id}+---+delete:+ parameters:+ - description: Relation ID+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: |-+ Returned if the relation was deleted successfully.+ The response body is empty.+ 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 delete this relation.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage work package relations+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified relation does not exist.+ description: |-+ Returned if the relation does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** manage work package relations+ headers: {}+ tags:+ - Relations+ description: Deletes the relation.+ operationId: Delete_Relation+ summary: Delete Relation+get:+ parameters:+ - description: Relation id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ delete:+ href: "/api/v3/relations/1"+ method: DELETE+ from:+ href: "/api/v3/work_packages/42"+ title: Steel Delivery+ self:+ href: "/api/v3/relations/1"+ to:+ href: "/api/v3/work_packages/84"+ title: Bending the steel+ update:+ href: "/api/v3/relations/1/form"+ method: POST+ updateImmediately:+ href: "/api/v3/relations/1"+ method: PATCH+ _type: Relation+ delay: 0+ description: We can't bend the steel before it's been delivered!+ id: 1+ name: precedes+ reverseType: follows+ type: precedes+ schema:+ "$ref": "../components/schemas/relation_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified relation does not exist.+ description: |-+ Returned if the relation does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work packages for the involved work packages+ headers: {}+ tags:+ - Relations+ description: ''+ operationId: View_Relation+ summary: View Relation+patch:+ parameters:+ - description: Relation ID+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ delete:+ href: "/api/v3/relations/1"+ method: DELETE+ from:+ href: "/api/v3/work_packages/42"+ title: Steel Delivery+ self:+ href: "/api/v3/relations/1"+ to:+ href: "/api/v3/work_packages/84"+ title: Bending the steel+ update:+ href: "/api/v3/relations/1/form"+ method: POST+ updateImmediately:+ href: "/api/v3/relations/1"+ method: PATCH+ _type: Relation+ delay: 0+ description: We can't bend the steel before it's been delivered!+ id: 1+ name: precedes+ reverseType: follows+ type: precedes+ schema:+ "$ref": "../components/schemas/relation_model.yml"+ description: OK+ 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: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified relation does not exist.+ description: |-+ Returned if the relation does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** manage work package relations+ 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 modify a read-only property (`PropertyIsReadOnly`)++ * a constraint for a property was violated (`PropertyConstraintViolation`)++ * the client provides a link to an invalid resource (`ResourceTypeMismatch`) or a+ work package that does not exist or for which the client does not have sufficient permissions+ to see it (**required permissions**: `view work packages` for the involved work packages).+ headers: {}+ tags:+ - Relations+ description: |-+ When calling this endpoint the client provides a single object, containing the properties and links that it wants to change, in the body.+ It is only allowed to provide properties or links supporting the **write** operation.++ Note that changing the `type` of a relation invariably also changes the respective `reverseType` as well as the "name" of it.+ The returned Relation object will reflect that change. For instance if you change a Relation's+ `type` to "follows" then the `reverseType` will be changed to `precedes`.+ operationId: Edit_Relation+ summary: Edit Relationdiff --git a/docs/api/apiv3/paths/relation_form.yml b/docs/api/apiv3/paths/relation_form.ymlnew file mode 100644index 00000000000..2b7304497c9--- /dev/null+++ b/docs/api/apiv3/paths/relation_form.yml@@ -0,0 +1,130 @@+# /api/v3/relations/{id}/form+---+post:+ parameters:+ - description: ID of the relation being modified+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ payload:+ _links:+ from:+ href: "/api/v3/work_packages/4534"+ to:+ href: "/api/v3/work_packages/3857"+ _type: WorkPackage+ delay: 3+ description: let it rest for 3 days+ type: follows+ schema:+ _links:+ self:+ href: "/api/v3/relations/schema"+ _type: Schema+ delay:+ name: Delay+ type: Integer+ writable: true+ description:+ name: Description+ type: String+ writable: true+ from:+ name: From work package+ type: WorkPackage+ writeable: false+ id:+ name: ID+ type: Integer+ writable: false+ reverseType:+ name: Reverse Type+ type: String+ writable: false+ to:+ name: To work package+ type: WorkPackage+ writable: false+ type:+ allowedValues:+ - relates+ - duplicates+ - duplicated+ - blocks+ - blocked+ - precedes+ - follows+ - includes+ - partof+ - requires+ - required+ name: Type+ type: String+ writable: true+ validationErrors:+ from:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:BadExampleError+ message: For the purpose of this example we need a validation+ error. The remainder of the response pretends there were no+ errors.+ _links:+ commit:+ href: "/api/v3/relations"+ method: PATCH+ self:+ href: "/api/v3/relations/form"+ validate:+ href: "/api/v3/relations/form"+ method: POST+ _type: Form+ schema:+ "$ref": "../components/schemas/relation_edit_form_model.yml"+ description: OK+ 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 edit the specified relation.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage work package relations++ *Note that you will only receive this error, if you are at least allowed to see the involved work packages.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified relation does not exist.+ description: |-+ Returned if the relation does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view (involved) work package(s), manage work package relations+ headers: {}+ tags:+ - Relations+ description: ''+ operationId: Relation_edit_form+ summary: Relation edit formdiff --git a/docs/api/apiv3/paths/relations.yml b/docs/api/apiv3/paths/relations.ymlnew file mode 100644index 00000000000..69496b6bbf9--- /dev/null+++ b/docs/api/apiv3/paths/relations.yml@@ -0,0 +1,83 @@+# /api/v3/relations+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint. Valid fields to filter by are:++ + id - ID of relation++ + from - ID of work package from which the filtered relations emanates.++ + to - ID of work package to which this related points.++ + involved - ID of either the `from` or the `to` work package.++ + type - The type of relation to filter by, e.g. "follows".+ example: '[{ "from": { "operator": "=", "values": 42 }" }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ example: '[["type", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ delete:+ href: "/api/v3/relations/1"+ method: DELETE+ from:+ href: "/api/v3/work_packages/42"+ title: Steel Delivery+ self:+ href: "/api/v3/relations/1"+ to:+ href: "/api/v3/work_packages/84"+ title: Bending the steel+ update:+ href: "/api/v3/relations/1/form"+ method: POST+ updateImmediately:+ href: "/api/v3/relations/1"+ method: PATCH+ _type: Relation+ delay: 0+ description: We can't bend the steel before it's been delivered!+ id: 1+ name: precedes+ reverseType: follows+ type: precedes+ _links:+ self:+ href: "/api/v3/relations"+ _type: Collection+ count: 1+ total: 3+ schema:+ "$ref": "../components/schemas/relations_model.yml"+ description: OK+ headers: {}+ tags:+ - Relations+ description: |-+ Lists all relations according to the given (optional, logically conjunctive) filters and ordered by ID.+ The response only includes relations between work packages which the user is allowed to see.+ operationId: List_Relations+ summary: List Relationsdiff --git a/docs/api/apiv3/paths/relations_schema.yml b/docs/api/apiv3/paths/relations_schema.ymlnew file mode 100644index 00000000000..f9053d2afa9--- /dev/null+++ b/docs/api/apiv3/paths/relations_schema.yml@@ -0,0 +1,51 @@+# /api/v3/relations/schema+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/relations/schema"+ _type: Schema+ delay:+ name: Delay+ type: Integer+ writable: true+ description:+ name: Description+ type: String+ writable: true+ from:+ name: From work package+ type: WorkPackage+ writable: false+ id:+ name: ID+ type: Integer+ writable: false+ reverseType:+ name: Reverse Type+ type: String+ writable: false+ to:+ name: To work package+ type: WorkPackage+ writable: false+ type:+ name: Type+ type: String+ writable: true+ schema:+ "$ref": "../components/schemas/relation_schema_model.yml"+ description: OK+ headers: {}+ tags:+ - Relations+ description: ''+ operationId: View_relation_schema+ summary: View relation schemadiff --git a/docs/api/apiv3/paths/relations_schema_{type}.yml b/docs/api/apiv3/paths/relations_schema_{type}.ymlnew file mode 100644index 00000000000..dc82c125c75--- /dev/null+++ b/docs/api/apiv3/paths/relations_schema_{type}.yml@@ -0,0 +1,73 @@+# /api/v3/relations/schema/{type}+---+get:+ parameters:+ - description: Type of the schema+ example: follows+ in: path+ name: type+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/relations/schema"+ _type: Schema+ delay:+ name: Delay+ type: Integer+ writable: true+ description:+ name: Description+ type: String+ writable: true+ from:+ name: From work package+ type: WorkPackage+ writable: false+ id:+ name: ID+ type: Integer+ writable: false+ reverseType:+ name: Reverse Type+ type: String+ writable: false+ to:+ name: To work package+ type: WorkPackage+ writable: false+ type:+ name: Type+ type: String+ writable: true+ schema:+ "$ref": "../components/schemas/relation_schema_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified relation type does not exist.+ description: |-+ Returned if the relation type does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** manage work package relations+ headers: {}+ tags:+ - Relations+ description: ''+ operationId: View_relation_schema_for_type+ summary: View relation schema for typediff --git a/docs/api/apiv3/paths/render_markdown.yml b/docs/api/apiv3/paths/render_markdown.ymlnew file mode 100644index 00000000000..f6d4dd95236--- /dev/null+++ b/docs/api/apiv3/paths/render_markdown.yml@@ -0,0 +1,68 @@+# /api/v3/render/markdown+---+post:+ parameters:+ - description: |-+ API-Link to the context in which the rendering occurs, for example a specific work package.++ If left out only context-agnostic rendering takes place.+ Please note that OpenProject features markdown-extensions on top of the extensions GitHub Flavored Markdown (gfm) already+ provides that can only work given a context (e.g. display attached images).++ **Supported contexts:**++ * `/api/v3/work_packages/{id}` - an existing work package+ example: "/api/v3/work_packages/42"+ in: query+ name: context+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/json:+ schema:+ "$ref": "../components/schemas/markdown_model.yml"+ text/html:+ examples:+ response:+ value: '<p>Hello world! <a href="http://example.com">This</a> <strong>is</strong>+ markdown!</p>++'+ schema:+ "$ref": "../components/schemas/markdown_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRenderContext+ message: Could not render markdown string in the given context.+ description: |-+ Returned if the context passed by the client is not valid (e.g. unknown).++ Note that this response will also occur when the requesting user+ is not allowed to see the context resource (e.g. limited work package visibility).+ headers: {}+ '415':+ content:+ application/json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:TypeNotSupported+ message: Expected Content-Type to be 'text/plain' but got 'application/json'.+ description: Returned if the Content-Type indicated in the request is not `text/plain`.+ headers: {}+ tags:+ - Previewing+ description: ''+ operationId: Preview_Markdown_document+ summary: Preview Markdown documentdiff --git a/docs/api/apiv3/paths/render_plain.yml b/docs/api/apiv3/paths/render_plain.ymlnew file mode 100644index 00000000000..f356cc46f4a--- /dev/null+++ b/docs/api/apiv3/paths/render_plain.yml@@ -0,0 +1,33 @@+# /api/v3/render/plain+---+post:+ responses:+ '200':+ content:+ application/json:+ schema:+ "$ref": "../components/schemas/plain_text_model.yml"+ text/html:+ examples:+ response:+ value: "<p>Hello world! This *is* plain text!</p>\n"+ schema:+ "$ref": "../components/schemas/plain_text_model.yml"+ description: OK+ headers: {}+ '415':+ content:+ application/json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:TypeNotSupported+ message: Expected Content-Type to be 'text/plain' but got 'application/json'.+ description: Returned if the Content-Type indicated in the request is not `text/plain`.+ headers: {}+ tags:+ - Previewing+ description: ''+ operationId: Preview_plain_document+ summary: Preview plain documentdiff --git a/docs/api/apiv3/paths/revision.yml b/docs/api/apiv3/paths/revision.ymlnew file mode 100644index 00000000000..3f0d7acfd3f--- /dev/null+++ b/docs/api/apiv3/paths/revision.yml@@ -0,0 +1,68 @@+# /api/v3/revisions/{id}+---+get:+ parameters:+ - description: Revision id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ author:+ href: "/api/v3/users/1"+ project:+ href: "/api/v3/projects/1"+ self:+ href: "/api/v3/revisions/1"+ showRevision:+ href: "/projects/identifier/repository/revision/11f4b07"+ _type: Revision+ authorName: Some Developer+ createdAt: '2015-07-21T13:36:59Z'+ formattedIdentifier: 11f4b07+ id: 1+ identifier: 11f4b07dff4f4ce9548a52b7d002daca7cd63ec6+ message:+ format: plain+ html: "<p>This revision provides new features<br/><br/>An elaborate+ description</p>"+ raw: |-+ This revision provides new features++ An elaborate description+ schema:+ "$ref": "../components/schemas/revision_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified revision does not exist.+ description: |-+ Returned if the revision does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view changesets for the project the repository is created in.++ *Note: A client without sufficient permissions shall not be able to test for the existence of a revision.+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Revisions+ description: ''+ operationId: View_revision+ summary: View revisiondiff --git a/docs/api/apiv3/paths/role.yml b/docs/api/apiv3/paths/role.ymlnew file mode 100644index 00000000000..f17cfea15c1--- /dev/null+++ b/docs/api/apiv3/paths/role.yml@@ -0,0 +1,59 @@+# /api/v3/roles/{id}+---+get:+ parameters:+ - description: role id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/roles/3"+ title: Manager+ _type: Role+ id: 3+ name: Manager+ schema:+ "$ref": "../components/schemas/role_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to view this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see roles.++ **Required permission:** view members **or** manage members+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: Returned if the role does not exist.+ headers: {}+ tags:+ - Roles+ description: Fetch an individual role.+ operationId: View_role+ summary: View rolediff --git a/docs/api/apiv3/paths/roles.yml b/docs/api/apiv3/paths/roles.ymlnew file mode 100644index 00000000000..f4b40eb3b8e--- /dev/null+++ b/docs/api/apiv3/paths/roles.yml@@ -0,0 +1,78 @@+# /api/v3/roles+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ Currently supported filters are:++ + grantable: filters roles based on whether they are selectable for a membership++ + unit: filters roles based on the unit ('project' or 'system') for which they are selectable for a membership+ example: '[{ "unit": { "operator": "=", "values": ["system"] }" }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/roles/3"+ title: Manager+ _type: Role+ id: 3+ name: Manager+ - _links:+ self:+ href: "/api/v3/roles/2"+ title: Anonymous+ _type: Role+ id: 2+ name: Anonymous+ - _links:+ self:+ href: "/api/v3/roles/5"+ title: Reader+ _type: Role+ id: 5+ name: Reader+ - _links:+ self:+ href: "/api/v3/roles/4"+ title: Member+ _type: Role+ id: 4+ name: Member+ - _links:+ self:+ href: "/api/v3/roles/1"+ title: Non member+ _type: Role+ id: 1+ name: Non member+ _links:+ self:+ href: "/api/v3/roles"+ _type: Collection+ count: 5+ total: 5+ schema:+ "$ref": "../components/schemas/roles_model.yml"+ description: OK+ headers: {}+ tags:+ - Roles+ description: List all defined roles. This includes built in roles like 'Anonymous'+ and 'Non member'.+ operationId: List_roles+ summary: List rolesdiff --git a/docs/api/apiv3/paths/root.yml b/docs/api/apiv3/paths/root.ymlnew file mode 100644index 00000000000..8197ac6ad5e--- /dev/null+++ b/docs/api/apiv3/paths/root.yml@@ -0,0 +1,41 @@+# /api/v3+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ configuration:+ href: "/api/v3/configuration"+ priorities:+ href: "/api/v3/priorities"+ relations:+ href: "/api/v3/relations"+ statuses:+ href: "/api/v3/statuses"+ types:+ href: "/api/v3/types"+ user:+ href: "/api/v3/users/1"+ title: John Sheppard+ userPreferences:+ href: "/api/v3/my_preferences"+ users:+ href: "/api/v3/users"+ workPackages:+ href: "/api/v3/work_packages"+ coreVersion: 10.3.0+ instanceName: My own OpenProject+ schema:+ "$ref": "../components/schemas/root_model.yml"+ description: OK+ headers: {}+ tags:+ - Root+ description: ''+ operationId: View_root+ summary: View rootdiff --git a/docs/api/apiv3/paths/status.yml b/docs/api/apiv3/paths/status.ymlnew file mode 100644index 00000000000..b0def93bea4--- /dev/null+++ b/docs/api/apiv3/paths/status.yml@@ -0,0 +1,51 @@+# /api/v3/statuses/{id}+---+get:+ parameters:+ - description: status id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/statuses/1"+ _type: Status+ defaultDoneRatio: 0+ id: 1+ isClosed: false+ isDefault: true+ name: New+ position: 1+ schema:+ "$ref": "../components/schemas/status_model.yml"+ description: OK+ 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 see this status.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work package (on any project)+ headers: {}+ tags:+ - Statuses+ description: ''+ operationId: View_Status+ summary: View Statusdiff --git a/docs/api/apiv3/paths/statuses.yml b/docs/api/apiv3/paths/statuses.ymlnew file mode 100644index 00000000000..3345869a2cb--- /dev/null+++ b/docs/api/apiv3/paths/statuses.yml@@ -0,0 +1,102 @@+# /api/v3/statuses+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/statuses/1"+ _type: Status+ defaultDoneRatio: 0+ id: 1+ isClosed: false+ isDefault: true+ name: New+ position: 1+ - _links:+ self:+ href: "/api/v3/statuses/3"+ _type: Status+ defaultDoneRatio: 75+ id: 3+ isClosed: false+ isDefault: false+ isReadonly: false+ name: Resolved+ position: 3+ - _links:+ self:+ href: "/api/v3/statuses/4"+ _type: Status+ defaultDoneRatio: 25+ id: 4+ isClosed: false+ isDefault: false+ name: Feedback+ position: 4+ - _links:+ self:+ href: "/api/v3/statuses/5"+ _type: Status+ defaultDoneRatio: 100+ id: 5+ isClosed: true+ isDefault: false+ name: Closed+ position: 5+ - _links:+ self:+ href: "/api/v3/statuses/6"+ _type: Status+ defaultDoneRatio: 100+ id: 6+ isClosed: true+ isDefault: false+ name: Rejected+ position: 6+ - _links:+ self:+ href: "/api/v3/statuses/2"+ _type: Status+ defaultDoneRatio: 50+ id: 2+ isClosed: false+ isDefault: false+ name: In Progress+ position: 3+ _links:+ self:+ href: "/api/v3/statuses"+ _type: Collection+ count: 6+ total: 6+ schema:+ "$ref": "../components/schemas/statuses_model.yml"+ description: OK+ 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 see the statuses.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work package (on any project)+ headers: {}+ tags:+ - Statuses+ description: ''+ operationId: List_all_Statuses+ summary: List all Statusesdiff --git a/docs/api/apiv3/paths/time_entries.yml b/docs/api/apiv3/paths/time_entries.ymlnew file mode 100644index 00000000000..b0b5c8c66aa--- /dev/null+++ b/docs/api/apiv3/paths/time_entries.yml@@ -0,0 +1,242 @@+# /api/v3/time_entries+---+get:+ parameters:+ - description: Page number inside the requested collection.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported sorts are:++ + id: Sort by primary key++ + hours: Sort by logged hours++ + spent_on: Sort by spent on date++ + created_at: Sort by time entry creation datetime++ + updated_at: Sort by the time the time entry was updated last+ example: '[["spent_on", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["spent_on", "asc"]'+ type: string+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:++ + work_package: Filter time entries by work package++ + project: Filter time entries by project++ + user: Filter time entries by users++ + spent_on: Filter time entries by spent on date++ + created_at: Filter time entries by creation datetime++ + updated_at: Filter time entries by the last time they where updated++ + activity: Filter time entries by time entry activity+ example: '[{ "work_package": { "operator": "=", "values": ["1", "2"] } }, { "project":+ { "operator": "=", "values": ["1"] } }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ activity:+ href: "/api/v3/time_entries/activities/18"+ title: Some time entry activity+ delete:+ href: "/api/v3/time_entries/1"+ method: delete+ project:+ href: "/api/v3/projects/1"+ title: Some project+ self:+ href: "/api/v3/time_entries/1"+ updateImmediately:+ href: "/api/v3/time_entries/1"+ method: patch+ user:+ href: "/api/v3/users/2"+ title: Some user+ workPackage:+ href: "/api/v3/work_packages/1"+ title: Some work package+ _type: TimeEntry+ comment:+ format: plain+ html: "<p>Some comment</p>"+ raw: Some comment+ createdAt: '2015-03-20T12:56:56Z'+ hours: PT5H+ id: 5+ spentOn: '2015-03-20'+ updatedAt: '2015-03-20T12:56:56Z'+ - _links:+ activity:+ href: "/api/v3/time_entries/activities/14"+ title: some other time entry activity+ project:+ href: "/api/v3/projects/42"+ title: Some other project+ self:+ href: "/api/v3/time_entries/2"+ user:+ href: "/api/v3/users/6"+ title: Some other project+ workPackage:+ href: "/api/v3/work_packages/541"+ title: Some other work package+ _type: TimeEntry+ comment:+ format: plain+ html: "<p>Another comment</p>"+ raw: Another comment+ createdAt: '2015-03-20T12:56:56Z'+ hours: PT7H+ id: 10+ spentOn: '2015-03-21'+ updatedAt: '2015-03-20T12:56:56Z'+ _links:+ changeSize:+ href: "/api/v3/time_entries?offset=1&pageSize=%7Bsize%7D"+ templated: true+ createTimeEntry:+ href: "/api/v3/time_entries/form"+ method: post+ createTimeEntryImmediately:+ href: "/api/v3/time_entries"+ method: post+ jumpTo:+ href: "/api/v3/time_entries?offset=%7Boffset%7D&pageSize=2"+ templated: true+ nextByOffset:+ href: "/api/v3/time_entries?offset=2&pageSize=2"+ self:+ href: "/api/v3/time_entries?offset=1&pageSize=2"+ _type: Collection+ count: 2+ offset: 1+ pageSize: 2+ total: 39+ schema:+ "$ref": "../components/schemas/list_time_entries_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery+ message:+ - Filters Invalid filter does not exist.+ description: Returned if the client sends invalid request parameters e.g. filters+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to view this resource.+ description: Returned if the client is not logged in and login is required.+ headers: {}+ tags:+ - Time Entries+ description: Lists time entries. The time entries returned depend on the filters+ provided and also on the permission of the requesting user.+ operationId: List_time_entries+ summary: List time entries+post:+ responses:+ '201':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_time_entry_model.yml"+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Log time+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: workPackage+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Work package is invalid.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Time Entries+ description: Creates a new time entry applying the attributes provided in the body.+ Please note that while there is a fixed set of attributes, custom fields can extend+ a time entries' attributes and are accepted by the endpoint.+ operationId: Create_Time_entry+ summary: Create Time entrydiff --git a/docs/api/apiv3/paths/time_entries_:id_form.yml b/docs/api/apiv3/paths/time_entries_:id_form.ymlnew file mode 100644index 00000000000..4cd492d1b03--- /dev/null+++ b/docs/api/apiv3/paths/time_entries_:id_form.yml@@ -0,0 +1,59 @@+# /api/v3/time_entries/:id/form+---+post:+ responses:+ '200':+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to edit the time entry.++ **Required permission:** *edit time entries* for every time entry of a project, or *edit own time entries* for time entries belonging to the user.+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the time entry does not exist or if the client does not have sufficient permissions to view it.++ **Required permission** `view time entries` in the project the time entry is assigned to or `view own time entries` for time entries belonging to the user+ headers: {}+ tags:+ - Time Entries+ description: ''+ operationId: Time_entry_update_form+ requestBody:+ content:+ application/json:+ schema:+ type: integer+ description: time entries activity id+ required: true+ summary: Time entry update formdiff --git a/docs/api/apiv3/paths/time_entries_activity_item.yml b/docs/api/apiv3/paths/time_entries_activity_item.ymlnew file mode 100644index 00000000000..9c13208bad3--- /dev/null+++ b/docs/api/apiv3/paths/time_entries_activity_item.yml@@ -0,0 +1,57 @@+# /api/v3/time_entries/activity/{id}+---+get:+ parameters:+ - description: time entries activity id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ projects...: []+ _links:+ projects:+ - href: "/api/v3/projects/seeded_project"+ title: Seeded Project+ - href: "/api/v3/projects/working-project"+ title: Working Project+ self:+ href: "/api/v3/time_entries/activities/18"+ title: a autem+ _type: TimeEntriesActivity+ default: false+ id: 18+ name: a autem+ position: 10+ schema:+ "$ref": "../components/schemas/view_time_entries_activity_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the activity does not exist or if the user does not have permission to view them.++ **Required permission** `view time entries`, `log time`, `edit time entries`, `edit own time entries` or `manage project activities` in any project+ headers: {}+ tags:+ - Time Entry Activities+ description: ''+ operationId: View_time_entries_activity+ summary: View time entries activitydiff --git a/docs/api/apiv3/paths/time_entries_available_projects.yml b/docs/api/apiv3/paths/time_entries_available_projects.ymlnew file mode 100644index 00000000000..b7bfd47e0f5--- /dev/null+++ b/docs/api/apiv3/paths/time_entries_available_projects.yml@@ -0,0 +1,45 @@+# /api/v3/time_entries/available_projects+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _type: Project...+ - _type: Project...+ _links:+ self:+ href: "/api/v3/time_entries/available_projects"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/available_projects_for_time_entries_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** *log time*, *edit time entries* or *edit own time entries* in any project+ headers: {}+ tags:+ - Time Entries+ description: Gets a list of projects in which a time entry can be created in or+ be assigned to on update. The list contains all projects in which the user issuing+ the request has the necessary permissions.+ operationId: Available_projects_for_time_entries+ summary: Available projects for time entriesdiff --git a/docs/api/apiv3/paths/time_entries_form.yml b/docs/api/apiv3/paths/time_entries_form.ymlnew file mode 100644index 00000000000..de89f4c14ea--- /dev/null+++ b/docs/api/apiv3/paths/time_entries_form.yml@@ -0,0 +1,38 @@+# /api/v3/time_entries/form+---+post:+ responses:+ '200':+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** *log time* in any project+ headers: {}+ tags:+ - Time Entries+ description: ''+ operationId: Time_entry_create_form+ summary: Time entry create formdiff --git a/docs/api/apiv3/paths/time_entries_schema.yml b/docs/api/apiv3/paths/time_entries_schema.ymlnew file mode 100644index 00000000000..b999f4bfd25--- /dev/null+++ b/docs/api/apiv3/paths/time_entries_schema.yml@@ -0,0 +1,112 @@+# /api/v3/time_entries/schema+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _dependencies: []+ _links:+ self:+ href: "/api/v3/time_entries/schema"+ _type: Schema+ activity:+ _links: {}+ hasDefault: true+ location: _links+ name: Activity+ required: true+ type: TimeEntriesActivity+ writable: true+ createdAt:+ hasDefault: false+ name: Created on+ options: {}+ required: true+ type: DateTime+ writable: false+ customField29:+ hasDefault: false+ name: sfsdfsdfsdfsdfdsf+ options:+ rtl:+ required: false+ type: String+ writable: true+ hours:+ hasDefault: false+ name: Hours+ options: {}+ required: true+ type: Duration+ writable: true+ id:+ hasDefault: false+ name: ID+ options: {}+ required: true+ type: Integer+ writable: false+ project:+ _links: {}+ hasDefault: false+ location: _links+ name: Project+ required: false+ type: Project+ writable: true+ spentOn:+ hasDefault: false+ name: Date+ options: {}+ required: true+ type: Date+ writable: true+ updatedAt:+ hasDefault: false+ name: Updated on+ options: {}+ required: true+ type: DateTime+ writable: false+ user:+ hasDefault: false+ name: User+ options: {}+ required: true+ type: User+ writable: false+ workPackage:+ _links: {}+ hasDefault: false+ location: _links+ name: Work package+ required: false+ type: WorkPackage+ writable: true+ schema:+ "$ref": "../components/schemas/view_time_entry_schema_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see the schema.++ **Required permission:** *log time* or *view time entries* or *edit time entries* or *edit own time entries* on any project+ headers: {}+ tags:+ - Time Entries+ description: ''+ operationId: View_time_entry_schema+ summary: View time entry schemadiff --git a/docs/api/apiv3/paths/time_entry.yml b/docs/api/apiv3/paths/time_entry.ymlnew file mode 100644index 00000000000..6b294c863d3--- /dev/null+++ b/docs/api/apiv3/paths/time_entry.yml@@ -0,0 +1,191 @@+# /api/v3/time_entries/{id}+---+delete:+ parameters:+ - description: Time entry id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: Returned if the time entry was deleted successfully.+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: Returned if the client does not have sufficient permissions+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the time entry does not exist or if the user does not have sufficient permissions to see the time entry.++ **Required permission** `view time entries` in the project the time entry is assigned to or `view own time entries` for time entries belonging to the user+ headers: {}+ tags:+ - Time Entries+ description: Permanently deletes the specified time entry.+ operationId: Delete_time_entry+ summary: Delete time entry+get:+ parameters:+ - description: time entry id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ activity...: {}+ project...: {}+ user...: {}+ workPackage...: {}+ _links:+ activity:+ href: "/api/v3/time_entries/activities/18"+ title: Some time entry activity+ customField4:+ href: "/api/v3/users/5"+ title: Some other user+ delete:+ href: "/api/v3/time_entries/1"+ method: delete+ project:+ href: "/api/v3/projects/1"+ title: Some project+ self:+ href: "/api/v3/time_entries/1"+ updateImmediately:+ href: "/api/v3/time_entries/1"+ method: patch+ user:+ href: "/api/v3/users/2"+ title: Some user+ workPackage:+ href: "/api/v3/work_packages/1"+ title: Some work package+ _type: TimeEntry+ comment:+ format: plain+ html: "<p>Some text explaining why the time entry was created</p>"+ raw: Some text explaining why the time entry was created+ createdAt: '2015-03-20T12:56:56Z'+ customField12: 5+ hours: PT5H+ id: 1+ spentOn: '2015-03-20'+ updatedAt: '2015-03-20T12:56:56Z'+ schema:+ "$ref": "../components/schemas/view_time_entry_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the time entry does not exist or if the user does not have permission to view them.++ **Required permission** `view time entries` in the project the time entry is assigned to or `view own time entries` for time entries belonging to the user+ headers: {}+ tags:+ - Time Entries+ description: ''+ operationId: View_time_entry+ summary: View time entry+patch:+ parameters:+ - description: Time entry id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_time_entry_model.yml"+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Edit (own) time entries, depending on what time entry is being modified.+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: workPackage+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: Work package is invalid.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Time Entries+ description: Updates the given time entry by applying the attributes provided in+ the body. Please note that while there is a fixed set of attributes, custom fields+ can extend a time entries' attributes and are accepted by the endpoint.+ operationId: Update_Time_entry+ summary: Update Time entrydiff --git a/docs/api/apiv3/paths/type.yml b/docs/api/apiv3/paths/type.ymlnew file mode 100644index 00000000000..10e65b3eb2f--- /dev/null+++ b/docs/api/apiv3/paths/type.yml@@ -0,0 +1,53 @@+# /api/v3/types/{id}+---+get:+ parameters:+ - description: type id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ self:+ href: "/api/v3/types/1"+ _type: Type+ color: "#ff0000"+ createdAt: '2014-05-21T08:51:20Z'+ id: 1+ isDefault: true+ isMilestone: false+ name: Bug+ position: 1+ updatedAt: '2014-05-21T08:51:20Z'+ schema:+ "$ref": "../components/schemas/type_model.yml"+ description: OK+ 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 see this type.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work package or manage types (on any project)+ headers: {}+ tags:+ - Types+ description: ''+ operationId: View_Type+ summary: View Typediff --git a/docs/api/apiv3/paths/types.yml b/docs/api/apiv3/paths/types.ymlnew file mode 100644index 00000000000..377c72ec048--- /dev/null+++ b/docs/api/apiv3/paths/types.yml@@ -0,0 +1,65 @@+# /api/v3/types+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/types/1"+ _type: Type+ color: "#ff0000"+ createdAt: '2014-05-21T08:51:20Z'+ id: 1+ isDefault: true+ isMilestone: false+ name: Bug+ position: 1+ updatedAt: '2014-05-21T08:51:20Z'+ - _links:+ self:+ href: "/api/v3/types/2"+ _type: Type+ color: "#888"+ createdAt: '2014-05-21T08:51:20Z'+ id: 2+ isDefault: false+ isMilestone: false+ name: Feature+ position: 2+ updatedAt: '2014-05-21T08:51:20Z'+ _links:+ self:+ href: "/api/v3/types"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/types_model.yml"+ description: OK+ 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 see the types.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work package or manage types (on any project)+ headers: {}+ tags:+ - Types+ description: ''+ operationId: List_all_Types+ summary: List all Typesdiff --git a/docs/api/apiv3/paths/user.yml b/docs/api/apiv3/paths/user.ymlnew file mode 100644index 00000000000..d801b90dca8--- /dev/null+++ b/docs/api/apiv3/paths/user.yml@@ -0,0 +1,226 @@+# /api/v3/users/{id}+---+delete:+ parameters:+ - description: User id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '202':+ description: |-+ Returned if the account was deleted successfully.++ Note that the response body is empty as of now. In future versions of the API a body+ *might* be returned, indicating the progress of deletion.+ 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 delete the account of this user.+ description: |-+ Returned if the client does not have sufficient permissions or if deletion of users was disabled in the instance wide settings.++ **Required permission:** Administrators only (exception: users might be able to delete their own accounts)+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified user does not exist.+ description: Returned if the user does not exist.+ headers: {}+ tags:+ - Users+ description: Permanently deletes the specified user account.+ operationId: Delete_user+ summary: Delete user+get:+ parameters:+ - description: User id. Use `me` to reference current user, if any.+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ delete:+ href: "/api/v3/users/1"+ method: DELETE+ lock:+ href: "/api/v3/users/1/lock"+ method: POST+ self:+ href: "/api/v3/users/1"+ title: j.sheppard+ show:+ href: "/users/1"+ type: text/html+ updateImmediately:+ href: "/api/v3/users/1"+ method: PATCH+ _type: User+ admin: true+ avatar: https://example.org/users/1/avatar+ createdAt: '2014-05-21T08:51:20Z'+ email: [email protected]+ firstName: John+ id: 1+ language: en+ lastName: Sheppard+ login: j.sheppard+ status: active+ updatedAt: '2014-05-21T08:51:20Z'+ schema:+ "$ref": "../components/schemas/view_user_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified user does not exist or you do not have permission+ to view them.+ description: |-+ Returned if the user does not exist or if the API user does not have permission to view them.++ **Required permission** The user needs to be locked in if the installation is configured to prevent anonymous access+ headers: {}+ tags:+ - Users+ description: ''+ operationId: View_user+ summary: View user+patch:+ parameters:+ - description: User id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_user_model.yml"+ description: OK+ 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 update the account of this user.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Administrators, manage_user global permission+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified user does not exist or you do not have permission+ to view them.+ description: |-+ Returned if the user does not exist or if the API user does not have the necessary permissions to update it.++ **Required permission:** Administrators only (exception: users may update their own accounts)+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: email+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: The email address is already taken.+ description: |-+ Returned if:++ * the client tries to modify a read-only property (`PropertyIsReadOnly`)++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Users+ description: |-+ Updates the user's writable attributes.+ When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body.+ operationId: Update_user+ requestBody:+ content:+ application/json:+ schema:+ example:+ admin: true+ email: [email protected]+ firstName: Hans+ language: en+ lastName: Wurst+ login: h.wurst+ properties:+ admin:+ type: boolean+ email:+ type: string+ firstName:+ type: string+ language:+ type: string+ lastName:+ type: string+ login:+ type: string+ type: object+ summary: Update userdiff --git a/docs/api/apiv3/paths/user_form.yml b/docs/api/apiv3/paths/user_form.ymlnew file mode 100644index 00000000000..0f8169e52bc--- /dev/null+++ b/docs/api/apiv3/paths/user_form.yml@@ -0,0 +1,61 @@+# /api/v3/users/{id}/form+---+post:+ parameters:+ - description: User id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage_user global permission+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the request user can not be found.++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a membership. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Users+ description: ''+ operationId: User_update_form+ summary: User update formdiff --git a/docs/api/apiv3/paths/user_lock.yml b/docs/api/apiv3/paths/user_lock.ymlnew file mode 100644index 00000000000..31807c6bab4--- /dev/null+++ b/docs/api/apiv3/paths/user_lock.yml@@ -0,0 +1,186 @@+# /api/v3/users/{id}/lock+---+delete:+ parameters:+ - description: User id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ delete:+ href: "/api/v3/users/1"+ method: DELETE+ lock:+ href: "/api/v3/users/1/lock"+ method: POST+ self:+ href: "/api/v3/users/1"+ title: j.sheppard+ show:+ href: "/users/1"+ type: text/html+ updateImmediately:+ href: "/api/v3/users/1"+ method: PATCH+ _type: User+ admin: true+ avatar: https://example.org/users/1/avatar+ createdAt: '2014-05-21T08:51:20Z'+ email: [email protected]+ firstName: John+ id: 1+ language: en+ lastName: Sheppard+ login: j.sheppard+ status: active+ updatedAt: '2014-05-21T08:51:20Z'+ schema:+ "$ref": "../components/schemas/view_user_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidUserStatusTransition+ message: The current user account status does not allow this operation.+ description: |-+ Returned if the client tries to unlock a user account whose current status does not allow this transition.++ **Required permission:** Administrators only+ 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 unlock the account of this user.+ description: |-+ Returned if the client does not have sufficient permissions for unlocking a user.++ **Required permission:** Administrators only+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified user does not exist.+ description: Returned if the user does not exist.+ headers: {}+ tags:+ - Users+ description: ''+ operationId: Unlock_user+ summary: Unlock user+post:+ parameters:+ - description: User id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ delete:+ href: "/api/v3/users/1"+ method: DELETE+ lock:+ href: "/api/v3/users/1/lock"+ method: POST+ self:+ href: "/api/v3/users/1"+ title: j.sheppard+ show:+ href: "/users/1"+ type: text/html+ updateImmediately:+ href: "/api/v3/users/1"+ method: PATCH+ _type: User+ admin: true+ avatar: https://example.org/users/1/avatar+ createdAt: '2014-05-21T08:51:20Z'+ email: [email protected]+ firstName: John+ id: 1+ language: en+ lastName: Sheppard+ login: j.sheppard+ status: active+ updatedAt: '2014-05-21T08:51:20Z'+ schema:+ "$ref": "../components/schemas/view_user_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidUserStatusTransition+ message: The current user account status does not allow this operation.+ description: |-+ Returned if the client tries to lock a user account whose current status does not allow this transition.++ **Required permission:** Administrators only+ 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 lock the account of this user.+ description: |-+ Returned if the client does not have sufficient permissions for locking a user.++ **Required permission:** Administrators only+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified user does not exist.+ description: Returned if the user does not exist.+ headers: {}+ tags:+ - Users+ description: ''+ operationId: Lock_user+ summary: Lock userdiff --git a/docs/api/apiv3/paths/users.yml b/docs/api/apiv3/paths/users.ymlnew file mode 100644index 00000000000..a10cbeda0e1--- /dev/null+++ b/docs/api/apiv3/paths/users.yml@@ -0,0 +1,223 @@+# /api/v3/users+---+get:+ parameters:+ - description: Page number inside the requested collection.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:++ + status: Status the user has++ + group: Name of the group in which to-be-listed users are members.++ + name: Filter users in whose first or last names, or email addresses the given string occurs.++ + login: User's login+ example: '[{ "status": { "operator": "=", "values": ["invited"] } }, { "group":+ { "operator": "=", "values": ["1"] } }, { "name": { "operator": "=", "values":+ ["[email protected]"] } }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ example: '[["status", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ type: string+ responses:+ '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+ update:+ href: "/api/v3/users/1"+ method: PATCH+ title: Update j.sheppard+ _type: User+ admin: true+ avatar: https://example.org/users/1/avatar+ createdAt: '2014-05-21T08:51:20Z'+ email: [email protected]+ firstName: John+ id: 1+ language: en+ lastName: Sheppard+ login: j.sheppard+ status: active+ updatedAt: '2014-05-21T08:51:20Z'+ _links:+ self:+ href: "/api/v3/users"+ _type: Collection+ count: 1+ total: 2+ schema:+ "$ref": "../components/schemas/users_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery+ message: Unknown sort column.+ description: Returned if the client sends an unknown sort column.+ 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 list users.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Administrator+ headers: {}+ tags:+ - Users+ description: Lists users. Only administrators or users with manage_user global permission+ have permission to do this.+ operationId: List_Users+ summary: List Users+post:+ responses:+ '201':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/view_user_model.yml"+ 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 new users.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Administrator+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: email+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: The email address is already taken.+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Users+ description: |-+ Creates a new user. Only administrators and users with manage_user global permission are allowed to do so.+ When calling this endpoint the client provides a single object, containing at least the properties and links that are required, in the body.++ Valid values for `status`:++ 1) "active" - In this case a password has to be provided in addition to the other attributes.+ 2) "invited" - In this case nothing but the email address is required. The rest is optional. An invitation will be sent to the user.+ operationId: Create_User+ requestBody:+ content:+ application/json:+ schema:+ example:+ admin: false+ email: [email protected]+ firstName: Hans+ language: de+ lastName: Wurst+ login: h.wurst+ password: hunter5+ status: active+ properties:+ admin:+ type: boolean+ email:+ type: string+ firstName:+ type: string+ language:+ type: string+ lastName:+ type: string+ login:+ type: string+ password:+ type: string+ status:+ type: string+ type: object+ summary: Create Userdiff --git a/docs/api/apiv3/paths/users_schemas.yml b/docs/api/apiv3/paths/users_schemas.ymlnew file mode 100644index 00000000000..3647eaa2bf2--- /dev/null+++ b/docs/api/apiv3/paths/users_schemas.yml@@ -0,0 +1,138 @@+# /api/v3/users/schemas+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _dependencies: []+ _links:+ self:+ href: "/api/v3/users/schema"+ _type: Schema+ admin:+ hasDefault: false+ name: Administrator+ options: {}+ required: false+ type: Boolean+ writable: true+ avatar:+ hasDefault: false+ name: Avatar+ options: {}+ required: false+ type: String+ writable: false+ createdAt:+ hasDefault: false+ name: Created on+ options: {}+ required: true+ type: DateTime+ writable: false+ customField1:+ hasDefault: false+ name: User String CF+ required: false+ type: String+ writable: true+ customField2:+ hasDefault: false+ location: _links+ name: User List cf+ required: false+ type: CustomOption+ writable: true+ firstName:+ hasDefault: false+ maxLength: 255+ minLength: 1+ name: First name+ options: {}+ required: true+ type: String+ writable: false+ id:+ hasDefault: false+ name: ID+ options: {}+ required: true+ type: Integer+ writable: false+ identityUrl:+ hasDefault: false+ name: Identity url+ options: {}+ required: false+ type: String+ writable: true+ language:+ hasDefault: false+ name: Language+ options: {}+ required: false+ type: String+ writable: true+ lastName:+ hasDefault: false+ maxLength: 255+ minLength: 1+ name: Last name+ options: {}+ required: true+ type: String+ writable: false+ login:+ hasDefault: false+ maxLength: 255+ minLength: 1+ name: Username+ options: {}+ required: true+ type: String+ writable: true+ mail:+ hasDefault: false+ maxLength: 255+ minLength: 1+ name: Email+ options: {}+ required: true+ type: String+ writable: true+ password:+ hasDefault: false+ name: Password+ options: {}+ required: false+ type: Password+ writable: false+ status:+ hasDefault: false+ name: Status+ options: {}+ required: false+ type: String+ writable: true+ updatedAt:+ hasDefault: false+ name: Updated on+ options: {}+ required: true+ type: DateTime+ writable: false+ schema:+ "$ref": "../components/schemas/view_user_schema_model.yml"+ description: OK+ headers: {}+ tags:+ - Users+ description: The schema response use two exemplary custom fields that extend the+ schema response. Depending on your instance and custom field configuration, the+ response will look somewhat different.+ operationId: View_user_schema+ summary: View user schemadiff --git a/docs/api/apiv3/paths/version.yml b/docs/api/apiv3/paths/version.ymlnew file mode 100644index 00000000000..cc4f86924a1--- /dev/null+++ b/docs/api/apiv3/paths/version.yml@@ -0,0 +1,198 @@+# /api/v3/versions/{id}+---+delete:+ parameters:+ - description: Version id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: Returned if the version was successfully deleted+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage versions+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the version does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view work packages **or** manage versions (any project where the version is available)++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a version. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Versions+ description: Deletes the version. Work packages associated to the version will no+ longer be assigned to it.+ operationId: Delete_Version+ summary: Delete Version+get:+ parameters:+ - description: version id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ availableInProjects:+ href: "/api/v3/versions/11/projects"+ customField4:+ href: "/api/v3/custom_options/5"+ title: Custom field option+ definingProject:+ href: "/api/v3/projects/11"+ self:+ href: "/api/v3/versions/11"+ update:+ href: "/api/v3/versions/11/form"+ method: POST+ updateImmediately:+ href: "/api/v3/versions/11"+ method: PATCH+ _type: Version+ customField14: '1234567890'+ description:+ format: plain+ html: This version has a description+ raw: This version has a description+ endDate:+ id: 11+ name: v3.0 Alpha+ sharing: system+ startDate: '2014-11-20'+ status: open+ schema:+ "$ref": "../components/schemas/version_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the version does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view work packages **or** manage versions (any project where the version is available)++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a version. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Versions+ description: ''+ operationId: View_version+ summary: View version+patch:+ parameters:+ - description: Version id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/version_model.yml"+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Manage versions in the version's project.+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the version does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view work packages **or** manage versions (any project where the version is available)++ *Note: A client without sufficient permissions shall not be able to test for the existence of+ a version. That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ '422':+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Versions+ description: Updates the given version by applying the attributes provided in the+ body. Please note that while there is a fixed set of attributes, custom fields+ can extend a version's attributes and are accepted by the endpoint.+ operationId: Update_Versions+ summary: Update Versionsdiff --git a/docs/api/apiv3/paths/version_form.yml b/docs/api/apiv3/paths/version_form.ymlnew file mode 100644index 00000000000..5fa4197012a--- /dev/null+++ b/docs/api/apiv3/paths/version_form.yml@@ -0,0 +1,46 @@+# /api/v3/versions/{id}/form+---+post:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage versions in the version's project+ headers: {}+ tags:+ - Versions+ description: ''+ operationId: Version_update_form+ summary: Version update formdiff --git a/docs/api/apiv3/paths/version_projects.yml b/docs/api/apiv3/paths/version_projects.ymlnew file mode 100644index 00000000000..3005190dcc4--- /dev/null+++ b/docs/api/apiv3/paths/version_projects.yml@@ -0,0 +1,75 @@+# /api/v3/versions/{id}/projects+---+get:+ parameters:+ - description: Version id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ categories:+ href: "/api/v3/projects/1/categories"+ self:+ href: "/api/v3/projects/1"+ title: Lorem+ status:+ href: "/api/v3/project_statuses/on_track"+ title: On track+ versions:+ href: "/api/v3/projects/1/versions"+ _type: Project+ active: true+ createdAt: '2014-05-21T08:51:20Z'+ description:+ format: markdown+ html: "<p>Lorem <strong>ipsum</strong> dolor sit amet</p>"+ raw: Lorem **ipsum** dolor sit amet+ id: 1+ identifier: project_identifier+ name: Project example+ statusExplanation:+ format: markdown+ html: "<p>Everything <strong>fine</strong></p>"+ raw: Everything **fine**+ updatedAt: '2014-05-21T08:51:20Z'+ _links:+ self:+ href: "/api/v3/versions/2/projects"+ _type: Collection+ count: 1+ total: 1+ schema:+ "$ref": "../components/schemas/list_projects_by_version_model.yml"+ description: OK+ headers: {}+ '404':+ description: |-+ Returned if the version does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view work packages **or** manage versions (any project where the given version is available)++ *Note: A client without sufficient permissions shall not be able to test for the existence of a version.+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Projects+ description: |-+ This endpoint lists the projects where the given version is available.++ The projects returned depend on the sharing settings of the given version,+ but are also limited to the projects that the current user is allowed to see.+ operationId: List_projects_with_version+ summary: List projects with versiondiff --git a/docs/api/apiv3/paths/versions.yml b/docs/api/apiv3/paths/versions.ymlnew file mode 100644index 00000000000..c3ada0ac17c--- /dev/null+++ b/docs/api/apiv3/paths/versions.yml@@ -0,0 +1,143 @@+# /api/v3/versions+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ Currently supported filters are:++ + sharing: filters versions by how they are shared within the server (*none*, *descendants*, *hierarchy*, *tree*, *system*).+ example: '[{ "sharing": { "operator": "*", "values": ["system"] }" }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ availableInProjects:+ href: "/api/v3/versions/11/projects"+ definingProject:+ href: "/api/v3/projects/12"+ self:+ href: "/api/v3/versions/11"+ _type: Version+ description:+ format: plain+ html: This version has a description+ raw: This version has a description+ endDate:+ id: 11+ name: v3.0 Alpha+ startDate: '2014-11-20'+ status: Open+ - _links:+ availableInProjects:+ href: "/api/v3/versions/12/projects"+ definingProject:+ href: "/api/v3/projects/11"+ self:+ href: "/api/v3/versions/12"+ _type: Version+ description:+ format: plain+ html: ''+ raw: ''+ endDate:+ id: 12+ name: v2.0+ startDate:+ status: Closed+ - _links:+ availableInProjects:+ href: "/api/v3/versions/13/projects"+ definingProject:+ href: "/api/v3/projects/13"+ self:+ href: "/api/v3/versions/10"+ _type: Version+ description:+ format: plain+ html: ''+ raw: ''+ endDate:+ id: 10+ name: v1.0+ startDate:+ status: Open+ _links:+ self:+ href: "/api/v3/versions"+ _type: Collection+ count: 3+ total: 3+ schema:+ "$ref": "../components/schemas/versions_model.yml"+ description: OK+ headers: {}+ tags:+ - Versions+ description: Returns a collection of versions. The client can choose to filter the+ versions similar to how work packages are filtered. In addition to the provided+ filters, the server will reduce the result set to only contain versions, for which+ the requesting client has sufficient permissions (*view_work_packages*).+ operationId: List_versions+ summary: List versions+post:+ responses:+ '201':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/version_model.yml"+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** Manage versions+ headers: {}+ '422':+ description: |-+ Returned if:++ * a constraint for a property was violated (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Versions+ description: |-+ Creates a new version applying the attributes provided in the body. Please note that while there is a fixed set of attributes, custom fields can extend a version's attributes and are accepted by the endpoint.++ You can use the form and schema to be retrieve the valid attribute values and by that be guided towards successful creation.+ operationId: Create_versions+ summary: Create versionsdiff --git a/docs/api/apiv3/paths/versions_available_projects.yml b/docs/api/apiv3/paths/versions_available_projects.ymlnew file mode 100644index 00000000000..565f76bfe54--- /dev/null+++ b/docs/api/apiv3/paths/versions_available_projects.yml@@ -0,0 +1,95 @@+# /api/v3/versions/available_projects+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ categories:+ href: "/api/v3/projects/6/categories"+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ editWorkPackage:+ href: "/api/v3//work_packages/{work_package_id}/form"+ method: post+ templated: true+ self:+ href: "/api/v3/projects/6"+ title: A project+ versions:+ href: "/api/v3/projects/6/versions"+ _type: Project+ createdAt: '2015-07-06T13:28:14+00:00'+ description: Eveniet molestias omnis quis aut qui eum adipisci.+ Atque aut aut in exercitationem adipisci amet. Nisi asperiores+ quia ratione veritatis enim exercitationem magnam. Aut fuga+ architecto adipisci nihil. Et repellat pariatur. Aliquam et+ sed perferendis nostrum quaerat. Fugit doloremque voluptatem.+ id: 6+ identifier: a_project+ name: A project+ type: Customer Project+ updatedAt: '2015-10-01T09:55:02+00:00'+ - _links:+ categories:+ href: "/api/v3/projects/14/categories"+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ self:+ href: "/api/v3/projects/14"+ title: Another project+ versions:+ href: "/api/v3/projects/14/versions"+ _type: Project+ createdAt: '2016-02-29T12:50:20+00:00'+ description: ''+ id: 14+ identifier: another_project+ name: Another project+ type:+ updatedAt: '2016-02-29T12:50:20+00:00'+ _links:+ self:+ href: "/api/v3/versions/available_projects"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/available_projects_for_versions_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage versions+ headers: {}+ tags:+ - Versions+ description: Gets a list of projects in which a version can be created in. The list+ contains all projects in which the user issuing the request has the manage versions+ permissions.+ operationId: Available_projects_for_versions+ summary: Available projects for versionsdiff --git a/docs/api/apiv3/paths/versions_form.yml b/docs/api/apiv3/paths/versions_form.ymlnew file mode 100644index 00000000000..3413dd71ac2--- /dev/null+++ b/docs/api/apiv3/paths/versions_form.yml@@ -0,0 +1,38 @@+# /api/v3/versions/form+---+post:+ responses:+ '200':+ description: OK+ 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 authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage versions in any project+ headers: {}+ tags:+ - Versions+ description: ''+ operationId: Version_create_form+ summary: Version create formdiff --git a/docs/api/apiv3/paths/versions_schemas.yml b/docs/api/apiv3/paths/versions_schemas.ymlnew file mode 100644index 00000000000..46072fda6d9--- /dev/null+++ b/docs/api/apiv3/paths/versions_schemas.yml@@ -0,0 +1,121 @@+# /api/v3/versions/schemas+---+get:+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _dependencies: []+ _links:+ self:+ href: "/api/v3/versions/schema"+ _type: Schema+ createdAt:+ hasDefault: false+ name: Created on+ required: true+ type: DateTime+ writable: false+ customField14:+ hasDefault: false+ name: text CF+ required: false+ type: String+ visibility: default+ writable: true+ customField40:+ _links: {}+ hasDefault: false+ location: _links+ name: List CF+ required: false+ type: CustomOption+ visibility: default+ writable: true+ definingProject:+ _links: {}+ hasDefault: false+ name: Project+ required: true+ type: Project+ writable: true+ description:+ hasDefault: false+ name: Description+ required: false+ type: Formattable+ writable: true+ endDate:+ hasDefault: false+ name: Finish date+ required: false+ type: Date+ writable: false+ id:+ hasDefault: false+ name: ID+ required: true+ type: Integer+ writable: false+ name:+ hasDefault: false+ maxLength: 60+ minLength: 1+ name: Name+ required: true+ type: String+ writable: true+ sharing:+ _links: {}+ hasDefault: false+ name: Sharing+ required: true+ type: String+ visibility: default+ writable: true+ startDate:+ hasDefault: false+ name: Start date+ required: false+ type: Date+ writable: true+ status:+ _links: {}+ hasDefault: false+ name: Status+ required: true+ type: String+ visibility: default+ writable: true+ updatedAt:+ hasDefault: false+ name: Updated on+ required: true+ type: DateTime+ writable: false+ schema:+ "$ref": "../components/schemas/version_schema_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions to see the schema.++ **Required permission:** view work packages or manage versions on any project+ headers: {}+ tags:+ - Versions+ description: ''+ operationId: View_version_schema+ summary: View version schemadiff --git a/docs/api/apiv3/paths/wiki_page.yml b/docs/api/apiv3/paths/wiki_page.ymlnew file mode 100644index 00000000000..a76959be2e6--- /dev/null+++ b/docs/api/apiv3/paths/wiki_page.yml@@ -0,0 +1,59 @@+# /api/v3/wiki_pages/{id}+---+get:+ parameters:+ - description: Wiki page identifier+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ project:+ _type: Project...+ id: 12+ _links:+ addAttachment:+ href: "/api/v3/wiki_pages/72/attachments"+ method: post+ attachments:+ href: "/api/v3/wiki_pages/72/attachments"+ project:+ href: "/api/v3/projects/12"+ title: some project+ self:+ href: "/api/v3/wiki_pages/72"+ _type: WikiPage+ id: 72+ title: A wiki page with a name+ schema:+ "$ref": "../components/schemas/wiki_page_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the wiki page does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view wiki page in the page's project+ headers: {}+ tags:+ - Wiki Pages+ description: Retrieve an individual wiki page as identified by the id parameter+ operationId: View_Wiki_Page+ summary: View Wiki Pagediff --git a/docs/api/apiv3/paths/wiki_page_attachments.yml b/docs/api/apiv3/paths/wiki_page_attachments.ymlnew file mode 100644index 00000000000..df727ba036f--- /dev/null+++ b/docs/api/apiv3/paths/wiki_page_attachments.yml@@ -0,0 +1,247 @@+# /api/v3/wiki_pages/{id}/attachments+---+get:+ parameters:+ - description: ID of the wiki page whose attachments will be listed+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ author:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ container:+ href: "/api/v3/wiki_pages/72"+ title: wiki+ delete:+ href: "/api/v3/attachments/376"+ method: delete+ downloadLocation:+ href: "/api/v3/attachments/376/content"+ self:+ href: "/api/v3/attachments/376"+ title: 200.gif+ _type: Attachment+ contentType: image/gif+ createdAt: '2018-06-01T07:24:19Z'+ description:+ format: plain+ html: ''+ raw: ''+ digest:+ algorithm: md5+ hash: 7ac9c97ef73d47127f590788b84c0c1c+ fileName: some.gif+ fileSize: 3521772+ id: 376+ _links:+ self:+ href: "/api/v3/wiki_pages/72/attachments"+ _type: Collection+ count: 1+ total: 1+ schema:+ "$ref": "../components/schemas/attachments_by_wiki_page_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the wiki page does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view wiki pages++ *Note: A client without sufficient permissions shall not be able to test for the existence of a work package.+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Attachments+ description: ''+ operationId: List_attachments_by_wiki_page+ summary: List attachments by wiki page+post:+ parameters:+ - description: ID of the wiki page to receive the attachment+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ author:+ _links:+ lock:+ href: "/api/v3/users/1/lock"+ method: post+ title: Set lock on admin+ self:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ showUser:+ href: "/users/1"+ type: text/html+ updateImmediately:+ href: "/api/v3/users/1"+ method: patch+ title: Update admin+ _type: User+ admin: true+ avatar: ''+ createdAt: '2015-03-20T12:56:52Z'+ email:+ firstName: OpenProject+ id: 1+ identityUrl:+ lastName: Admin+ login: admin+ name: OpenProject Admin+ status: active+ updatedAt: '2018-05-29T13:57:44Z'+ container:+ _links:+ addAttachment:+ href: "/api/v3/wiki_pages/72/attachments"+ method: post+ attachments:+ href: "/api/v3/wiki_pages/72/attachments"+ project:+ href: "/api/v3/projects/12"+ title: Demo project+ self:+ href: "/api/v3/wiki_pages/72"+ _type: WikiPage+ id: 72+ title: wiki+ _links:+ author:+ href: "/api/v3/users/1"+ title: OpenProject Admin+ container:+ href: "/api/v3/wiki_pages/72"+ title: wiki+ delete:+ href: "/api/v3/attachments/376"+ method: delete+ downloadLocation:+ href: "/api/v3/attachments/376/content"+ self:+ href: "/api/v3/attachments/376"+ title: 200.gif+ _type: Attachment+ contentType: image/gif+ createdAt: '2018-06-01T07:24:19Z'+ description:+ format: plain+ html: ''+ raw: ''+ digest:+ algorithm: md5+ hash: 7ac9c97ef73d47127f590788b84c0c1c+ fileName: some.gif+ fileSize: 3521772+ id: 376+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody+ message: The request could not be parsed as JSON.+ description: |-+ Returned if the client sends a not understandable request. Reasons include:++ * Omitting one of the required parts (metadata and file)++ * sending unparsable JSON in the metadata part+ 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 delete this attachment.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit wiki pages++ *Note that you will only receive this error, if you are at least allowed to see the wiki page*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The requested resource could not be found.+ description: |-+ Returned if the wiki page does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view wiki pages++ *Note: A client without sufficient permissions shall not be able to test for the existence of a wiki page+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: File is too large (maximum size is 5242880 Bytes).+ description: |-+ Returned if the client tries to send an invalid attachment.+ Reasons are:++ * Omitting the file name (`fileName` property of metadata part)++ * Sending a file that is too large+ headers: {}+ tags:+ - Attachments+ description: |-+ Adds an attachment with the wiki page as it's container.++ See [the general specification for uploading attachments](#attachments-attachments) for details.+ operationId: Add_attachment_to_wiki_page+ summary: Add attachment to wiki pagediff --git a/docs/api/apiv3/paths/work_package.yml b/docs/api/apiv3/paths/work_package.ymlnew file mode 100644index 00000000000..89ab5d1cacd--- /dev/null+++ b/docs/api/apiv3/paths/work_package.yml@@ -0,0 +1,511 @@+# /api/v3/work_packages/{id}+---+delete:+ parameters:+ - description: Work package id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: |-+ Returned if the work package was deleted successfully.++ 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: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ tags:+ - Work Packages+ description: |-+ Deletes the work package, as well as:++ * all associated time entries++ * its hierarchy of child work packages+ operationId: Delete_Work_Package+ summary: Delete Work Package+get:+ parameters:+ - description: Work package id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '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:+ 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'+ schema:+ "$ref": "../components/schemas/work_package_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ tags:+ - Work Packages+ description: ''+ operationId: View_Work_Package+ summary: View Work Package+patch:+ 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+ responses:+ '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:+ 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'+ schema:+ "$ref": "../components/schemas/work_package_model.yml"+ description: OK+ 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 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: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ '409':+ content:+ application/hal+json:+ 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.+ description: Returned if the resource was changed since the client requested+ it. This is determined using the `lockVersion` property.+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: Subject+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: The subject might not be blank.+ description: |-+ Returned if:++ * the client tries to modify 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 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.++ Additionally to the fields the client wants to change, it is mandatory to provide the value of `lockVersion` which was received+ by the `GET` request this change originates from.++ The value of `lockVersion` is used to implement [optimistic locking](http://en.wikipedia.org/wiki/Optimistic_concurrency_control).+ operationId: Edit_Work_Package+ requestBody:+ content:+ application/json:+ schema:+ example:+ _links:+ parent:+ href: "/api/v3/work_packages/42"+ lockVersion: 13+ subject: Lorem+ properties:+ _links:+ properties:+ parent:+ properties:+ href:+ type: string+ type: object+ type: object+ lockVersion:+ type: number+ subject:+ type: string+ type: object+ summary: Edit Work Packagediff --git a/docs/api/apiv3/paths/work_package_activities.yml b/docs/api/apiv3/paths/work_package_activities.ymlnew file mode 100644index 00000000000..b6ec95aa444--- /dev/null+++ b/docs/api/apiv3/paths/work_package_activities.yml@@ -0,0 +1,168 @@+# /api/v3/work_packages/{id}/activities+---+get:+ parameters:+ - description: Work package id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/activity/1"+ user:+ href: "/api/v3/users/1"+ workPackage:+ href: "/api/v3/work_packages/1"+ _type: Activity+ comment:+ format: markdown+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ raw: Lorem ipsum dolor sit amet.+ createdAt: '2014-05-21T08:51:20Z'+ details: []+ id: 1+ version: 1+ - _links:+ self:+ href: "/api/v3/activity/2"+ user:+ href: "/api/v3/users/1"+ workPackage:+ href: "/api/v3/work_packages/1"+ _type: Activity+ comment:+ format: markdown+ html: "<p>Lorem ipsum dolor sit amet.</p>"+ raw: Lorem ipsum dolor sit amet.+ createdAt: '2014-05-21T08:51:22Z'+ details: []+ id: 2+ version: 2+ _links:+ self:+ href: "/api/v3/work_packages/1/revisions"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/work_package_activities_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ tags:+ - Work Packages+ description: ''+ operationId: List_work_package_activities+ summary: List work package activities+post:+ 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+ 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 comment here.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** create journals++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ tags:+ - Work Packages+ description: |-+ Creates an activity for the selected work package and, on success, returns the+ updated activity.+ operationId: Comment_work_package+ requestBody:+ content:+ application/json:+ schema:+ example:+ comment:+ raw: I think this is awesome!+ properties:+ comment:+ properties:+ raw:+ type: string+ type: object+ type: object+ summary: Comment work packagediff --git a/docs/api/apiv3/paths/work_package_attachments.yml b/docs/api/apiv3/paths/work_package_attachments.ymlnew file mode 100644index 00000000000..1dc84cc8b2a--- /dev/null+++ b/docs/api/apiv3/paths/work_package_attachments.yml@@ -0,0 +1,168 @@+# /api/v3/work_packages/{id}/attachments+---+get:+ parameters:+ - description: ID of the work package whose attachments will be listed+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ schema:+ "$ref": "../components/schemas/attachments_by_work_package_model.yml"+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: A client without sufficient permissions shall not be able to test for the existence of a work package.+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ tags:+ - Attachments+ description: ''+ operationId: List_attachments_by_work_package+ summary: List attachments by work package+post:+ parameters:+ - description: ID of the work package to receive the attachment+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _links:+ author:+ href: "/api/v3/users/1"+ container:+ href: "/api/v3/work_packages/1"+ downloadLocation:+ href: "/some/remote/aws/url/image.png"+ self:+ href: "/api/v3/attachments/1"+ staticDownloadLocation:+ href: "/api/v3/attachments/1/download"+ _type: Attachment+ contentType: image/png+ createdAt: '2014-05-21T08:51:20Z'+ description:+ format: plain+ html: "<p>A picture of a cute cat</p>"+ raw: A picture of a cute cat+ digest:+ algorithm: md5+ hash: 64c26a8403cd796ea4cf913cda2ee4a9+ fileName: cat.png+ filesize: 24+ id: 1+ schema:+ "$ref": "../components/schemas/attachment_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidRequestBody+ message: The request could not be parsed as JSON.+ description: |-+ Returned if the client sends a not understandable request. Reasons include:++ * Omitting one of the required parts (metadata and file)++ * sending unparsable JSON in the metadata part+ 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 delete this attachment.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** edit work package or add work package++ *Note that you will only receive this error, if you are at least allowed to see the work package.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: A client without sufficient permissions shall not be able to test for the existence of a work package.+ That's why a 404 is returned here, even if a 403 might be more appropriate.*+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: File is too large (maximum size is 5242880 Bytes).+ description: |-+ Returned if the client tries to send an invalid attachment.+ Reasons are:++ * Omitting the file name (`fileName` property of metadata part)++ * Sending a file that is too large+ headers: {}+ tags:+ - Attachments+ description: |-+ To add an attachment to a work package, a client needs to issue a request of type `multipart/form-data`+ with exactly two parts.++ The first part *must* be called `metadata`. Its content type is expected to be `application/json`,+ the body *must* be a single JSON object, containing at least the `fileName` and optionally the attachments `description`.++ The second part *must* be called `file`, its content type *should* match the mime type of the file.+ The body *must* be the raw content of the file.+ Note that a `filename` must be indicated in the `Content-Disposition` of this part, however it will be ignored.+ Instead the `fileName` inside the JSON of the metadata part will be used.+ operationId: Add_attachment_to_work_package+ summary: Add attachment to work packagediff --git a/docs/api/apiv3/paths/work_package_available_projects.yml b/docs/api/apiv3/paths/work_package_available_projects.ymlnew file mode 100644index 00000000000..4bc57f8b3e7--- /dev/null+++ b/docs/api/apiv3/paths/work_package_available_projects.yml@@ -0,0 +1,118 @@+# /api/v3/work_packages/{id}/available_projects+---+get:+ parameters:+ - description: work package id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ categories:+ href: "/api/v3/projects/6/categories"+ createWorkPackage:+ href: "/api/v3/projects/6/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/6/work_packages"+ method: post+ editWorkPackage:+ href: "/api/v3//work_packages/{work_package_id}/form"+ method: post+ templated: true+ self:+ href: "/api/v3/projects/6"+ title: A project+ versions:+ href: "/api/v3/projects/6/versions"+ _type: Project+ createdAt: '2015-07-06T13:28:14+00:00'+ description: Eveniet molestias omnis quis aut qui eum adipisci.+ Atque aut aut in exercitationem adipisci amet. Nisi asperiores+ quia ratione veritatis enim exercitationem magnam. Aut fuga+ architecto adipisci nihil. Et repellat pariatur. Aliquam et+ sed perferendis nostrum quaerat. Fugit doloremque voluptatem.+ id: 6+ identifier: a_project+ name: A project+ type: Customer Project+ updatedAt: '2015-10-01T09:55:02+00:00'+ - _links:+ categories:+ href: "/api/v3/projects/14/categories"+ createWorkPackage:+ href: "/api/v3/projects/14/work_packages/form"+ method: post+ createWorkPackageImmediate:+ href: "/api/v3/projects/14/work_packages"+ method: post+ self:+ href: "/api/v3/projects/14"+ title: Another project+ versions:+ href: "/api/v3/projects/14/versions"+ _type: Project+ createdAt: '2016-02-29T12:50:20+00:00'+ description: ''+ id: 14+ identifier: another_project+ name: Another project+ type:+ updatedAt: '2016-02-29T12:50:20+00:00'+ _links:+ self:+ href: "/api/v3/work_packages/5/available_projects"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/available_projects_for_work_package_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ 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.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ tags:+ - Work Packages+ description: Gets a list of projects that are available as projects to which the+ work package can be moved.+ operationId: Available_projects_for_work_package+ summary: Available projects for work packagediff --git a/docs/api/apiv3/paths/work_package_available_relation_candidates.yml b/docs/api/apiv3/paths/work_package_available_relation_candidates.ymlnew file mode 100644index 00000000000..df1b8f3e3e4--- /dev/null+++ b/docs/api/apiv3/paths/work_package_available_relation_candidates.yml@@ -0,0 +1,77 @@+# /api/v3/work_packages/{id}/available_relation_candidates+---+get:+ parameters:+ - description: Project id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ - description: Maximum number of candidates to list (default 10)+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ example: '[{ "status_id": { "operator": "o", "values": null } }]'+ in: query+ name: filters+ required: false+ schema:+ type: string+ - description: Shortcut for filtering by ID or subject+ example: '"rollout"'+ in: query+ name: query+ required: false+ schema:+ type: string+ - description: Type of relation to find candidates for (default "relates")+ example: '"follows"'+ in: query+ name: type+ required: false+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/work_packages/1"+ _type: WorkPackage+ id: 1+ subject: Skipped other properties for brevity+ - _links:+ self:+ href: "/api/v3/work_packages/2"+ _type: WorkPackage+ id: 2+ subject: Skipped other properties for brevity+ _links:+ self:+ href: "/api/v3/projects/14/work_packages"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/available_relation_candidates_model.yml"+ description: OK+ headers: {}+ tags:+ - Work Packages+ description: ''+ operationId: Available_relation_candidates+ summary: Available relation candidatesdiff --git a/docs/api/apiv3/paths/work_package_available_watchers.yml b/docs/api/apiv3/paths/work_package_available_watchers.ymlnew file mode 100644index 00000000000..4b909e6af0c--- /dev/null+++ b/docs/api/apiv3/paths/work_package_available_watchers.yml@@ -0,0 +1,110 @@+# /api/v3/work_packages/{id}/available_watchers+---+get:+ parameters:+ - description: work package id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '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+ _type: User+ avatar: https://example.org/users/1/avatar+ createdAt: '2014-05-21T08:51:20Z'+ email: [email protected]+ firstName: John+ id: 1+ lastName: Sheppard+ login: j.sheppard+ 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'+ email: [email protected]+ firstName: Jim+ id: 2+ lastName: Sheppard+ login: j.sheppard2+ status: active+ updatedAt: '2014-05-21T08:51:20Z'+ _links:+ self:+ href: "/api/v3/work_packages/1/available_watchers"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/available_watchers_model.yml"+ description: OK+ headers: {}+ '403':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission+ message: You are not authorized to access this resource.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** add work package watchers++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ tags:+ - Work Packages+ description: Gets a list of users that are able to be watchers of the specified+ work package.+ operationId: Available_watchers+ summary: Available watchersdiff --git a/docs/api/apiv3/paths/work_package_form.yml b/docs/api/apiv3/paths/work_package_form.ymlnew file mode 100644index 00000000000..a9c9fbd6e69--- /dev/null+++ b/docs/api/apiv3/paths/work_package_form.yml@@ -0,0 +1,50 @@+# /api/v3/work_packages/{id}/form+---+post:+ parameters:+ - description: ID of the work package being modified+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ description: OK+ 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 edit the specified 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++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ tags:+ - Work Packages+ description: ''+ operationId: Work_Package_Edit_Form+ summary: Work Package Edit Formdiff --git a/docs/api/apiv3/paths/work_package_relations.yml b/docs/api/apiv3/paths/work_package_relations.ymlnew file mode 100644index 00000000000..dc09aa36970--- /dev/null+++ b/docs/api/apiv3/paths/work_package_relations.yml@@ -0,0 +1,111 @@+# /api/v3/work_packages/{work_package_id}/relations+---+get:+ parameters:+ - description: Work package id+ example: '1'+ in: path+ name: work_package_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: work_package_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 Relationdiff --git a/docs/api/apiv3/paths/work_package_relations_form.yml b/docs/api/apiv3/paths/work_package_relations_form.ymlnew file mode 100644index 00000000000..64634c28756--- /dev/null+++ b/docs/api/apiv3/paths/work_package_relations_form.yml@@ -0,0 +1,134 @@+# /api/v3/work_packages/{id}/relations/form+---+post:+ parameters:+ - description: ID of the relation being modified+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ payload:+ _links:+ from:+ href: "/api/v3/work_packages/4534"+ to:+ href: "/api/v3/work_packages/3857"+ _type: WorkPackage+ delay: 3+ description: let it rest for 3 days+ type: follows+ schema:+ _type: Schema+ delay:+ name: Delay+ type: Integer+ writable: true+ description:+ name: Description+ type: String+ writable: true+ from:+ _links:+ allowedValues:+ - href: "/api/v3/work_packages/{id}"+ name: From work package+ type: WorkPackage+ writable: true+ id:+ name: ID+ type: Integer+ writable: false+ reverseType:+ name: Reverse Type+ type: String+ writable: false+ to:+ _links:+ allowedValues:+ href: "/api/v3/work_packages/{id}/available_relation_candidates"+ title: Available work packages to relate to+ name: To work package+ type: WorkPackage+ writable: true+ type:+ allowedValues:+ - relates+ - duplicates+ - duplicated+ - blocks+ - blocked+ - precedes+ - follows+ - includes+ - partof+ - requires+ - required+ name: Type+ type: String+ writable: true+ validationErrors:+ from:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:BadExampleError+ message: For the purpose of this example we need a validation+ error. The remainder of the response pretends there were no+ errors.+ _links:+ commit:+ href: "/api/v3/relations"+ method: PATCH+ self:+ href: "/api/v3/relations/form"+ validate:+ href: "/api/v3/relations/form"+ method: POST+ _type: Form+ schema:+ "$ref": "../components/schemas/work_package_relation_form_model.yml"+ description: OK+ 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 edit the specified relation.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** manage work package relations++ *Note that you will only receive this error, if you are at least allowed to see the involved work packages.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified relation does not exist.+ description: |-+ Returned if the relation does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view (involved) work package(s), manage work package relations+ headers: {}+ tags:+ - Work Packages+ description: ''+ operationId: Relation_create_form+ summary: Relation create formdiff --git a/docs/api/apiv3/paths/work_package_revisions.yml b/docs/api/apiv3/paths/work_package_revisions.ymlnew file mode 100644index 00000000000..c07f27a7d9e--- /dev/null+++ b/docs/api/apiv3/paths/work_package_revisions.yml@@ -0,0 +1,118 @@+# /api/v3/work_packages/{id}/revisions+---+get:+ parameters:+ - description: work package id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ author:+ href: "/api/v3/users/1"+ title: John Sheppard - j.sheppard+ project:+ href: "/api/v3/projects/1"+ title: A Test Project+ self:+ href: "/api/v3/revisions/13"+ showRevision:+ href: "/projects/identifier/repository/revision/11f4b07"+ _type: Revision+ authorName: John Sheppard+ createdAt: '2015-07-21T13:36:59Z'+ formattedIdentifier: 11f4b07+ id: 13+ identifier: 11f4b07dff4f4ce9548a52b7d002daca7cd63ec6+ message:+ format: plain+ html: "<p>This revision provides new features<br/><br/>An elaborate+ description</p>"+ raw: |-+ This revision provides new features++ An elaborate description+ - _links:+ author:+ href: "/api/v3/users/2"+ title: Jim Sheppard - j.sheppard+ project:+ href: "/api/v3/projects/1"+ title: A Test Project+ self:+ href: "/api/v3/revisions/14"+ showRevision:+ href: "/projects/identifier/repository/revision/029ed72a"+ _type: Revision+ authorName: j1msheppard+ createdAt: '2015-06-30T08:47:00Z'+ formattedIdentifier: '029ed72a'+ id: 13+ identifier: '029ed72a3b7b7c4ab332b1f6eaa6576e7c946059'+ message:+ format: plain+ html: "<p>This revision fixes some stuff<br/><br/>More information+ here</p>"+ raw: |-+ This revision fixes some stuff++ More information here+ _links:+ self:+ href: "/api/v3/work_packages/42/revisions"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/revisions_model.yml"+ description: OK+ 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 see linked revisions for this work+ package.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work packages for the project the work package is contained in.++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified work project 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: {}+ tags:+ - Work Packages+ description: |-+ Gets a list of revisions that are linked to this work package, e.g., because it is referenced in the commit message of the revision.+ Only linked revisions from repositories are shown if the user has the view changesets permission in the defining project.+ operationId: Revisions+ summary: Revisionsdiff --git a/docs/api/apiv3/paths/work_package_watcher.yml b/docs/api/apiv3/paths/work_package_watcher.ymlnew file mode 100644index 00000000000..63baa258d12--- /dev/null+++ b/docs/api/apiv3/paths/work_package_watcher.yml@@ -0,0 +1,68 @@+# /api/v3/work_packages/{work_package_id}/watchers/{id}+---+delete:+ parameters:+ - description: Work package id+ example: '1'+ in: path+ name: work_package_id+ required: true+ schema:+ type: integer+ - description: User id+ example: '1'+ in: path+ name: id+ required: true+ schema:+ type: integer+ responses:+ '204':+ description: No Content+ 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 remove watchers from this work package.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** delete work package watchers++ *Note that you will only receive this error, if you are at least allowed to see the corresponding work package.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified work package does not exist.+ description: |-+ Returned in one of the following cases:++ Either the work package does not exist or the client does not have sufficient permissions to see it.++ **Required permission:** view work package++ Or the specified user does not exist at all.++ *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: {}+ tags:+ - Work Packages+ description: |-+ Removes the specified user from the list of watchers for the given work package.++ If the request succeeds, the specified user is not watching the work package anymore.++ *Note: This might also be the case, if the specified user did not watch the work package prior to the request.*+ operationId: Remove_watcher+ summary: Remove watcherdiff --git a/docs/api/apiv3/paths/work_package_watchers.yml b/docs/api/apiv3/paths/work_package_watchers.ymlnew file mode 100644index 00000000000..c1f2a99928c--- /dev/null+++ b/docs/api/apiv3/paths/work_package_watchers.yml@@ -0,0 +1,222 @@+# /api/v3/work_packages/{work_package_id}/watchers+---+get:+ parameters:+ - description: Work package id+ example: '1'+ in: path+ name: work_package_id+ required: true+ schema:+ type: integer+ responses:+ '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+ schema:+ "$ref": "../components/schemas/watchers_model.yml"+ description: OK+ 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 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: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ tags:+ - Work Packages+ description: ''+ operationId: List_watchers+ summary: List watchers+post:+ parameters:+ - description: Work package id+ example: '1'+ in: path+ name: work_package_id+ required: true+ schema:+ type: integer+ responses:+ '200':+ description: OK+ headers: {}+ '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.++ For example:++ * The request did not contain a single JSON object++ * The JSON object did not contain the key `user`++ * The value of `users` was not a link object+ 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 add watchers to this work package.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permissions:**++ * view work package (for self)++ * 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: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _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: {}+ '422':+ description: |-+ Returned if:++ * the client tries to specify a link to a resource that is not a user (`ResourceTypeMismatch`)++ * the user specified is not allowed to watch that work package (`PropertyConstraintViolation`)++ * the user specified does not exist (`PropertyConstraintViolation`)+ headers: {}+ tags:+ - Work Packages+ description: |-+ Adds a watcher to the specified work package.++ The request is expected to contain a single JSON object, that contains a link object under the `user` key.++ The response will be user added as watcher.+ In case the user was already watching the work package an `HTTP 200` is returned, an+ `HTTP 201` if the user was added as a new watcher.+ operationId: Add_watcher+ requestBody:+ content:+ application/json:+ schema:+ example:+ user:+ href: "/api/v3/users/1"+ properties:+ user:+ properties:+ href:+ type: string+ type: object+ type: object+ summary: Add watcherdiff --git a/docs/api/apiv3/paths/work_packages.yml b/docs/api/apiv3/paths/work_packages.ymlnew file mode 100644index 00000000000..cd6355df67f--- /dev/null+++ b/docs/api/apiv3/paths/work_packages.yml@@ -0,0 +1,404 @@+# /api/v3/work_packages+---+get:+ parameters:+ - description: Page number inside the requested collection.+ example: '25'+ in: query+ name: offset+ required: false+ schema:+ default: 1+ type: integer+ - description: Number of elements to display per page.+ example: '25'+ in: query+ name: pageSize+ required: false+ schema:+ type: integer+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint. If no filter is to be applied, the client should send an empty array (`[]`).+ example: '[{ "type_id": { "operator": "=", "values": [''1'', ''2''] }}]'+ in: query+ name: filters+ required: false+ schema:+ default: '[{ "status_id": { "operator": "o", "values": null }}]'+ type: string+ - description: |-+ JSON specifying sort criteria.+ Accepts the same format as returned by the [queries](#queries) endpoint.+ example: '[["status", "asc"]]'+ in: query+ name: sortBy+ required: false+ schema:+ default: '["id", "asc"]'+ type: string+ - description: The column to group by.+ example: status+ in: query+ name: groupBy+ required: false+ schema:+ type: string+ - description: Indicates whether properties should be summed up if they support+ it.+ example: 'true'+ in: query+ name: showSums+ required: false+ schema:+ default: 'false'+ type: boolean+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/work_packages/1"+ _type: WorkPackage+ id: 1+ subject: Skipped other properties for brevity+ - _links:+ self:+ href: "/api/v3/work_packages/2"+ _type: WorkPackage+ id: 2+ subject: Skipped other properties for brevity+ _links:+ self:+ href: "/api/v3/work_packages"+ _type: Collection+ count: 2+ total: 2+ schema:+ "$ref": "../components/schemas/work_packages_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery+ message: Operator can't be blank.+ description: |-+ Returned if the client sends a query parameter, that the server knows, but does not understand.+ E.g. by providing a syntactically incorrect `filters` parameter.+ 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 see work packages.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** view work packages (globally or in any project)+ headers: {}+ tags:+ - Work Packages+ description: ''+ operationId: List_work_packages+ summary: List work packages+post:+ parameters:+ - 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+ responses:+ '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:+ 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'+ schema:+ "$ref": "../components/schemas/work_package_model.yml"+ description: OK+ 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 add work packages to this project.+ description: |-+ 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.*+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified project does not exist.+ description: |-+ 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.*+ headers: {}+ '422':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ details:+ attribute: Subject+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:PropertyConstraintViolation+ message: The subject might not be blank.+ description: |-+ 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+ 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 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.++ A project link must be set when creating work packages through this route.+ operationId: Create_Work_Package+ requestBody:+ content:+ application/json:+ schema:+ example:+ _links:+ assignee:+ href: "/api/v3/users/8"+ customField32:+ href: "/api/v3/users/3"+ project:+ href: "/api/v3/project/42"+ type:+ href: "/api/v3/type/123"+ customField41: 8+ startDate: '2048-01-03'+ subject: Lorem+ properties:+ _links:+ properties:+ assignee:+ properties:+ href:+ type: string+ type: object+ customField32:+ properties:+ href:+ type: string+ type: object+ project:+ properties:+ href:+ type: string+ type: object+ type:+ properties:+ href:+ type: string+ type: object+ type: object+ customField41:+ type: number+ startDate:+ type: string+ subject:+ type: string+ type: object+ summary: Create Work Packagediff --git a/docs/api/apiv3/paths/work_packages_form.yml b/docs/api/apiv3/paths/work_packages_form.ymlnew file mode 100644index 00000000000..a9c2d354195--- /dev/null+++ b/docs/api/apiv3/paths/work_packages_form.yml@@ -0,0 +1,12 @@+# /api/v3/work_packages/form+---+post:+ responses:+ '200':+ description: OK+ headers: {}+ tags:+ - Work Packages+ description: ''+ operationId: Work_Package_Create_Form+ summary: Work Package Create Formdiff --git a/docs/api/apiv3/paths/work_packages_schemas.yml b/docs/api/apiv3/paths/work_packages_schemas.ymlnew file mode 100644index 00000000000..604c6f02361--- /dev/null+++ b/docs/api/apiv3/paths/work_packages_schemas.yml@@ -0,0 +1,72 @@+# /api/v3/work_packages/schemas/+---+get:+ parameters:+ - description: |-+ JSON specifying filter conditions.+ Accepts the same format as returned by the [queries](#queries) endpoint. Currently supported filters are:++ + id: The schema's id+ example: '[{ "id": { "operator": "=", "values": ["12-1", "14-2"] } }]'+ in: query+ name: filters+ required: true+ schema:+ type: string+ responses:+ '200':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _embedded:+ elements:+ - _links:+ self:+ href: "/api/v3/work_packages/schemas/13-1"+ _type: Schema...+ - _links:+ self:+ href: "/api/v3/work_packages/schemas/7-6"+ _type: Schema...+ _links:+ self:+ href: "/api/v3/work_packages/schemas"+ _type: Collection+ count: 2+ total: 5+ schema:+ "$ref": "../components/schemas/work_package_schemas_model.yml"+ description: OK+ headers: {}+ '400':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery+ message: Unknown filter.+ description: Returned if the client sends invalid request.+ 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 list schemas.+ description: |-+ Returned if the client does not have sufficient permissions.++ **Required permission:** View work packages in any project.+ headers: {}+ tags:+ - Work Packages+ description: List work package schemas.+ operationId: List_Work_Package_Schemas+ summary: List Work Package Schemasdiff --git a/docs/api/apiv3/paths/work_packages_schemas_{identifier}.yml b/docs/api/apiv3/paths/work_packages_schemas_{identifier}.ymlnew file mode 100644index 00000000000..da0c6c7c759--- /dev/null+++ b/docs/api/apiv3/paths/work_packages_schemas_{identifier}.yml@@ -0,0 +1,38 @@+# /api/v3/work_packages/schemas/{identifier}+---+get:+ parameters:+ - description: Identifier of the schema+ example: 12-13+ in: path+ name: identifier+ required: true+ schema:+ type: string+ responses:+ '200':+ description: OK+ headers: {}+ '404':+ content:+ application/hal+json:+ examples:+ response:+ value:+ _type: Error+ errorIdentifier: urn:openproject-org:api:v3:errors:NotFound+ message: The specified schema does not exist.+ description: |-+ Returned if the schema does not exist or the client does not have sufficient permissions+ to see it.++ **Required permission:** view work packages (on the project where this schema is used)++ *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.*+ headers: {}+ tags:+ - Work Packages+ description: ''+ operationId: View_Work_Package_Schema+ summary: View Work Package Schemadiff --git a/docs/api/apiv3/tags/actions_and_capabilities.yml b/docs/api/apiv3/tags/actions_and_capabilities.ymlnew file mode 100644index 00000000000..2e4c5ebfa14--- /dev/null+++ b/docs/api/apiv3/tags/actions_and_capabilities.yml@@ -0,0 +1,72 @@+---+description: |-+ An action is a change one can trigger within the OpenProject instance.+ This could be creating a work package, exporting work packages or updating a user.+ An action can also be something where the user is able to be involved so where the user is in the passive role+ e.g. when being assigned a work package.++ A capability combines an action with a context and a principal. It thus communicates, which principal can carry out+ (or be passively involved) which action within a certain context. E.g. a user might have the capability of creating work packages+ within a project.++ In other words, an action is independent of a principal and context while a capability is+ a relation between an action, the context and the principal.++ The actions are most of the time derived from permissions which can be configured via the administrative UI where an administrator+ selects from a set of permissions to be granted per role. But there are other cases, e.g. in order to become assignee or responsible of a work package, a user has+ to have a role which allows having work packages assigned which is not a permission.++ Even though user might have a capability, it might still not be possible to carry out the action+ because some other requirement is not met.+ E.g. A user might have the capability to update work packages, but if a particular work package is+ in a readonly state, that work package cannot be updated.++ *Only a small set of actions that actually already exist in the system are currently exposed via+ the api. They will be added over time.*++ ## Action++ An action describes what can be carried out within the application. Until an action becomes assigned,+ which turns it into a capability, it remains in the state of "could be".++ ### Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:-------------------:|----------------------------------------- | ------------- | -------------------------------------------------------------- | -------------------- |+ | self | The action | Action | not null | READ |++ ### Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |+ | id | Identifier for the action | String | Not null | READ |+ | name | A human readable name for the action *Not yet implemented* | String | Not null | READ |+ | description | Describes what can be done by principals having that action *Not yet implemented* | String | Not null | READ |+ | modules | Clusters the actions into groups into which they belong logically *Not yet implemented* | []String | Not null | READ |++ ## Capabilities++ Actions can be assigned to a principal by assigning roles to that principal. E.g. a user might receive the 'work_packages/show'+ action by having a role called reader assigned within a project.++ Whenever a principal is assigned an action within a context, the principal has additional capabilities.++ Exactly which actions can be gained by having a role assigned depends on the configuration of that role.+ The configuration is adaptable by admins within the administration of the OpenProject instance.++ ### Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |-------------------- |----------------------------------------- | ------------- | --------------- | -------------------- |+ | self | The capability | | | |+ | action | The action the principal is granted | Action | not null | READ |+ | context | The context the principal has this the action in. This is typically a project or the global context. | Project or null | | READ |+ | principal | The principal being allowed the action. | Action | not null | READ |++ ### Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |+ | id | Identifier for the action | String | Not null | READ |+ | name | A human readable name for the action | String | Not null | READ |+name: Actions & Capabilitiesdiff --git a/docs/api/apiv3/tags/activities.yml b/docs/api/apiv3/tags/activities.ymlnew file mode 100644index 00000000000..f20b1708b96--- /dev/null+++ b/docs/api/apiv3/tags/activities.yml@@ -0,0 +1,14 @@+---+description: |-+ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------: | ------------- | ---- | ----------- | -------------------- |+ | id | Activity id | Integer | x > 0 | READ |+ | version | Activity version | Integer | x > 0 | READ |+ | comment | | Formattable | | READ / WRITE |+ | details | | Array of Formattable | | READ |+ | createdAt | Time of creation | DateTime | | READ |++ Activity can be either _type Activity or _type Activity::Comment.+name: Activitiesdiff --git a/docs/api/apiv3/tags/attachments.yml b/docs/api/apiv3/tags/attachments.ymlnew file mode 100644index 00000000000..aa27ff22d04--- /dev/null+++ b/docs/api/apiv3/tags/attachments.yml@@ -0,0 +1,33 @@+---+description: |-+ Attachments are files that were uploaded to OpenProject. Each attachment belongs to a single+ container (e.g. a work package or a board message).++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|----------------------------------------------------------------------| -------------------------------------------- |+ | delete | Deletes this attachment | **Permission**: edit on attachment container or being the author for attachments without container |++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:----------------:| --------------------------------------------------- | ------------- | ----------- | -------------------- |+ | self | This attachment | Attachment | not null | READ |+ | container | The object (e.g. WorkPackage) housing the attachment| Anything | not null | READ |+ | author | The user who uploaded the attachment | User | not null | READ |+ | downloadLocation | Direct download link to the attachment | - | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ |:------------:| ----------------------------------------------- | ----------- | ----------- | -------------------- |+ | id | Attachment's id | Integer | x > 0 | READ |+ | title | The name of the file | String | not null | READ |+ | fileName | The name of the uploaded file | String | not null | READ |+ | fileSize | The size of the uploaded file in Bytes | Integer | x >= 0 | READ |+ | description | A user provided description of the file | Formattable | not null | READ |+ | contentType | The files MIME-Type as determined by the server | String | not null | READ |+ | digest | A checksum for the files content | Digest | not null | READ |+ | createdAt | Time of creation | DateTime | not null | READ |+name: Attachmentsdiff --git a/docs/api/apiv3/tags/basic_objects.yml b/docs/api/apiv3/tags/basic_objects.ymlnew file mode 100644index 00000000000..1af5e154bda--- /dev/null+++ b/docs/api/apiv3/tags/basic_objects.yml@@ -0,0 +1,244 @@+---+description: |-+ # Links++ Links to other resources in the API are represented uniformly by so called link objects.++ ## Local Properties++ | Property | Description | Type | Required | Nullable | Default |+ |:---------:| ------------------------------------------------------------------------ | ------- |:--------:|:--------:| ----------- |+ | href | URL to the referenced resource (might be relative) | String | ✓ | ✓ | |+ | title | Representative label for the resource | String | | | |+ | templated | If true the `href` contains parts that need to be replaced by the client | Boolean | | | false |+ | method | The HTTP verb to use when requesting the resource | String | | | GET |+ | payload | The payload to send in the request to achieve the desired result | String | | | unspecified |+ | identifier| An optional unique identifier to the link object | String | | | unspecified |++ All link objects *must* contain the `href` property, though it might be `null`. Thus the following is a valid+ link object:++ {+ "href": null+ }++ whereas `{ }` is not a valid link object. The meaning of `"href": null` is that **no** resource is referenced.+ For example a work package without an assignee will still have an assignee link, but its `href` will be `null`.++ If a `title` is present, the client can display the title to the user when referring to the resource.++ Templated links are links that contain client replaceable parts. Replaceable parts are enclosed in braces. For example+ the link `api/v3/example/{id}` is not complete in itself, but the client needs to replace the string `{id}` itself.+ As of now the API does not indicate the valid replacement values.++ The `method` indicates which HTTP verb the client *must* use when following the link for the intended purpose.++ If a `payload` is specified, it needs to be sent as the body of the request to achieve the desired result (e.g. perform the+ action represented by the link). If no `payload` is specified, there is either no payload to send or a valid payload is not specified+ by the link object. A payload might also be templated slightly. If the `templated` property is true, a payload might contain replaceable parts+ in its strings (e.g. `{ "href": "/api/v3/examples/{example_id}" }`).++ Note: When writing links (e.g. during a `PATCH` operation) only changes to `href` are accepted.+ Changes to all other properties will be **silently ignored**.++ For resources invisible to the client (e.g. because of missing permissions), a link will contain+ the uri `urn:openproject-org:api:v3:undisclosed` instead of a url. This indicates the existence of a value+ without revealing the actual value. An example for this is the parent project. A project resource which itself might be+ visible to the client can have a reference to a parent project invisible to the same client. Revealing the existence of+ a parent over hiding has the benefit of allowing the client to make an informed decision of whether to keep the existing reference+ or updating it. Sending ‘{ "href": "urn:openproject-org:api:v3:undisclosed" }` for a resource will have the effect of keeping the+ original value. This is especially beneficial if the client creates and updates resources based on the payload object provided+ as part of a form as is recommended when interacting with the API.++ # Errors++ In case of an error, the API will respond with an appropriate HTTP status code.+ For responses with an HTTP status of `4xx` and `5xx` the body will always contain a single error object.+ Error objects shall give the client additional details about the cause of an erroneous response.++ ## General errors++ * Error objects have their `_type` set to `Error`++ * The `errorIdentifier` serves as a unique (and machine readable) identifier for a specific error cause+ * There *may* be multiple possible error identifiers per HTTP status code+ * There *may* be multiple possible HTTP status codes per error identifier+ * The "List of Error Identifiers" defines the possible mappings between HTTP status and error identifier++ * The `message` contains a human readable concise message describing the error+ * It *optionally* includes specific information, for example which permission would have been needed to perform an action+ * It is localized depending on the users preferences+ * It *must not* include HTML or other kind of markup+ * Error messages form complete sentences including punctuation++ ### Example++ {+ "_type": "Error",+ "errorIdentifier": "urn:openproject-org:api:v3:errors:InternalServerError",+ "message": "An internal server error occurred. This is not your fault."+ }++ ## Embedded error information++ Errors might optionally contain embedded objects that contain further information.++ ### Error details++ Under the embedded key `details` there might be an object describing the error more verbosely. For example if the+ error affects a specific field, this field could be defined there.++ #### Example++ {+ "_type": "Error",+ "errorIdentifier": "urn:openproject-org:api:v3:examples:ExampleError",+ "message": "This is an example error.",+ "_embedded": {+ "details": {+ "_type": "ExampleErrorDetailInformation",+ "erroneousField": "subject"+ }+ }+ }++ ### Multiple error objects++ To ease implementation of basic clients it is guaranteed that the response body always only contains a single error object.+ However it is allowed that an error object *embeds* other error objects under the key `errors`, thereby aggregating them.++ The `errorIdentifier` of such an object is always `urn:openproject-org:api:v3:errors:MultipleErrors`. The message can either describe one of the+ embedded errors or simply state that multiple errors occurred.++ #### Example++ {+ "_type": "Error",+ "errorIdentifier": "urn:openproject-org:api:v3:errors:MultipleErrors",+ "message": "Multiple fields violated their constraints.",+ "_embedded": {+ "errors": [+ {+ "_type": "Error",+ "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",+ "...": "..."+ },+ {+ "_type": "Error",+ "errorIdentifier": "urn:openproject-org:api:v3:errors:PropertyConstraintViolation",+ "...": "..."+ }+ ]+ }+ }++ ## List of Error Identifiers++ * `urn:openproject-org:api:v3:errors:InvalidQuery` (**HTTP 400**) - The query contained a value that did not match the servers expectation++ * `urn:openproject-org:api:v3:errors:InvalidRequestBody` (**HTTP 400**) - The format of the request body did not match the servers expectation++ * `urn:openproject-org:api:v3:errors:InvalidRenderContext` (**HTTP 400**) - The client specified a rendering context that does not exist++ * `urn:openproject-org:api:v3:errors:InvalidUserStatusTransition` (**HTTP 400**) - The client used an invalid transition in the attempt to change the status of a user account.++ * `urn:openproject-org:api:v3:errors:Unauthenticated` (**HTTP 401**) - The client has to authenticate to access the requested resource.++ * `urn:openproject-org:api:v3:errors:MissingPermission` (**HTTP 403**) - The client does not have the needed permissions to perform the requested action++ * `urn:openproject-org:api:v3:errors:NotFound` (**HTTP 404**) - Default for HTTP 404 when no further information is available++ * `urn:openproject-org:api:v3:errors:UpdateConflict` (**HTTP 409**) - The resource changed between GET-ing it and performing an update on it++ * `urn:openproject-org:api:v3:errors:TypeNotSupported` (**HTTP 415**) - The request contained data in an unsupported media type (Content-Type)++ * `urn:openproject-org:api:v3:errors:PropertyIsReadOnly` (**HTTP 422**) - The client tried to set or change a property that is not writable++ * `urn:openproject-org:api:v3:errors:PropertyConstraintViolation` (**HTTP 422**) - The client tried to set a property to an invalid value++ * `urn:openproject-org:api:v3:errors:PropertyValueNotAvailableAnymore` (**HTTP 422**) - An unchanged property needs to be changed, because other changes to the resource make it unavailable++ * `urn:openproject-org:api:v3:errors:ResourceTypeMismatch` (**HTTP 422**) - A link to a resource of a specific type was expected, but the link to another type of resource was provided++ * `urn:openproject-org:api:v3:errors:PropertyFormatError` (**HTTP 422**) - A property value was provided in a format that the server does not understand or accept++ * `urn:openproject-org:api:v3:errors:InternalServerError` (**HTTP 500**) - Default for HTTP 500 when no further information is available++ * `urn:openproject-org:api:v3:errors:MultipleErrors` - Multiple errors occurred. See the embedded `errors` array for more details.++ # Formattable Text++ OpenProject supports text formatting in Markdown. Properties that contain formattable text have a special representation in this API. In this specification their+ type is indicated as `Formattable`. Their representation contains the following properties:++ | Property | Description | Type | Example | Supported operations |+ |:--------:| -------------------------------------------------- | ------ | ---------------------------------- | -------------------- |+ | format | Indicates the formatting language of the raw text | String | markdown | READ |+ | raw | The raw text, as entered by the user | String | `I **am** formatted!` | READ / WRITE |+ | html | The text converted to HTML according to the format | String | `I <strong>am</strong> formatted!` | READ |++ `format` can as of today have one of the following values:++ * `plain` - only basic formatting, e.g. inserting paragraphs and line breaks into HTML++ * `markdown` - formatting using Markdown++ * `custom` - There is no apparent formatting rule that transforms the raw version to HTML (only used for read only properties)++ Note that `raw` is the only property supporting the **write** operation. A property of type *Formattable* that+ is marked as **read and write**, will only accept changes to the `raw` property. Changes to `format` and `html` will be **silently ignored**.+ It is thus sufficient to solely provide the `raw` property for changes.++ If the *Formattable* is marked as **read only**, the `raw` attribute also becomes **read only**.++ #### Example++ {+ "format": "markdown",+ "raw": "I **am** formatted!",+ "html": "I <strong>am</strong> formatted!"+ }++ # Dates, Times and Durations++ Representation of time related values in this API is done according to [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601).+ In this specification the following terms will be used as type specifiers (e.g. in tables):++ * `Date` - refers to an ISO 8601 date, e.g. "2014-05-21"++ * `DateTime` - refers to an ISO 8601 combined date and time, e.g. "2014-05-21T13:37:00Z"++ * `Duration` - refers to an ISO 8601 duration, e.g. "P1DT18H"++ # Colors++ Colors are represented in RGB using hexadecimal notation as specified in [CSS Color Module Level 3](http://www.w3.org/TR/css3-color/).+ That is a `#` followed by either three or six hexadecimal digits.++ #### Examples++ red: #ff0000 or #f00+ green: #00ff00 or #0f0+ black: #000000 or #000+ white: #ffffff or #fff++ # Digests++ Digests (or Hashes) are one way functions that map data of arbitrary size to data of a fixed size.+ In OpenProject they are for example used to calculate checksums for (attachment) files.+ The checksum calculated depends on the hashed data and the algorithm used as hash function.++ Therefore all digests are represented in the following form:++ | Property | Description | Type | Example |+ |:---------:| -------------------------------------------------- | ------ | ---------------------------------- |+ | algorithm | The algorithm used to compute the digest | String | md5 |+ | hash | The calculated digest in hexadecimal notation | String | 64c26a8403cd796ea4cf913cda2ee4a9 |++ #### Example++ {+ "algorithm": "md5",+ "hash": "64c26a8403cd796ea4cf913cda2ee4a9"+ }+name: Basic Objectsdiff --git a/docs/api/apiv3/tags/budgets.yml b/docs/api/apiv3/tags/budgets.ymlnew file mode 100644index 00000000000..8a47a1c2b30--- /dev/null+++ b/docs/api/apiv3/tags/budgets.yml@@ -0,0 +1,17 @@+---+description: |-+ *Note: Budgets are currently only implemented as a stub. Further properties of budgets might be added at a future date, however they will require the view budget permission to be displayed.*++ ## Linked Properties:++ | Link | Description | Type | Constraints | Supported operations |+ |:---------:|-------------------------------------------- | ------------- | --------------------- | -------------------- |+ | self | This budget | Budget | not null | READ |++ ## Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :---------: | ------------------------------------------- | ----------- | ----------- | -------------------- | --------------------------- |+ | id | Budget id | Integer | x > 0 | READ | |+ | subject | Budget name | String | not empty | READ | |+name: Budgetsdiff --git a/docs/api/apiv3/tags/categories.yml b/docs/api/apiv3/tags/categories.ymlnew file mode 100644index 00000000000..c9a69e79e18--- /dev/null+++ b/docs/api/apiv3/tags/categories.yml@@ -0,0 +1,17 @@+---+description: |-+ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:---------------:| --------------------------------------------------- | ------------- | ----------- | -------------------- |+ | self | This category | Category | not null | READ |+ | project | The project of this category | Project | not null | READ |+ | defaultAssignee | Default assignee for work packages of this category | User | | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------: | ------------- | ------- | ----------- | -------------------- |+ | id | Category id | Integer | x > 0 | READ |+ | name | Category name | String | | READ |+name: Categoriesdiff --git a/docs/api/apiv3/tags/collections.yml b/docs/api/apiv3/tags/collections.ymlnew file mode 100644index 00000000000..b95fada0af3--- /dev/null+++ b/docs/api/apiv3/tags/collections.yml@@ -0,0 +1,45 @@+---+description: |-+ Whenever a client calls a resource that can return more than one element, it will receive a collection of elements.+ However as collections can become quite large, the API will **not** simply return a JSON array, but a special collection+ object that will contain the actual elements in its embedded property `elements`.++ Collections *may* be paginated, this means that a single response from the server will not contain all elements of the collection,+ but only a subset. In this case the client can issue further requests to retrieve the remaining elements.+ There are two ways to access the result pages of a paginated collection:++ * offset based pagination++ * cursor based pagination++ The available ways of pagination depend on the collection queried. Some collections feature no pagination at all, meaning they+ will always return all elements. Others might only offer one of the two pagination methods or both of them.+ An explanation of [offset](#collections-offset-based-pagination) and [cursor](#collections-cursor-based-pagination) based+ pagination can be found below the links table.++ A collection also carries meta information like the total count of elements in the collection or - in case of a paginated collection -+ the amount of elements returned in this response and action links to retrieve the remaining elements.++ ## Local Properties++ | Property | Description | Type | Availability |+ |:--------:| --------------------------------------------------------------- | ------- | --------------------------- |+ | total | The total amount of elements available in the collection | Integer | always |+ | pageSize | Amount of elements that a response will hold | Integer | when paginated |+ | count | Actual amount of elements in this response | Integer | always |+ | offset | The page number that is requested from paginated collection | Integer | when offset based available |+ | groups | Summarized information about aggregation groups | Object | when grouping |+ | totalSums| Aggregations of supported values for elements of the collection | Object | when showing sums |++ ## Links++ | Link | Description | Availability |+ |:----------------:| ------------------------------------------------------------------------ | --------------------------- |+ | self | Link to the current page in the collection | always |+ | changeSize | Templated link to change the page size, might change relative position | when paginated |+ | jumpTo | Templated link to jump to a specified offset | when offset based available |+ | nextByOffset | Link to retrieve the following page of elements (offset based) | when offset based available |+ | previousByOffset | Link to retrieve the preceding page of elements (offset based) | when offset based available |+ | nextByCursor | Link to retrieve the elements following the current page (cursor based) | when cursor based available |+ | previousByCursor | Link to retrieve the elements preceding the current page (cursor based) | when cursor based available |+name: Collectionsdiff --git a/docs/api/apiv3/tags/configuration.yml b/docs/api/apiv3/tags/configuration.ymlnew file mode 100644index 00000000000..44cc7cb00f2--- /dev/null+++ b/docs/api/apiv3/tags/configuration.yml@@ -0,0 +1,22 @@+---+description: |-+ The configuration endpoint allows to read certain configuration parameters of the OpenProject instance.+ Note that there is no 1:1 relationship between this endpoint and the settings you can find in your settings.yml.++ For now this endpoint will only allow access to settings deemed useful for a client to know in general.++ As clients might rely on the combination of both, the system settings as well as the current user's preferences, the resource+ embeds the current user's preferences so client can fetch both with one request.++ | Link | Description | Type | Nullable | Supported operations |+ |:-------------------:| ------------------------------------------------ | ------------- | -------- | -------------------- |+ | self | The configuration | Configuration | | READ |+ | userPreferences | The preferences of the current user | UserPreferences | | READ |++ ## Local Properties++ | Property | Description | Type | Condition | Supported operations |+ | :-----------------------: | -------------------------------------------------- | ---------- | --------------------------------- | -------------------- |+ | maximumAttachmentFileSize | The maximum allowed size of an attachment in Bytes | Integer | | READ |+ | perPageOptions | Page size steps to be offered in paginated list UI | Integer[] | | READ |+name: Configurationdiff --git a/docs/api/apiv3/tags/custom_actions.yml b/docs/api/apiv3/tags/custom_actions.ymlnew file mode 100644index 00000000000..29fed068202--- /dev/null+++ b/docs/api/apiv3/tags/custom_actions.yml@@ -0,0 +1,26 @@+---+description: |-+ Custom actions are a preconfigured set of changes that are applied to a work package.++ Currently, this resource is a stub. The conditions and changes defined for the custom action are not yet present in the resource.++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|----------------------------------------------------------------------| --------------------------------------- |+ | executeImmediately | Apply the action to a work package |++ ## Linked Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |+ | self | This custom action | CustomAction | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | ------------ | -------------------- |+ | id | Custom action id | Integer | x > 0 | READ |+ | name | The user selected name of the custom action | String | | READ |+ | description | A text describing the custom action | String | | READ |+name: Custom actionsdiff --git a/docs/api/apiv3/tags/custom_objects.yml b/docs/api/apiv3/tags/custom_objects.ymlnew file mode 100644index 00000000000..3c12391c5b3--- /dev/null+++ b/docs/api/apiv3/tags/custom_objects.yml@@ -0,0 +1,17 @@+---+description: |-+ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:-------------:|-------------------------- | ------------- | ----------- | -------------------- |+ | self | This custom object | CustomObject | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ |:----------------:| ---------------------------------------------- | -------- | ----------- | -------------------- |+ | id | The identifier | Integer | | READ |+ | value | The value defined for this custom object | String | | READ |++ Custom objects are options of list custom fields.+name: Custom Objectsdiff --git a/docs/api/apiv3/tags/documents.yml b/docs/api/apiv3/tags/documents.ymlnew file mode 100644index 00000000000..971203d4ba2--- /dev/null+++ b/docs/api/apiv3/tags/documents.yml@@ -0,0 +1,27 @@+---+description: |-+ A document is a file containing a list of attachments.++ *Please note, that the endpoint is only a stub for now.*++ ## Actions++ None yet++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations | Condition |+ | :-----------: | ------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |+ | self | This document | Document | not null | READ | |+ | project | The project the document is in | Project | not null | READ / WRITE | |+ | attachments | The attachments belonging to the document | []Attachment | not null | READ / WRITE | |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |+ | id | Document's id | Integer | x > 0 | READ | |+ | title | The title chosen for the collection of documents | String | max 60 characters | READ | |+ | description | A text describing the documents | String | | READ | |+ | createdAt | The time the document was created at | DateTime | | READ | |+name: Documentsdiff --git a/docs/api/apiv3/tags/filters.yml b/docs/api/apiv3/tags/filters.ymlnew file mode 100644index 00000000000..cf0e741c10c--- /dev/null+++ b/docs/api/apiv3/tags/filters.yml@@ -0,0 +1,121 @@+---+description: |-+ Filter objects can be added to a number of endpoints in the OpenProject APIv3. With them, you can create powerful queries to endpoints to return the data that you want.++ They all share the following basic properties:++ - They consist of three items: A property to filter or a specific filter name, one or more values, and a filter operator that defines what query to produce with the given values++ - You can combine any number of distinct filters can be added to the endpoint definitions in this API documentation++ - A combination of filter objects are treated as an AND filter. OR filters are not yet possible in a single query, but this feature is tracked in https://community.openproject.com/wp/26837++ ## Filter syntax++ The filter syntax is a JSON object that can be passed as a GET parameter to the endpoints as an URL-encoded JSON string looks like the following:++ ```+ [+ { "<filter name>": { "operator": "<operator>", "values": [<value>, ...] },+ ...+ ]+ ```++ **Example**++ Filtering the work packages API endpoint for a work package that matches the subject or ID "12" and has a status with the ID=5.++ ```+ [+ { "subjectOrId": { "operator": "**", values: ["12"] } },+ { "status": { "operator": "=", values: ["5"] } }+ ]+ ```++ With the above JSON stringified and URL-encoded, this can be added to the `/api/v3/work_packages` endpoint using the `filter` parameter to form the URL:++ ```+ https://community.openproject.com/api/v3/work_packages?filters=%5B%7B%22subjectOrId%22:%7B%22operator%22:%22**%22,%22values%22:%5B%2212%22%5D%7D%7D,%7B%22status%22:%7B%22operator%22:%22=%22,%22values%22:%5B%225%22%5D%7D%7D%5D+ ```++ ## Compression++ As the above can become quite long, especially if a lot of filter values are included, the API offers to wrap all query props into a zlib compressed and base64 encoded property (`eprops`).+ The property will then not only include the filter but the complete query props set (e.g. `pageSize`, `offset` and `columns`. So `eprops` is then a JSON object that is compressed and encoded.++ **Example**++ Instead of the request++ ```+ https://community.openproject.com/api/v3/work_packages?filters=[%7B%22subjectOrId%22:%7B%22operator%22:%22**%22,%22values%22:[%2212%22]%7D%7D,%7B%22status%22:%7B%22operator%22:%22=%22,%22values%22:[%225%22]%7D%7D]&pageSize=10&sortBy=[[%22id%22,%20%22asc%22]]+ ```++ Which in a non URL encoded style would be++ ```+ https://community.openproject.com/api/v3/work_packages?filters=[{"subjectOrId":{"operator":"**","values":["12"]}},{"status":{"operator":"=","values":["5"]}}]&pageSize=10&sortBy=[["id", "asc"]]+ ```++ All of the props can be put inside a json object++ ```+ {+ "filters": "[{\"subjectOrId\":{\"operator\":\"**\",\"values\":[\"12\"]}},{\"status\":{\"operator\":\"=\",\"values\":[\"5\"]}}]",+ "sortBy": "[[\"id\",\"asc\"]]",+ "pageSize": 10+ }+ ```++ Please note, that all objects that have to be json (e.g `filters`) will be double encoded.++ That json object can then be compressed and encoded and the result sent over as the combined `eprops` parameter:++ ```+ https://community.openproject.com/api/v3/work_packages?eprops=eJxtjTELwjAUhP%2FLjSWDFVwCLt2cHBz7OsT2VSKFlLwXQUv%2Bu0lXHe%2B7%2B7gN%0As1%2BUo8Ci3wiS7k8e9RovE8EWEFaOTkMsidA0BEN4uSWxFNIT2iNhyNlUV50m%0A%2BaOdf6zTLg0wkBC1e9f3gv20L52Mpa%2Ft6h588x%2BGbQ%2F5C12YN%2BM%3D%0A+ ```++ ## Available filters++ The availability of filters depend on the endpoint you're querying and will be listed in each endpoint definition. For work packages, you can also [start using filters in the work packages module](https://community.openproject.com/projects/openproject/work_packages) to build your query and then simply copy the URL from your browser to get the resulting filter values and their operators.++ ## Available operators++ The following table is a list of all available operators. Not all endpoints and parameters support all values, but this list serves as a lookup table for identifying and using the operators. When building a filter object, you use the **symbol** listed below.++ | Symbol | Description of filtered properties | Values array contains |+ | ------ | ------------------------------------------------------------ | -------------------------- |+ | `=` | are equal to one of the given value(s) | At least one typed value |+ | `!` | are not equal one of the given value(s) | At least one typed value |+ | `>=` | are greater or equal than the given value | One numerical value |+ | `<=` | are lesser or equal than the given value | One numerical value |+ | `t-` | are the given number of days in the past | 1 integer (days) |+ | `t+` | are the given number of days in the future | 1 integer (days) |+ | `<t+` | are *less than* the given number of days in the future | 1 integer (days) |+ | `>t+` | are *more than* the given number of days in the future | 1 integer (days) |+ | `>t-` | are *less than* the given number of days in the past | 1 integer (days) |+ | `<t-` | are *more than* the given number of days in the past | 1 integer (days) |+ | `*` | are not NULL | *nothing, values is empty* |+ | `!*` | are NULL | *nothing, values is empty* |+ | `**` | searches the given string in all string-based attributes | One string value |+ | `=d` | are on the given date | 1 ISO8601 date/datetime |+ | `<>d` | are between the two given dates. | 2 ISO8601 date/datetimes |+ | `w` | are in this week | *nothing, values is empty* |+ | `t` | are today | *nothing, values is empty* |+ | `~` | are containing the given words (SQL LIKE) in that order | At least one string value |+ | `!~` | are *not* containing the given words (SQL LIKE) in that order | At least one string value |++ ++ **Special operators for work packages**++ There are some additional operators only in use for work packages:++ | Symbol | Description of filtered properties | Values array contains |+ | ------ | ------------------------------------------ | -------------------------- |+ | `o` | the status of the work package is *open* | *nothing, values is empty* |+ | `c` | the status of the work package is *closed* | *nothing, values is empty* |+ | `ow` | the work packages have a manual sort order | *nothing, values is empty* |++ There are also relation filters for work packages that have the symbols `blocks/blocked` `children/parent` `follows/precedes` `duplicates/duplicated` `partof/includes` `relates` `requires/required` depending on the direction of the relation and take as value the work package ID that is the target node of the relation.+name: Filtersdiff --git a/docs/api/apiv3/tags/forms.yml b/docs/api/apiv3/tags/forms.ymlnew file mode 100644index 00000000000..ce75d74ead4--- /dev/null+++ b/docs/api/apiv3/tags/forms.yml@@ -0,0 +1,88 @@+---+description: |-+ This API provides forms as a concept to aid in editing or creating resources. The goal of forms is to:++ * make writable properties of a resource discoverable++ * show to which values a property can be set++ * validate changes to a resource and indicate validation errors++ These benefits aside, a client can freely choose to immediately edit a resource without prior validation by a form.+ In the case of an invalid request the edit will fail and return appropriate errors nevertheless.++ A form is associated to a single resource and aids in performing changes on that resource.+ When posting to a form endpoint with an empty request body or an empty JSON object,+ you will receive an initial form for the associated resource.+ Subsequent calls to the form should contain a single JSON object as described by the form.++ ## Actions++ | Link | Description | Condition |+ |:-------------------:| --------------------------------------------------------------------- | -------------------------------- |+ | validate | Validate changes, show errors and allowed values for changed resource | |+ | commit | Actually perform changes to the resource | form content is valid |+ | previewMarkup | Post markup (e.g. markdown) here to receive an HTML-rendered response | |++ ## Linked Properties++ | Link | Description | Type | Nullable | Supported operations |+ |:-------------------:| ------------------------------------------------ | ------------- | -------- | -------------------- |+ | self | This form | Form | | READ |++ ## Embedded Properties:++ Apart from the linked properties, forms contain always three other embedded properties:++ * `payload`++ * `schema`++ * `validationErrors`++ Their purpose is explained below.++ ### Payload++ The payload contains an edited version of the resource that will be modified when committing the form.+ This representation contains all writable properties of the resource and reflects all changes that the latest call to **validate** included,+ thereby acting as a preview for the changes.++ In case the client tries to set the value to something invalid, the invalid change is also reflected here. However a validation error (see below)+ indicates that a commit of this payload would fail.++ It might happen that setting one property affects the allowed values for another property. Thus by changing a property A+ the current value of another property B might become invalid. If the client did not yet touch the value of B, the payload will+ contain a default value for that property. Nevertheless the client will also receive an appropriate validation error for value B.++ The content of this element *can* be used as a template for the request body of a call to **validate** or **commit**.++ A call to **validate** and **commit** does not need to include all properties that were defined in the `payload` section.+ It is only necessary to include the properties that you want to change, as well as the `lockVersion` if one is present.+ However you *may* include all the properties sent in the `payload` section.++ ### Schema++ The schema embedded in a form is a normal [schema describing the underlying resource](#schema).+ However, the embedded schema can change with each revalidation of the form.+ For example it might be possible, that changing the type of a work package affects its available properties,+ as well as possible values for certain properties.+ As this makes the embedded schema very dynamic, it is not included as a static link.++ ### Validation Errors++ Like a [schema](#schema) the validation errors build a dictionary where the key is a property name.+ Each value is an error object that indicates the error that occurred validating the corresponding property.+ There are only key value pairs for properties that failed validation, the element is empty if all validations succeeded.++ However note that even in the case of validation errors, the response you receive from the form endpoint will be an HTTP 200.+ That is because the main purpose of a form is helping the client to sort out validation errors.++ ### Meta object++ Form resources may have an additional `_meta` object that contains parameters to be sent together with the resource,+ but that do not belong to the resource itself. For example, parameters on if and how to send notifications for the action+ performed with the API request can be sent.++ Each individual endpoint will describe their meta properties, if available.+name: Formsdiff --git a/docs/api/apiv3/tags/grids.yml b/docs/api/apiv3/tags/grids.ymlnew file mode 100644index 00000000000..43f4acb3e4a--- /dev/null+++ b/docs/api/apiv3/tags/grids.yml@@ -0,0 +1,50 @@+---+description: |-+ A grid is a layout for a page or a part of the page of the OpenProject application. It defines the structure (number of rows and number of columns) as well as the contents of the page.++ The contents is defined by `GridWidget`s. While a `GridWidget` is it's own type, it is not a resource in it's own right as it is an intrinsic part of a `Grid`.++ Depending on what page a grid is defined for, different widgets may be eligible to be placed on the grid. The page might also define the permissions needed for accessing, creating or modifying the grid.++ Currently, the following pages employ grids:++ + /my/page: The my page every user has. Only a user can access or modify their "my page".++ *The delete action is not yet supported*++ ## Actions++ | Link | Description | Condition |+ |:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- |+ | updateImmediately | Directly perform edits on this grid | **Permission**: depends on the page the grid is defined for |+ | update | Validate edits on the grid via a form resource before committing | **Permission**: depends on the page the grid is defined for |++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations | Condition |+ | :-----------: | -------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |+ | self | This grid | Grid | not null | READ | |+ | page | The url of the page the grid is defined for | url | not null | READ / WRITE | The page cannot be changed after the creation |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | -------------- |+ | id | Grid's id | Integer | x > 0 | READ | |+ | rowCount | The number of rows the grid has | Integer | x > 0 | READ/WRITE | |+ | columnCount | The number of columns the grid has | Integer | x > 0 | READ/WRITE | |+ | widgets | The set of `GridWidget`s selected for the grid | []GridWidget | | READ/WRITE | The widgets cannot overlap |+ | createdAt | The time the grid was created | DateTime | | READ | |+ | updatedAt | The time the grid was last updated | DateTime | | READ | |++ ## GridWidget Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | -------------- |+ | identifier | The kind of widget | String | not null | READ/WRITE | |+ | startRow | The row the widget starts at (1 based) | Integer | x > 0, x < rowCount of the grid, x < endRow | READ/WRITE | |+ | endRow | The row the widget ends. The widget's area does not include the row itself. | Integer | x > 0, x <= rowCount of the grid, x > startRow | READ/WRITE | |+ | startColumn | The column the widget starts at (1 based) | Integer | x > 0, x < columnCount of the grid, x < endColumn | READ/WRITE | |+ | endColumn | The column the widget ends. The widget's area does not include the column itself. | Integer | x > 0, x <= columnCount of the grid, x > startColumn | READ/WRITE | |+ | options | An options hash of values customizable by the widget | JSON | | READ/WRITE | |+name: Gridsdiff --git a/docs/api/apiv3/tags/groups.yml b/docs/api/apiv3/tags/groups.ymlnew file mode 100644index 00000000000..08755361778--- /dev/null+++ b/docs/api/apiv3/tags/groups.yml@@ -0,0 +1,33 @@+---+description: |-+ Groups are collections of users. They support assigning/unassigning multiple users to/from a project in one operation.++ This resource does not yet have the form and schema endpoints. But as all properties are static, clients should still be able+ to work with this resource.++ ## Actions++ ## Actions++ | Link | Description | Condition |+ |:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- |+ | delete | Deletes the group. | **Permission**: Administrator |+ | updateImmediately | Updates the group's attributes. | **Permission**: Administrator |++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations | Condition |+ |:-----------: |-------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |+ | self | This group | Group | not null | READ | |+ | memberships | Link to collection of all the group's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions. | MemberCollection | | READ | **Permission**: view members or manage members in any project |+ | members | The list all all the users that are members of the group | UserCollection | | READ/WRITE | **Permission**: manage members in any project to read & admin to write |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |+ | id | Group's id | Integer | x > 0 | READ | |+ | name | Group's full name, formatting depends on instance settings | String | | READ/WRITE | Admin to write |+ | createdAt | Time of creation | DateTime | | READ | Only visible by admins |+ | updatedAt | Time of the most recent change to the user | DateTime | | READ | Only visible by admins |+name: Groupsdiff --git a/docs/api/apiv3/tags/help_texts.yml b/docs/api/apiv3/tags/help_texts.ymlnew file mode 100644index 00000000000..2a6592a372e--- /dev/null+++ b/docs/api/apiv3/tags/help_texts.yml@@ -0,0 +1,18 @@+---+description: |-+ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:-------------:|-------------------------- | ------------- | ----------- | -------------------- |+ | self | This help text | HelpText | not null | READ |+ | editText | Edit the help text entry | text/htm | Admin | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------: | --------------------------- | -------------------- | ----------- | -------------------- |+ | id | Help text id | Integer | x > 0 | READ |+ | attribute | Attribute name | String | | READ |+ | attributeCaption | Attribute caption | String | | READ |+ | helpText | Help text content | Formattable | | READ |+name: Help textsdiff --git a/docs/api/apiv3/tags/memberships.yml b/docs/api/apiv3/tags/memberships.ymlnew file mode 100644index 00000000000..9f3f9113070--- /dev/null+++ b/docs/api/apiv3/tags/memberships.yml@@ -0,0 +1,31 @@+---+description: |-+ Users and groups can become members of a project. Such a membership will also have one or more roles assigned to it. By that, memberships control the permissions a user has within a project.++ There are also memberships that do not govern the permissions within a certain project but rather govern global permissions. Among the permissions that can be granted like this are the permissions to "Create project" and "Manage users". Those memberships do not have a project associated.++ When creating and updating memberships, a custom message can be sent to users of new and updated memberships. This message can be provided within the `_meta` group.++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:-------------------:|----------------------------------------- | ------------- | -------------------------------------------------------------- | -------------------- |+ | self | This membership | Membership | not null | READ |+ | project | The project for which the membership is granted | Project | | READ |+ | roles | The list of roles the user or group is granted in the project | RoleCollection | not null | READ |+ | principal | The user or group that was granted membership | User or Group | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |+ | id | Membership id | Integer | x > 0 | READ |+ | createdAt | Time of creation | DateTime | not null | READ |+ | updatedAt | Time of latest update | DateTime | not null | READ |++ ## Meta parameters++ | Meta property | Description | Type | Constraints | Supported operations |Condition |+ | :------------------------: | --------------------------------------------------- | ---- | ----------- | -------------------- |----------|+ | notificationMessage | The message included in the email(s) send to the users of new or updated memberships | Formattable | | READ/WRITE | |+name: Membershipsdiff --git a/docs/api/apiv3/tags/news.yml b/docs/api/apiv3/tags/news.ymlnew file mode 100644index 00000000000..685dc800abf--- /dev/null+++ b/docs/api/apiv3/tags/news.yml@@ -0,0 +1,26 @@+---+description: |-+ News are articles written by users in order to inform other users of important information.++ ## Actions++ None yet++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations | Condition |+ | :-----------: | -------------------------------------| ------------- | --------------------- | -------------------- | ----------------------------------------- |+ | self | This news | News | not null | READ | |+ | project | The project the news is situated in | Project | not null | READ / WRITE | |+ | author | The user having created the news | User | not null | READ | |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |+ | id | News' id | Integer | x > 0 | READ | |+ | title | The headline of the news | String | max 60 characters | READ | |+ | summary | A short summary | String | max 255 characters | READ | |+ | description | The main body of the news with all the details | String | | READ | |+ | createdAt | The time the news was created at | DateTime | | READ | |+name: Newsdiff --git a/docs/api/apiv3/tags/posts.yml b/docs/api/apiv3/tags/posts.ymlnew file mode 100644index 00000000000..de920ee7ac1--- /dev/null+++ b/docs/api/apiv3/tags/posts.yml@@ -0,0 +1,27 @@+---+description: |-+ Represents a post in a board. Posts are also referred to as messages in the application.++ *This resource is currently a stub*++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|--------------------------------| --------------------------------------- |+ | addAttachment | Attach a file to the post | **Permission**: edit messages |++ ## Linked Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------- | -------------------- |+ | self | This post | Post | not null | READ |+ | attachments | The files attached to this post | Collection | | READ |+ | project | The project the post belongs to | Project | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------- | ----------- | ------------------------------------ | -------------------- |+ | id | Identifier of this post | Integer | x > 0 | READ |+ | subject | The post's subject | String | not null | READ |+name: Postsdiff --git a/docs/api/apiv3/tags/previewing.yml b/docs/api/apiv3/tags/previewing.ymlnew file mode 100644index 00000000000..bb6a1f80d5c--- /dev/null+++ b/docs/api/apiv3/tags/previewing.yml@@ -0,0 +1,9 @@+---+description: |-+ Throughout OpenProject user input for many properties can be formatted using *Markdown*.+ Using the appropriate rendering endpoint it is possible to render custom formatted inputs into HTML and thus+ receive a preview of the rendered text.++ The request to a rendering endpoint must always have a MIME-Type of `text/plain`.+ The request body is the actual string that shall be rendered as HTML string.+name: Previewingdiff --git a/docs/api/apiv3/tags/principals.yml b/docs/api/apiv3/tags/principals.ymlnew file mode 100644index 00000000000..2007b0fe7aa--- /dev/null+++ b/docs/api/apiv3/tags/principals.yml@@ -0,0 +1,13 @@+---+description: |-+ Principals are the superclass of users, groups and placeholder users. This end point returns all principals+ within a joined collection but can be filtered to e.g. only return groups or users.++ ## Linked Properties++ See [user](#users) and [group](#groups)++ ## Local Properties++ See [user](#users) and [group](#groups) and placeholder users (TDB)+name: Principalsdiff --git a/docs/api/apiv3/tags/priorities.yml b/docs/api/apiv3/tags/priorities.ymlnew file mode 100644index 00000000000..7004adda68f--- /dev/null+++ b/docs/api/apiv3/tags/priorities.yml@@ -0,0 +1,18 @@+---+description: |-+ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:---------:|-------------------------------------------- | ------------- | --------------------- | -------------------- |+ | self | This priority | Priority | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------: | ------------------------------------------- | ---------- | ----------- | -------------------- |+ | id | Priority id | Integer | x > 0 | READ |+ | name | Priority name | String | not empty | READ |+ | position | Sort index of the priority | Integer | x > 0 | READ |+ | isDefault | Indicates whether this is the default value | Boolean | | READ |+ | isActive | Indicates whether the priority is available | Boolean | | READ |+name: Prioritiesdiff --git a/docs/api/apiv3/tags/projects.yml b/docs/api/apiv3/tags/projects.ymlnew file mode 100644index 00000000000..c9dae2acf0e--- /dev/null+++ b/docs/api/apiv3/tags/projects.yml@@ -0,0 +1,51 @@+---+description: |-+ Projects are containers structuring the information (e.g. work packages, wikis) into smaller groups. They can be used in a classic project management approach but also when structuring work by departments.++ As containers, they also control behaviour of the elements within them. One of the most important aspects of this is that projects limit permissions by having members with a certain permission set (roles) assigned to them.++ ## Actions++ | Link | Description | Condition |+ |:--------------------------: |----------------------------------------------------------------------| --------------------------------- |+ | update | Form endpoint that aids in updating this project | **Permission**: edit project |+ | updateImmediately | Directly update this project | **Permission**: edit project |+ | delete | Delete this project | **Permission**: admin |+ | createWorkPackage | Form endpoint that aids in preparing and creating a work package | **Permission**: add work packages |+ | createWorkPackageImmediately | Directly creates a work package in the project | **Permission**: add work packages |++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |Condition |+ | :----------: | ------------- | ---- | ----------- | -------------------- |----------------------------------------- |+ | self | This project | Project | not null | READ | |+ | categories | Categories available in this project | Collection | not null | READ | |+ | types | Types available in this project | Collection | not null | READ | **Permission**: view work packages or manage types |+ | versions | Versions available in this project | Collection | not null | READ | **Permission**: view work packages or manage versions |+ | memberships | Memberships in the project | Collection | not null | READ | **Permission**: view members |+ | workPackages | Work Packages of this project | Collection | not null | READ | |+ | parent | Parent project of the project | Project | | READ/WRITE | **Permission** edit project |+ | status | Denotes the status of the project, so whether the project is on track, at risk or is having trouble. | ProjectStatus | | READ/WRITE | **Permission** edit project |++ Depending on custom fields defined for projects, additional links might exist.++ Note, that the parent link may contain the "undisclosed uri" `urn:openproject-org:api:v3:undisclosed` in case a+ parent project is defined but the client lacks permission to see it. See the+ [general introduction into links' properties](/docs/api/basic-objects/#header-local-properties-1) for more information.++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------------------:| ------------- | ---- | ----------- | -------------------- |+ | id | Projects' id | Integer | x > 0 | READ/WRITE |+ | identifier | | String | | READ/WRITE |+ | name | | String | | READ/WRITE |+ | active | Indicates whether the project is currently active or already archived | Boolean | | READ/WRITE |+ | statusExplanation | A text detailing and explaining why the project has the reported status | Formattable | | READ/WRITE |+ | public | Indicates whether the project is accessible for everybody | Boolean | | READ/WRITE |+ | description | | Formattable | | READ/WRITE |+ | createdAt | Time of creation | DateTime | | READ |+ | updatedAt | Time of the most recent change to the project | DateTime | | READ |++ Depending on custom fields defined for projects, additional properties might exist.+name: Projectsdiff --git a/docs/api/apiv3/tags/queries.yml b/docs/api/apiv3/tags/queries.ymlnew file mode 100644index 00000000000..18c345e7da1--- /dev/null+++ b/docs/api/apiv3/tags/queries.yml@@ -0,0 +1,114 @@+---+description: |-+ A query defines how work packages can be filtered and displayed. Clients can define a query once, store it, and use it later on to load the same set of filters.++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|----------------------------------------------------------------------| --------------------------------------- |+ | star | Elevates the query to the status of 'starred' | **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is not yet starred |+ | unstar | Removes the 'starred' status | **Permission**: save queries for own queries, manage public queries for public queries; Only present if query is starred |+ | update | Use the Form based process to verify the query before persisting | **Permission**: view work packages |+ | updateImmediately | Persist the query without using a Form based process for guidance | **Permission**: save queries for own queries, manage public queries for public queries; |++ ## Linked Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------------: | ------------------------------------------------------ | --------------------- | ------------------------------------------- | -------------------- |+ | self | This query | Query | not null | READ |+ | user | The user that owns this query | User | not null | READ |+ | project | The project on which this query operates | Project | | READ |+ | columns | Ordered list of QueryColumns. The columns, when mapped to WorkPackage properties determine which WorkPackage properties to display | []QueryColumn | | READ |+ | highlightedAttributes | **Only with valid Enterprise Token available:** List of QueryColumns that should get highlighted when `highlightingMode` is set to `inline`. | []QueryColumn | | READ |+ | sortBy | Ordered list of QuerySortBys. Indicates the WorkPackage property the results will be ordered by as well as the direction | []QuerySortBy | | READ |+ | groupBy | The WorkPackage property results of this query are grouped by | String | | READ |+ | results | The list of work packages returned by applying the filters, sorting and grouping defined in the query | WorkPackageCollection | | READ |+ | schema | This query's schema | Schema | | READ |++ Please note, that all the properties listed above will also be embedded when individual queries are returned but will not be embedded when a list of queries is returned. Whether the properties are embedded or not may be subject to change in the future.++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | ------------------------------------ | -------------------- |+ | id | Query id | Integer | x > 0 | READ |+ | name | Query name | String | | READ |+ | filters | A set of QueryFilters which will be applied to the work packages to determine the resulting work packages | []QueryFilterInstance | | READ |+ | sums | Should sums (of supported properties) be shown? | Boolean | | READ |+ | timelineVisible | Should the timeline mode be shown? | Boolean | | READ |+ | timelineLabels | Which labels are shown in the timeline, empty when default | QueryTimelineLabels | | READ |+ | timelineZoomLevel| Which zoom level should the timeline be rendered in? | String | days, weeks, months, quarters, years | READ |+ | highlightingMode | Which highlighting mode should the table have? | String | none, inline, status, priority, type | READ |+ | showHierarchies | Should the hierarchy mode be enabled? | Boolean | | READ |+ | hidden | Should the query be hidden from the query list? | Boolean | | READ |+ | public | Can users besides the owner see the query? | Boolean | | READ |+ | starred | Should the query be highlighted to the user? | Boolean | | READ |+ | createdAt | Time of creation | DateTime | not null | READ |+ | updatedAt | Time of the most recent change to the query | DateTime | not null | READ |++ A query that is not assigned to a project (`"project": null`) is called a global query. Global queries filter work packages regardless of the project they are assigned to. As such, a different set of filters exists for those queries.++ ## Query Filter Instance++ A QueryFilterInstance defines a filtering applied to the list of work packages. As such it contains:++ * the filter type (`QueryFilter`) used++ * the operator (`QueryOperator`) used++ * the list of values++ The list of values can either consist of a list of links or of a list of strings. If the values are primitive (e.g. Integer, Boolean, Date) they will be displayed as strings and the QueryFilterInstance will have a `values` property.++ ```+ {+ "_type": "DueDateQueryFilter",+ "name": "Finish date",+ "values": [+ "1"+ ],+ "_links": {+ "filter": {+ "href": "/api/v3/queries/filters/dueDate",+ "title": "Finish date"+ },+ "operator": {+ "href": "/api/v3/queries/operators/<t+",+ "title": "in less than"+ }+ "schema": {+ "href": "/api/v3/queries/filter_instance_schemas/dueDate"+ }+ }+ }+ ```++ If the values are nonprimitive (e.g. User, Project), they will be listed as objects and the QueryFilterInstance will have a `values` link.++ ```+ {+ "_type": "AssigneeQueryFilter",+ "name": "Assignee",+ "_links": {+ "filter": {+ "href": "/api/v3/queries/filters/assignee",+ "title": "Assignee"+ },+ "operator": {+ "href": "/api/v3/queries/operators/=",+ "title": "is"+ },+ "schema": {+ "href": "/api/v3/queries/filter_instance_schemas/assignee"+ },+ "values": [+ {+ "href": "/api/v3/users/1",+ "title": "OpenProject Admin"+ }+ ]+ }+ }++ ```+name: Queriesdiff --git a/docs/api/apiv3/tags/query_columns.yml b/docs/api/apiv3/tags/query_columns.ymlnew file mode 100644index 00000000000..782c59481be--- /dev/null+++ b/docs/api/apiv3/tags/query_columns.yml@@ -0,0 +1,25 @@+---+description: |-+ A QueryColumn can be referenced by a Query to denote the work package properties the client should display for the work packages returned as query results. The columns maps to the WorkPackage by the id property. QueryColumns exist in three types: QueryColumn::Property, QueryColumn::RelationToType and QueryColumn::RelationOfType.++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|----------------------------------------------------------------------| ---------------------------------------|++ As of now, no actions are defined.++ ## Linked Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |+ | self | This query column | QueryColumn::Property, QueryColumn::RelationToType or QueryColumn::RelationOfType | not null | READ |+ | type | The type relations point to | Type | not null, exists only on QueryColumn::Relation | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |+ | id | Query column id | String | not null | READ |+ | name | Query column name | String | not null | READ |+name: Query Columnsdiff --git a/docs/api/apiv3/tags/query_filter_instance_schema.yml b/docs/api/apiv3/tags/query_filter_instance_schema.ymlnew file mode 100644index 00000000000..a08b2cf5010--- /dev/null+++ b/docs/api/apiv3/tags/query_filter_instance_schema.yml@@ -0,0 +1,18 @@+---+description: |-+ A QueryFilterInstanceSchema is a Schema specifically for describing QueryFilterInstances. Because the behaviour of FilterInstances, with regards to the `values` property, differs from one another depending on the chosen Filter, the QueryFilterInstanceSchema explicitly lists the dependencies in its `_dependencies` property. As the property causing the difference is the selected Filter, that property is linked. Apart from that, a QueryFilterInstanceSchema has the same structure a Schema does.++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ | :-------------------: | ---------------------------------------- | ------------- | -------- | -------------------- |+ | self | This QueryFilterInstanceSchema (same as for schema) | QueryFilterInstanceSchema | not null | READ |+ | filter | The filter for which this schema is specific | Filter | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ------------ | -------------------------------- | -------------------- |+ | name | Describes the name attribute | Field schema | not null | READ |+ | filter | QuerySortBy name | Field schema | not null | READ |+name: Query Filter Instance Schemadiff --git a/docs/api/apiv3/tags/query_filters.yml b/docs/api/apiv3/tags/query_filters.ymlnew file mode 100644index 00000000000..78e5bfaca75--- /dev/null+++ b/docs/api/apiv3/tags/query_filters.yml@@ -0,0 +1,23 @@+---+description: |-+ A QueryFilter can be referenced by a filter instance defined for a Query to denote the filtering applied to the query's work package results. This resource is not an instance of an applicable filter but rather the type an applicable filter can have.++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|----------------------------------------------------------------------| ---------------------------------------|++ As of now, no actions are defined.++ ## Linked Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |+ | self | This query filter | QueryFilter | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |+ | id | QueryFilter id | String | not null | READ |+name: Query Filtersdiff --git a/docs/api/apiv3/tags/query_operators.yml b/docs/api/apiv3/tags/query_operators.ymlnew file mode 100644index 00000000000..32ebb2f82a3--- /dev/null+++ b/docs/api/apiv3/tags/query_operators.yml@@ -0,0 +1,24 @@+---+description: |-+ A QueryOperator can be referenced by a QueryFilter to denote the operator to be applied to the filter relation.++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|----------------------------------------------------------------------| ---------------------------------------|++ As of now, no actions are defined.++ ## Linked Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |+ | self | This query operator | QueryOperator | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |+ | id | Query operator id | String | not null | READ |+ | name | Query operator name | String | not null | READ |+name: Query Operatorsdiff --git a/docs/api/apiv3/tags/query_sort_bys.yml b/docs/api/apiv3/tags/query_sort_bys.ymlnew file mode 100644index 00000000000..98e97e5a169--- /dev/null+++ b/docs/api/apiv3/tags/query_sort_bys.yml@@ -0,0 +1,26 @@+---+description: |-+ A QuerySortBy can be referenced by a Query to denote the sorting applied to the query's work package results. It consists of the columns to sort by as well as the direction (ascending/descending)++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|----------------------------------------------------------------------| ---------------------------------------|++ As of now, no actions are defined.++ ## Linked Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |+ | self | This query sort by | QuerySortBy | not null | READ |+ | column | The QueryColumn to sort on. | QueryColumn | not null | READ |+ | direction | The direction the QueryColumn is to be sorted in. This property is identified by a URI (`urn:openproject-org:api:v3:queries:directions:asc` or `urn:openproject-org:api:v3:queries:directions:desc`) instead of by a URL. | | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------------------------- | -------------------- |+ | id | QuerySortBy id | String | not null | READ |+ | name | QuerySortBy name | String | not null | READ |+name: Query Sort Bysdiff --git a/docs/api/apiv3/tags/relations.yml b/docs/api/apiv3/tags/relations.ymlnew file mode 100644index 00000000000..6e437393dee--- /dev/null+++ b/docs/api/apiv3/tags/relations.yml@@ -0,0 +1,51 @@+---+description: |-+ Work packages may be related to each other in different ways.++ ```+ +--------------+ +--------------++ | | 1 1 | |+ | Work package +-------------+--------------+ Work package |+ | | from | to | |+ +--------------+ | +--------------++ +------+-------++ | Relation |+ +--------------++ | type |+ | reverseType |+ | description |+ | delay |+ +--------------++ ```++ ## Actions++ | Link | Description | Condition |+ |:-------------------:| -------------------------------------------------------------------- | --------------------------------------------- |+ | update | Updates the relation between two work packages via a form | **Permission**: manage work package relations |+ | updateImmediately | Updates the relation between two work packages | **Permission**: manage work package relations |+ | delete | Destroys the relation between the two work packages | **Permission**: manage work package relations |++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations | Condition |+ |:-------------:|-------------------------------------- | ------------- | ----------- | -------------------- | --------------------------------------------- |+ | self | This relation | Relation | not null | READ | **Permission**: view work packages |+ | schema | The schema of this relation | Schema | not null | READ | |+ | from | The emanating work package | WorkPackage | not null | READ | **Permission**: view work packages |+ | to | The work package the relation ends in | WorkPackage | not null | READ | **Permission**: view work packages |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------------:| ------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------- | -------------------- |+ | id | Relation ID | Integer | x > 0 | READ |+ | name | The internationalized name of this kind of relation | String | | READ+ | type | Which kind of relation (blocks, precedes, etc.) | String | in: relates, duplicates, duplicated, blocks, blocked, precedes, follows, includes, partof, requires, required | READ / WRITE |+ | reverseType | The kind of relation from the other WP's perspective | String | in: relates, duplicates, duplicated, blocks, blocked, precedes, follows, includes, partof, requires, required | READ |+ | description | Short text further describing the relation | String | | READ / WRITE |+ | delay* | The delay in days between closing of `from` and start of `to` | Integer | x >= 0 | READ / WRITE |++ \* Only applicable for some relation types such as "follows". You can check using the relation by schema+ endpoint at `/api/v3/relations/schema/{type}`.+name: Relationsdiff --git a/docs/api/apiv3/tags/revisions.yml b/docs/api/apiv3/tags/revisions.ymlnew file mode 100644index 00000000000..a97768812c7--- /dev/null+++ b/docs/api/apiv3/tags/revisions.yml@@ -0,0 +1,24 @@+---+description: |-+ Revisions are sets of updates to files in the context of repositories linked in OpenProject.++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:----------------:| --------------------------------------------------------------------------------------------------| ------------- | ----------- | -------------------- |+ | self | This revision | Revision | not null | READ |+ | project | The project to which the revision belongs | Project | not null | READ |+ | author | The user that added this revision, if the authorName was mapped to a user in OpenProject | User | | READ |+ | showRevision | A URL to the repository view (outside APIv3) showing this revision | - | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ |:-----------------------:| ------------------------------------------------------------------------------------------------------------------------------------------------------------| ----------- | ----------- | -------------------- |+ | id | Revision's id, assigned by OpenProject | Integer | x > 0 | READ |+ | identifier | The raw SCM identifier of the revision (e.g. full SHA hash) | String | not null | READ |+ | formattedIdentifier | The SCM identifier of the revision, formatted (e.g. shortened unambiguous SHA hash). May be identical to identifier in many cases | String | not null | READ |+ | authorName | The name of the author that committed this revision. Note that this name is retrieved from the repository and does not identify a user in OpenProject. | String | not null | READ |+ | message | The commit message of the revision | Formattable | not null | READ |+ | createdAt | The time this revision was committed to the repository | DateTime | not null | READ |+name: Revisionsdiff --git a/docs/api/apiv3/tags/roles.yml b/docs/api/apiv3/tags/roles.ymlnew file mode 100644index 00000000000..1c8f2999ee7--- /dev/null+++ b/docs/api/apiv3/tags/roles.yml@@ -0,0 +1,19 @@+---+description: |-+ When principals (groups or users) are assigned to a project, they are receive roles in that project. Roles regulate access to specific resources by having permissions configured for them.++ Currently, this is only a stub.++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ | :-------------------: | ----------------------------------------- | ------------- | -------------------------------| -------------------- |+ | self | This role | Role | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |+ | id | Role id | Integer | x > 0 | READ |+ | name | Role name | String | not null | READ |+name: Rolesdiff --git a/docs/api/apiv3/tags/root.yml b/docs/api/apiv3/tags/root.ymlnew file mode 100644index 00000000000..88cce018c28--- /dev/null+++ b/docs/api/apiv3/tags/root.yml@@ -0,0 +1,26 @@+---+description: |-+ The root resource contains links to available resources in the API. By following these links+ a client should be able to discover further resources in the API.++ *Note: Currently there is no list action for projects available.*+ *A client will therefore have to know links to projects and can't (yet) discover them.*++ | Link | Description | Type | Nullable | Supported operations | Condition |+ | :-------------------: | ------------------------------------------------ | --------------- | -------- | -------------------- | --------- |+ | configuration | The configuration of this OpenProject instance | Configuration | | READ | |+ | user | The user currently logged-in | User | | READ | logged in |+ | userPreferences | The preferences of the logged-in user | UserPreference | | READ | logged in |+ | priorities | List of available priorities | Collection | | READ | **Permission** View work packages in any project |+ | statuses | List of available work package statuses | Collection | | READ | **Permission** View work packages in any project |+ | types | List of available work package types | Collection | | READ | **Permission** View work packages in any project |+ | workPackages | List of all work packages | Collection | | READ | **Permission** View work packages in any project |+ | users | List of all users | Collection | | READ | **Permission** Administrator |++ ## Local Properties++ | Property | Description | Type | Condition | Supported operations |+ | :-----------------------: | ---------------------------------------------------- | ---------- | --------------------------------- | -------------------- |+ | instanceName | The name of the OpenProject instance | String | | READ |+ | coreVersion | The OpenProject core version number for the instance | String | **Permission** requires admin privileges | READ |+name: Rootdiff --git a/docs/api/apiv3/tags/schemas.yml b/docs/api/apiv3/tags/schemas.ymlnew file mode 100644index 00000000000..6105b7de957--- /dev/null+++ b/docs/api/apiv3/tags/schemas.yml@@ -0,0 +1,153 @@+---+description: |-+ The schema provides more detailed information about the properties of a resource.+ The schema is represented by a dictionary containing names of resource properties as keys+ and objects describing the corresponding property as values.+ These objects are called **field schema** and form the core of the schema representation,+ each of them can contain its own `_links` and `_embedded` section.++ ## Linked Properties++ | Link | Description | Type | Nullable | Supported operations |+ |:-------------------:| ---------------------------------------- | ------------- | -------- | -------------------- |+ | self | This schema | Schema | | READ |++ ## Local Properties++ | Property | Description | Type |+ | :-----------------: | ---------------------------------------------------------------------------------- | ---------------- |+ | _dependencies | A list of dependencies between one property's value and another property | SchemaDependency |++ The `_dependencies` property contains the list of dependencies that exist between the value selected for one of the properties of the described resource and the resource's structure. Depending on the value, additional properties might exist or properties might have other values allowed to be assigned. See [SchemaDependency](#schema-dependencies) for more information.++ # Field schema++ ## Linked Properties++ | Property | Description | Conditions |+ | :--------------: | -------------------------------------------------------------- | --------------------------------------------- |+ | allowedValues | List of resources that are assignable by the current user. | Will not exist if `allowedValuesSchemas` is present. |+ | allowedValuesSchemas | Link to schemas further describing the property. | Will not exist if `allowedValues` is present. |++ The `allowedValues` can either contain a list of canonical links or just a single link to a collection resource.+ This is an optimization to allow efficient handling of both small resource lists (that can be enumerated inline) and large+ resource lists (requiring one or more separate requests).++ The `allowedValuesSchemas` will on rare occasions (e.g. for a [Query](#query)) replace `allowedValues`. This is done when there is no fixed set of allowed values. Instead, the allowed values will have to follow a schema, or one of a list of schemas, in its own right.++ Only one of the links (`allowedValues`, `allowedValuesSchemas`) will exist for any given property.++ ## Local Properties++ | Property | Description | Type | Default |+ |:-----------------:| ---------------------------------------------------------------------------------- | ------------ | ------- |+ | name | Human readable name of the property as it could be displayed in a UI | String | |+ | type | The data type of the properties values | MetaType | |+ | minLength | The value of the property must at least contain the specified amount of characters | Integer | 0 |+ | maxLength | The value of the property must at most contain the specified amount of characters | Integer | ∞ |+ | regularExpression | The value of the property must match the given regular expression (if not null) | String | null |+ | required | If true this property is not nullable | Boolean | true |+ | writable | If false it is not allowed to **change** the properties value | Boolean | true |+ | location | If present, contains a reference to the location of the property in the JSON | String | |+ | description | If present, contains a formattable, human readable description | Formattable | |++ All of the above properties that do not have a default value *must* be present in the schema.+ For properties that have a default value, the client can assume the default value, if the property is missing.++ Note that regular expressions used in the API follow the rules of [Ruby Regular Expressions](http://www.ruby-doc.org/core-2.2.6/Regexp.html).++ ### Location property++ The location property gives a hint as to where to find the property if it is not contained in the set of local attributes.+ For example, for linked properties, the location attribute of the schema will contain `_links`. The property will then be found in the resource+ under the path `_links.propertyName`.++ For the default attributes to be added on the top level of the resource, the location attribute will not be set.++ # Schema Dependencies++ A SchemaDependency describes the dependencies between a value chosen for a resource's property and the resource's structure. By that, additional properties or changes in a property are described. A SchemaDependency will never describe a property to disappear, only to appear. As such it always provides additional information. For a property that is depending on another propertie's value, this can result in not being listed in the resource's schema itself at all. This will be the case if the existence of the a property as a whole will be dependent. If only one of the aspects (e.g. *writable*) of the property changes with the selected value, the property itself will already be listed in the schema, but it will lack the dependent aspect.++ Given that SchemaDependencies will only add information, and the content type of JSON, a client should be able to join the two objects, the schema and the dependency, into one object easily.++ SchemaDependencies are always embedded inside a Schema's `_dependencies` attribute. As such, they are not independently existing resources. Consequently, they do not have a `self` reference.++ ## Linked Properties++ | Link | Description | Type | Nullable | Supported operations |+ |:-------------------:| ---------------------------------------- | ------------- | -------- | -------------------- |++ A SchemaDependency does not have any links.++ ## Local Properties++ | Property | Description | Type |+ | :-----------------: | ---------------------------------------------------------------------------------- | ---------------- |+ | on | The name of the property on which the dependency exists | string |+ | dependencies | The additions to a schema grouped by the value of the depending property | object |++ The following excerpt exemplifies the objects that can be found as a value of the `dependencies` property:++ ```+ {+ "_type": "SchemaDependency",+ "on": "someProperty",+ "dependencies": {+ "1": {+ "loremIpsum": {+ "type": "User",+ "name": "Lorem ipsum",+ "required": true,+ "hasDefault": false,+ "writable": true,+ "location": "_links",+ "description": {+ "format": "markdown",+ "raw": "A description for field Lorem ipsum. This may contain [links](https://example.com).",+ "html": "<p>A description for field Lorem ipsum. This may contain <a href=\"https://exampel.com\">links</a>.</p>"+ };+ "_links": {+ "allowedValues": {+ "href": "/api/v3/some/path/to/users"+ }+ }+ }+ },+ "2": {+ "loremIpsum": {+ "type": "User",+ "name": "Lorem ipsum",+ "required": true,+ "hasDefault": false,+ "writable": true,+ "location": "_links",+ "_links": {+ "allowedValues": {+ "href": "/api/v3/a/totally/different/path/to/other/users"+ }+ }+ }+ },+ "3": {+ "loremIpsum": {+ "type": "User",+ "name": "Lorem ipsum",+ "required": true,+ "hasDefault": false,+ "writable": false,+ "location": "_links",+ }+ },+ "4": {}+ }+ }+ ```++ Given the example above, the client has to add the property `loremIpsum` to the schema if the depending property is `1`, `2` or `3`.+ If it is `4` the property does not exist.+ The property will not be writable if the value is `3`.+ The values allowed to be set differ between having `1` or `2` selected for the depending property.++ Because of the limitation of JSON objects, all keys will be strings, even when the depending value is actually something different (e.g. Integer, Date).+ This is also true for resources in which case the url of the resource is used as the key.+name: Schemasdiff --git a/docs/api/apiv3/tags/statuses.yml b/docs/api/apiv3/tags/statuses.ymlnew file mode 100644index 00000000000..c1b46ecf5ae--- /dev/null+++ b/docs/api/apiv3/tags/statuses.yml@@ -0,0 +1,20 @@+---+description: |-+ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:-------------:|-------------------------- | ------------- | ----------- | -------------------- |+ | self | This status | Status | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------: | ------------- | ------- | ----------- | -------------------- |+ | id | Status id | Integer | x > 0 | READ |+ | name | Status name | String | | READ |+ | position | Sort index of the status | Integer | | READ |+ | isDefault | | Boolean | | READ |+ | isClosed | are tickets of this status considered closed? | Boolean | | READ |+ | isReadonly | are tickets of this status read only? | Boolean | | READ |+ | defaultDoneRatio | The percentageDone being applied when changing to this status | Integer | 0 <= x <= 100 | READ |+name: Statusesdiff --git a/docs/api/apiv3/tags/time_entries.yml b/docs/api/apiv3/tags/time_entries.ymlnew file mode 100644index 00000000000..d37adec96c3--- /dev/null+++ b/docs/api/apiv3/tags/time_entries.yml@@ -0,0 +1,37 @@+---+description: |-+ ## Actions++ | Link | Description | Condition |+ |:-------------------:| -------------------------------------------------------------------------- | ---------------------------------------------------------------- |+ | updateImmediately | Directly perform edits on this time entry | **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user |+ | update | Form endpoint that aids in preparing and performing edits on a TimeEntry | **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user |+ | delete | Delete this time entry | **Permission**: 'edit time entries' or 'edit own time entries' if the time entry belongs to the user |++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations | Condition |+ | :-----------: | -------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |+ | self | This time entry | TimeEntry | not null | READ | |+ | project | The project the time entry is bundled in. The project might be different from the work package's project once the workPackage is moved. | Project | not null | READ / WRITE | |+ | workPackage | The work package the time entry is created on | WorkPackage | | READ / WRITE | |+ | user | The user the time entry tracks expenditures for | User | not null | READ | |+ | activity | The time entry activity the time entry is categorized as | TimeEntriesActivity | not null | READ / WRITE | |++ Depending on custom fields defined for time entries, additional links might exist.++ Time entries are either linked to a work package or to a project. If they are linked to a project, the work package reference is empty. If they are linked to a work package, the project reference is filled up automatically to point to the work package's project.++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |+ | id | Time entries' id | Integer | x > 0 | READ | |+ | comment | A text provided by the user detailing the time entry | String | max 255 characters | READ / WRITE | |+ | spentOn | The date the expenditure is booked for | Date | | READ / WRITE | |+ | hours | The time quantifying the expenditure | Time | | READ / WRITE | |+ | createdAt | The time the time entry was created | DateTime | | READ | |+ | updatedAt | The time the time entry was last updated | DateTime | | READ | |++ Depending on custom fields defined for time entries, additional properties might exist.+name: Time Entriesdiff --git a/docs/api/apiv3/tags/time_entry_activities.yml b/docs/api/apiv3/tags/time_entry_activities.ymlnew file mode 100644index 00000000000..f26fe07282b--- /dev/null+++ b/docs/api/apiv3/tags/time_entry_activities.yml@@ -0,0 +1,24 @@+---+description: |-+ Time entries are classified by an activity which is one item of a set of user defined activities (e.g. Design, Specification, Development).++ ## Actions++ None++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations | Condition |+ | :-----------: | -------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |+ | self | This time entry activity | TimeEntriesActivity | not null | READ | |+ | projects | List of projects the time entry is active in | []Project | not null | READ / WRITE | |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |+ | id | Time entries' id | Integer | x > 0 | READ | |+ | name | The human readable name chosen for this activity | String | max 30 characters | READ | |+ | position | The rank the activity has in a list of activities | Date | | READ | |+ | default | Flag to signal whether this activity is the default activity | Boolean | | READ | |+name: Time Entry Activitiesdiff --git a/docs/api/apiv3/tags/types.yml b/docs/api/apiv3/tags/types.ymlnew file mode 100644index 00000000000..0d22da7dcb3--- /dev/null+++ b/docs/api/apiv3/tags/types.yml@@ -0,0 +1,21 @@+---+description: |-+ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:-------------:|-------------------------- | ------------- | ----------- | -------------------- |+ | self | This type | Type | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ |:----------------:| ---------------------------------------------- | -------- | ----------- | -------------------- |+ | id | Type id | Integer | x > 0 | READ |+ | name | Type name | String | | READ |+ | color | The color used to represent this type | Color | | READ |+ | position | Sort index of the type | Integer | | READ |+ | isDefault | | Boolean | | READ |+ | isMilestone | Do tickets of this type represent a milestone? | Boolean | | READ |+ | createdAt | Time of creation | DateTime | | READ |+ | updatedAt | Time of the most recent change to the user | DateTime | | READ |+name: Typesdiff --git a/docs/api/apiv3/tags/userpreferences.yml b/docs/api/apiv3/tags/userpreferences.ymlnew file mode 100644index 00000000000..3a07d315f3e--- /dev/null+++ b/docs/api/apiv3/tags/userpreferences.yml@@ -0,0 +1,19 @@+---+description: |-+ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:---------:|----------------------------------------------------------| -------------- | --------------------- | -------------------- |+ | self | This UserPreferences | UserPreferences| not null | READ |+ | user | The user that this preference belongs to | User | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ |:----------------------:| -----------------------------------------------------------| ---------- | ----------- | -------------------- |+ | hideMail | Hide mail address from other users | Boolean | | READ / WRITE |+ | timeZone | Current selected time zone | String | | READ / WRITE |+ | commentSortDescending | Sort comments in descending order | Boolean | | READ / WRITE |+ | warnOnLeavingUnsaved | Issue warning when leaving a page with unsaved text | Boolean | | READ / WRITE |+ | accessibilityMode | Enable accessibility mode | Boolean | | READ / WRITE |+name: UserPreferencesdiff --git a/docs/api/apiv3/tags/users.yml b/docs/api/apiv3/tags/users.ymlnew file mode 100644index 00000000000..eaad6c4f4c4--- /dev/null+++ b/docs/api/apiv3/tags/users.yml@@ -0,0 +1,68 @@+---+description: |-+ ## Actions++ | Link | Description | Condition |+ |:-------------------:| -------------------------------------------------------------------- | ---------------------------------------------------------------- |+ | lock | Restrict the user from logging in and performing any actions | not locked; **Permission**: Administrator |+ | show | Link to the OpenProject user page (HTML) | |+ | unlock | Allow a locked user to login and act again | locked; **Permission**: Administrator |+ | updateImmediately | Updates the user's attributes. | **Permission**: Administrator, manage_user global permission |+ | delete | Permanently remove a user from the instance | **Permission**: Administrator, self-delete |++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations | Condition |+ |:-----------:|-------------------------------------------------------------- | ------------- | --------------------- | -------------------- | ----------------------------------------- |+ | self | This user | User | not null | READ | |+ | auth_source | Link to the user's auth source (endpoint not yet implemented) | AuthSource | | READ / WRITE | **Permission**: Administrator |+ | members | Link to collection of all the user's memberships. The list will only include the memberships in projects in which the requesting user has the necessary permissions. | MemberCollection | | READ | **Permission**: view members or manage members in any project |++ Depending on custom fields defined for users, additional links might exist.++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :----------: | --------------------------------------------------------- | -------- | ---------------------------------------------------- | -------------------- | ----------------------------------------------------------- |+ | id | User's id | Integer | x > 0 | READ | |+ | login | User's login name | String | unique, 256 max length | READ / WRITE | **Permission**: Administrator, manage_user global permission |+ | firstName | User's first name | String | 30 max length | READ / WRITE | **Permission**: Administrator, manage_user global permission |+ | lastName | User's last name | String | 30 max length | READ / WRITE | **Permission**: Administrator, manage_user global permission |+ | name | User's full name, formatting depends on instance settings | String | | READ | |+ | email | User's email address | String | unique, 60 max length | READ / WRITE | E-Mail address not hidden, **Permission**: Administrator, manage_user global permission |+ | admin | Flag indicating whether or not the user is an admin | Boolean | in: [true, false] | READ / WRITE | **Permission**: Administrator |+ | avatar | URL to user's avatar | Url | | READ | |+ | status | The current activation status of the user (see below) | String | in: ["active", "registered", "locked", "invited"] | READ | |+ | language | User's language | String | ISO 639-1 | READ / WRITE | **Permission**: Administrator, manage_user global permission |+ | password | User's password for the default password authentication | String | | WRITE | **Permission**: Administrator |+ | identity_url | User's identity_url for OmniAuth authentication | String | | READ / WRITE | **Permission**: Administrator |+ | createdAt | Time of creation | DateTime | | READ | |+ | updatedAt | Time of the most recent change to the user | DateTime | | READ | |++ Depending on custom fields defined for users, additional properties might exist.++ The `status` of a user can be one of:++ * `active` - the user can log in with the account right away++ * `invited` - the user is invited and is pending registration++ If the user's `status` is set to `active` during creation a means of authentication+ has to be provided which is one of the following:++ * `password` - The password with which the user logs in.++ * `auth_source` - Link to an LDAP auth source.++ * `identity_url` - The identity URL of an OmniAuth authentication provider.++ If all of these are missing the creation will fail with an "missing password" error.++ The `language` is limited to those activated in the system.++ Due to data privacy, the user's properties are limited to reveal as little about the user as possible.+ Thus `login`, `firstName`, `lastName`, `language`, `createdAt` and `updatedAt` are hidden for all+ users except for admins or the user themselves.++ Please note that custom fields are not yet supported by the api although the backend supports them.+name: Usersdiff --git a/docs/api/apiv3/tags/versions.yml b/docs/api/apiv3/tags/versions.ymlnew file mode 100644index 00000000000..50f80d1efbf--- /dev/null+++ b/docs/api/apiv3/tags/versions.yml@@ -0,0 +1,37 @@+---+description: |-+ Work Packages can be assigned to a version. As such, versions serve to group Work Packages into logical units where each group comprises all the work packages that needs to be finished in order for the version to be finished.++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|--------------------------------------------------------------------------| ---------------------------------------|+ | update | Form endpoint that aids in preparing and performing edits on the version | **Permission**: manage versions |+ | updateImmediately | Directly perform edits on the version | **Permission**: manage versions |++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations |+ |:-------------------:|----------------------------------------- | ------------- | -------------------------------------------------------------- | -------------------- |+ | self | This version | Version | not null | READ |+ | definingProject | The project to which the version belongs | Project | only present if the project is visible for the current user | READ |+ | availableInProjects | Projects where this version can be used | Projects | not null | READ |++ Depending on custom fields defined for versions, additional linked properties might exist.++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :---------: | --------------------------------------------- | ----------- | ----------- | -------------------- |+ | id | Version id | Integer | x > 0 | READ |+ | name | Version name | String | not null, may not exceed 60 characters | READ / WRITE |+ | description | | Formattable | | READ / WRITE |+ | startDate | | Date | | READ / WRITE |+ | endDate | | Date | | READ / WRITE |+ | status | The current status of the version | String | not null, only 'open', 'finished', 'closed' | READ / WRITE |+ | sharing | The current status of the version | String | not null, limited to fixed set as defined by form | READ / WRITE |+ | createdAt | Time of creation | DateTime | not null | READ |+ | updatedAt | Time of the most recent change to the version | DateTime | not null | READ |++ Depending on custom fields defined for versions, additional properties might exist.+name: Versionsdiff --git a/docs/api/apiv3/tags/wiki_pages.yml b/docs/api/apiv3/tags/wiki_pages.ymlnew file mode 100644index 00000000000..b4902b5b3c9--- /dev/null+++ b/docs/api/apiv3/tags/wiki_pages.yml@@ -0,0 +1,27 @@+---+description: |-+ Represents an individual page in a project's wiki.++ *This resource is currently a stub*++ ## Actions++ | Link | Description | Condition |+ |:-------------------:|----------------------------------------------------------------------| --------------------------------------- |+ | addAttachment | Attach a file to the wiki page | **Permission**: edit wiki page |++ ## Linked Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------------------ | ----------- | -------------- | -------------------- |+ | self | This wiki page | WikiPage | not null | READ |+ | attachments | The files attached to this wiki page | Collection | | READ |+ | project | The project the wiki page belongs to | Project | not null | READ |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations |+ | :--------------: | ------------------------------------------- | ----------- | ------------------------------------ | -------------------- |+ | id | Identifier of this wiki page | Integer | x > 0 | READ |+ | title | The wiki page's title | String | not null | READ |+name: Wiki Pagesdiff --git a/docs/api/apiv3/tags/work_packages.yml b/docs/api/apiv3/tags/work_packages.ymlnew file mode 100644index 00000000000..6b83063da9c--- /dev/null+++ b/docs/api/apiv3/tags/work_packages.yml@@ -0,0 +1,91 @@+---+description: |-+ ## Actions++ | Link | Description | Condition |+ |:-------------------:|--------------------------------------------------------------------------| ---------------------------------------|+ | addAttachment | Attach a file to the WP | **Permission**: edit work package |+ | addComment | Post comment to WP | **Permission**: add work package notes |+ | addRelation | Adds a relation to this work package. | **Permission**: manage wp relations |+ | addWatcher | Add any user to WP watchers | **Permission**: add watcher |+ | customActions | Collection of predefined changes that can be applied to the work package | |+ | previewMarkup | Post markup (in markdown) here to receive an HTML-rendered response | |+ | removeWatcher | Remove any user from WP watchers | **Permission**: delete watcher |+ | unwatch | Remove current user from WP watchers | logged in; watching |+ | update | Form endpoint that aids in preparing and performing edits on a WP | **Permission**: edit work package |+ | updateImmediately | Directly perform edits on a work package | **Permission**: edit work package |+ | watch | Add current user to WP watchers | logged in; not watching |++ ## Linked Properties++ | Link | Description | Type | Constraints | Supported operations | Condition |+ | :----------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------ | --------------------- | ----------------------------------------- |+ | self | This work package | WorkPackage | not null | READ | |+ | schema | The schema of this work package | Schema | not null | READ | |+ | ancestors | Array of all visible ancestors of the work package, with the root node being the first element | Collection | not null | READ | **Permission** view work packages |+ | attachments | The files attached to this work package | Collection | not null | READ / WRITE | |+ | author | The person that created the work package | User | not null | READ | |+ | assignee | The person that is intended to work on the work package | User | | READ / WRITE | |+ | availableWatchers | All users that can be added to the work package as watchers. | User | | READ | **Permission** add work package watchers |+ | budget | The budget this work package is associated to | Budget | | READ / WRITE | **Permission** view cost objects |+ | category | The category of the work package | Category | | READ / WRITE | |+ | children | Array of all visible children of the work package | Collection | not null | READ | **Permission** view work packages |+ | parent | Parent work package | WorkPackage | Needs to be visible (to the current user) | READ / WRITE | |+ | priority | The priority of the work package | Priority | not null | READ / WRITE | |+ | project | The project to which the work package belongs | Project | not null | READ / WRITE | |+ | responsible | The person that is responsible for the overall outcome | User | | READ / WRITE | |+ | relations | Relations this work package is involved in | Relation | | READ | **Permission** view work packages |+ | revisions | Revisions that are referencing the work package | Revision | | READ | **Permission** view changesets |+ | status | The current status of the work package | Status | not null | READ / WRITE | |+ | timeEntries | All time entries logged on the work package. Please note that this is a link to an HTML resource for now and as such, the link is subject to change. | N/A | | READ | **Permission** view time entries |+ | type | The type of the work package | Type | not null | READ / WRITE | |+ | version | The version associated to the work package | Version | | READ / WRITE | |+ | watchers | All users that are currently watching this work package | Collection | | READ | **Permission** view work package watchers |++ ## Local Properties++ | Property | Description | Type | Constraints | Supported operations | Condition |+ | :--------------: | ------------------------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------ | -------------------- | -------------------------------- |+ | id | Work package id | Integer | x > 0 | READ | |+ | lockVersion | The version of the item as used for optimistic locking | Integer | | READ | |+ | subject | Work package subject | String | not null; 1 <= length <= 255 | READ / WRITE | |+ | type | Name of the work package's type | String | not null | READ | |+ | description | The work package description | Formattable | | READ / WRITE | |+ | scheduleManually | If false (default) schedule automatically. | Boolean | | READ / WRITE | |+ | startDate | Scheduled beginning of a work package | Date | Cannot be set for parent work packages; must be equal or greater than the earliest possible start date; Exists only on work packages of a non milestone type | READ / WRITE | |+ | dueDate | Scheduled end of a work package | Date | Cannot be set for parent work packages; must be greater than or equal to the start date; Exists only on work packages of a non milestone type | READ / WRITE | |+ | date | Date on which a milestone is achieved | Date | Exists only on work packages of a milestone type | READ / WRITE | |+ | derivedStartDate | Similar to start date but is not set by a client but rather deduced by the work packages's descendants. If manual scheduleManually is active, the two dates can deviate. | Date | | READ | |+ | derivedDueDate | Similar to due date but is not set by a client but rather deduced by the work packages's descendants. If manual scheduleManually is active, the two dates can deviate. | Date | | READ | |+ | estimatedTime | Time a work package likely needs to be completed excluding its descendants | Duration | | READ / WRITE | |+ | derivedEstimatedTime | Time a work package likely needs to be completed including its descendants | Duration | | READ | |+ | spentTime | The time booked for this work package by users working on it | Duration | | READ | **Permission** view time entries |+ | percentageDone | Amount of total completion for a work package | Integer | 0 <= x <= 100; Cannot be set for parent work packages | READ / WRITE | |+ | createdAt | Time of creation | DateTime | | READ | |+ | updatedAt | Time of the most recent change to the work package | DateTime | | READ | |++ Note that the properties listed here only cover the built-in properties of the OpenProject Core.+ Using plug-ins and custom fields a work package might contain various additional properties.+ A client can consult the schema information to which the work package links. The schema will contain information about+ all properties of the linking work package, including properties added by plug-ins and custom fields.++ Custom fields are identified by a key in the form of `customFieldN`, where `N` is an integer. Depending on their type,+ they can occur as properties or as linked properties. A client has to consult the schema to resolve+ the human readable name of custom fields.++ Properties that cannot be set directly on parent work packages are inferred from their children instead:++ * `startDate` is the earliest start date from its children if manual scheduling is activated.++ * `dueDate` is the latest finish date from its children if manual scheduling is activated.++ * `estimatedTime` is the sum of estimated times from its children++ * `percentageDone` is the weighted average of the sum of its children percentages done. The weight is given by the average of its children estimatedHours. However, if the percentage done is given by a work package's status, then only the status matters and no value is inferred.++ `startDate` can also not be earlier than a finish date of any predecessor.++ While attachments are returned as a link which's content is to be fetched separately, clients can choose to+ replace the work package's attachments by providing an array of already uploaded [Attachment resources](#attachments) on [create](#work-packages-work-packages-post)+ and [update](#work-packages-work-package-patch). The attachments the work package has had prior to the request will be removed.+name: Work Packagesdiff --git a/lib/api/open_api.rb b/lib/api/open_api.rbindex 9c9de3c1b01..948afc2af35 100644--- a/lib/api/open_api.rb+++ b/lib/api/open_api.rb@@ -2,14 +2,25 @@ module APImodule OpenAPIextend self- def spec(version: :stable)- spec_path = Rails.application.root.join("docs/api/apiv3/openapi-spec.yml")+ def spec+ @spec ||= begin+ spec_path = Rails.application.root.join("docs/api/apiv3/openapi-spec.yml")- if spec_path.exist?- assemble_spec spec_path- else- API::OpenAPI::BlueprintImport.convert version: version, single_file: true+ if spec_path.exist?+ assemble_spec spec_path+ else+ raise "Could not find openapi-spec.yml uner #{spec_path.to_s}"+ endend++ @spec["servers"] = [+ {+ "description" => "This server",+ "url" => "#{Setting.protocol}://#{Setting.host_name}/"+ }+ ]++ @specenddef assemble_spec(file_path)diff --git a/lib/tasks/api.rake b/lib/tasks/api.rakeindex 1b935d4b260..d1724a380db 100644--- a/lib/tasks/api.rake+++ b/lib/tasks/api.rake@@ -46,23 +46,23 @@ namespace :api doendend- desc 'Saves the API spec (OAS3.0) to ./docs/api/openproject-apiv3-<branch>.yml'- task :update_spec, [:branch] => [:environment] do |task, args|- branch = (args[:branch] || "stable").to_sym- spec = API::OpenAPI::BlueprintImport.convert version: branch, single_file: false-- File.open(Rails.application.root.join("docs/api/apiv3/openapi-spec.yml"), "w") do |f|- f.write spec.to_yaml+ desc 'Saves the complete API spec (OAS 3.0) as a single json (default) or YAML file.'+ task save_spec: [:environment] do+ if ARGV.size != 2+ $stderr.puts "usage: rake api:save_spec <file-name>"+ exit 1end- end- desc 'Saves the API spec (OAS3.0) to ./docs/api/openproject-apiv3-single.yml'- task :assemble_spec, [:branch] => [:environment] do |task, args|- branch = (args[:branch] || "stable").to_sym+ file_name = ARGV.last+ format = (file_name =~ /\.ya?ml\Z/i) ? :yml : :jsonspec = API::OpenAPI.spec-- File.open(Rails.application.root.join("docs/api/apiv3/openapi-spec-single.yml"), "w") do |f|- f.write spec.to_yaml++ File.open(file_name, "w") do |f|+ if format == :yml+ f.puts spec.to_yaml+ else+ f.puts spec.to_json+ endendendend