iTwin Projects icon

iTwin Projects

Comprehensive iTwin Projects API

Overview

This node operation "Get my favorite iTwins" retrieves a list of the user's favorite iTwin projects or assets from the Bentley iTwin platform. It allows filtering the favorites by specific criteria such as subclass, status, type, and whether to include inactive items. This is useful for users who want to programmatically access their personalized collection of iTwins for further processing, reporting, or integration with other systems.

Practical examples:

  • Fetch all favorite iTwin projects of certain subclasses (e.g., Asset, Project) to display in a custom dashboard.
  • Retrieve only active favorite iTwins of a particular type for automated monitoring or notifications.
  • Include inactive favorites when performing audits or historical data analysis.

Properties

Name Meaning
Sub Class Specify one or more subclasses of iTwin entities to query on, separated by commas. Filtering by subclass improves query speed. Example: Asset,Project will find all Assets or Projects matching the criteria.
Status Filter favorites by a particular status value. Cannot be used simultaneously with Include Inactive.
Type Filter favorites by a particular type value.
Include Inactive Boolean flag to include inactive iTwins in the results. Defaults to false (inactive iTwins are excluded). Cannot be used at the same time as the Status parameter.

Output

The output is an array of JSON objects representing the favorite iTwins that match the query parameters. Each item in the output corresponds to a single favorite iTwin entity with its associated metadata as returned by the Bentley iTwin API.

If the node supports binary data output, it would typically represent files or attachments related to the iTwin entities, but this operation focuses on JSON data describing favorite iTwins.

Dependencies

  • Requires an API key credential or OAuth2 token configured in n8n to authenticate with the Bentley iTwin platform.
  • Depends on the Bentley iTwin REST API endpoints for fetching favorite iTwin data.
  • The node uses internal helper classes (like ProjectsOpenApiInterpreter) to interpret and execute API operations.

Troubleshooting

  • Common issues:

    • Using both Status and Include Inactive parameters simultaneously will cause errors because they are mutually exclusive.
    • Providing invalid subclass or type values may result in empty responses or API errors.
    • Missing or invalid API credentials will lead to authentication failures.
  • Error messages:

    • "Unknown operation: get-my-favorite-itwins" indicates the operation name is incorrect or not implemented.
    • Authentication errors suggest checking the API key or OAuth2 token configuration.
    • Query parameter validation errors occur if incompatible parameters are set together.

To resolve these, ensure correct parameter usage, valid credentials, and consult Bentley iTwin API documentation for valid filter values.

Links and References

Discussion