iTwin Projects icon

iTwin Projects

Comprehensive iTwin Projects API

Overview

This node operation allows users to create a new repository within an iTwin project environment. It is useful for managing various types of data repositories associated with digital twins, such as reality data, iModels, GIS data, sensor data, and more. By creating repositories, users can organize and store different classes and subclasses of data relevant to their iTwin projects.

Practical examples include:

  • Creating a Reality Data repository to store 3D spatial data.
  • Setting up an iModels repository to manage building information models.
  • Establishing a Geographic Information System (GIS) repository for geospatial features.
  • Adding a Sensor Data repository to collect and manage IoT sensor outputs.

Properties

Name Meaning
iTwin ID The unique identifier of the iTwin project where the repository will be created.
Class The main classification of the repository. Options: Reality Data, iModels, Storage, Forms, Construction, Geographic Information System, Cesium Curated Content, Sensor Data, Subsurface, Geospatial Features, Pdf Plansets.
Sub Class The subclassification of the repository, providing further categorization. Options: Web Map Service, Web Map Tile Service, Arc GIS, URL Template, Performance, Evo Workspace.
Display Name The user-friendly name for the repository that will be displayed in interfaces.
Uri The URI endpoint or address associated with the repository.
Authentication JSON object containing authentication details required to access the repository API (e.g., headers).
Options JSON object specifying additional options for querying or displaying data from the repository.
Options (Custom Payload) Allows overriding the request body with a custom JSON payload if enabled. This provides flexibility to send any specific data structure to the API when creating the repository.

Output

The node outputs JSON data representing the result of the repository creation operation. This typically includes details about the newly created repository such as its identifiers, status, and metadata returned by the iTwin Projects API.

If the operation returns binary data (not indicated here), it would represent files or other binary content related to the repository, but this node primarily deals with JSON responses.

Dependencies

  • Requires an API key or OAuth2 token credential configured in n8n to authenticate with the iTwin Projects API.
  • Depends on the iTwin Projects API service being accessible.
  • The node uses an internal interpreter module (ProjectsOpenApiInterpreter) to map operations and execute API calls.

Troubleshooting

  • Common issues:

    • Missing or invalid iTwin ID or URI may cause the API call to fail.
    • Incorrect authentication details in the "Authentication" property can lead to authorization errors.
    • Providing an unsupported class or subclass value will likely result in validation errors from the API.
    • Malformed JSON in the "Options" or "Custom Payload" fields can cause parsing errors.
  • Error messages:

    • "Unknown operation": Indicates the specified operation is not recognized; ensure "create-repository" is selected.
    • API errors related to authentication or permissions should be resolved by verifying credentials.
    • JSON parsing errors suggest correcting the syntax in JSON input fields.

Links and References

  • iTwin Developer Documentation
  • For detailed API specs and repository management, consult the official iTwin Projects API documentation linked above.

Discussion