Database endpoints
Import from MySQL
Copy MySQL tables into the tenant with a full or incremental sync. Missing destination tables are created.
POST /v1/tenants/{tenant}/ingest/mysql/sync
- Map the source tablesChoose destination IDs, keys and sync modes.
- Run the table syncCopy full or incremental data into the tenant.
- Save the returned cursorUse rows_synced and new_cursor_unix_ms for follow-up checks.
Before you start
Use your database bearer token.
Use source credentials for a MySQL 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
- conn_url is a MySQL connection URL that carries the source database credentials: a write-only secret, never echoed back.
- The source host must be on the server's ingest allow-list (deny-all by default).
- tables must contain at least one entry.
| 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 pairs a source table with its destination and rows_synced. Keep new_cursor_unix_ms when continuing an incremental sync. Verify the imported rows before changing application traffic.
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. |