List Devices
GET
/ea/devices

Description

List UniFi devices of owner.
Note: The structure of devices.uidb may vary depending on the UniFi OS or Network Server version. The provided example is based on UniFi OS 4.0.6.

Parameters

X-API-KEY
string
Required
header
API key
hostIds[]
array[string]
Optional
query
List of host IDs
time
string
Optional
query
Last processed timestamp of devices
Example
curl -X GET 'https://api.ui.com/ea/devices?hostIds[]=900A6F00301100000000074A6BA90000000007A3387E0000000063EC9853:123456789&hostIds[]=900A6F00301100000000074A6BA90000000007A3387E0000000063EC9853:987654321&time=2024-07-15T07:01:13Z' \
  -H 'Accept: application/json' \
  -H 'X-API-KEY: dnF8hQgEXlkG5ipcb3pbWwTNV9MZk0Nx'

Responses

200
ok
code
Optional
data
array
Optional
devices
array
Optional
adoptionTime
string
Optional
firmwareStatus
string
Optional
id
string
Optional
ip
string
Optional
isConsole
boolean
Optional
isManaged
boolean
Optional
mac
string
Optional
model
string
Optional
name
string
Optional
note
string
Optional
productLine
string
Optional
shortname
string
Optional
startupTime
string
Optional
date-time
status
string
Optional
uidb
Optional
updateAvailable
string
Optional
version
string
Optional
hostId
string
Optional
hostName
string
Optional
updatedAt
string
Optional
date-time
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
  "data": [
    {
      "devices": [
        {
          "adoptionTime": null,
          "firmwareStatus": "upToDate",
          "id": "F4E2C6C23F13",
          "ip": "192.168.1.226",
          "isConsole": true,
          "isManaged": true,
          "mac": "F4E2C6C23F13",
          "model": "UDM SE",
          "name": "unifi.yourdomain.com",
          "note": null,
          "productLine": "network",
          "shortname": "UDMPROSE",
          "startupTime": "2024-06-19T13:41:43Z",
          "status": "online",
          "uidb": {
            "guid": "0fd8c390-a0e8-4cb2-b93a-7b3051c83c46",
            "id": "e85485da-54c3-4906-8f19-3cef4116ff02",
            "images": {
              "default": "3008400039c483c496f4ad820242c447",
              "nopadding": "67b553529d0e523ca9dd4826076c5f3f",
              "topology": "8371ecdda1f00f1636a2eefadf0d7d47"
            }
          },
          "updateAvailable": null,
          "version": "4.0.6"
        }
      ],
      "hostId": "900A6F00301100000000074A6BA90000000007A3387E0000000063EC9853:123456789",
      "hostName": "unifi.yourdomain.com",
      "updatedAt": "2024-07-15T07:01:13Z"
    }
  ],
  "httpStatusCode": 200,
  "traceId": "a7dc15e0eb4527142d7823515b15f87d"
}

Responses

400
invalid parameter
code
Optional
data
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
  "code": "parameter_invalid",
  "httpStatusCode": 400,
  "message": "invalid time format: 2024-04-24",
  "traceId": "a7dc15e0eb4527142d7823515b15f87d"
}

Responses

401
unauthorized
code
Optional
data
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
  "code": "unauthorized",
  "httpStatusCode": 401,
  "message": "unauthorized",
  "traceId": "a7dc15e0eb4527142d7823515b15f87d"
}

Responses

429
rate limit
code
Optional
data
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional

Headers

Retry-After
string
example: 5
Example Response
{
  "code": "rate_limit",
  "httpStatusCode": 429,
  "message": "rate limit exceeded, retry after 5.372786998s",
  "traceId": "a7dc15e0eb4527142d7823515b15f87d"
}

Responses

500
failed to list devices
code
Optional
data
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
  "code": "server_error",
  "httpStatusCode": 500,
  "message": "failed to list devices",
  "traceId": "a7dc15e0eb4527142d7823515b15f87d"
}

Responses

502
bad gateway
code
Optional
data
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
  "code": "bad_gateway",
  "httpStatusCode": 502,
  "message": "bad gateway",
  "traceId": "a7dc15e0eb4527142d7823515b15f87d"
}