# (GET) Sensor Configuration History

<mark style="color:blue;">`GET`</mark> `https://api.sofarocean.com/api/sensor-configuration-history?spotterId=:spotterId&startDate=:startDate&endDate=:endDate`

Returns Smart Mooring sensor configurations for a Spotter, specified by `spotterId`, between `startDate` and `endDate`.

{% hint style="info" %}
This endpoint will only return sensor configuration history from June 2025 or later.
{% endhint %}

## Query Parameters

| Name        | Type   | Description                                                                                                                      |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `spotterId` | string | The Spotter ID of the device you wish to retrieve information from.                                                              |
| `startDate` | string | <p>ISO 8601-formatted timestamp indicating the start date for data inclusion.<br><br>e.g., <code>2025-06-01T07:00:00Z</code></p> |
| `endDate`   | string | <p>ISO 8601-formatted timestamp indicating the end date for data inclusion.<br><br>e.g.,  <code>2025-06-02T07:00:00Z</code></p>  |

## Response Description

The response body includes the configurations of all sensors attached to the Smart Mooring during the specified time window, ordered by timestamp. Each element of the `data` array represents a complete configuration at one time.

{% hint style="info" %}
For more information about [Smart Mooring](https://www.notion.so/Smart-Mooring-Product-Documentation-Onboarding-557d26176ca6422fab42c879b2093d92?source=copy_link) sensors and data, please refer to the [Sensors & Payloads guide](https://sofarocean.notion.site/Sensors-Payloads-a26e005cc5374a7eb6a1e64a3b54b7de?pvs=74).
{% endhint %}

| Name                     | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `timestamp`              | string | <p>ISO 8601-formatted timestamp indicating the time the configuration was reported by the Spotter.<br><br>The timestamp of the first entry will be at or after the specified <code>startDate</code>. This does not necessarily indicate the earliest time the configuration was used, as the sensor configuration could have been in use prior to the specified <code>startDate</code>.</p>                                                                                                        |
| `configuration_checksum` | string | <p>A unique identifier for the Smart Mooring configuration. Can be cross-referenced with the sensor data samples returned by the <a href="sensor-data">Sensor Data endpoint</a> to determine the sensor configuration at the time of data collection.<br><br>If the sensors are returned to an earlier configuration, the <code>configuration\_checksum</code> will also return to its previous value (as long as the sensors are in the same position and have the same configured settings).</p> |
| `sensor_configurations`  | array  | The complete configuration of all sensors attached to the Spotter's Smart Mooring at a given time.                                                                                                                                                                                                                                                                                                                                                                                                 |

### Sensor Configurations

The `sensor_configurations` array contains details on the configuration of each sensor.

| Name                   | Type    | Description                                                                                                                                                                                                      |
| ---------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `app_name`             | string  | <p>The name of the sensor, returned for Bristlemouth sensors.<br><br>For Bristlemouth Development Kits, <code>app\_name</code> can be changed for better identification of the device.</p>                       |
| `sensor_type`          | object  | The name and display name of the sensor.                                                                                                                                                                         |
| `position`             | integer | The sensor's physical position in the Smart Mooring relative to the Spotter, with `1` being closest to the Spotter and `0` being the Bristlemouth processor within the Spotter at the root of the Smart Mooring. |
| `configuration`        | object  | The sensor's configuration settings.                                                                                                                                                                             |
| `data_types`           | array   | The data fields and units potentially returned by the sensor among its data samples.                                                                                                                             |
| `firmware_sha`         | string  | The Bristlemouth mote's firmware version.                                                                                                                                                                        |
| `bristlemouth_node_id` | string  | The Bristlemouth mote's ID.                                                                                                                                                                                      |
| `configuration_crc`    | string  | An error-detecting code for the Bristlemouth mote.                                                                                                                                                               |

## Examples

### Example Request

<pre class="language-bash"><code class="lang-bash"><strong>curl "https://api.sofarocean.com/api/sensor-configuration-history?spotterId=SPOT-0222&#x26;startDate=2025-12-01T07:00:00Z&#x26;endDate=2025-12-02T07:00:00Z" -H 'token: YOUR_API_TOKEN'
</strong></code></pre>

### Example Responses

{% tabs %}
{% tab title="200" %}
**Configuration history:**

{% code expandable="true" %}

```json
{
    "status": "success",
    "spotterId": "SPOT-31082C",
    "data": [
        {
            "timestamp": "2025-09-02T02:16:07.000Z",
            "sensor_configurations": [
                {
                    "app_name": "bridge",
                    "position": 0,
                    "data_types": [],
                    "firmware_sha": "3610e39f",
                    "configuration": {
                        "sampleDurationMs": 840000,
                        "sampleIntervalMs": 1800000,
                        "samplesPerReport": 2,
                        "subsampleEnabled": 0,
                        "softReadingPeriodMs": 500,
                        "subsampleDurationMs": 60000,
                        "subsampleIntervalMs": 300000,
                        "ticksSamplingEnabled": 0,
                        "transmitAggregations": 1,
                        "alignmentInterval5Min": 1,
                        "sensorsCheckIntervalS": 60,
                        "sensorsPollIntervalMs": 10000,
                        "currentReadingPeriodMs": 60000,
                        "rbrCodaReadingPeriodMs": 500,
                        "disableUnusedPortsTimeMs": 0,
                        "turbidityReadingPeriodMs": 1000,
                        "bridgePowerControllerEnabled": 1
                    },
                    "configuration_crc": "0xedba5d73",
                    "bristlemouth_node_id": "0xd158263d60f8e3a1",
                    "sensor_type": {
                        "name": "bm_bridge_1",
                        "display_name": "Spotter"
                    }
                },
                {
                    "app_name": "borealis",
                    "position": 1,
                    "data_types": [
                        {
                            "units": "unitless",
                            "unit_type": "boolean",
                            "data_type_name": "generic_boolean_1bits"
                        },
                        {
                            "units": "dB re µPa²",
                            "unit_type": "sound_pressure_level",
                            "data_type_name": "bm_borealis_spl_broadband_8bits"
                        },
                        {
                            "units": "dB re µPa²",
                            "unit_type": "interquartile_range",
                            "data_type_name": "bm_borealis_max_iqr_8bits"
                        },
                        {
                            "units": "unitless",
                            "unit_type": "index",
                            "data_type_name": "bm_borealis_max_iqr_band_number_6bits"
                        },
                        {
                            "units": "unitless",
                            "unit_type": "spectral_entropy",
                            "data_type_name": "bm_borealis_entropy_8bits"
                        },
                        {
                            "units": "unitless",
                            "unit_type": "buffer_length",
                            "data_type_name": "generic_buffer_length_8bits"
                        },
                        {
                            "units": "bit",
                            "unit_type": "bit",
                            "data_type_name": "generic_dummy_1bits"
                        }
                    ],
                    "firmware_sha": "98b26cbb",
                    "configuration": {
                        "enable_dsp": 1,
                        "enable_sbc": 1,
                        "dfu_confirm": 1,
                        "sample_rate": 48000,
                        "sbc_command": "/usr/local/bin/borealis_hydrotwin.sh",
                        "hydrotwin_ldr": 3,
                        "report_interval": 810,
                        "enable_daq_recording": 1,
                        "disableUnusedPortsTimeMs": 0
                    },
                    "configuration_crc": "0x4d24634d",
                    "bristlemouth_node_id": "0x9d24ede22a7e7413",
                    "sensor_type": {
                        "name": "bm_borealis_1",
                        "display_name": "Bristlemouth Borealis Hydrophone"
                    }
                }
            ],
            "configuration_checksum": "0x4b15a6d0"
        },
        {
            "timestamp": "2025-09-05T02:43:58.000Z",
            "sensor_configurations": [
                {
                    "app_name": "bridge",
                    "position": 0,
                    "data_types": [],
                    "firmware_sha": "3610e39f",
                    "configuration": {
                        "sampleDurationMs": 840000,
                        "sampleIntervalMs": 1800000,
                        "samplesPerReport": 2,
                        "subsampleEnabled": 0,
                        "softReadingPeriodMs": 500,
                        "subsampleDurationMs": 60000,
                        "subsampleIntervalMs": 300000,
                        "ticksSamplingEnabled": 0,
                        "transmitAggregations": 1,
                        "alignmentInterval5Min": 1,
                        "sensorsCheckIntervalS": 60,
                        "sensorsPollIntervalMs": 10000,
                        "currentReadingPeriodMs": 60000,
                        "rbrCodaReadingPeriodMs": 500,
                        "disableUnusedPortsTimeMs": 0,
                        "turbidityReadingPeriodMs": 1000,
                        "bridgePowerControllerEnabled": 1
                    },
                    "configuration_crc": "0xedba5d73",
                    "bristlemouth_node_id": "0xd158263d60f8e3a1",
                    "sensor_type": {
                        "name": "bm_bridge_1",
                        "display_name": "Spotter"
                    }
                },
                {
                    "app_name": "borealis",
                    "position": 1,
                    "data_types": [
                        {
                            "units": "unitless",
                            "unit_type": "boolean",
                            "data_type_name": "generic_boolean_1bits"
                        },
                        {
                            "units": "dB re µPa²",
                            "unit_type": "sound_pressure_level",
                            "data_type_name": "bm_borealis_spl_broadband_8bits"
                        },
                        {
                            "units": "dB re µPa²",
                            "unit_type": "interquartile_range",
                            "data_type_name": "bm_borealis_max_iqr_8bits"
                        },
                        {
                            "units": "unitless",
                            "unit_type": "index",
                            "data_type_name": "bm_borealis_max_iqr_band_number_6bits"
                        },
                        {
                            "units": "unitless",
                            "unit_type": "spectral_entropy",
                            "data_type_name": "bm_borealis_entropy_8bits"
                        },
                        {
                            "units": "unitless",
                            "unit_type": "buffer_length",
                            "data_type_name": "generic_buffer_length_8bits"
                        },
                        {
                            "units": "bit",
                            "unit_type": "bit",
                            "data_type_name": "generic_dummy_1bits"
                        }
                    ],
                    "firmware_sha": "98b26cbb",
                    "configuration": {
                        "enable_dsp": 1,
                        "enable_sbc": 0,
                        "dfu_confirm": 1,
                        "sample_rate": 31250,
                        "sbc_command": "/usr/local/bin/borealis_hydrotwin.sh",
                        "enable_pgram": 0,
                        "hydrotwin_ldr": 3,
                        "report_interval": 810,
                        "sensorBmLogEnable": 1,
                        "enable_daq_recording": 1,
                        "sensorsCheckIntervalS": 60,
                        "sensorsPollIntervalMs": 5000,
                        "disableUnusedPortsTimeMs": 0
                    },
                    "configuration_crc": "0x332d39ff",
                    "bristlemouth_node_id": "0x9d24ede22a7e7413",
                    "sensor_type": {
                        "name": "bm_borealis_1",
                        "display_name": "Bristlemouth Borealis Hydrophone"
                    }
                }
            ],
            "configuration_checksum": "0x9fedcb4e"
        },
        ...
    ]
}
```

{% endcode %}

**No configuration history:**

```json
{
    "status": "success",
    "spotterId": "SPOT-010423",
    "data": []
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "status": "error",
    "message": "Device not found"
}
```

{% endtab %}

{% tab title="401" %}
**Incorrect token:**

```json
{
    "message": "Authentication Failed"
}
```

**Missing token:**

```json
{
    "message": "No token provided"
}
```

{% endtab %}
{% endtabs %}
