OpenProject icon

OpenProject

Interact with OpenProject via API

Actions199

Overview

This node interacts with the OpenProject API to list projects based on specified filter and sorting criteria. It is useful for retrieving a customized list of projects from an OpenProject instance, allowing users to apply complex filters and sort orders to tailor the output to their needs.

Common scenarios include:

  • Fetching all active projects under a specific ancestor project.
  • Retrieving projects created within a certain timeframe.
  • Listing projects visible to a particular user.
  • Sorting projects by creation date or latest activity.

Practical example: A project manager wants to get a list of all active projects under a parent project with ID 1, sorted by project ID in ascending order, including only the total count and each project's identifier and name.

Properties

Name Meaning
Filters JSON string specifying filter conditions to narrow down the list of projects. Supports filters such as:
- active: filter by whether projects are active.
- ancestor: filter projects by their ancestor (excluding the project itself).
- available_project_attributes: filter by activated project attributes.
- created_at: filter by project creation time.
- latest_activity_at: filter by last activity time.
- name_and_identifier: filter by project name and identifier.
- parent_id: filter by parent project.
- principal: filter by project members.
- storage_id and storage_url: filter by linked storages.
- type_id: filter by project types.
- user_action: filter by current user's actions in projects.
- id: filter by project IDs.
- visible: filter projects visible to a specific user ID.
Additional filters may be supported based on custom fields configured in OpenProject.
Sort By JSON string specifying sort criteria for the returned projects. Supported sort keys include:
- id
- name
- typeahead (sorts by hierarchy and name)
- created_at
- public
- latest_activity_at
- required_disk_space
Additional sort options may exist based on custom fields.
Select Comma-separated list of properties to include in the response. For example, "total,elements/identifier,elements/name" will return the total number of projects and for each project its identifier and name.

Output

The node outputs JSON data representing the list of projects retrieved from the OpenProject API. The structure typically includes:

  • total: Total number of projects matching the filters.
  • elements: An array of project objects, each containing the selected properties such as identifier, name, and any other requested fields.

If binary data were involved (not indicated here), it would represent file attachments or similar content, but this node focuses on JSON project data only.

Dependencies

  • Requires an API key credential for authenticating with the OpenProject API.
  • Needs the base URL of the OpenProject instance configured in the node credentials.
  • Uses standard HTTP headers for JSON communication (Accept: application/json, Content-Type: application/json).

Troubleshooting

  • Invalid Filter or Sort JSON: If the JSON strings provided in Filters or Sort By are malformed, the API request will fail. Ensure valid JSON syntax.
  • Unsupported Filter or Sort Keys: Using unsupported filter or sort keys may result in empty results or errors. Refer to OpenProject API documentation for supported keys.
  • Authentication Errors: Missing or incorrect API credentials will cause authentication failures. Verify that the API key and base URL are correctly set.
  • Empty Results: If no projects match the filters, the output will have total as 0 and an empty elements array.
  • API Endpoint Changes: Changes in the OpenProject API might affect compatibility. Keep the node and API version aligned.

Links and References

Discussion