Skip to main content
get/knowledge-fs/spaces/{knowledge_base_id}/documents/{document_id}/revisions/{revision}/chunks/{chunk_id}
Request example
Response
get/knowledge-fs/spaces/{knowledge_base_id}/documents/{document_id}/revisions/{revision}/chunks/{chunk_id}

Authorization

Authorizationstringheaderrequired#

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path parameters

knowledge_base_idstringrequired#
Knowledge base ID: the last segment of the Service API endpoint shown in the knowledge base's API Access dialog (…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.
document_idstringrequired#
The document ID, from List Documents or from the address bar of the open document (/datasets/new/<knowledge base ID>/documents/<document ID>).
revisionintegerrequired#
Revision number. From List Document Revisions.

Range: >= 1

chunk_idstringrequired#
Chunk ID. From List Chunks.

Responses

application/json
The chunk.
created_atstring#
When the chunk was created, ISO 8601.
document_idstring#
Document ID: the id of Get Document.
document_revisioninteger#
Revision the chunk belongs to. Each revision has its own chunks. A chunk ID is addressable only through its own revision.
enabledboolean#
Whether the chunk takes part in retrieval. No operation in this API changes it.
end_offsetinteger#
Zero-based UTF-8 byte offset in the parsed document text. Exclusive end. null when unknown.
idstring#
Chunk ID. The chunk_id path value for Get Chunk.
kindstring#
What the chunk was built from: chunk for a run of body text (the default), section for a heading section, table for a table, image for an image, summary for a generated summary.
knowledge_space_idstring#
Internal ID of the knowledge base. Not the knowledge base ID in the path.
ordinalinteger#
Position of the chunk within the revision, starting at 0. Sort by it to read chunks in document order.
parent_chunk_idstring#
ID of the parent chunk for parent-child chunking. null for top-level chunks.
parse_element_idsstring[]#
IDs of the parsed elements the chunk was built from.
section_pathstring[]#
Headings from the document root to the chunk's section.
start_offsetinteger#
Zero-based UTF-8 byte offset in the parsed document text. Inclusive start. null when unknown.
textstring#
Chunk content.
token_countinteger#
Number of tokens in text.
user_metadataobject#
Metadata attached to the chunk. Free-form object.