EAFW API Documentation

Public read-only HTTP endpoints for the East Africa Flood Watch system. All endpoints return JSON (unless noted), accept ?scope=<scope_key> for project filtering where applicable (e.g. scope=whca), and require no authentication for the read endpoints listed here.

Heads up: a Swagger UI / OpenAPI 3 schema (powered by drf-spectacular) will replace this static page in a follow-up release. The endpoint catalog below stays accurate either way.

Dataset Catalog

Discover what data is available. Each dataset wraps one or more raster or vector layers — Multimodal flood forecasts, GEOGloWS, WRF rainfall, LandScan population, FFPI/DFFPI, GADM boundaries, etc.

EndpointParametersReturns
GET
/api/datasets/ List every dataset in the catalog
GET
/api/datasets/{id}/ Single dataset detail (layers, time range, units)
GET
/api/dataset-slug/{slug}/ Look up a dataset by its slug
GET
/api/metadata/{id}/ Dataset metadata (source, license, citation)

Raster Data — Multimodal, LandScan, WRF, COGs

Pixel queries, time series, tiles, and thumbnails for every raster dataset in the system. Includes Multimodal flood ensembles (GeoSFM/FloodProofs/MIKE), LandScan population, WRF rainfall, FFPI/DFFPI, and any other COG uploaded via Wagtail.

EndpointParametersReturns
GET
/api/raster/{layer_id}/tiles.json TileJSON for a raster layer (z/x/y template + bounds)
GET
/api/raster-tiles/{layer_id}/{z}/{x}/{y} ?time=<iso> Rendered raster tile (PNG)
GET
/api/raster-data/pixel/{layer_id} ?lon=&lat= Pixel value at a coordinate (e.g. LandScan population at a point)
GET
/api/raster-data/pixel/timeseries/{layer_id} ?lon=&lat= Pixel time series across all available timestamps (e.g. multimodal forecast at a station)
GET
/api/raster-data/geostore/{layer_id} ?geostore_id=<uuid> Zonal stats over a stored polygon
GET
/api/raster-data/geostore/timeseries/{layer_id} ?geostore_id=<uuid> Zonal-stats time series
GET
/api/raster-file-thumbnail/{file_id}.png PNG thumbnail of a raster file
GET
/api/wms-tileset/{dataset_id} WMS tileset metadata

Raster File Inspection (large-image)

Low-level access to individual GeoTIFFs / COGs uploaded to the catalog — bands, frames, metadata, histograms, regions and tiles.

EndpointParametersReturns
GET
/api/file-raster/ List uploaded raster files
GET
/api/file-raster/{pk}/info/metadata/ Metadata (CRS, bounds, bands)
GET
/api/file-raster/{pk}/info/band/ ?band=1 Single band info
GET
/api/file-raster/{pk}/info/bands/ All band info
GET
/api/file-raster/{pk}/info/frames/ Multi-frame timestep info
GET
/api/file-raster/{pk}/data/histogram/ Pixel value histogram
GET
/api/file-raster/{pk}/data/pixel/ ?x=&y= Raw pixel value
GET
/api/file-raster/{pk}/data/region.{fmt} ?left=&top=&right=&bottom= Crop a region as png/tiff/jpeg/jp2/webp
GET
/api/file-raster/{pk}/data/thumbnail.{fmt} ?width=&height= Thumbnail in any image format
GET
/api/file-raster/{pk}/tiles/{z}/{x}/{y}.{fmt} Per-file tile pyramid
GET
/api/file-raster/{pk}/tiles/metadata/ Tile pyramid metadata
GET
/api/large-image/sources Available large-image source plugins
GET
/api/large-image/colormaps All registered colormaps
GET
/api/large-image/formats Supported output formats

Vector Data & Tiles

Vector layers, MVT tiles, GeoJSON feature serving, and tile-gl style endpoints for client-side rendering.

EndpointParametersReturns
GET
/api/vector-data/ List vector datasets
GET
/api/vector-tiles/{z}/{x}/{y} Vector tile (PBF)
GET
/api/feature-serv/{table_name}.geojson ?bbox=&filter= GeoJSON feature collection
GET
/api/tile-gl/tile/{source}/{z}/{x}/{y}.pbf tile-gl vector tile
GET
/api/tile-gl/tile-json/{source}.json tile-gl TileJSON
GET
/api/tile-gl/style/{source}.json Mapbox style JSON for a source
GET
/tipg/collections Discover every tipg-served table/function (auto-discovers schemas gha/public/wrf/floodproofs)
GET
/tipg/collections/{schema.name}/tiles/WebMercatorQuad/{z}/{x}/{y} Vector tile (MVT) — tables expose all columns; function collections accept their parameters as query strings

Administrative Boundaries & Geostore

Country / region / sub-region lookups, named admin search, and the persistent geostore for storing custom polygons used in raster zonal stats.

EndpointParametersReturns
GET
/api/country List all countries
GET
/api/country/{gid_0} Country regions (admin1)
GET
/api/country/{gid_0}/{gid_1} Country sub-regions (admin2)
GET
/api/admin-boundary/info ?gid_0=&gid_1= Boundary info for an admin unit
GET
/api/admin-boundary/search ?q=<name> Search admin units by name
GET
/api/admin-boundary/{pk} Boundary detail
GET
/tipg/collections/gha.admin0/tiles/WebMercatorQuad/{z}/{x}/{y} Country tile (admin0). Swap to gha.admin1/admin2 for finer levels, or gha.whca_admin0/1/2 for the 5-country WHCA subset.
GET
/api/map-boundary-tiles/{table_name}/{z}/{x}/{y} Tile from any boundary table
GET
/api/map-boundary-data/{table_name}/{gid} Boundary feature by id
POST
/api/geostore/ body: GeoJSON Store a polygon, get a UUID
GET
/api/geostore/{geostore_id} Retrieve stored polygon
GET
/api/geostore/admin/{gid_0} Get geostore for admin0
GET
/api/geostore/admin/{gid_0}/{gid_1} Get geostore for admin1
GET
/api/geostore/admin/{gid_0}/{gid_1}/{gid_2} Get geostore for admin2
GET
/api/aoi/ List Areas of Interest (saved polygons)
GET
/api/aoi/{pk}/ AOI detail

Flood Forecasts & Situation

EAFW custom flood APIs — country tickers, multimodal/Google ensemble forecast metadata, GEOGloWS streamflow, WRF rainfall.

EndpointParametersReturns
GET
/api/flood/situation-summary ?scope=<scope> Country alert counts and latest dates
GET
/api/flood/country-summary ?scope=<scope> Per-country tickers (active alerts, severity)
GET
/api/flood/admin-bounds ?type=admin-boundary|whca-region|cluster&country=<name> Bounding box + GeoJSON for an area
GET
/api/flood/forecast-dates Available multimodal forecast dates
GET
/api/flood/google-flood-dates Google Flood Forecasting API dates
GET
/api/flood/forecast-timeseries/{point_id} Multimodal ensemble at a flood point
GET
/api/flood/geoglows-forecast/{river_id} GEOGloWS streamflow + return-period thresholds
GET
/api/v1/wrf/daily-rainfall/dates WRF daily rainfall available dates
GET
/api/v1/wrf/extreme-rainfall/dates WRF extreme rainfall available dates

Assessment Reports

Project-scoped flood assessments submitted by NMHS country experts (MET + Hydro). Read-only — submission requires authenticated expert account.

EndpointParametersReturns
GET
/reports/published/ ?scope=<scope> HTML page with map + consolidated table
GET
/reports/published/ ?scope=<scope>&format=csv CSV: one row per (admin, expert)
GET
/reports/api/v1/assessment/choropleth/ ?scope=<scope> JSON: round, assessments, submitted countries, expected countries
GET
/reports/api/v1/dashboard/config/active/ Active dashboard config
GET
/reports/api/v1/dashboard/config/ List dashboard configs

Raster WMS / Cached Tiles (MapServer & MapCache)

OGC WMS / WFS endpoints rendered by MapServer with MapCache in front. Used for FFPI, DFFPI, WHCA-clipped rasters, etc.

EndpointParametersReturns
GET
/mapserver/ SERVICE=WMS&REQUEST=GetCapabilities WMS capabilities document
GET
/mapserver/ SERVICE=WMS&REQUEST=GetMap&LAYERS=<name>&BBOX=...&WIDTH=&HEIGHT=&SRS= Rendered raster image
GET
/mapcache/ SERVICE=WMS&REQUEST=GetMap&...&DIM_SCOPE=<scope> Cached raster tile (scope-aware)
GET
/nilebasin-geoserver/ OGC params Proxy to Nile Basin DSS GeoServer (FFPI/DFFPI)

Quick Examples

All datasets in the catalog
curl 'http://floodwatch.icpac.net/api/datasets/'
LandScan population at a coordinate
curl 'http://floodwatch.icpac.net/api/raster-data/pixel/<landscan_layer_uuid>?lon=32.5&lat=15.5'
Multimodal forecast time series at a flood point
curl 'http://floodwatch.icpac.net/api/flood/forecast-timeseries/123'
GEOGloWS streamflow + return periods for a river
curl 'http://floodwatch.icpac.net/api/flood/geoglows-forecast/770069437'
Country flood ticker
curl 'http://floodwatch.icpac.net/api/flood/country-summary'
Discover all tipg vector tile collections
curl 'http://floodwatch.icpac.net/tipg/collections?f=json'
WHCA boundary GeoJSON for Sudan
curl 'http://floodwatch.icpac.net/api/flood/admin-bounds?type=whca-region&country=Sudan'
Raster file metadata (e.g. a LandScan upload)
curl 'http://floodwatch.icpac.net/api/file-raster/<file_id>/info/metadata/'
WHCA published assessments (JSON)
curl 'http://floodwatch.icpac.net/reports/api/v1/assessment/choropleth/?scope=whca'
WHCA published assessments (CSV)
curl 'http://floodwatch.icpac.net/reports/published/?scope=whca&format=csv'
Need write access or a higher rate limit? Contact the EAFW team. Authenticated endpoints (assessment editor, content management) require an NMHS expert account or regional admin credentials issued by ICPAC.