Get Document Outline
Returns the heading tree built for the current version of a document file.
The outline exists only after indexing has built it, and not at all for a file whose indexing failed before that step. After a re-index, this operation returns the outline the new indexing task built, once that task publishes.
The response is not paginated.
1 min read
get/knowledge-fs/spaces/{knowledge_base_id}/documents/{document_file_id}/outline
Request example
Response
get/knowledge-fs/spaces/{knowledge_base_id}/documents/{document_file_id}/outline
Authorization
Path parameters
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 file ID. From List Document Files.
Responses
application/json
The outline.
Internal. Not needed to read the outline.
When the outline was built, ISO 8601.
ID of the document file the outline was built for.
Outline ID.
Internal ID of the knowledge base. Not the knowledge base ID in the path.
Additional outline details. Free-form object.
Top-level headings, in document order. Nested headings are in each heading's
children.Internal. Not needed to read the outline.
Internal. Not needed to read the outline.
When the outline last changed, ISO 8601.
null when it has not changed since it was built.The document file's
version the outline belongs to. It does not change when a re-index rebuilds the outline, because a document file's version never changes.