Spotter Sensor

The Spotter Data API provides access to 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 A maximum of 500 samples may be retrieved in a single request (100 if includeFrequencyData==true). Frequency data is only available for samples collected from Spotters in Full Waves Mode.
Request
Response
Request
Query Parameters
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.
endDate
optional
string
default: now() Timestamp for end of data range. ISO 8601 format.
startDate
optional
string
default: null Timestamp for start of data range. ISO 8601 format.
limit
optional
integer
default: 20 max: 500 max: 100 if frequencyData included. Maximum number of samples to retrieve in request.
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",
"limit": 1,
"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&limit=1" -H 'token: YOUR_API_TOKEN'