OriginChainDB
Database endpoints

Import a CSV or NDJSON file

Upload a CSV or NDJSON file and load its rows into an existing table.

POST /v1/tenants/{tenant}/ingest/files/{schema}

Move a file into an existing tableVerify imported rows before switching application traffic.
  1. Prepare CSV or NDJSONMatch the destination table's fields and types.
  2. Upload the fileChoose format and chunk settings.
  3. Check imported rowsCompare rows_ingested with the expected file contents.

Before you start

Use your database bearer token.

Connection setup

Register the destination table and prepare a CSV or NDJSON file. This is a multipart upload, not a JSON body; use curl -F file=@people.csv.

Path parameters

FieldTypeRequired
tenantstringRequired
schemastringRequired

Query parameters

FieldTypeRequired
formatstringOptional
csv_has_headerbooleanOptional
chunk_sizeintegerOptional

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

multipart/form-data

Limits and accepted values
  • Exactly one part named 'file' (binary CSV or NDJSON);
  • other parts are ignored.
  • Format is taken from the 'format' query parameter, else the part's content type (text/csv, application/x-ndjson, application/jsonl), else the filename extension (.csv, .ndjson, .jsonl), else NDJSON if the first non-blank byte is '{'.
  • CSV cells are coerced to the table's column types;
  • an empty cell becomes null.
  • The route defines no fixed body-size limit. This is not a claim of unlimited deployment capacity.
FieldTypeRequired
filestringRequired

Read the result

rows_ingested reports imported rows and chunks reports the work units used. Confirm the row count against your file and inspect the destination before switching an application to the imported data.

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.
429Honor Retry-After when present; back off.
500Check the outcome before retrying a write.
501Check deployment support for this operation.
503Honor Retry-After when present; check write outcomes.
© 2026 Silicoyn Technologies Pvt Ltd