Historical Data

The /wave-data url communicates data collected from a deployed Spotter's wave sensors within a given date-time window.

Note: For additional details, please expand the section by clicking '>'

Fetch Historical Data

GET https://api.sofarocean.com/api/wave-data?spotterId=:spotterId

Returns waves and sensor data for the corresponding spotterId * If you're a realtime Spotter Data customer and do not own your own Spotters, note that results for the wave-data endpoint will be fixed to a 30 day real-time window. * frequencyData is only available for samples collected from Spotters in Waves: Spectrum mode or HDR mode. * partitionData is only available for samples collected from Spotters in Waves: Partition mode or HDR mode.

* barometerData is only available for samples collected from barometer-equipped Spotters

Query Parameters

NameTypeDescription

spotterId

string

SpotterId of the device to retrieve data for.

limit

number

default: 20 max: 500 (100 if frequencyData included in response)

startDate

string

default: null ISO8601-formatted timestamp string indicating start date for data inclusion. Example: 2021-01-01T07:00:00Z

endDate

string

default: now() ISO8601-formatted timestamp string indicating end date for data inclusion. Example: 2021-01-02T07:00:00Z

includeWaves

boolean

default: true Set false to omit waves data.

includeWindData

boolean

default: false Set true to return wind data.

includeSurfaceTempData

boolean

default: false Set true to return surface temperature data. * Only applies for SST-equipped Spotters.

includeTrack

boolean

default: false Set true to return location tracking data.

includeFrequencyData

boolean

default: false Set true to return frequency data. * Only applies for samples collected in Waves: Spectrum or HDR mode

includeDirectionalMoments

boolean

default: false Set true to return directional moments data. * Only applies for samples collected in Waves: Spectrum mode and includeFrequencyData: true

includePartitionData

boolean

default: false Set true to return partitions data. * Only applies for samples collected in Waves: Partition mode.

includeBarometerData

boolean

default: false Set true to return barometer data. * Only applies for barometer-equipped Spotters.

processingSources

string

default: embedded

Select from which data processing source to receive data: [embedded, hdr, all]

* HDR processing source only applicable to cellular-equipped Spotters running in HDR mode

{
  "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": [...]
  }
}

Example Request

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

Last updated