Skip to main content

Overview

Knowledge Stack organizes all content — folders, documents, versions, sections, and chunks — in a unified tree hierarchy. The content traversal API lets you navigate this tree with a single, flexible endpoint that works at any level of the hierarchy. Instead of using separate endpoints for listing documents in a folder, versions of a document, or sections in a version, you use a single traversal function that starts from any point in the tree and returns its children.

How It Works

Every item in Knowledge Stack has a path part — a node in the content tree. The tree structure looks like this:
The traversal API starts from any node and walks down the tree, returning the children you are interested in.

Common Use Cases

Parameters

Depth

Controls how deep to traverse:

Type Filter

Filters the returned results by content type. Intermediate nodes are traversed but excluded from results unless their type matches the filter. For example, when searching for chunks under a folder, the system traverses through documents, versions, and sections but only returns chunks.

Ordering

Results can be ordered in four ways:

Include Parent

When enabled, the starting node is included in the results alongside its children. This is useful for:
  • Building breadcrumbs (showing the current folder name alongside its children)
  • Serializing a subtree as a self-contained structure
  • Loading parent metadata in a single request

Traverse Until Types

Stops traversal at specific content types while still including them in results. For example, you can traverse folders but stop at documents — the documents are returned, but their versions, sections, and chunks are not traversed.

Pagination

For large result sets, use pagination with offset and limit parameters. Without pagination, results are capped at 250 items. The response includes a total count so you can determine if more results are available.

Limits

Edge Cases