Skip to main content
POST
Requires scope: sdk:historical-ingest Provide file= (JSONL path — SDK uploads to S3 then creates the job), records= (inline list, ≤ 50,000 rows), and/or documents= (PDF/image binaries for a document package). Local validation runs before any network call. Phase 1 runs automatically; by default the job pauses at awaiting_confirmation for review before graph replay. Document packages use POST /v1/ingestion/jobs:begin for multi-PUT uploads — see the resource ingestion guide.

Parameters

str | None
Path to a JSONL file (patient and/or log rows). Max size from org SDK config (default 100 MB). Not combined with documents=.
list[IngestRecord] | None
Inline patient/log records when file= is not used. Combined with documents= for package jobs.
list[IngestDocument] | None
Local PDF/image paths for a document package. SDK allocates upload URLs, PUTs binaries, builds manifest.jsonl with type=document rows, then creates the job.
str | None
Stable job key; prevents duplicate active/completed jobs (409). Reusable after FAILED.
bool
default:"True"
When True (default), pause at awaiting_confirmation before Phase 2 replay.
list[str] | None
View summary_type identifiers to backfill in Phase 2; None = all active org templates.
int | None
Per-patient cap on logs considered during view backfill only (cost control for log-dense patients).

Returns

IngestionJob — Job snapshot including job_id, status, stage, and progress counters.
str
Job identifier for polling and confirm/cancel.
str
e.g. queued, awaiting_confirmation, replaying, completed.
str
Human-readable pipeline stage.
float
0–100 progress estimate.
int
Patients inserted or updated in Phase 1.
int
Logs successfully inserted as STALE rows.
int
Logs rejected during validation/insert.
int
Document binaries in the package (0 for JSONL-only jobs).
int
Documents that completed OCR successfully.
int
Documents that failed OCR.
list[IngestionErrorSummary] | None
Up to 100 sample errors (line, code, message).
Guide: /send-data/historical-backfill. Document packages: /send-data/resource-ingestion.
When documents= is set, the SDK calls POST /v1/ingestion/jobs:begin, PUTs each binary, PUTs manifest.jsonl, then POST /v1/ingestion/jobs.

Raises