Skip to content

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

Add timestamps parameter to OpenAPI GET query endpoints

Christophe Bliardcd5ec21e45a0
diff --git a/docs/api/apiv3/paths/project_queries_default.yml b/docs/api/apiv3/paths/project_queries_default.yml
index cd765cd12b5..a5bed27f8a9 100644
--- a/docs/api/apiv3/paths/project_queries_default.yml
+++ b/docs/api/apiv3/paths/project_queries_default.yml
@@ -1,6 +1,15 @@
# /api/v3/projects/{id}/queries/default
---
get:
+ summary: View default query for project
+ operationId: View_default_query_for_project
+ tags:
+ - Queries
+ description: Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries)
+ 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:
- description: Id of the project the default query is requested for
example: '1'
@@ -9,74 +18,83 @@ get:
required: true
schema:
type: integer
- - description: |-
+ - name: filters
+ 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.
+ - name: offset
+ 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
+ - name: pageSize
+ 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
+ - name: sortBy
+ 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
+ - name: groupBy
+ 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
+ - name: showSums
+ 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.
+ - name: timestamps
+ description: Indicates the timestamps to filter by when showing changed attributes
+ on work packages. Values can be either ISO8601 durations or dates.
+ example: '2023-01-01,P-1Y,PT0S'
+ in: query
+ required: false
+ schema:
+ default: 'PT0S'
+ type: string
+ - name: timelineVisible
+ 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.
+ - name: showHierarchies
+ description: Indicates whether the hierarchy mode should be enabled.
example: true
in: query
- name: showHierarchies
required: false
schema:
default: true
@@ -203,12 +221,3 @@ get:
**Required permission:** any permission in the project
headers: {}
- tags:
- - Queries
- description: Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries)
- 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 project
diff --git a/docs/api/apiv3/paths/queries_default.yml b/docs/api/apiv3/paths/queries_default.yml
index 99f834bb7f7..d904ede3add 100644
--- a/docs/api/apiv3/paths/queries_default.yml
+++ b/docs/api/apiv3/paths/queries_default.yml
@@ -1,84 +1,101 @@
# /api/v3/queries/default
---
get:
+ summary: View default query
+ operationId: View_default_query
+ tags:
+ - Queries
+ description: Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries)
+ 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:
- - description: |-
+ - name: filters
+ 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.
+ - name: offset
+ 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
+ - name: pageSize
+ 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
+ - name: sortBy
+ 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
+ - name: groupBy
+ 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
+ - name: showSums
+ 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.
+ - name: timestamps
+ description: Indicates the timestamps to filter by when showing changed attributes
+ on work packages. Values can be either ISO8601 durations or dates.
+ example: '2023-01-01,P-1Y,PT0S'
+ in: query
+ required: false
+ schema:
+ default: 'PT0S'
+ type: string
+ - name: timelineVisible
+ 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
+ - name: timelineZoomLevel
+ 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.
+ - name: showHierarchies
+ description: Indicates whether the hierarchy mode should be enabled.
example: true
in: query
- name: showHierarchies
required: false
schema:
default: true
@@ -191,11 +208,3 @@ get:
**Required permission:** view work packages in any project
headers: {}
- tags:
- - Queries
- description: Same as [viewing an existing, persisted Query](https://www.openproject.org/docs/api/endpoints/queries/#list-queries)
- 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 query
diff --git a/docs/api/apiv3/paths/queries_schema.yml b/docs/api/apiv3/paths/queries_schema.yml
index f16335a1e59..78dec71aae1 100644
--- a/docs/api/apiv3/paths/queries_schema.yml
+++ b/docs/api/apiv3/paths/queries_schema.yml
@@ -1,6 +1,12 @@
# /api/v3/queries/schema
---
get:
+ summary: View schema for global queries
+ operationId: View_schema_for_global_queries
+ tags:
+ - Queries
+ description: Retrieve the schema for global queries, those, that are not assigned
+ to a project.
responses:
'200':
content:
@@ -25,9 +31,3 @@ get:
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 queries
diff --git a/docs/api/apiv3/paths/query.yml b/docs/api/apiv3/paths/query.yml
index 543d9216787..d70cf02000b 100644
--- a/docs/api/apiv3/paths/query.yml
+++ b/docs/api/apiv3/paths/query.yml
@@ -63,115 +63,124 @@ get:
end point accepts a number of parameters that can be used to override the resources'
persisted parameters.
parameters:
- - description: Query id
+ - name: id
+ description: Query id
example: '1'
in: path
- name: id
required: true
schema:
type: integer
- - description: |-
+ - name: filters
+ 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.
+ - name: offset
+ 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
+ - name: pageSize
+ 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.
+ - name: columns
+ 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
+ - name: sortBy
+ 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
+ - name: groupBy
+ 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
+ - name: showSums
+ 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.
+ - name: timestamps
+ description: Indicates the timestamps to filter by when showing changed attributes
+ on work packages. Values can be either ISO8601 durations or dates.
+ example: '2023-01-01,P-1Y,PT0S'
+ in: query
+ required: false
+ schema:
+ default: 'PT0S'
+ type: string
+ - name: timelineVisible
+ 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
+ - name: timelineLabels
+ 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.
+ - name: highlightingMode
+ 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`
+ - name: highlightedAttributes
+ 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.
+ - name: showHierarchies
+ description: Indicates whether the hierarchy mode should be enabled.
example: true
in: query
- name: showHierarchies
required: false
schema:
default: true