API reference
13 operations in imports. Raw spec: openapi.json.
GET
/api/v1/imports/batchesGET /api/imports/batches
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/imports/batchesPOST /api/imports/batches
Request body
CreateBatchRequest
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
GET
/api/v1/imports/batches/{batch_id}GET /api/imports/batches/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
batch_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/imports/batches/{batch_id}/chunksPOST /api/imports/batches/{id}/chunks — plans then executes ONE chunk atomically. A fail-policy chunk with any conflict persists nothing and returns 409 with the full per-row report.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
batch_id | path | string | Yes |
Request body
ChunkRequest
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/imports/batches/{batch_id}/finishPOST /api/imports/batches/{id}/finish — closes the span, emits `import.batch_finished`, and records cumulative counters in audit.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
batch_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/imports/batches/{batch_id}/runPOST /api/imports/batches/{id}/run — hands the staged batch to the worker queue exactly once (generalized 2.7 job queue). Re-running a finished or queued batch is a typed 409; the worker replays chunks idempotently through the SAME commit path as synchronous pushes.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
batch_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/imports/batches/{batch_id}/stagePOST /api/imports/batches/{id}/stage — uploads ONE chunk of rows to the ObjectStore under a deterministic key WITHOUT executing anything. An optional saved template is applied at stage time so the stored chunk is already canonical; the worker later replays the staged sequence.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
batch_id | path | string | Yes |
Request body
StageChunkRequest
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/imports/dry-runPOST /api/imports/dry-run
Request body
DryRunRequest
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
GET
/api/v1/imports/templatesGET /api/imports/templates
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
source_system | query | string | No | Narrow to one source system |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/imports/templatesPOST /api/imports/templates — saves one reusable source→canonical column mapping. Targets are validated against the canonical field catalog for the entity kind; duplicates per (org, source system, kind, name) are a typed 409.
Request body
CreateImportTemplateRequest
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
GET
/api/v1/imports/templates/{template_id}GET /api/imports/templates/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
PUT
/api/v1/imports/templates/{template_id}PUT /api/imports/templates/{id} — content update; uniqueness conflicts (renaming onto an existing sibling) surface as typed 409s.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template_id | path | string | Yes |
Request body
UpdateTemplateRequest
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
DELETE
/api/v1/imports/templates/{template_id}DELETE /api/imports/templates/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer