(GET) Sensor Data | Sofar API

For the complete documentation index, see llms.txt. This page is also available as Markdown.

GET``https://api.sofarocean.com/api/sensor-data?spotterId=:spotterId&startDate=:startDate&endDate=:endDate

Returns Smart Mooring sensor data collected by the specified Spotter between startDate and endDate.

Query Parameters

Name Type Description
spotterId string SpotterId of the device to retrieve data for.
startDate string ISO 8601-formatted timestamp indicating the start date for data inclusion.
e.g., 2021-01-01T07:00:00Z
endDate string ISO 8601-formatted timestamp indicating the end date for data inclusion.
e.g., 2021-01-02T07:00:00Z

If neither startDate nor endDate are specified, startDate will default to 24 hours ago and endDate will default to now.

Response Description

For more information about Smart Mooring sensors and data, please refer to the Sensors & Payloads guide.

The /sensor-data response format consists of a “flat” (uncategorized) data stream ordered by timestamp. Keep in mind that these timestamps, while ordered, are not necessarily unique. It is possible for two or more sensors to send different values with identical timestamps (e.g., a temperature sensor and a pressure sensor could emit data at the same time).

The location data in each sample dict is the location of the Spotter when the report was encoded and transmitted. If the Spotter is configured to send multiple sample periods in a single transmission (eg to save on data telemetry costs) all samples in the report will have the same location data.

Name Type Description
latitude Latitude of the Spotter location.
longitude Longitude of the Spotter location.
timestamp string ISO 8601-formatted timestamp indicating the end of a sample collection period.
sensorPosition integer The sensor's physical position in the Smart Mooring relative to the Spotter, with 1 being closest to the Spotter.
units The physical units of the data.
value The measured value.
unit_type A contextual description of what is being measured.
data_type_name string The type of information being sent by a sensor, as ingested by the API.
configuration_checksum Property indicating the physical layout of the sensors on the Smart Mooring that can be cross-referenced with the configurations returned by the Configuration History endpoint to determine the sensor configuration in use at the time the data was collected.

Examples

Example Request

Copy

curl "https://api.sofarocean.com/api/sensor-data?spotterId=SPOT-0222&startDate=2021-12-01T00:00:00Z&endDate=2021-12-02T00:00:00Z" -H 'token: YOUR_API_TOKEN'

Example Response

200

Copy

{
  "status": "success",
  "data": [
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:02:13.000Z",
      "sensorPosition": 2,
      "units": "μbar",
      "value": 50,
      "unit_type": "pressure",
      "data_type_name": "rbrcoda3_stdevpressure_15bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:02:13.000Z",
      "sensorPosition": 2,
      "units": "°C",
      "value": 25.266200000000005,
      "unit_type": "temperature",
      "data_type_name": "rbrcoda3_meantemperature_20bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:02:13.000Z",
      "sensorPosition": 1,
      "units": "°C",
      "value": 25.480000000000004,
      "unit_type": "temperature",
      "data_type_name": "sofar_temperature_12bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:02:13.000Z",
      "sensorPosition": 2,
      "units": "μbar",
      "value": 1122270,
      "unit_type": "pressure",
      "data_type_name": "rbrcoda3_meanpressure_21bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 2,
      "units": "°C",
      "value": 25.268500000000003,
      "unit_type": "temperature",
      "data_type_name": "rbrcoda3_meantemperature_20bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 1,
      "units": "°C",
      "value": 25.520000000000003,
      "unit_type": "temperature",
      "data_type_name": "sofar_temperature_12bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 2,
      "units": "μbar",
      "value": 1122190,
      "unit_type": "pressure",
      "data_type_name": "rbrcoda3_meanpressure_21bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 2,
      "units": "μbar",
      "value": 70,
      "unit_type": "pressure",
      "data_type_name": "rbrcoda3_stdevpressure_15bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 3,
      "units": "cm/s",
      "value": 188.69,
      "unit_type": "speed",
      "data_type_name": "aanderaa_abs_speed_mean_15bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 3,
      "units": "cm/s",
      "value": 76.92,
      "unit_type": "speed",
      "data_type_name": "aanderaa_abs_speed_std_15bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 3,
      "units": "rad",
      "value": 4.058,
      "unit_type": "direction",
      "data_type_name": "aanderaa_direction_circ_mean_13bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 3,
      "units": "rad",
      "value": 1.074,
      "unit_type": "direction",
      "data_type_name": "aanderaa_direction_circ_std_13bits",
      "configuration_checksum": "0xb6929687"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 3,
      "configuration_checksum": "0xb6929687",
      "value": 7,
      "unit_type": "reading_count",
      "data_type_name": "aanderaa_reading_count_10bits"
    },
    {
      "latitude": 13.1203,
      "longitude": 100.91925,
      "timestamp": "2021-12-01T03:17:13.000Z",
      "sensorPosition": 3,
      "units": "°C",
      "value": -0.17999999999999972,
      "unit_type": "temperature",
      "data_type_name": "aanderaa_temperature_mean_13bits",
      "configuration_checksum": "0xb6929687"
    }
  ]
}