Line

You are reading the unreleased docs (next). See latest (v0.9)

/api/nav

3 routes under /api/nav.

Cockpit server REST reference, next.

All routes sit below the Cockpit server's session gate (app.use('/api', auth.requireSession)) except /api/health. Generated from the real route table in ui/server/src.

GET /api/nav/file#

open a row of the Flow view. The client names a feature and a path; the path is accepted only if it is one of the files that feature's flow (computed here) draws, then read through the same guard.

Source: ui/server/src/index.mjs.

POST /api/nav/open#

two shapes -- { from, ref, start } follows a resolved reference (the reference trail); { file, line, column } opens a bare file at a known position with no reference name (the live preview's "Show in source" button, which already has the exact location from the app's own error stack).

Parameter In Type
from body —
ref body —
start body —
file body —
line body —
column body —

Source: ui/server/src/index.mjs.

GET /api/nav/page#

click-to-navigate. Both routes sit below the session gate. They return only project-root-relative paths and never take a path to read from the client: the first view is a page (the editor's own pages/ guard), every later hop is a reference in a file, resolved server-side (see projectNav.mjs).

Source: ui/server/src/index.mjs.