OpenProject icon

OpenProject

Interact with OpenProject via API

Actions199

Overview

This node operation, View Default Query under the Queries resource, allows users to retrieve a default saved query from OpenProject and customize its result set dynamically. Instead of creating new queries, users can view and override filters, sorting, grouping, pagination, and display options on an existing default query.

Typical use cases include:

  • Fetching work packages (tasks/issues) with specific filters applied temporarily without altering the saved query.
  • Paginating through large sets of work packages returned by the default query.
  • Adjusting how results are grouped or sorted for reporting or dashboard purposes.
  • Enabling timeline views and hierarchies dynamically based on user preferences.

For example, a project manager might want to view all open tasks assigned to certain team members, sorted by status ascending, grouped by status, and displayed in a timeline zoomed by days, without changing the underlying saved query.

Properties

Name Meaning
Filters JSON string specifying filter conditions to override the query's persisted filters. Accepts all filters supported by the work packages endpoint. Send [] for no filters. Example: [{"assignee": {"operator": "=", "values": ["1", "5"]}}].
Offset Number indicating the page number inside the query's result collection of work packages. Used for pagination.
Page Size Number of elements to display per page in the query's result collection. Controls pagination size.
Sort By JSON string specifying sort criteria overriding the query's persisted sort order. Example: [["status", "asc"]].
Group By String specifying the column to group results by, overriding the query's persisted group criteria. Example: "status".
Show Sums Boolean indicating whether properties that support summation should be summed up in the results, overriding the query's persisted sums property.
Timestamps String specifying timestamps to filter changed attributes on work packages. Supports ISO8601 dates/durations and relative date keywords like "oneDayAgo@HH:MM+HH:MM". Values older than 1 day require a valid Enterprise Token.
Timeline Visible Boolean indicating whether the timeline view should be shown.
Timeline Zoom Level String indicating the zoom level for the timeline. Valid values: days, weeks, months, quarters, years.
Show Hierarchies Boolean indicating whether hierarchy mode should be enabled in the results.

Output

The node outputs JSON data representing the queried work packages according to the specified filters and display options. The output structure typically includes:

  • A collection of work package objects matching the query parameters.
  • Metadata about pagination, sorting, grouping, and sums if applicable.
  • Timeline and hierarchy information if those options are enabled.

If binary data is present (not indicated here), it would represent attachments or files related to work packages, but this operation focuses on JSON data.

Dependencies

  • Requires an API key credential for authenticating with the OpenProject API.
  • Needs the base URL of the OpenProject instance configured in credentials.
  • The user must have appropriate permissions to access queries and work packages.
  • For filtering by timestamps older than one day, a valid Enterprise Token is required.

Troubleshooting

  • Invalid JSON in Filters or Sort By: Since filters and sort criteria are passed as JSON strings, malformed JSON will cause errors. Validate JSON syntax before input.
  • Permission Denied: If the API key lacks rights to view queries or work packages, the node will fail. Ensure correct API credentials and user permissions.
  • Enterprise Token Required: Using timestamp filters older than one day without an Enterprise Token will result in authorization errors.
  • Pagination Issues: Setting offset or page size incorrectly may lead to empty results or repeated data. Verify these values align with the total available items.
  • Unsupported Timeline Zoom Level: Providing invalid values for timeline zoom level will cause errors. Use only allowed values (days, weeks, months, quarters, years).

Links and References

Discussion