GA
GeoAlerta AI
Reference

API Documentation

REST endpoints exposed by the GeoAlerta FastAPI backend. Base URL is environment-specific.

GET/api/resumo
Aggregate risk summary for the municipality.
Example response
json
{
  "municipio": "Tuntum-MA",
  "total_microcelulas": 21394,
  "pop_total": 36251,
  "risco": { "baixo": 12110, "medio": 5821, "alto": 2438, "critico": 1025 }
}
GET/api/riscos
List of microcells with risk score and class.
Parameters
min_scorefloatFilter cells above score threshold.
limitintMax records (default 1000).
Example response
json
[
  { "id": "MC-00451", "lat": -5.293, "lon": -44.654, "score": 0.87, "classe": "critico" }
]
GET/api/top-criticas
Top-N most critical microcells, ranked.
Parameters
nintNumber of cells to return.
Example response
json
[
  { "rank": 1, "id": "MC-00451", "score": 0.91, "pop_exposta": 184 }
]
GET/api/geojson-celulas
GeoJSON FeatureCollection of all microcells.
Example response
json
{
  "type": "FeatureCollection",
  "features": [
    { "type": "Feature", "geometry": { ... }, "properties": { "id": "MC-00001", "risco": "baixo" } }
  ]
}
POST/api/cenarios
Simulate rainfall scenario and return updated risk.
Parameters
rain_mmfloat*Rainfall in millimeters.
Example response
json
{
  "scenario": "heavy_rain",
  "rain_mm": 80,
  "delta_criticas": +312
}
POST/api/relatos
Submit a citizen field report (participatory layer).
Parameters
latfloat*Latitude.
lonfloat*Longitude.
tipostring*Event type (flood, landslide, ...).
Example response
json
{ "id": "RL-9821", "status": "received", "validation": "pending" }