Netlify Connect /

Monitor sync events in Netlify Connect

This product is available on Connect Enterprise plans.

Netlify Connect automatically syncs and updates your data layer to ensure that you always have access to the latest data. You can review all sync events for your data layer in the Activity section on the data layer’s overview page.

This document covers the types of sync events that occur and how to access sync event logs.

# Sync events

There are three types of events that can occur in Netlify Connect:

  • Sync from all data sources: the system reads data source configurations, installs dependencies, and then retrieves data from all connected data sources. Once the data is retrieved, the system uses the information to build or update the GraphQL schema for the data layer
  • Sync from {data source type}: the system retrieves data from the specified data source
  • Sync to database: the system syncs data to the data layer’s database as a new data revision and makes it available through the GraphQL API

When you create and configure a new data layer, modify a data source configuration, or manually trigger a sync, Netlify does a full sync to set up or update the data layer. When this occurs, the events are Sync from all data sources, and then Sync to database.

When data in a connected source updates, such as newly published content in your CMS, Netlify only syncs the updated data source. The events are Sync from {data source type}, and then Sync to database.

Each successful sync generates a new data revision. You can review all available data revisions in the Revisions section on the data layer’s overview page. Learn more about data revisions.

# Automated syncs

One of the benefits of Netlify Connect is that it automatically updates your data layers to ensure they always have access to the latest data.

The API will use the pinned revision, even if syncs generate new ones

If you pin a data revision, successful syncs will continue to generate new revisions but the GraphQL API for your data layer will always use the pinned one.

Automated syncs occur in the following scenarios:

  • When you add or update configurations for any data sources connected to your data layer. This triggers a sync of all connected data sources and Netlify will create a new data revision and update the GraphQL schema and API to reflect the change.
  • When data in a connected data source updates, such as when you publish new content in your CMS. Netlify will be notified of the change and will automatically create a new data revision and update your data layer.

# Manual syncs

If you are troubleshooting and want to manually trigger a refresh of all data in your data layer, you can start a sync from all connected data sources through the Netlify UI or a webhook.

Note that if your data layer’s API is using a pinned data revision, Netlify will generate a new revision to reflect the data sync but the API will continue to use the old data. Make sure to unpin the old data revision and/or pin the new revision once the data refresh is complete.

# Trigger a sync with the Netlify UI

  1. Navigate to the

    page for your team and select the data layer from the Data layers list.

  2. In the Activity section, select

    . Netlify will start syncing the data.

# Trigger a sync with the webhook

  1. Navigate to the page for your team and select the data layer from the Data layers list.
  2. Select Data layer settings.
  3. Find the Webhook URL under . It is formatted as https://webhook.netlify-connect.com/hooks/data_layer/data_source/publish/{data_layer_id}.
  4. Send a POST request to this webhook and Netlify will start syncing the data. You can leave the request body empty.

# Review data layer sync events

Logs are retained for 5 days

Currently, Netlify Connect only retains logs for five days. Older events are listed in the Activity section, but the logs are unavailable.

To review sync events for a data layer, navigate to the overview page for that data layer:

  1. Navigate to the page for your team in the Netlify UI.
  2. Select the data layer you want to review from the Data layers list.
  3. Review the Activity section and select a sync event in the list to access the detailed log.

Example data layer activity section with a sync event expanded to reveal the detailed logs.

To review the associated data revision for a successful sync, select Revisions.