iTwin iModels icon

iTwin iModels

Interact with iTwin Platform iModels API for managing iModels, changesets, named versions, and more

Actions54

Overview

This node interacts with the iTwin Platform to create a share link for an iModel. Creating an iModel share allows users to generate a shareable key granting access to a specific iModel with defined permissions and expiration. This is useful in scenarios where you want to securely share an iModel with external collaborators or applications without giving full access to the entire platform.

Practical examples:

  • Generating a temporary read-only link to an iModel for a client review.
  • Creating a webview share link that can be embedded in a website or application.
  • Automating the creation of expiring shares for limited-time access during project phases.

Properties

Name Meaning
ID The unique identifier of the iModel to share. This is required to specify which iModel the share will be created for.
Name The name assigned to the share. This helps identify the share link, e.g., "Client Review Share".
Expires At A universal datetime string (recommended ISO 8601 format) specifying when the share will expire. Cannot be set more than 6 months into the future. Example: 2022-10-01T15:35:35.7777777Z.
Permission The level of permission granted via the share key. Options are:
- imodels_webview: Allows viewing the iModel in a webview.
- imodels_read: Grants read-only access to the iModel data.
Options Additional options including:
- Custom Payload: Allows overriding the request body with a custom JSON payload if enabled. This is useful for advanced use cases requiring direct control over the API request body.

Output

The node outputs JSON data representing the response from the iTwin Platform API after creating the iModel share. This typically includes details about the newly created share such as its ID, share key, permissions, expiration, and other metadata.

No binary data output is involved.

Dependencies

  • Requires an API authentication token credential configured in n8n to authenticate with the iTwin Platform.
  • Depends on the iTwin Platform's iModels API endpoint to create shares.
  • The node uses an internal OpenAPI interpreter module to map operations and execute requests.

Troubleshooting

  • Common issues:

    • Invalid or missing iModel ID: Ensure the provided iModel ID exists and is correctly formatted.
    • Expiration date too far in the future: The API restricts expiration dates to within 6 months; setting beyond this will cause errors.
    • Insufficient permissions: The API key used must have rights to create shares on the specified iModel.
    • Malformed custom payload JSON: If using the custom payload option, ensure the JSON is valid.
  • Error messages:

    • "Unknown operation": Indicates the operation parameter is incorrect or unsupported.
    • API errors related to authorization or validation will be returned in the node output if "Continue On Fail" is enabled.

To resolve errors, verify input parameters, check API credentials, and consult the iTwin Platform API documentation for permission requirements.

Links and References

Discussion