iTwin Component Center icon

iTwin Component Center

Comprehensive iTwin Component Center API

Overview

This node integrates with the iTwin Component Center API to update a component document. It allows users to modify metadata and properties of an existing document associated with a specific component in the Component Center. This is useful for managing design documents, thumbnails, references, gallery images, or type catalogs related to components in a digital twin environment.

Typical use cases include:

  • Updating the display name or version of a design document.
  • Associating a new thumbnail or type catalog document with an existing design document.
  • Marking a document as active or available.
  • Managing document versions by linking to previous versions.

For example, a user might update the version and display name of a design document after revisions or link a new thumbnail image to a design document.

Properties

Name Meaning
Component ID The unique identifier of the component to which the document belongs.
Document ID The unique identifier of the document to be updated.
Display Name The display name of the document. Must be at most 250 characters and cannot contain special characters >, <, ^, $, ?, `
Extension The file extension associated with the document (e.g., rfa, dgn, txt).
Version The version string of the document.
Previous Version ID For documents with purpose 'Design', this should hold the ID of the previous active design document when up-versioning.
Associated Design Document For documents with purpose 'Thumbnail' or 'TypeCatalog', this refers to the associated design document's ID.
Purpose The purpose of the document. Options are: Design, Thumbnail, Reference, Gallery Image, Type Catalog. Only one TypeCatalog document can exist per component with an existing design document. Display names of type catalog and design document must match.
Available Boolean indicating if a file is associated with the document.
Is Active Boolean indicating if the document is active. By default true except for 'Design' documents or 'Thumbnail' documents linked to a design document where only one version can be active.
Options → Custom Payload Allows overriding the request body with a custom JSON payload instead of using the standard parameters. Useful for advanced or unsupported API fields.

Output

The node outputs an array of JSON objects representing the response from the Component Center API after updating the document. Each output item contains the updated document data as returned by the API.

If the operation returns multiple items, each is output as a separate JSON object in the array.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the iTwin Component Center API.
  • The node depends on the internal ComponentCenterOpenApiInterpreter class to map operations and execute API calls.
  • Proper configuration of OAuth2 or API credentials within n8n is necessary to authorize requests.

Troubleshooting

  • Unknown operation error: If the operation parameter is incorrect or not supported, the node throws an "Unknown operation" error. Ensure the operation is set to "update-component-document".
  • Validation errors: The API may reject updates if required fields like componentId, documentId, or displayName are missing or invalid. Check that all required fields are provided and meet constraints (e.g., display name length and forbidden characters).
  • Version conflicts: When updating design documents with versioning, ensure previousVersionId is correctly set to avoid conflicts.
  • Authentication failures: Verify that the API credentials are valid and have sufficient permissions.
  • Custom Payload issues: If using the custom payload option, ensure the JSON is well-formed and matches the API schema; otherwise, the request may fail.

Links and References

Discussion