> For the complete documentation index, see [llms.txt](https://docs.sofarocean.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sofarocean.com/spotter-and-smart-mooring/fetch-devices.md).

# (GET) Devices

<mark style="color:blue;">`GET`</mark> `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 | <p>Default: <code>false</code> </p><p><br>Set <code>true</code> to limit the response to Spotters registered directly to your account. Any Spotters shared to your account will be excluded.</p> |

## Response Description

The response body contains a list of Spotters associated with the account, ordered by `spotterId`.&#x20;

| Name        | Type   | Description                                                                                                                                            |
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `spotterId` | string | The Spotter's identifier.                                                                                                                              |
| `name`      | string | The Spotter's display name, as configured in the [Spotter Dashboard](https://spotter.sofarocean.com/). Returns `null` if no display name has been set. |
| `hullType`  | string | <p>The Spotter's hull type. <br><br>Can be <code>spotter</code>, <code>scout</code> or <code>velella</code>.</p>                                       |

## Examples

### Example Request

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

### Example Responses

{% tabs %}
{% tab title="200" %}
**2 Devices:**

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

**No Devices:**

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

{% endtab %}

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

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

**Missing Token:**

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

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sofarocean.com/spotter-and-smart-mooring/fetch-devices.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
