wundcheck

Reports if a Weather Underground personal weather station is currently online.

Endpoint

GET /api/v1/status?stationId=<station_id>&apiKey=<api_key>&thresholdMin=<minutes>
Query parameters
Param Required Notes
stationId yes WU PWS station ID, e.g. IMAIDE50
apiKey maybe Your own WU PWS API key. If omitted, falls back to the server's default key, if one is configured. Required if the server has no default key configured.
thresholdMin no Minutes of staleness before a station is considered offline. Defaults to the server's configured threshold.

Example

GET /api/v1/status?stationId=IMAIDE50&apiKey=apikeyaaaaaaaaaaaaaaaa

200 OK
{"stationID": "IMAIDE50", "status": "online", "ageSeconds": 120}

ageSeconds is how old the station's last observation was, in seconds. It's included whenever an observation was available to measure it from (online and most offline results), and omitted when the station is offline with no observation on record at all.

Responses

Response status by situation
Situation HTTP status
Station online (fresh observation) 200 online
Station exists, data stale/not reporting 200 offline
Station ID unknown to WU 404 station_not_found
Supplied apiKey rejected by WU 401 invalid_api_key
WU upstream unreachable/erroring 502 upstream_unavailable
Unhandled server-side failure 500 error
Bad/missing request params 400 invalid_request
Client exceeded rate limit 429 rate_limited

All error bodies follow {"status": "<code>", "message": "<human readable>"}.

Source

The source for the project is available at https://github.com/IanKulin/wundcheck.