How to Trigger Syncs Manually Using the REST API
Question
How can I trigger connection syncs manually using the Fivetran REST API?
Answer
Sync rescheduling doesn't work with manual sync scheduling. When you enable manual sync scheduling, you must always manually trigger all syncs, including any syncs that are rescheduled.
To enable manual sync scheduling and trigger a manual sync, do the following:
Use the Update a Connection endpoint to set your connection's
schedule_typeparameter tomanual:PATCH https://api.fivetran.com/v1/connections/{connection_id}{ "schedule_type": "manual", "run_setup_tests": false }Use the Sync Connection Data endpoint to trigger a data sync:
POST https://api.fivetran.com/v1/connections/{connection_id}/sync{ "force": true }Using the
"force": truepayload parameter in the request stops a sync that is in progress. Leave the payload empty if you don't want to stop a current sync.
When you enable manual sync scheduling, we ignore the set sync_frequency. You can trigger syncs manually using the REST API or by clicking Sync in the top right of your connection overview page in Fivetran.
To learn how to manage a connection through its entire lifecycle using the Fivetran REST API, see our Manage Connection Using the REST API tutorial.