Documentation menu

API reference

13 operations in imports. Raw spec: openapi.json.

GET/api/v1/imports/batches

GET /api/imports/batches

Responses

StatusDescription
200

Security: bearer

POST/api/v1/imports/batches

POST /api/imports/batches

Request body

CreateBatchRequest

Responses

StatusDescription
200

Security: bearer

GET/api/v1/imports/batches/{batch_id}

GET /api/imports/batches/{id}

Parameters

NameInTypeRequiredDescription
batch_idpathstringYes

Responses

StatusDescription
200

Security: bearer

POST/api/v1/imports/batches/{batch_id}/chunks

POST /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

NameInTypeRequiredDescription
batch_idpathstringYes

Request body

ChunkRequest

Responses

StatusDescription
200

Security: bearer

POST/api/v1/imports/batches/{batch_id}/finish

POST /api/imports/batches/{id}/finish — closes the span, emits `import.batch_finished`, and records cumulative counters in audit.

Parameters

NameInTypeRequiredDescription
batch_idpathstringYes

Responses

StatusDescription
200

Security: bearer

POST/api/v1/imports/batches/{batch_id}/run

POST /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

NameInTypeRequiredDescription
batch_idpathstringYes

Responses

StatusDescription
200

Security: bearer

POST/api/v1/imports/batches/{batch_id}/stage

POST /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

NameInTypeRequiredDescription
batch_idpathstringYes

Request body

StageChunkRequest

Responses

StatusDescription
200

Security: bearer

POST/api/v1/imports/dry-run

POST /api/imports/dry-run

Request body

DryRunRequest

Responses

StatusDescription
200

Security: bearer

GET/api/v1/imports/templates

GET /api/imports/templates

Parameters

NameInTypeRequiredDescription
source_systemquerystringNoNarrow to one source system

Responses

StatusDescription
200

Security: bearer

POST/api/v1/imports/templates

POST /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

StatusDescription
200

Security: bearer

GET/api/v1/imports/templates/{template_id}

GET /api/imports/templates/{id}

Parameters

NameInTypeRequiredDescription
template_idpathstringYes

Responses

StatusDescription
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

NameInTypeRequiredDescription
template_idpathstringYes

Request body

UpdateTemplateRequest

Responses

StatusDescription
200

Security: bearer

DELETE/api/v1/imports/templates/{template_id}

DELETE /api/imports/templates/{id}

Parameters

NameInTypeRequiredDescription
template_idpathstringYes

Responses

StatusDescription
200

Security: bearer