Skip to main content

Sync API

The Sync API is designed for third-party systems that want to replicate LetsBuild user data. It is a read-only API and does not support write operations.

Sync API latency

The Sync Service behind this API precomputes a "view of the world" for each user, allowing it to efficiently respond to queries about a user's data at a specific point in time. As a result, there can be a delay between a change made in LetsBuild and when it is reflected in the Sync API.

The system is designed to be eventually consistent, meaning all changes made in LetsBuild will eventually be reflected in the Sync API. However, this may not happen immediately. Typically, the delay is less than 5 minutes, though it can be longer in some cases.

Using Sync resolvers and the cursor

The Sync API uses a cursor to paginate through the results as well as to store the point in time that the client has reached as part of the sync. The cursor is a string that represents the current state of your sync client. You should not attempt to construct your own cursor, always use the cursor returned by the API for each Sync response

FAQ

Why am I getting "00000000-0000-0000-0000-000000000000" (null Guid) for some UUID fields ?

This scenario can occur when several related entities are created in LetsBuild within a short time frame. The Sync Service might have processed some changes but not all, resulting in incomplete data. To avoid locking and to return changes as quickly as possible, the service may provide partial data initially. This is a rare occurrence.

Since the system is eventually consistent, the missing data will be available in the Sync API after a short delay, reflected as an update to the partial entity. No action is required on the client side.