Syncs
Switch a sync on or off
Start or pause a sync. The sync answers in state processing while it starts or stops; read its status to follow. A sync switched off can be switched on again only after a short wait, which the error names in seconds.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace the resources belong to
base_id*stringThe sync (a sync is called a base in these paths)
uuidregion*stringData region of the sync (its presence is checked; the value is used as given)
"besg""usnv"The switch to apply
application/json- body
Switch the sync on or off
switch_mode*stringON to start syncing, OFF to pause
"ON""OFF"The sync after the switch
application/json- response
The sync after the switch
data*The sync after the switch
curl -X POST 'https://api.stacksync.com/v1/workspaces/0/bases/497f6eca-6276-4993-bfeb-53cbbbba6f08/switch?region=besg' \ -H 'Content-Type: application/json' \ -d '{ "switch_mode": "ON"}'{ "data": { "base_id": "3f6c1d2e-8a4b-4c7d-9e21-5b6f7a8c9d01", "switch_mode": "ON", "base_status": "processing" }}POSTRename a sync
Change the name of a sync. The name must follow the name rule and be free in the workspace. Send `validate_only: true` to check the name without renaming.
POSTSet the change capture method
Sets how changes are captured from one Postgres app of a sync: triggers, or logical replication.