Skip to main content
Ingestion converts uploaded files into derived representations (search index, knowledge-graph nodes, organized-file outputs). This is the only call that makes files searchable. Uploading a file registers it in the ledger; ingesting it builds the representations that queries and tools read.

Ingest

Queue an ingestion run for one file, an explicit batch, or an entire folder. The ingestion lane (PDF, spreadsheet, audio, …) is chosen per file from its type — callers do not name a lane. Query parameters:
  • wait_seconds (optional, default 0, max 300)
Headers:
  • Idempotency-Key (optional)
Request body:
Body fields:
  • selection (required) — What to process. Discriminated on type:
    • {"type": "file_ids", "file_ids": ["<uuid>", ...]} — Explicit list of up to 1000 files.
    • {"type": "path_prefix", "path_prefix": "reports/", "stale_only": false} — All files under a folder prefix. "" or "/" means the whole workspace. Set stale_only: true to re-ingest only files whose observed hash diverged from the ingested hash.
  • reingest_unchanged (optional, default false) — Force re-ingestion even for files already ingested at the same content hash (normally a no-cost skip).
Response (202 Accepted): A Job with kind: "ingestion". Result (on success):
Per-file outcomes are independent: one corrupt file in a folder of 400 does not fail the run — it appears as a failed entry. The job status is succeeded even when some files failed. Per-file status values: "ingested", "skipped_unchanged" (same content hash — no-cost skip), "failed". kg_build_job_id is set only when the workspace has opted into knowledge_graph.auto_build (off by default); poll it to know when the graph covers the newly ingested files. Otherwise it is null and the graph is built when you ask. Example (ingest two explicit files):

Reconcile

Detect divergence between storage and the file ledger. Reconciliation only detects — it never modifies files or representations. Query parameters:
  • wait_seconds (optional, default 0, max 300)
Headers:
  • Idempotency-Key (optional)
Request body:
Body fields:
  • path_prefix (optional) — Scope the scan to a path prefix. Omit or pass null for the whole workspace.
  • auto_ingest (optional, default false) — Chain an ingestion for everything the scan found.
Response (202 Accepted): A Job with kind: "reconciliation". Result (on success):
  • discovered — Objects in storage with no ledger row yet.
  • marked_stale — Rows whose observed_hash no longer matches the stored object.
  • orphans_removed — Rows whose object is gone from storage.
  • ingestion_job_id — Set when auto_ingest was requested.

Ingestion workflow