ws-dottie
Version:
Your friendly TypeScript companion for Washington State transportation APIs - WSDOT and WSF data with smart caching and React Query integration
483 lines • 21.6 kB
JSON
{
"openapi": "3.0.0",
"info": {
"title": "Wsdot Weather Readings API",
"version": "1.0.0",
"description": "Wsdot Weather Readings API - Washington State Department of Transportation APIs"
},
"servers": [
{
"url": "https://www.wsdot.wa.gov/traffic/api/api",
"description": "Production server"
}
],
"components": {
"schemas": {
"RoadwayLocation": {
"type": "object",
"properties": {
"Description": {
"type": "string",
"nullable": true,
"description": "Human-readable description of the roadway location, such as interchange names or cross streets."
},
"Direction": {
"type": "string",
"nullable": true,
"description": "Traffic direction designation: N, S, B, NB, or SB, indicating which side of the highway is affected."
},
"Latitude": {
"type": "number",
"description": "Latitude of the roadway location in decimal degrees."
},
"Longitude": {
"type": "number",
"description": "Longitude of the roadway location in decimal degrees."
},
"MilePost": {
"type": "number",
"description": "Milepost marker along the highway corridor, with 0 indicating route terminus."
},
"RoadName": {
"type": "string",
"nullable": true,
"description": "Highway or route designation code, such as '005' for I-5 or '090' for I-90."
}
},
"required": [
"Description",
"Direction",
"Latitude",
"Longitude",
"MilePost",
"RoadName"
],
"description": "Roadway location information including route, milepost, coordinates, and direction."
}
},
"parameters": {}
},
"paths": {
"/Scanweb": {
"get": {
"summary": "List comprehensive weather readings from all weather stations.",
"operationId": "fetchWeatherReadings",
"tags": [
"weather-readings"
],
"x-codeSamples": [
{
"lang": "JavaScript",
"source": "import { fetchWeatherReadings } from 'ws-dottie/wsdot-weather-readings/core';\n\nconst data = await fetchWeatherReadings({\n fetchMode: 'native',\n validate: true\n});\n\nconsole.log(data);"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"StationId": {
"type": "string",
"description": "National Weather Service assigned station identifier code."
},
"StationName": {
"type": "string",
"description": "Display name of the weather station."
},
"Latitude": {
"type": "number",
"description": "Latitude of the weather station in decimal degrees."
},
"Longitude": {
"type": "number",
"description": "Longitude of the weather station in decimal degrees."
},
"Elevation": {
"type": "integer",
"description": "Elevation of the weather station above sea level in meters."
},
"ReadingTime": {
"type": "string",
"nullable": true,
"description": "UTC datetime when the comprehensive weather reading was taken (ISO-8601 format).",
"format": "date-time"
},
"AirTemperature": {
"type": "number",
"nullable": true,
"description": "Current air temperature in degrees Celsius."
},
"RelativeHumidty": {
"type": "integer",
"nullable": true,
"description": "Relative humidity as a percentage (0-100)."
},
"AverageWindSpeed": {
"type": "integer",
"nullable": true,
"description": "Average wind speed during evaluation cycle in kilometers per hour."
},
"AverageWindDirection": {
"type": "integer",
"nullable": true,
"description": "Average wind direction in degrees clockwise from north (0-359)."
},
"WindGust": {
"type": "integer",
"nullable": true,
"description": "Maximum wind gust speed during evaluation cycle in kilometers per hour."
},
"Visibility": {
"type": "integer",
"nullable": true,
"description": "Average visibility distance in meters (computed every 3 minutes)."
},
"PrecipitationIntensity": {
"type": "integer",
"nullable": true,
"description": "Precipitation intensity derived from precipitation rate (intensity units)."
},
"PrecipitationType": {
"type": "integer",
"nullable": true,
"description": "Code indicating precipitation type: 0 = none, 1 = rain, 2 = snow."
},
"PrecipitationPast1Hour": {
"type": "number",
"nullable": true,
"description": "Precipitation amount (liquid equivalent) for previous 1 hour in millimeters."
},
"PrecipitationPast3Hours": {
"type": "number",
"nullable": true,
"description": "Precipitation amount (liquid equivalent) for previous 3 hours in millimeters."
},
"PrecipitationPast6Hours": {
"type": "number",
"nullable": true,
"description": "Precipitation amount (liquid equivalent) for previous 6 hours in millimeters."
},
"PrecipitationPast12Hours": {
"type": "number",
"nullable": true,
"description": "Precipitation amount (liquid equivalent) for previous 12 hours in millimeters."
},
"PrecipitationPast24Hours": {
"type": "number",
"nullable": true,
"description": "Precipitation amount (liquid equivalent) for previous 24 hours in millimeters."
},
"PrecipitationAccumulation": {
"type": "number",
"nullable": true,
"description": "Precipitation amount (liquid equivalent) from midnight GMT to current time in millimeters."
},
"BarometricPressure": {
"type": "integer",
"nullable": true,
"description": "Atmospheric pressure in millibars (not adjusted for elevation)."
},
"SnowDepth": {
"type": "integer",
"nullable": true,
"description": "Snow depth on representative areas excluding highway pavement in centimeters."
},
"SurfaceMeasurements": {
"type": "array",
"nullable": true,
"items": {
"type": "object",
"properties": {
"SensorId": {
"type": "integer",
"description": "Numeric ID of the surface sensor."
},
"SurfaceTemperature": {
"type": "number",
"nullable": true,
"description": "Current pavement surface temperature in degrees Celsius."
},
"RoadFreezingTemperature": {
"type": "number",
"nullable": true,
"description": "Freezing point of moisture on pavement based on chemical treatment in degrees Celsius."
},
"RoadSurfaceCondition": {
"type": "number",
"nullable": true,
"description": "Code indicating road surface condition: 101 = Dry, 102 = Wet, 103 = Moist, 104 = Ice, 105 = Snow."
}
},
"required": [
"SensorId",
"SurfaceTemperature",
"RoadFreezingTemperature",
"RoadSurfaceCondition"
]
},
"description": "Array of surface sensor measurements including pavement temperature, freezing temperature, and condition codes."
},
"SubSurfaceMeasurements": {
"type": "array",
"nullable": true,
"items": {
"type": "object",
"properties": {
"SensorId": {
"type": "integer",
"description": "Numeric ID of the subsurface sensor."
},
"SubSurfaceTemperature": {
"type": "number",
"nullable": true,
"description": "Temperature from sensor embedded 12-18 inches below road pavement in degrees Celsius."
}
},
"required": [
"SensorId",
"SubSurfaceTemperature"
]
},
"description": "Array of subsurface sensor measurements including ground temperature from sensors embedded below pavement."
}
},
"required": [
"StationId",
"StationName",
"Latitude",
"Longitude",
"Elevation",
"ReadingTime",
"AirTemperature",
"RelativeHumidty",
"AverageWindSpeed",
"AverageWindDirection",
"WindGust",
"Visibility",
"PrecipitationIntensity",
"PrecipitationType",
"PrecipitationPast1Hour",
"PrecipitationPast3Hours",
"PrecipitationPast6Hours",
"PrecipitationPast12Hours",
"PrecipitationPast24Hours",
"PrecipitationAccumulation",
"BarometricPressure",
"SnowDepth",
"SurfaceMeasurements",
"SubSurfaceMeasurements"
],
"description": "Comprehensive weather reading from a WSDOT weather station, including atmospheric conditions, precipitation across multiple time periods, and surface/subsurface sensor measurements."
}
},
"examples": {
"sampleResponse": {
"summary": "Sample response",
"description": "Example of a successful response from the API (showing first item of 131 total)",
"value": [
{
"StationId": "TALPE",
"StationName": "090ws05226 - Alpental",
"Latitude": 47.427,
"Longitude": -121.418,
"Elevation": 876,
"ReadingTime": "2025-11-16T01:38:33.000Z",
"AirTemperature": 8.2,
"RelativeHumidty": 100,
"AverageWindSpeed": 3,
"AverageWindDirection": 355,
"WindGust": 7,
"Visibility": 828,
"PrecipitationIntensity": 0,
"PrecipitationType": 0,
"PrecipitationPast1Hour": 0.1,
"PrecipitationPast3Hours": 0.8,
"PrecipitationPast6Hours": 2.7,
"PrecipitationPast12Hours": 6.6,
"PrecipitationPast24Hours": 20.9,
"PrecipitationAccumulation": null,
"BarometricPressure": null,
"SnowDepth": null,
"SurfaceMeasurements": [
{
"SensorId": 0,
"SurfaceTemperature": 10,
"RoadFreezingTemperature": null,
"RoadSurfaceCondition": 104
},
{
"SensorId": 1,
"SurfaceTemperature": 8.7,
"RoadFreezingTemperature": null,
"RoadSurfaceCondition": 105
}
],
"SubSurfaceMeasurements": [
{
"SensorId": 0,
"SubSurfaceTemperature": 6.8
}
]
}
]
}
}
}
}
}
}
}
},
"/Scanweb/SurfaceMeasurements": {
"get": {
"summary": "List surface measurements from all weather stations.",
"operationId": "fetchSurfaceMeasurements",
"tags": [
"surface-measurements"
],
"x-codeSamples": [
{
"lang": "JavaScript",
"source": "import { fetchSurfaceMeasurements } from 'ws-dottie/wsdot-weather-readings/core';\n\nconst data = await fetchSurfaceMeasurements({\n fetchMode: 'native',\n validate: true\n});\n\nconsole.log(data);"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"SensorId": {
"type": "number",
"description": "Numeric ID of the surface sensor."
},
"SurfaceTemperature": {
"type": "number",
"description": "Current pavement surface temperature in degrees Celsius."
},
"RoadFreezingTemperature": {
"type": "number",
"description": "Freezing point of moisture on pavement based on chemical treatment in degrees Celsius."
},
"RoadSurfaceCondition": {
"type": "number",
"description": "Code indicating road surface condition: 101 = Dry, 102 = Wet, 103 = Moist, 104 = Ice, 105 = Snow, 108 = Unknown/Other."
}
},
"description": "Surface sensor measurements including pavement temperature, road freezing temperature, and surface condition code from sensors embedded in or mounted on road surfaces."
}
},
"examples": {
"sampleResponse": {
"summary": "Sample response",
"description": "Example of a successful response from the API (showing first item of 131 total)",
"value": [
{}
]
}
}
}
}
}
}
}
},
"/Scanweb/SubSurfaceMeasurements": {
"get": {
"summary": "List subsurface measurements from all weather stations statewide.",
"operationId": "fetchSubSurfaceMeasurements",
"tags": [
"surface-measurements"
],
"x-codeSamples": [
{
"lang": "JavaScript",
"source": "import { fetchSubSurfaceMeasurements } from 'ws-dottie/wsdot-weather-readings/core';\n\nconst data = await fetchSubSurfaceMeasurements({\n fetchMode: 'native',\n validate: true\n});\n\nconsole.log(data);"
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"SensorId": {
"type": "number",
"description": "Numeric ID of the subsurface sensor."
},
"SubSurfaceTemperature": {
"type": "number",
"description": "Temperature from sensor embedded 12-18 inches below road pavement in degrees Celsius."
}
},
"description": "Subsurface sensor measurements including ground temperature from sensors embedded below road pavement."
}
},
"examples": {
"sampleResponse": {
"summary": "Sample response",
"description": "Example of a successful response from the API (showing first item of 131 total)",
"value": [
{}
]
}
}
}
}
}
}
}
}
},
"tags": [
{
"name": "weather-readings",
"description": "Comprehensive weather readings from all WSDOT weather stations statewide.",
"x-description": "Complete weather data including air temperature, humidity, wind conditions, visibility, precipitation across multiple time periods, barometric pressure, snow depth, and surface/subsurface sensor measurements.",
"x-cacheStrategy": "FREQUENT",
"x-useCases": [
"Access complete weather station data for comprehensive analysis.",
"Monitor atmospheric and surface conditions for transportation operations.",
"Track precipitation across multiple time periods (1h, 3h, 6h, 12h, 24h)."
],
"x-updateFrequency": "5m"
},
{
"name": "surface-measurements",
"description": "Surface sensor measurements from WSDOT weather stations statewide.",
"x-description": "Pavement surface temperature, road freezing temperature, and road surface condition codes from sensors embedded in or mounted on road surfaces.",
"x-cacheStrategy": "FREQUENT",
"x-useCases": [
"Monitor road surface conditions for winter maintenance operations.",
"Assess pavement temperature and freezing risk.",
"Evaluate travel safety based on surface condition codes."
],
"x-updateFrequency": "5m"
},
{
"name": "sub-surface-measurements",
"description": "Subsurface temperature measurements from sensors embedded below road pavement.",
"x-description": "Ground temperature data from sensors embedded 12-18 inches below road pavement surfaces for monitoring ground temperature conditions.",
"x-cacheStrategy": "FREQUENT",
"x-useCases": [
"Monitor ground temperature conditions for winter maintenance operations.",
"Predict road surface conditions based on subsurface temperature trends.",
"Assess travel safety by understanding ground temperature patterns."
],
"x-updateFrequency": "5m"
}
]
}