fetch devices.md
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs; this page is available as Markdown.
(GET) Devices
GET https://api.sofarocean.com/api/devices
Returns a list containing the display name, Spotter ID, and hull type of any Spotters you have API access to (i.e., Spotters registered to or shared with your account).
Query Parameters
| Name | Type | Description |
|---|---|---|
excludeSharedDevices |
boolean | Default:
|
Response Description
The response body contains a list of Spotters associated with the account, ordered by spotterId.
| Name | Type | Description |
|---|---|---|
spotterId |
string | The Spotter's identifier. |
name |
string | The Spotter's display name, as configured in the Spotter Dashboard. Returns null if no display name has been set. |
hullType |
string | The Spotter's hull type. |
Examples
Example Request
curl "https://api.sofarocean.com/api/devices" -H 'token: YOUR_API_TOKEN'
Example Responses
2 Devices:
{
"message": "2 devices",
"data": {
"devices": [
{
"spotterId": "SPOT-0017",
"hullType": "spotter",
"name": "Mavericks 1"
},
{
"spotterId": "SPOT-0018",
"hullType": "spotter",
"name": "Golden Gate"
}
]
}
}
No Devices:
{
"message": "0 devices",
"data": {
"devices": []
}
}
Incorrect Token:
{
"message": "Authentication Failed"
}
Missing Token:
{
"message": "No token provided"
}