Get the knowledge document tree
Returns a lazy, depth-bounded tree of knowledge documents starting at parentId (root documents when omitted). Each node reports hasChildren so you can decide whether to fetch further levels via GET /api/knowledge/{id}/children.
Accepts the same filter parameters as GET /api/knowledge/list (everything below except limit/skip — parentId here keeps its tree-specific meaning, the root to start from, not a filter). With no filter active, the response is the plain tree with no matched field on any node. With a filter active, the tree (already built and depth-bounded as usual) is pruned to documents that match the filter, plus their ancestors (so a match stays reachable from the root) and their descendants (so a matched folder's contents stay visible) — every kept node within the tree, matching or not, gets a matched boolean. A document that would only appear more than depth levels below the root is never fetched, so it can't match either — increase depth to search deeper.
Request
- Base URLhttps://core-api.getaptly.com
- Auth
- API key in header x-token
- or API key in header Authorization
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Omit, or pass "" / "null", for the root level.
How many levels to expand eagerly.
Only match documents associated with this board.
Only match documents linked to this card.
Only match documents extracted from this conversation.
Case-insensitive substring match on document name. Regex metacharacters are escaped before being interpolated into the query, so the match is always literal.
Set true to match archived documents instead of active ones. Also widens tree traversal itself so archived documents (and their archived descendants) are reachable at all.
Only match documents created by this user (matches createdBy).
Only match documents last updated by this user (matches updatedBy).
Only match documents created on or after this ISO date (inclusive).
Only match documents created on or before this ISO date (inclusive).
Only match documents last updated on or after this ISO date (inclusive). Filters updatedAt only, never createdAt.
Only match documents last updated on or before this ISO date (inclusive). Filters updatedAt only, never createdAt.
Set true to match only documents with no aptletUuid, aptletInstanceId, or streamId — the knowledge base's own top-level documents ("pane 0"). Cannot be combined with aptletUuid, aptletInstanceId, or streamId.
Response
Tree of knowledge document nodes.
Changes
No recorded changes to this operation across all 1 revision of this API.