Fetch API
Fetch a Tree
GET
Fetch a Menu Tree — a hierarchical collection of records assembled from a Data Storage using
A single response is capped at 1,000 nodes total. When a level wouldn’t fit within the budget, the entire level is omitted (partial levels are never returned) and a warning is included in the response header.
parentKey and position defaults, with each node rendered through a Detail Block.
Path Parameters
string
required
Your project’s Fetch token, embedded in the subdomain.
string
required
The tree’s slug, e.g.
<tree-slug>. Per project — see your tree’s detail view in the API Builder.Query Parameters
string
Optional starting node. When provided,
items contains a single entry — the node with this key, plus its descendants. Without a key, items contains every root-level node (records with no parent).integer
Optional level limit. Controls how many levels of
$items are included. Without it, all levels are returned (subject to the 1,000-node cap).Headers
See Headers on the overview for the full set. Trees honourfs-context, fs-domain, fs-version, and fs-secret (only when the project has fetch keys configured).
Response
The response body wraps the tree in anitems array. When called without a key, this array lists every root-level node (records with no parent); when called with one, it holds only the matching node — still wrapped in a list, for shape consistency with the unkeyed call. Each node’s subtree is carried on its own $items field.
array
required
The tree’s top-level nodes.