Monitor sync events in Netlify Connect
This feature is available on 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 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.
# 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.
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 rebuild the data layer’s 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 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.
# Trigger a sync with the Netlify UI
Navigate to the
page for your team and select the data layer from the Data layers list.In the Activity section, select
. Netlify will start syncing the data.
# Trigger a sync with the webhook
- Navigate to the page for your team and select the data layer from the Data layers list.
- Select Data layer settings.
- Find the Webhook URL under
https://webhook.gatsbyjs.com/hooks/data_layer/data_source/publish/YOUR-DATA-LAYER-ID
. . It is formatted as - 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 five 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:
- Navigate to the page for your team in the Netlify UI.
- Select the data layer you want to review from the Data layers list.
- Review the Activity section and select a sync event in the list to access the detailed log.
Did you find this doc useful?
Your feedback helps us improve our docs.