The help centre
The API calls behind the help centre.
Part of the HTTP API reference.
Route: /^#\/help(?:\/([a-z0-9-]+))?(?:\/([a-z0-9-]+))?$/ →
drawHelp(slug, anchor). The second capture is a heading on the
page.
One call, once per session: GET /api/help (helpData), cached
in HELP.data.
GET /api/help — every page and the table of contents
No parameters, no permission check beyond a session.
Docstring: "Every help page and the table of contents, in one answer. All of it at once — thirty pages of text is smaller than one screenshot — so searching the help is instant and needs no index on the server."
Why it is data and not rendered:
The documentation ships with the product, in
help/: one Markdown file per page andhelp/index.jsonfor the table of contents. Served as data and rendered by the screen, so the pages are versioned, sealed in the manifest and upgraded with the code they describe — the product and its documentation cannot drift apart by living in two places.
Response — help/index.json with a pages map added:
{
"sections": [
{"name": "Getting started",
"pages": [{"slug": "first-steps", "title": "First steps", …}]}
],
"pages": {
"first-steps": "# First steps\n\n…" // the raw Markdown
}
}
Any top-level key named _ in index.json is dropped.
Refusal: 503 (the NotReady shape) when help/index.json is missing or
unreadable:
{"error": "The help pages are missing or damaged.",
"remedy": "Reinstall the release: the help/ folder ships with it."}
A page listed in the index whose .md file is missing is not a failure: its
content becomes "# <title>\n\nThis page is missing."
A slug that does not match HELP_SLUG = ^[a-z0-9]+(?:-[a-z0-9]+)*$ is skipped entirely.
The whole body is cached on the modification times of every file in help/, so
editing a page is picked up without a restart.