---
title: "GET /switches"
method: GET
path: "/switches"
tags: ["Switches"]
---

# GET /switches

`GET /switches`

This endpoint allows users to retrieve a paginated list of switches within a given account.  
It is important to note that after using the pageSize parameter, the "totalSize" in the response  represents the total number of available switches, not the number of switches resulting from the query string.

## Query parameters

- `id__in` string[]
- `name__contains` string
- `id__contains` string
- `include` 'description' | 'userAgent' | 'data' | 'ipAddressLocation'
- `pageToken` string
- `pageSize` integer

## Response `200`

OK

- ApiPaginatedSwitchResponse — Used to wrap results for a paginated response, containing information on how to retrieve further pages.
  - `nextPageToken` string, nullable, required — Token to retrieve the next page. The value of this token is passed into the field pageToken. This value can be null if there is no next page.
  - `prevPageToken` string, nullable, required — Token to retrieve the previous page. The value of this token is passed into the field pageToken. This value can be null of there is no previous page.
  - `results` object[], required — The result set from a collection API call.
    - `id` string, uuid, required — Unique switch identifier
    - `accountId` string, required — Account ID.
    - `name` string, required — Switch name
    - `bridgeId` string — The bridge a switch is connected to.
    - `portCount` integer
    - `status` DeviceStatus — Indicates various aspects of the device's status. The statuses defined here should be in sync with the events schema defined for the Device Cloud Status Update.
      - `connectionStatus` 'online' | 'deviceOffline' | 'invalidCredentials' | 'bridgeOffline' | 'off' | 'error' | 'busy' | 'unknown' — Indicates the connection status of the device: * `online`: The device is online and operational. * `deviceOffline`: The device is offline. * `invalidCredentials`: The known credentials for this device, including the default credentials, are invalid. This is causing the device to appear offline. * `bridgeOffline`: The bridge that connects this device to the cloud is offline. However, both the device and the bridge may still be operational locally, even though the cloud has no visibility into their status. * `off`: The device is online, but has been turned off by the user. * `error`: The device is offline due to some problem that has not been described by any of the other statuses. * `busy`: The device is currently busy and unavailable for other operations. * `unknown`: The device state is unknown for some reason.
    - `statusV2` DeviceStatusV2 — Status as reported by the edge device.
      - `cloudConnectionStatus` 'connected' | 'disconnected', required — Socket connection state between device and cloud * `connected`: The device socket connected to cloud. * `disconnected`: The device socket disconnected from cloud.
      - `edgeReportedDeviceStatus` 'operational' | 'error' | 'disabled' | 'unreachable' | 'unknown' | 'initializing', required — Indicates the operational status of the device. The statuses defined here should be in sync with the DeviceStatus schema. * `operational`: The device is online and operational. * `error`: Device not working (requires error details). * `disabled`: Operational but intentionally not recording telemetry * `unreachable`: The device is not reachable (e.g., offline, out of service). * `unknown`: The device state is unknown for some reason. * `initializing`: The device is in the process of initializing.
      - `deviceSpecificError` 'disconnectedFromBridge' | 'generalDeviceError' | 'networkError' | 'invalidCredentials' | 'deviceSupportIssue' | 'queuedForConfiguration' | 'configurationInProgress' | 'deviceDisabled' | 'analogNoPower' | 'analogBadSignal' | 'analogIncompatibleSignal' | 'analogNoSignal' — Indicates the detailed error status of a device, grouped by device type: ONVIF Camera / RTSP Camera / Multicamera: * `generalDeviceError`: Camera error * `networkError`: Network error * `invalidCredentials`: Invalid credentials * `deviceSupportIssue`: Device support issue * `queuedForConfiguration`: Queued for configuration * `configurationInProgress`: Configuration in progress * `deviceDisabled`: Device is turned off * `disconnectedFromBridge`: Disconnected from bridge Analog Camera: * `analogNoPower`: Power loss detected * `analogBadSignal`: Signal quality issue * `analogIncompatibleSignal`: Incompatible signal * `analogNoSignal`: No signal * `disconnectedFromBridge`: Disconnected from bridge * `deviceDisabled`: Device is turned off Managed Switch: * `deviceSupportIssue`: Switch support issue * `disconnectedFromBridge`: Disconnected from bridge
    - `notes` string
    - `ports` ApiSwitchPort[] — List of ports of the switch and details about each port and what is possibly connected to it.
      - `id` integer — Port identifier, unique for the given switch
      - `enabled` boolean — Indicates whether the port is on (true) or off (false)
      - `power` number — Power in Watts that this port is drawing
      - `detectedDeviceCount` integer — Number of devices connected to the port. If a single device has been detected, the Mac address and possibly the IP Address are returned.
      - `devices` DetectedDevice[] — List of devices that are known to be connected to the port.
        - `macAddress` string — MAC address behind the port.
        - `ipAddress` string — IP Address found using ARP for the given MAC address.
        - `guid` string, uuid — GUID of the device that corresponds to the MAC or IP connected to the port.
        - `esn` string — Esn of the device that corresponds to the MAC or IP connected to the port.
        - `deviceName` string, nullable — Name of the device that corresponds to the MAC or IP connected to the port. The value is null if no device is connected to the port.
        - `deviceId` string, nullable — Id of the device that corresponds to the MAC or IP connected to the port. The value is null if no device is connected to the port.
        - `deviceType` 'camera' | 'speaker' | 'bridge' | 'multiCamera', nullable — Type of the device that corresponds to the MAC or IP connected to the port. The value is null if no device is connected to the port. new devices might be added in the future.
    - `networkInfo` ApiNetworkInfo
      - `globalIP` string, nullable
      - `adapters` ApiAdapterInfo[]
        - `macAddress` string, nullable
        - `ipAddress` string, nullable
    - `firmware` ApiFirmware
      - `currentVersion` string, nullable
    - `visibleByBridges` BridgeId2[]
  - `totalSize` integer, required — Size of the total result set.

## Other responses

- `400` — The supplied object is invalid. Error detail will contain the validation error.
- `401` — You are not authenticated. Please authenticate and try again.
- `404` — Referenced resource could not be found.
- `500` — Something went wrong in the server. Please try again.

---

[API](https://skmtc.net/eagleeyenetworks/apis/devices.md) · [All operations](https://skmtc.net/eagleeyenetworks/apis/devices/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eagleeyenetworks/devices/versions/df57313de545/schema)
