Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 1.05 KB

File metadata and controls

17 lines (14 loc) · 1.05 KB

API quick reference

FastAPI serves interactive OpenAPI documentation at /docs and the schema at /openapi.json.

Method Endpoint Purpose
GET /health Service health and synthetic-data flag.
GET /api/v1/dashboard Overview metrics and current unexpired alerts.
GET /api/v1/villages Aggregate village risk list.
GET /api/v1/villages/{lgd_code} Explainable village profile and source lineage.
GET /api/v1/alerts Active processed alerts; expired alerts excluded.
GET /api/v1/data-sources Provenance catalogue.
POST /api/v1/scoring/static-risk Four-factor static risk calculation.
POST /api/v1/scoring/immediate-priority Five-factor official-review priority calculation.
POST /api/v1/capacity Minimum-constraint effective and available capacity.

Demo role-based access uses X-Demo-Role: public, field_surveyor, district_officer, data_manager, or administrator. Production deployments should replace this with the state identity provider and signed tokens.