curl --request POST \
  --url localhost:3000/api/v1/flows/cdc/create \
  --header 'Authorization: Basic OnJsYWNrd3dhbmEyMw==' \
  --header 'Content-Type: application/json' \
  --data '
{
"connection_configs": {
  "flow_job_name": "mirror_api_kick_off",
	 "source_name": "rds_peer",
  "destination_name": "ch_peer",
  "table_mappings": [
    {
      "source_table_identifier": "public.users",
      "destination_table_identifier": "users_api"
    },
    {
      "source_table_identifier": "public.payments",
      "destination_table_identifier": "payments_api"
    },
    {
      "source_table_identifier": "public.optional_ordering_key",
      "destination_table_identifier": "optional_ordering_key",
      "columns": [
        {
          "name": "id",
          "ordering": 1
        },
        {
          "name": "created_at",
          "ordering": 2
        }
      ]
    },
  ],
  "max_batch_size": 1000,
  "idle_timeout_seconds": 300,
  "publication_name": "",
  "do_initial_snapshot": true,
  "snapshot_num_rows_per_partition": 5000,
  "snapshot_max_parallel_workers": 4,
  "snapshot_num_tables_in_parallel": 2,
  "resync": false,
  "initial_snapshot_only": false,
  "soft_delete_col_name": "_peerdb_is_deleted",
  "synced_at_col_name": "_peerdb_synced_at"
}
}'
{
	"workflowId": "mirror_kick_off-peerflow-2d269226-9757-4d9f-8cfd-6adb1ca29c0e"
}
POST api/v1/flows/cdc/create

This endpoint is used to create a CDC mirror.

Request Fields

connection_configs
object
required

Connection configuration

Response Fields

workflowId
string

The ID of the parent workflow created for this mirror.

curl --request POST \
  --url localhost:3000/api/v1/flows/cdc/create \
  --header 'Authorization: Basic OnJsYWNrd3dhbmEyMw==' \
  --header 'Content-Type: application/json' \
  --data '
{
"connection_configs": {
  "flow_job_name": "mirror_api_kick_off",
	 "source_name": "rds_peer",
  "destination_name": "ch_peer",
  "table_mappings": [
    {
      "source_table_identifier": "public.users",
      "destination_table_identifier": "users_api"
    },
    {
      "source_table_identifier": "public.payments",
      "destination_table_identifier": "payments_api"
    },
    {
      "source_table_identifier": "public.optional_ordering_key",
      "destination_table_identifier": "optional_ordering_key",
      "columns": [
        {
          "name": "id",
          "ordering": 1
        },
        {
          "name": "created_at",
          "ordering": 2
        }
      ]
    },
  ],
  "max_batch_size": 1000,
  "idle_timeout_seconds": 300,
  "publication_name": "",
  "do_initial_snapshot": true,
  "snapshot_num_rows_per_partition": 5000,
  "snapshot_max_parallel_workers": 4,
  "snapshot_num_tables_in_parallel": 2,
  "resync": false,
  "initial_snapshot_only": false,
  "soft_delete_col_name": "_peerdb_is_deleted",
  "synced_at_col_name": "_peerdb_synced_at"
}
}'
{
	"workflowId": "mirror_kick_off-peerflow-2d269226-9757-4d9f-8cfd-6adb1ca29c0e"
}