See Stacksync in action with a solution architect. Book a demo ↗
Syncs

Syncs

Set the change capture method

POST
/v1/workspaces/{workspace_id}/bases/{base_id}/apps/{app_id}/cdc-method

Sets how changes are captured from one Postgres app of a sync: triggers, or logical replication.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace. List the ones your key can reach with GET /v1/workspaces.

base_id*string

The sync.

Formatuuid
app_id*string

One of the sync's two apps, as listed in the sync's apps.

Query Parameters

region*Regions

The region of the sync

Value in"besg""usnv"

Request Body

application/json
  1. body
cdc_method*CDCMethod

triggers, or logical_replication when the database allows it

Value in"triggers""logical_replication"
validate_only?Validate Only

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Defaultfalse

Response Body

OK

application/json
  1. response

POST /bases/<base_id>/apps/<app_id>/cdc-method

app_id*App Id
cdc_method*CDCMethod
Value in"triggers""logical_replication"
Set the change capture method
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"}