What the API does today
The small HTTP service under /api that Statewide's own apps use.
Statewide's own apps talk to a small HTTP service under /api on the same address as the site. It signs requests in with your logged-in session, so it is not something to call from another website or script.
| Method | Path | What it does |
|---|---|---|
| GET | /api/health | Answers {"ok": true} when the service is running. No login. |
| GET | /api/me | Your signed-in user and memberships. Login required; answers 401 with code unauthorized otherwise. |
| GET | /api/stream?c=<community slug> | The live event stream the MDT and boards use. |
| POST | /api/heartbeat?c=<community slug> | The MDT's "still here" signal for a signed-on unit. |
Limits
Heartbeats are limited to one accepted every 10 seconds per unit; faster ones get a 429. See API errors.