Expand description
Admin API for debug mode: trace listing/retrieval and the plugin sandbox.
Every route except GET /api/debug/config responds 404 while
debug.enabled is false. A 403 would confirm the surface exists, and
these endpoints dump request contexts and execute plugins โ the highest
value target on the box. The 404 is defence in depth behind the Basic Auth
layer, not a replacement for it.
Discoverability is preserved two ways: each gated rejection logs a warning
naming the exact config key, and GET /api/debug/config always answers so
the web UI can render an explanatory empty state instead of a mystery.
Structsยง
- Step
With ๐Changes - A step plus the changes derived from the preceding snapshot.
- Trace
Filter ๐ - Optional filters for the trace list, so a developer can pull just the recent
requests on the policy or route they are working on. All are ANDed; empty
strings are ignored (a bare
?route=is not a filter).
Functionsยง
- apply_
filter ๐ - Keeps only the summaries matching every supplied filter.
- bad_
request ๐ - clear_
traces ๐ DELETE /api/debug/tracesโ empties the buffer.- disabled ๐
- The
404returned when debug mode is off, matching the shape the rest of the Admin API uses for a missing resource. - get_
config ๐ GET /api/debug/configโ the effective debug settings.- get_
trace ๐ GET /api/debug/traces/{id}โ one trace with computed changes.- list_
traces ๐ GET /api/debug/tracesโ summaries, newest first.- non_
empty ๐ - render_
trace ๐ - Renders a trace with per-step
changescomputed at read time. - router
- Builds the router for the
/api/debug/*endpoints. - run_
sandbox ๐ POST /api/debug/sandboxโ run ad-hoc nodes or a named policy against a synthetic context.- source_
str ๐