(GET) Devices | Sofar API

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

GET https://api.sofarocean.com/api/devices

Returns a list containing the device display name and Spotter ID of any Spotters you have API access to. If you have not changed the device display name in the Spotter Dashboard, the display name and Spotter ID will be the same.

Query Parameters

Name Type Description
excludeSharedDevices boolean Default: false Set true to limit the response to Spotters registered directly to your account. Any Spotters shared to your account will be excluded.

Response Description

Name Type Description
spotterId string The device's identifier.
name string The device's display name, configured in the Spotter Dashboard.

Error Codes

Examples

Example Request

curl "https://api.sofarocean.com/api/devices" -H 'token: YOUR_API_TOKEN'

Example Responses

200 (2 devices)

{
  "message": "2 devices",
  "data": {
    "devices": [
      {
        "spotterId": "SPOT-0017",
        "name": "Mavericks 1"
      },
      {
        "spotterId": "SPOT-0018",
        "name": "Golden Gate"
      }
    ]
  }
}

200 (no devices)

{
    "message": "0 devices",
    "data": {
        "devices": []
    }
}

401 (incorrect token)

{
    "message": "Authentication Failed"
}

401 (missing token)

{
    "message": "No token provided"
}