Expand description
HTTP route modules, one per resource. Each exposes a plain pub fn router() -> axum::Router<AppState>, merged together in crate::build_router.
Modules§
- capabilities
- config
GET/PUT /api/configfor the mutable global TOML policies and tune settings.- demo
- Restricted simulator-only public Demo API.
- draft
GET/PUT /api/runs/draftfor the app-wide New Tune form draft.- health
GET /api/health– an unauthenticated liveness probe, deliberately the only endpoint that touches neithercrate::state::AppStatenor the database: a load balancer or the Windows Service manager (server-windows-service) needs to be able to tell “the process is up and answering HTTP” apart from “the process is up but the database is unreachable” (the latter would fail on essentially every other route already). It also exposes the server package version for the web application’s shell.- history
- Run-history routes:
GET /api/runs(filtered, paginated list),GET /api/runs/{id}(full run detail: config, initial readings, samples, results, writes),GET /api/runs/{id}/export(CSV/JSON sample export), andDELETE /api/runs/{id}. - opc
- OPC DA diagnostic routes:
GET /api/opc/servers,GET /api/opc/capabilities,GET /api/opc/browse,DELETE /api/opc/browse/sessions/:id,GET /api/opc/search,GET /api/opc/read, and the indexed-search status/refresh/control routes – back the GUI’s server dropdown, typed tag-tree browser, namespace search, index management, and connection test. - runs
POST /api/runs(start a new tune run) andPOST /api/runs/{id}/cancel(request its cancellation) – the write side of the run-history APIroutes::historyreads from.- stream
GET /api/runs/{id}/stream– pushes per-tick engine state to the browser over Server-Sent Events as a run progresses, so the frontend’s live trend chart doesn’t have to pollGET /api/runs/{id}and re-fetch the whole (ever-growing)samplesarray once a second, the wayfrontend/src/api/runs.ts’suseRuninterim-substitute polling did before this endpoint existed (frontend-live-stream, the last piecefrontend-screenswas blocked on).- templates
- Template CRUD routes:
GET /api/templates,GET /api/templates/{name},POST /api/templates,PUT /api/templates/{name},DELETE /api/templates/{name}.