OpenProject icon

OpenProject

Consume OpenProject API

Overview

This node interacts with the OpenProject API to retrieve all entries of a specified "Type" resource. It is designed to fetch multiple type records with flexible options for filtering, sorting, pagination, and grouping. This operation is useful when you want to list or analyze all available types in your OpenProject instance, such as issue types or task categories.

Practical examples include:

  • Retrieving all types to populate a dropdown menu in a workflow.
  • Exporting all types for reporting or synchronization with other systems.
  • Filtering types by specific criteria (e.g., only active types) before processing them further.

Properties

Name Meaning
Options Collection of optional parameters to customize the query:
- Limit Max number of results to return (minimum 1).
- Offset Number of results to skip (minimum 0), useful for pagination.
- Filter Filter results by specific fields using field=value syntax (e.g., status=open).
- Sort By Sort results by a field and direction, e.g., created_at:desc.
- Select Fields Comma-separated list of fields to include in the response (e.g., id,name,status).
- Group By Group results by a specific field (e.g., status).

Output

The node outputs an array of JSON objects representing the retrieved "Type" resources from OpenProject. Each object corresponds to one type entry and contains fields as returned by the OpenProject API, filtered and selected according to the input options.

No binary data output is produced by this operation.

Example output structure (simplified):

[
  {
    "id": "123",
    "name": "Bug",
    "description": "A software bug",
    "status": "active",
    ...
  },
  {
    "id": "124",
    "name": "Feature",
    "description": "A new feature request",
    "status": "active",
    ...
  }
]

Dependencies

  • Requires an API key credential for authenticating with the OpenProject API.
  • The base URL of the OpenProject instance must be configured in the credentials.
  • Uses HTTP Basic Authentication with the API key encoded in Base64.
  • Depends on the axios HTTP client library for making API requests.

Troubleshooting

  • Common issues:

    • Incorrect or missing API key credential will cause authentication failures.
    • Invalid filter syntax may result in no results or API errors.
    • Exceeding API rate limits or server errors can cause request failures.
    • Using unsupported fields in selectFields, sortBy, or groupBy may lead to unexpected results or errors.
  • Error messages:

    • "OpenProject error response: <message>": Indicates an error returned by the OpenProject API, often due to invalid parameters or permissions. Check the message for details.
    • Network or connection errors: Verify the base URL and network connectivity.
    • "The resource 'type' is not supported!": Should not occur for this operation; if it does, verify the resource parameter is correctly set to "type".
  • To resolve errors, ensure that:

    • Credentials are valid and have sufficient permissions.
    • Input parameters follow the expected format.
    • The OpenProject instance is reachable and operational.

Links and References

Discussion