Database endpoints
Import from object storage
Load CSV and NDJSON objects from a storage-bucket prefix into an existing table.
POST /v1/tenants/{tenant}/ingest/s3/sync
- Choose bucket and prefixSelect CSV or NDJSON objects and an existing table.
- Load the matching objectsApply the requested format and chunk settings.
- Review each object's outcomeInspect errors, empty objects and total imported rows.
Before you start
Use your database bearer token.
Register the destination table and configure server-side access to an allowed storage bucket. Replace SOURCE_BUCKET; storage credentials do not go in this 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
- schema is the destination table id and must exist.
- prefix defaults to '' (bucket root).
- format overrides per-object extension detection (csv or ndjson).
- csv_has_header defaults to true;
- chunk_size defaults to 5000.
- mode is one of: full (default), incremental (not yet supported, returns 400).
- The bucket must be on the server's ingest allow-list (deny-all by default);
- storage credentials are server-side and never sent in the request.
| Field | Type | Required |
|---|---|---|
bucket | string | Required |
chunk_size | integer | Optional |
csv_has_header | boolean | Optional |
format | string | Optional |
mode | string | Optional |
prefix | string | Optional |
schema | string | Required |
Read the result
Inspect both the total counters and each per_object result, including its error. Unsupported and empty objects are counted separately. Incremental mode is not implemented for this route.
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. |
| 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. |
| 502 | Check service availability and the write outcome. |
| 503 | Honor Retry-After when present; check write outcomes. |