OriginChainDB
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

Copy MySQL data and keep a cursorValidate imported records before redirecting application traffic.
  1. Map the source tablesChoose destination IDs, keys and sync modes.
  2. Run the table syncCopy full or incremental data into the tenant.
  3. Save the returned cursorUse rows_synced and new_cursor_unix_ms for follow-up checks.

Before you start

Use your database bearer token.

Connection setup

Use source credentials for a MySQL 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
  • 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.
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 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
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