Syncs
Set the change capture method
Sets how changes are captured from one Postgres app of a sync: triggers, or logical replication.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace. List the ones your key can reach with GET /v1/workspaces.
base_id*stringThe sync.
uuidapp_id*stringOne of the sync's two apps, as listed in the sync's apps.
region*RegionsThe region of the sync
"besg""usnv"application/json- body
cdc_method*CDCMethodtriggers, or logical_replication when the database allows it
"triggers""logical_replication"validate_only?Validate OnlyRun every check of the write and answer 204 without writing: a refused write answers the error the write would
falseOK
application/json- response
POST /bases/<base_id>/apps/<app_id>/cdc-method
app_id*App Idcdc_method*CDCMethod"triggers""logical_replication"curl -X POST 'https://api.stacksync.com/v1/workspaces/0/bases/497f6eca-6276-4993-bfeb-53cbbbba6f08/apps/string/cdc-method?region=besg' \ -H 'Content-Type: application/json' \ -d '{ "cdc_method": "triggers"}'{ "app_id": "<app_id>", "cdc_method": "triggers"}POSTSwitch 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.
POSTSet the rate limit of an app
Set the most requests Stacksync makes to one app of the sync per period. The sync may stay on. Leave rate limits at Stacksync's default unless the app asks for less.