iTwin Forms icon

iTwin Forms

Comprehensive iTwin Forms API

Overview

This node interacts with the iTwin Forms API, allowing users to manage form definitions and data within the iTwin platform. Specifically, the "Delete form definition" operation enables users to remove a form definition by its unique ID. This is useful for cleaning up obsolete or unwanted forms from an iTwin project.

Practical scenarios include:

  • Automating the removal of deprecated form templates.
  • Managing lifecycle of forms in large projects where forms are frequently updated or replaced.
  • Integrating form management into broader workflows that maintain iTwin project data consistency.

Properties

Name Meaning
ID The unique identifier of the form definition to delete. This ID should be obtained from the "Get iTwin form definitions" endpoint or from a form data instance's formId property.

Output

The output JSON contains the result of the delete operation. Typically, this will be an object indicating success or failure of the deletion request. If the operation returns multiple results (unlikely for a delete), each will be output as separate JSON objects.

If an error occurs during execution and the node is set to continue on fail, the output JSON will contain an error field with the error message and additional node information.

No binary data output is expected from this operation.

Dependencies

  • Requires an API authentication token credential for the iTwin platform (OAuth2).
  • Depends on the iTwin Forms API being accessible and the user having appropriate permissions to delete form definitions.
  • The node uses an internal interpreter class to map operations to API calls.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent form definition ID will cause the operation to fail.
    • Insufficient permissions or expired authentication tokens can lead to authorization errors.
    • Network connectivity problems may prevent successful API calls.
  • Error messages:

    • "Unknown operation: <operation>": Indicates the specified operation name is not recognized; ensure the operation parameter is correctly set to "delete-form-definition".
    • API errors returned from the iTwin service will be passed through; these often include HTTP status codes and descriptive messages.
    • If the node fails and "Continue On Fail" is enabled, errors will appear in the output JSON under the error key.

To resolve errors:

  • Verify the form ID is correct and exists.
  • Check API credentials and refresh tokens if necessary.
  • Confirm network access to the iTwin API endpoints.

Links and References

Discussion