Gets a Layer 0 knowledge document by id

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

Path parameters

context_idstring required

Spectron context id

idstring required

Document id fragment

Response

Document

contentHashstring required
createdAtstring date-time required
errorstring nullable
idstring required
mimeTypestring required
observedAtstring date-time nullable

Known/observed time of the content (explicit or front-matter-detected at upload); facts extracted from the document carry it as their known-time.

processingCompletedAtstring date-time nullable
processingStartedAtstring date-time nullable
sizeBytesinteger required
sourcestring required
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.

titlestring required
updatedAtstring date-time required
versioninteger required

Changes

Changed in 3 of the 5 revisions of this API.35

    • added the non-success response with the status 503

      response-non-success-status-added

    • added the optional property observedAt to the response with the 200 status

      response-optional-property-added

    • removed the optional property chunkCount from the response with the 200 status

      response-optional-property-removed

    • removed the optional property keywordCount from the response with the 200 status

      response-optional-property-removed

    • removed the optional property language from the response with the 200 status

      response-optional-property-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property chunkCount to the response with the 200 status

      response-optional-property-added

    • added the optional property keywordCount to the response with the 200 status

      response-optional-property-added

    • added the optional property language to the response with the 200 status

      response-optional-property-added

    This revision also has 15 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog