{"openapi":"3.1.0","info":{"title":"Operational System Water Level API","version":"1.0.0"},"paths":{"/api/v1/health":{"get":{"summary":"Health","description":"Return a minimal health response for container checks.","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api V1 Health Get"}}}}}}},"/api/v1/stations":{"get":{"summary":"List Stations","description":"Return visible stations that publish water level measurements.","operationId":"list_stations_api_v1_stations_get","parameters":[{"name":"active_within_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Active Within Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/water-levels/{station_id}":{"get":{"summary":"Get Water Levels","description":"Return a time series of water level measurements for the requested station.","operationId":"get_water_levels_api_v1_water_levels__station_id__get","parameters":[{"name":"station_id","in":"path","required":true,"schema":{"type":"string","title":"Station Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"From"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date-time","title":"To"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaterLevelSeriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/water-levels/{station_id}/latest":{"get":{"summary":"Get Latest Water Level","description":"Return the latest available water level measurement for a station.","operationId":"get_latest_water_level_api_v1_water_levels__station_id__latest_get","parameters":[{"name":"station_id","in":"path","required":true,"schema":{"type":"string","title":"Station Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestWaterLevelResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LatestWaterLevelResponse":{"properties":{"station":{"$ref":"#/components/schemas/StationResponse"},"parameter":{"type":"string","title":"Parameter"},"unit":{"type":"string","title":"Unit"},"point":{"$ref":"#/components/schemas/WaterLevelPointResponse"}},"type":"object","required":["station","parameter","unit","point"],"title":"LatestWaterLevelResponse","description":"Latest water level value available for a station."},"StationListResponse":{"properties":{"stations":{"items":{"$ref":"#/components/schemas/StationResponse"},"type":"array","title":"Stations"}},"type":"object","required":["stations"],"title":"StationListResponse","description":"Collection of visible water level stations."},"StationResponse":{"properties":{"station_id":{"type":"string","title":"Station Id"},"station_name":{"type":"string","title":"Station Name"},"location_id":{"type":"string","title":"Location Id"},"location_name":{"type":"string","title":"Location Name"},"latitude":{"type":"number","title":"Latitude"},"longitude":{"type":"number","title":"Longitude"},"last_measurement_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Measurement At"}},"type":"object","required":["station_id","station_name","location_id","location_name","latitude","longitude","last_measurement_at"],"title":"StationResponse","description":"Public metadata for a visible measurement station."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WaterLevelPointResponse":{"properties":{"timestamp":{"type":"string","title":"Timestamp"},"value":{"type":"number","title":"Value"}},"type":"object","required":["timestamp","value"],"title":"WaterLevelPointResponse","description":"Single water level observation in API responses."},"WaterLevelSeriesResponse":{"properties":{"station":{"$ref":"#/components/schemas/StationResponse"},"parameter":{"type":"string","title":"Parameter"},"unit":{"type":"string","title":"Unit"},"points":{"items":{"$ref":"#/components/schemas/WaterLevelPointResponse"},"type":"array","title":"Points"}},"type":"object","required":["station","parameter","unit","points"],"title":"WaterLevelSeriesResponse","description":"Water level time series for a station."}}}}