Skip to main content

Sovereign Weather Gateway APIs

Integrate real-time weather observations, forecasts, and rainfall data into your maps and telemetry dashboards via the Sovereign Weather Gateway (api-gw.sovereignsolutions.com).


Authentication​

Include your Sovereign API key in the X-Sovereign-Api-Key request header:

GET /weather/v1/current?lat=19.0760&lng=72.8777 HTTP/1.1
Host: api-gw.sovereignsolutions.com
X-Sovereign-Api-Key: YOUR_API_KEY

1. Current Weather Endpoint​

GET https://api-gw.sovereignsolutions.com/weather/v1/current?lat={latitude}&lng={longitude}

Sample Response​

{
"status": "success",
"data": {
"location": { "lat": 19.0760, "lng": 72.8777, "city": "Mumbai" },
"temperature_c": 31.4,
"feels_like_c": 36.2,
"humidity_pct": 78,
"wind_speed_kmh": 14.5,
"condition": "Partly Cloudy",
"icon": "partly-cloudy-day"
}
}

2. 7-Day City Forecast Endpoint​

GET https://api-gw.sovereignsolutions.com/weather/v1/forecast/7day?city_id={cityId}

3. State-Wise Rainfall API​

Retrieve aggregated rainfall data across districts and states for agricultural or flood-risk operations:

GET https://api-gw.sovereignsolutions.com/weather/v1/rainfall/state?state_code=MH

Response Format​

{
"state_code": "MH",
"state_name": "Maharashtra",
"date": "2024-08-18",
"average_rainfall_mm": 24.8,
"districts": [
{ "name": "Mumbai City", "rainfall_mm": 42.1, "status": "heavy" },
{ "name": "Pune", "rainfall_mm": 18.5, "status": "moderate" }
]
}