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 clone an existing iModel within a specified iTwin. It allows users to create a new iModel by copying data from a source iModel, optionally specifying which changesets to include in the clone. This is useful for scenarios such as creating backups, branching workflows, or setting up test environments based on existing iModels.

Practical examples:

  • Cloning a production iModel to create a sandbox environment for testing changes without affecting live data.
  • Creating a backup copy of an iModel at a specific changeset state.
  • Duplicating an iModel with a new name and description for a different project phase.

Properties

Name Meaning
ID The unique identifier of the source iModel to be cloned.
iTwin ID The identifier of the iTwin where the new cloned iModel will be created.
Changeset ID The ID of the latest changeset from the source iModel to include in the clone. If not provided, all changesets are copied. Specifying an empty string means no changesets are copied, only the original baseline is used.
Changeset Index The index (non-negative integer) of the latest changeset from the source iModel to include in the clone. Works as an alternative to Changeset ID. If not provided, all changesets are copied. An index of 0 means no changesets are copied, only the baseline.
Name The name for the new cloned iModel. Must be unique within the target iTwin. If omitted, the original iModel's name is used. Maximum length is 255 characters.
Description A description for the new cloned iModel. If omitted, the original iModel's description is used. Maximum length is 255 characters.
Options Additional options including a "Custom Payload" option that allows overriding the request body with a user-defined JSON payload. This enables advanced customization beyond the standard parameters.

Output

The node outputs JSON data representing the result of the clone operation. This typically includes details about the newly created iModel such as its ID, name, description, and status. The output structure directly reflects the API response from the iTwin platform's clone iModel endpoint.

No binary data output is produced by this node.

Dependencies

  • Requires an API authentication token credential configured in n8n to access the iTwin Platform APIs.
  • Depends on the iTwin Platform service being accessible and the user having appropriate permissions to clone iModels within the specified iTwin.
  • Uses an internal OpenAPI interpreter module to execute the clone operation.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent iModel ID or iTwin ID will cause the operation to fail.
    • Attempting to clone with a duplicate iModel name within the same iTwin will result in an error.
    • Incorrect changeset ID or index values may lead to unexpected cloning results or errors.
    • Network or authentication failures can prevent successful API calls.
  • Error messages:

    • "Unknown operation": Indicates the specified operation is not recognized; ensure "Clone iModel" is selected.
    • API errors related to permissions or resource not found should be resolved by verifying credentials and IDs.
    • Validation errors on input properties (e.g., name length, changeset index) require correcting the input values.

Links and References

Discussion