OriginChainDB
Database endpoints

Import from PostgreSQL

Copy tables from an allowed PostgreSQL source with a full or incremental sync.

POST /v1/tenants/{tenant}/ingest/postgres/sync

Copy PostgreSQL tables in request orderA later failure does not undo tables copied earlier in the request.
  1. Map an allowed sourceSet source tables, destination IDs and sync options.
  2. Sync tables in orderProcessing stops at the first failure.
  3. Review results and cursorsVerify each completed table before continuing.

Before you start

Use your database bearer token.

Connection setup

Use source credentials for a PostgreSQL host allowed by the operator. Replace the connection placeholder before sending the request.

Path parameters

FieldTypeRequired
tenantstringRequired

Headers

FieldTypeRequiredDescription
x-oc-db-userstringOptionalActing database user (role, grant and row-policy checks). Send with x-oc-db-key.
x-oc-db-keystringOptionalAPI key of the x-oc-db-user user.

Request body

application/json

Limits and accepted values
  • The host in conn_url must be on the operator's allow-list, otherwise 403.
  • tables must not be empty;
  • tables sync in order and the first failure stops the request.
FieldTypeRequired
conn_urlstringRequired
tablesobject[]Required
Fields in tables
FieldTypeRequired
dest_schema_idstringRequired
modestringRequired
primary_keystring[]Optional
Fields in primary_key
FieldTypeRequired
primary_keystringOptional
FieldTypeRequired
since_unix_msintegerOptional
src_schemastringRequired
src_tablestringRequired
updated_at_colstringOptional

Read the result

Each result reports source, destination, rows synced and a new cursor. Tables run in order and the first failure stops the request; inspect prior results instead of assuming an all-or-nothing import.

Response statuses

HTTP status reference
StatusWhat to do
200OK
400Correct the request before retrying.
401Check the credential and Authorization header.
402Check feature access or available credits.
403Check tenant access, roles and permissions.
404Check the resource ID and API route.
409Resolve the conflict before retrying.
413Split or reduce the request body.
415Send the required Content-Type.
422Correct the values or unsupported combination.
429Honor Retry-After when present; back off.
500Check the outcome before retrying a write.
501Check deployment support for this operation.
502Check service availability and the write outcome.
503Honor Retry-After when present; check write outcomes.
© 2026 Silicoyn Technologies Pvt Ltd