Skip to content
BreachPilot

Ops Endpoints

tools/api/routes/ops.py:1APIRouter(prefix="/api/v1/ops", tags=["ops"]). Built by create_router(auth, config) (ops.py:19) and wired unconditionally in app.py:170 / app.py:184. One read-only rollup for backends that previously had settings toggles but no operational surface: killchain, snapshots (+ counterfactual), eval baseline, browser, and the active chat provider. Read-only by design — enabling stays in PATCH /api/v1/config (Settings page); this route only reports. Config sections are read defensively (non-dict values treated as {}).

GET /api/v1/ops/summaryops_summary

  • Purpose: single status snapshot of dormant backends — killchain, snapshots/counterfactual, eval baseline, browser, active provider.
  • Authentication: bearer via _require_auth (ops.py:23, Authorization: Bearer <token> header).
  • Params/body: none.
  • Response fields (ops.py:37):
SectionFieldTypeSourceDefault
killchainenabledboolkillchain.enabledfalse
killchaingoal_statestrkillchain.goal_state"shell_as_root"
killchainrequire_verificationboolkillchain.require_verificationtrue
snapshotsenabledboolsnapshots.enabledfalse
snapshotsproviderstrsnapshots.provider"docker"
snapshotscounterfactualboolreplay_simulator.counterfactualfalse
evalenabledbooleval.enabledtrue
evalbaseline_pathstreval.baseline_path"reports/eval/baseline.json"
evalbaseline_existsboolPath(baseline_path).exists() (server filesystem)
browserenabledboolbrowser.enabledfalse
browserbackendstrbrowser.backend"none"
provideractivestrmodels.provider"ollama"
  • Status codes: 200 with the rollup; 401 missing/invalid token.
  • Error conditions: none beyond auth — missing config keys fall back to the defaults above; no path params so no 404.
  • Example request:
curl -H "Authorization: Bearer $BREACHPILOT_API_TOKEN" \
  http://127.0.0.1:8765/api/v1/ops/summary
  • Example response:
{
  "killchain": { "enabled": false, "goal_state": "shell_as_root", "require_verification": true },
  "snapshots": { "enabled": false, "provider": "docker", "counterfactual": false },
  "eval": { "enabled": true, "baseline_path": "reports/eval/baseline.json", "baseline_exists": false },
  "browser": { "enabled": false, "backend": "none" },
  "provider": { "active": "ollama" }
}
  • Related events: none — pure config/filesystem read, emits nothing.
  • WebUI usage: OpsPage (webui/src/routes/OpsPage.tsx:30) via apiFetch("/ops/summary") (react-query key ["ops","summary"], staleTime 15 s) — renders Killchain / Snapshots / Eval baseline / Browser+provider cards and links to /system Settings for toggling. No other consumer; enabling stays in PATCH /api/v1/config.
  • Source file: tools/api/routes/ops.py:27.
  • Endpoint matrix — method/route/handler table for every family
  • System endpointsGET/PATCH /api/v1/config, the write path for everything this rollup reports
  • Runs endpoints — run lifecycle (provider.active selects the model client)
  • Benchmarks endpoints — benchmark baselines (compare with the eval.baseline_path graded-harness baseline here)

Source map

  • tools/api/routes/ops.py — the single ops_summary handler
  • app.py — unconditional router wiring
  • webui/src/routes/OpsPage.tsx — Operations page consumer
source: repo docs (build sync)Edit this page on GitHub →