iTwin Projects icon

iTwin Projects

Comprehensive iTwin Projects API

Overview

This node enables creating a new repository resource within an iTwin project environment. It is designed to interact with the iTwin API to add resources uniquely identified within a specified repository and iTwin context. This operation is useful when managing digital twins or infrastructure projects where you need to programmatically add resources such as models, datasets, or other assets into a repository.

Practical examples include:

  • Automating the addition of new design files or data sets into a project repository.
  • Integrating external systems that generate resources dynamically and pushing them into the iTwin platform.
  • Managing large-scale infrastructure projects by scripting resource creation workflows.

Properties

Name Meaning
iTwin ID The unique identifier of the iTwin project where the repository resides.
Repository ID The unique identifier of the repository within the iTwin project where the resource will be created.
ID The unique identifier for the new resource within the repository. Must be unique to avoid conflicts.
Display Name The user-friendly name of the resource to display. Must be unique within the repository.
Options Additional optional settings:
- Custom Payload Allows overriding the default request body with a custom JSON payload for advanced use cases.

Output

The node outputs JSON data representing the response from the iTwin API after attempting to create the repository resource. The structure typically includes details about the newly created resource or error information if the operation fails.

If a custom payload is used, the output reflects the API's response to that specific payload.

No binary data output is indicated.

Dependencies

  • Requires an API authentication token credential configured in n8n to authenticate requests against the iTwin API.
  • Depends on the iTwin Projects API endpoint for repository resource management.
  • The node internally uses an OpenAPI interpreter module to map operations and execute API calls.

Troubleshooting

  • Common issues:

    • Duplicate resource IDs or display names within the same repository causing conflicts.
    • Invalid or missing iTwin ID or repository ID parameters leading to failed API calls.
    • Incorrectly formatted custom JSON payloads resulting in API errors.
  • Error messages:

    • "Unknown operation": Indicates the specified operation is not recognized; ensure "create-repository-resource" is selected.
    • API errors related to authentication failures suggest checking the configured API key or OAuth credentials.
    • Validation errors from the API about uniqueness or required fields should be resolved by verifying input property values.

Links and References

Discussion