Skip to content
REFERENCE / FIELD NOTE

API

SCOUT DOCS · REFERENCE / API

The Branch controller exposes the local HTTP API consumed by the admin web app. The repository’s generated contract is the authority:

docs/api/openapi.json

Do not hand-edit that file. The Rust API definitions generate it, and CI checks the generated TypeScript contracts for drift.

  • /session provides the fixed local-admin browser sign-in flow. /api-tokens issues, lists, and revokes bearer credentials for programmatic access with that same admin authority.
  • /network, /branches, and /nodes expose the administrative hierarchy, enrollment, authority, and operational state.
  • /settings, /config, and configuration revision routes cover render, validation, diff, stage, and apply work.
  • /data-areas, /access-grants, /access/preview, /identities, and /subjects model the bounded access flow.
  • /audit and /events/stream expose durable high-value activity and live UI invalidation signals.
Terminal window
bun run generate:api

Check without rewriting:

Terminal window
bun run check:api

Problems use application/problem+json and are designed to be safe for UI display. Authentication and Branch-scope checks remain server-side; client validation is a usability layer, not a security boundary.