Spotter Sensor

The Spotter Sensor API provides access to past 72-hour(3-day) real-time weather and surface data collected by Spotter devices via an HTTPs JSON API.

get
Available Devices

https://api.sofarocean.com/api/devices
Retrieve a list of Spotters you have API access to, including Spotter ID and nickname.
Request
Response
Request
Query Parameters
excludeSharedDevices
optional
boolean
default: false Set true to only return devices you own.
Response
200: OK
Content-Type: application/json; charset=utf-8
{
"message": "1 devices",
"data": {
"devices": [
{
"spotterId": "SPOT-0222",
"name": ""
}
]
}
}

Example Request

curl "https://api.sofarocean.com/api/devices" -H 'token: YOUR_API_TOKEN'

get
Wave Data

https://api.sofarocean.com/api/wave-data?spotterId=:spotterId
Returns surface data for the corresponding spotterId The past 72-hour realtime wave data will be retrieved in a single request. Frequency data is only available for samples collected from Spotters in Full Waves Mode.
Request
Response
Request
Query Parameters
includeSurfaceTempData
optional
boolean
default: false Include sea surface temperature (SST) readings in the response if available. Note: Not all Spotters have SST sensor hardware on board.
includeWindData
optional
boolean
default: false Include derived wind speed and direction in response.
includeDirectionalMoments
optional
boolean
default: false Include spectrally binned directional moments. Only applies if Spotter is in Full Waves Mode.
includeFrequencyData
optional
boolean
default: false Include spectrally binned surface variance, direction, and directional spreading. Only applies for samples collected in Full Waves Mode.
spotterId
required
string
Spotter ID of the device to retrieve data for.
Response
200: OK
Content-Type: application/json; charset=utf-8 For more information on data collected by Spotter, see the product documentation. https://www.sofarocean.com/posts/spotter-product-documentation Units: Wave Height: meters Periods: seconds Directions: degrees Location: decimal degrees Variance Density: m^2/Hz Directional Moments: unitless Wind Speed: m/s
{
"data": {
"spotterId": "SPOT-0222",
"waves": [
{
"significantWaveHeight": 1.91,
"peakPeriod": 10.24,
"meanPeriod": 7.72,
"peakDirection": 302.735,
"peakDirectionalSpread": 55.142,
"meanDirection": 279.846,
"meanDirectionalSpread": 70.635,
"timestamp": "2020-01-08T00:24:31.000Z",
"latitude": 34.64697,
"longitude": -159.877
},
{...}
]
}
}
‚Äč

Example Request

curl "https://api.sofarocean.com/api/wave-data?spotterId=SPOT-0222" -H 'token: YOUR_API_TOKEN'