OpenProject icon

OpenProject

Interact with OpenProject via API

Actions199

Overview

This node operation "List Available Parent Project Candidates" for the "Projects" resource interacts with an OpenProject API to retrieve a list of projects that can be considered as potential parent projects for a specified project. It is useful in scenarios where you want to organize projects hierarchically by selecting valid parent projects dynamically based on filters and sorting criteria.

Practical examples include:

  • When managing multiple projects, you may want to find all possible parent projects for a given project to maintain a clear project structure.
  • Filtering parent candidates by specific attributes (e.g., ancestor relationships) to ensure only relevant projects are selectable as parents.
  • Sorting the candidate projects by ID or other criteria to present them in a meaningful order.

Properties

Name Meaning
Filters JSON string specifying filter conditions to narrow down the list of available parent project candidates. Example: filtering by ancestor project ID.
Of The ID or identifier of the project for which the parent candidates are being determined.
Sort By JSON string specifying sort criteria for the returned list of projects. Accepts the same format as the queries endpoint in OpenProject API.

Output

The node outputs a JSON array containing the list of projects that qualify as available parent candidates according to the provided filters and sorting criteria. Each item in the output typically represents a project object with its properties as returned by the OpenProject API.

If the API supports binary data for projects (unlikely in this context), it would be summarized here, but this operation primarily deals with JSON data.

Dependencies

  • Requires an active connection to an OpenProject instance via its REST API.
  • Needs an API key or token credential configured in n8n to authenticate requests.
  • The base URL of the OpenProject server must be set in the credentials.
  • The node uses standard HTTP headers for JSON content negotiation.

Troubleshooting

  • Invalid Filter JSON: If the Filters property contains malformed JSON, the API request will fail. Ensure the JSON string is correctly formatted.
  • Incorrect Project ID in 'Of': Providing a non-existent or invalid project ID will result in no parent candidates or an error response.
  • Authentication Errors: Missing or incorrect API credentials will cause authentication failures. Verify the API key/token and base URL.
  • API Endpoint Changes: If the OpenProject API changes, the node might fail to fetch data. Check for updates or API deprecations.
  • Sorting Format Issues: The Sort By property must follow the expected JSON array format; otherwise, sorting may not apply or cause errors.

Links and References

Discussion