Synchronization API Overview
Introduction
The Synchronization API allows you to integrate engineering data into your iTwin composition. With this API, you can synchronize data from a variety of CAD and BIM applications, as well as different file formats. Requests are handled through specific Connectors, enabling the aggregation and alignment of data within an iModel. This ensures that your iTwin stays current and up-to-date.
Key Features
- Synchronize files directly from your document management system or the storage location where it resides using pre-authenticated URLs.
- Synchronize files directly from iTwin Storage.
- A wide range of connectors is available to facilitate your synchronization setup. Refer to the Supported formats section for the complete list of supported formats.
- Set the required synchronization configuration on the iTwin, iModel, or Connection scopes to define how data needs to be processed.
- Troubleshoot data or synchronization issues using the Diagnostic Reports.
Familiarize with important concepts while completing the Synchronization API accreditation course.
Integrations
With Manifest Connections, you can set up synchronizations for any document management system that supports pre-authenticated file access URLs.
Here are some resources to help you get started quickly:
- Azure Blob Storage: Follow the tutorial or the sample on synchronizing a file from Azure Blob Storage.
- SharePoint: Refer to the SharePoint sample.
Workflow
Manifest Connections
To create and run initial synchronization:
- Get pre-authenticated file access URLs from the file storage that you are using.
- Create Manifest Connection: Use the
synchronization/imodels/manifestconections
endpoint to create a connection that establishes links between your design files and iModel. - Run Connection: Use the
synchronization/imodels/manifestconnections/{connectionId}/runs
endpoint to run the created connection by passing access URLs. - Get Run Status: Use the
synchronization/imodels/manifestconnections/{connectionId}/runs/{runId}
endpoint to check the run status. - Chech Diagnostic Report: Use the
synchronization/reports?{iModelId}&{runId}[&taskId]
endpoint to inspect any found issues.
To update an iModel when engineering data is changed:
- Get pre-authenticated file access URLs from the file storage that you are using.
- Run Connection again: Use the
synchronization/imodels/manifestconnections/{connectionId}/runs
endpoint to run the required connection by passing access URLs.
You can also use the synchronization/imodels/manifestconnections/{connectionId}/sourcefiles/{sourceFileId}
endpoints to add, update, or delete the required design file from the Manifest Connection.
Basic Concepts
Familiarize yourself with these concepts that are used throughout the documentation:
Connectors identify differences in the source models between job runs. This synchronization results in Changesets, which contain the modifications sent to the iModel service. This is the key distinction between a Connector and a one-time converter.
During the initial synchronization, the Changeset will include the entire model's content. In subsequent synchronization runs, Changesets will reflect only the incremental differences between the existing iModel and your changes. If there are no modifications to the source model, the Connector will not process the synchronization, and no Changesets will be generated.
- User-Centered Applications/User Intercase: Use the user authorization workflow and provide the connection owner's refresh token obtained from the Get Authorization Information API. This API will also provide a redirect URL if the token needs renewal.
- Backend Service: For applications without a user interface, use a service-type application when registering a client and set the
authenticationType
to "Service" on the connection.
Media Links
- The Synchronization API - Accreditation course
- iTwin Developer Conference 2022. Synchronization API: Connectors to the Rescue - YouTube
- iTwin Developer Webinar. iTwin Synchronization: Bring Together a Wide Array of Disparate Engineering Data - YouTube
Was this page helpful?