List Sites
GET
/ea/sites

Description

List sites.
Note: The structure of meta and statistics 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
Example
curl -X GET 'https://api.ui.com/ea/sites' \
  -H 'Accept: application/json' \
  -H 'X-API-KEY: dnF8hQgEXlkG5ipcb3pbWwTNV9MZk0Nx'

Responses

200
ok
code
Optional
data
array
Optional
hostId
string
Optional
isOwner
boolean
Optional
meta
Optional
permission
string
Optional
siteId
string
Optional
statistics
Optional
subscriptionEndTime
string
Optional
date-time
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
  "data": [
    {
      "hostId": "900A6F00301100000000074A6BA90000000007A3387E0000000063EC9853:123456789",
      "isOwner": true,
      "meta": {
        "desc": "Default",
        "gatewayMac": "f4:e2:c6:c2:3f:13",
        "name": "default",
        "timezone": "Europe/Riga"
      },
      "permission": "admin",
      "siteId": "661900ae6aec8f548d49fd54",
      "statistics": {
        "counts": {
          "criticalNotification": 0,
          "gatewayDevice": 1,
          "guestClient": 0,
          "lanConfiguration": 2,
          "offlineDevice": 0,
          "offlineGatewayDevice": 0,
          "offlineWifiDevice": 0,
          "offlineWiredDevice": 0,
          "pendingUpdateDevice": 0,
          "totalDevice": 1,
          "wanConfiguration": 2,
          "wifiClient": 0,
          "wifiConfiguration": 0,
          "wifiDevice": 0,
          "wiredClient": 1,
          "wiredDevice": 0
        },
        "internetIssues": [
          {
            "highLatency": true,
            "index": 5731624,
            "latencyAvgMs": 23,
            "latencyMaxMs": 35
          },
          {
            "highLatency": true,
            "index": 5731625,
            "latencyAvgMs": 35,
            "latencyMaxMs": 78
          },
          {
            "index": 5731626
          }
        ],
        "ispInfo": {
          "name": "TET",
          "organization": "SIA Tet"
        },
        "percentages": {
          "txRetry": 2.03,
          "wanUptime": 99.86
        }
      },
      "subscriptionEndTime": "2024-06-27T13:09:46Z"
    }
  ],
  "httpStatusCode": 200,
  "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 sites
code
Optional
data
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
  "code": "server_error",
  "httpStatusCode": 500,
  "message": "failed to list sites",
  "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"
}