Skip to main content
GET
Rate limit tier: general, 600 requests/min. See Rate limits. Reads one document’s text from a workflow’s knowledge corpus. Find path first with List or Search. For an answer with citations instead of raw text, use Ask.

Content cap

content is capped; truncated is true when the document’s text was cut off at the cap. There is no pagination for a single document’s content — a long document returns its opening text with truncated: true. path is 1 to 1024 characters.

Content URL

Pass as_url=true to get content_url instead of the text: a presigned GET URL of the document’s whole body, valid for 15 minutes, with content empty. The URL is not subject to the content cap. An older snapshot ignores as_url and answers content with content_url null. A document that changed after the snapshot was published answers 404 with as_url.

Requires a knowledge base

Same requirement as ask: the workflow needs a knowledge node, or this returns 409 KNOWLEDGE_NOT_ENABLED. 409 KNOWLEDGE_NOT_READY means no usable snapshot has ever been published. Unlike ask, reading is never billed, so 402 cannot occur here.

Errors

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.

Path Parameters

workflow_id
string
required

Query Parameters

path
string
required

Path of the document or navigation page to read, from list_knowledge or search_knowledge. 1 to 1024 characters.

Required string length: 1 - 1024
as_url
boolean
default:false

Return a presigned content_url of the document's whole body instead of its capped content.

Response

Successful Response

The rendered content of one entry in a workflow's knowledge corpus.

path
string
required

Document or navigation-page path inside the workflow's corpus.

kind
string
required

document for a source file, index for a generated navigation page (older snapshots only).

folder
string
required

Parent folder of path; empty string at the corpus root.

title
string
required

Document title, or the navigation page's own heading.

page_count
integer
required

Page count for a document; 0 for a navigation page.

content
string
required

The document's text, capped; see truncated. Empty when as_url returned a content_url.

truncated
boolean
required

True when content was cut off at the cap.

file_id
string | null
required

The source file of a document built before packets. Null for a packet document, whose files are named by its citations.

source_version_id
string | null
required

The workflow version whose run produced this content.

content_url
string | null

With as_url=true, a presigned GET URL of the document's whole body text, valid for 900 seconds, and content is empty. Null otherwise, and on an older snapshot, which answers content instead.

document_packet_id
string | null

The document packet this document is read from. Null for a navigation page.