PUT /api/v1/{context_id}/documents/{id}

Changed on

Replaces a Layer 0 knowledge document and re-runs its pipeline

Request

Path parameters

context_idstring required

Spectron context id

idstring required

Document id fragment

Request body multipart/form-data

filestring binary required

The raw document bytes.

Response

Upload accepted

contentHashstring required
deduplicatedboolean required
idstring required
observedAtstring date-time nullable

The known/observed time stamped onto the document: the request's explicit observedAt or the value detected via observedAtHeader. Absent when neither applied, so facts will date to ingest time. On a dedup hit this is the matched document's known-time, which this upload fills only when that row has none and its first ingest has not published.

status'queued' | 'extracting' | 'chunking' | 'embedding' | 'keywording' | 'extracting_nodes' | 'ready' | 'failed' required

Lifecycle state of a [Document] in the ingestion pipeline.

Matches the SurrealQL ASSERT $value IN [...] on document.status in V1__schema.surql. The Keywording state is reserved for Phase C; in Phase A the pipeline transitions straight from Embedding to Ready.

Changes

    • info

      added the new optional request property /

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the new optional request property /