wave data.md
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs; this page is available as Markdown.
(GET) Historical Data
GET https://api.sofarocean.com/api/wave-data?spotterId=:spotterId
Returns waves and sensor data collected by the specified Spotter between startDate and endDate.
For Spotters shared, but not registered, to your account, you can only retrieve data collected within the past 30 days.
Query Parameters
| Name | Type | Description |
|---|---|---|
spotterId |
string | The identifier of the device you wish to retrieve data from. |
limit |
number | Default: The maximum amount of data to be included in the response. |
startDate |
string | Default: |
endDate |
string | Default: |
includeWaves |
boolean | Default: |
includeWindData |
boolean | Default: Set |
includeSurfaceTempData |
boolean | Default: Spotters equipped with SST sensors. |
includeTrack |
boolean | Default: Set |
includeFrequencyData |
boolean | Default: |
includeDirectionalMoments |
boolean | Default: Set |
includePartitionData |
boolean | Default: |
includeBarometerData |
boolean | Default: |
processingSources |
string | Default:
|
Response Description
For more information on the data collected by Spotters, see the product documentation.
| Name | Description | Units |
|---|---|---|
significantWaveHeight |
meters | |
peakPeriod, meanPeriod |
seconds | |
varianceDensity |
m2/Hz | |
windSpeed |
m/s | |
Examples
Example Request
curl "https://api.sofarocean.com/api/wave-data?spotterId=SPOT-0222&limit=20" -H 'token: YOUR_API_TOKEN'
Example Response
{% tabs %} {% tab title="200 " %}
{
"data": {
"spotterId": "SPOT-0222",
"limit": 20,
"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,
"processing_source": "embedded"
},
{...}
],
"track": [
{
"timestamp": "2017-09-27T22:41:27.000Z",
"latitude": 34.777083,
"longitude": -120.7396172,
"processing_source": "embedded"
},
{
"timestamp": "2017-09-27T22:44:27.000Z",
"latitude": 34.7769077,
"longitude": -120.7390585,
"processing_source": "embedded"
},
...
],
"frequencyData": [...],
"wind": [...],
"partitionData": [...]
}
}
{% endtab %} {% endtabs %}