iTwin Projects icon

iTwin Projects

Comprehensive iTwin Projects API

Overview

This node operation, Upload iTwin Image, allows users to upload an image associated with a specific iTwin project by providing the iTwin ID. It is useful in scenarios where you want to programmatically add or update images related to digital twins managed within the iTwin platform. For example, you might use this node to upload architectural renderings, site photos, or other visual documentation directly into an iTwin project workflow.

Properties

Name Meaning
iTwin ID The unique identifier of the iTwin project to which the image will be uploaded.
Options Additional optional settings for the upload:
   Custom Payload Allows overriding the default request body with a custom JSON payload. If enabled, you can specify any JSON structure to send as the request body instead of the standard format.

Output

The node outputs JSON data representing the response from the iTwin API after attempting to upload the image. This typically includes metadata about the uploaded image or confirmation of success. The exact structure depends on the API response but generally contains details such as image IDs, status, and any messages returned by the server.

No binary data output is indicated in the source code or property definitions.

Dependencies

  • Requires an API authentication token credential configured in n8n to authenticate requests to the iTwin platform.
  • Depends on the iTwin Projects API endpoint that handles image uploads.
  • The node internally uses a dynamically imported interpreter module (not fully shown) to execute the operation.

Troubleshooting

  • Common issues:
    • Missing or incorrect iTwin ID will cause the upload to fail.
    • Invalid or expired API credentials will result in authentication errors.
    • Improperly formatted custom JSON payloads (if used) may cause request failures.
  • Error messages:
    • "Unknown operation" if the operation name is not recognized (unlikely here since operation is fixed).
    • API errors returned from the iTwin service, which should be inspected in the node's output error message.
  • Resolutions:
    • Verify the iTwin ID is correct and exists.
    • Ensure API credentials are valid and have necessary permissions.
    • Validate any custom JSON payload before enabling it.

Links and References

  • iTwin Developer Documentation
  • Refer to the official iTwin Projects API docs for detailed information on image upload endpoints and payload formats.

Discussion