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
- Map an allowed sourceSet source tables, destination IDs and sync options.
- Sync tables in orderProcessing stops at the first failure.
- Review results and cursorsVerify each completed table before continuing.
Before you start
Use your database bearer token.
Use source credentials for a PostgreSQL host allowed by the operator. Replace the connection placeholder before sending the request.
Path parameters
| Field | Type | Required |
|---|---|---|
tenant | string | Required |
Headers
| Field | Type | Required | Description |
|---|---|---|---|
x-oc-db-user | string | Optional | Acting database user (role, grant and row-policy checks). Send with x-oc-db-key. |
x-oc-db-key | string | Optional | API 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.
| Field | Type | Required |
|---|---|---|
conn_url | string | Required |
tables | object[] | Required |
Fields in tables
| Field | Type | Required |
|---|---|---|
dest_schema_id | string | Required |
mode | string | Required |
primary_key | string[] | Optional |
Fields in primary_key
| Field | Type | Required |
|---|---|---|
primary_key | string | Optional |
| Field | Type | Required |
|---|---|---|
since_unix_ms | integer | Optional |
src_schema | string | Required |
src_table | string | Required |
updated_at_col | string | Optional |
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
| Status | What to do |
|---|---|
| 200 | OK |
| 400 | Correct the request before retrying. |
| 401 | Check the credential and Authorization header. |
| 402 | Check feature access or available credits. |
| 403 | Check tenant access, roles and permissions. |
| 404 | Check the resource ID and API route. |
| 409 | Resolve the conflict before retrying. |
| 413 | Split or reduce the request body. |
| 415 | Send the required Content-Type. |
| 422 | Correct the values or unsupported combination. |
| 429 | Honor Retry-After when present; back off. |
| 500 | Check the outcome before retrying a write. |
| 501 | Check deployment support for this operation. |
| 502 | Check service availability and the write outcome. |
| 503 | Honor Retry-After when present; check write outcomes. |