Skip to main content
GET
Get Document by File

Authorizations

Authorization
string
header
required

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_id
string<uuid>
required

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.

Query Parameters

document_asset_id
string
required

Document file ID: id from List Document Files, or documentAssetId in a citation. Must be a UUID.

Required string length: 1 - 255
document_asset_version
integer
required

The document file's version, or documentVersion in a citation. A document file's version is always 1.

Required range: x >= 1

Response

The document and revision.

document_id
string

The document ID. Pass it to Get Document or List Chunks.

revision
integer

The revision built from this file version. Pass it with document_id to List Chunks.