Test the API | Sofar API

Demo API Token

Include this API token in the header or query parameters of your requests to retrieve sample data:

bae3f690cd6528ddd04824491c4c52

Walkthrough

  1. Get a list of Spotters associated with the demo account

Use the Devices endpoint to retrieve a list of Spotters associated with the demo account, ordered by spotterId.

curl "https://api.sofarocean.com/api/devices" -H 'token: bae3f690cd6528ddd04824491c4c52'
  1. Get the latest data from the demo account's Spotters

Choose a spotterId from the list of Spotters associated with the demo account and use the Latest Data endpoint to retrieve the most recently transmitted device, waves and sensor data for that Spotter.

curl "https://api.sofarocean.com/api/latest-data?spotterId=SPOT-30344R" -H 'token: bae3f690cd6528ddd04824491c4c52'

Change the spotterId to retrieve the latest data from another one of the demo account's Spotters and/or try adjusting the other query parameters (e.g., includeSurfaceTempData, includeWindData, etc.) to modify which data is returned.

  1. Get data from that Spotter for a specified time window

Use the Wave Data endpoint to retrieve data from one of the demo account's Spotters, specified by spotterId, for a given time window. By default, the response will consist of general device information and up to 20 of the most recent data samples.

curl "https://api.sofarocean.com/api/wave-data?spotterId=SPOT-30344R" -H 'token: bae3f690cd6528ddd04824491c4c52'

Change the spotterId to retrieve the data from another one of the demo account's Spotters and/or try adjusting the other query parameters (e.g., startDate, endDate, includeBarometerData, etc.) to modify which data is returned.

You can also use the demo API token to call the Sensor Data and Sensor Configuration Endpoints, but the data arrays in the responses will be empty because the demo account has no registered Smart Mooring devices.