Get Host by ID
GET
/ea/hosts/{id}
Description
Retrieve detailed information about a specific host by ID.Note: The structure of
userData
and reportedState
may vary depending on the UniFi OS or Network Server version. The example provided is based on UniFi OS 4.0.6.Parameters
id
string
Required
path
Host ID
X-API-KEY
string
Required
header
API key
Example
curl -X GET 'https://api.ui.com/ea/hosts/{id}' \
-H 'Accept: application/json' \
-H 'X-API-KEY: dnF8hQgEXlkG5ipcb3pbWwTNV9MZk0Nx'
Responses
200
console
code
Optional
data
object
Optional
hardwareId
string
Optional
id
string
Optional
ipAddress
string
Optional
isBlocked
boolean
Optional
lastConnectionStateChange
string
Optional
date-time
latestBackupTime
string
Optional
date-time
owner
boolean
Optional
registrationTime
string
Optional
date-time
reportedState
Optional
type
string
Optional
userData
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
"data": {
"hardwareId": "eae0f123-0000-5111-b111-f833f56eade5",
"id": "900A6F00301100000000074A6BA90000000007A3387E0000000063EC9853:123456789",
"ipAddress": "192.168.220.114",
"isBlocked": false,
"lastConnectionStateChange": "2024-06-23T03:59:52Z",
"latestBackupTime": "2024-06-22T11:55:10Z",
"owner": true,
"registrationTime": "2024-04-17T07:27:14Z",
"reportedState": {
"anonid": "c2705509-58a5-40c9-8b2e-d29c8574ff08",
"apps": [
{
"controllerStatus": "READY",
"name": "users",
"port": 9080,
"swaiVersion": 2,
"type": "app",
"version": "1.8.42+3695"
}
],
"availableChannels": [
"release",
"beta",
"release-candidate"
],
"consolesOnSameLocalNetwork": [],
"controller_uuid": "900A6F00301100000000074A6BA90000000007A3387E0000000063EC9853:123456789",
"controllers": [
{
"abridged": true,
"controllerStatus": "READY",
"initialDeviceListSynced": true,
"installState": "installed",
"isConfigured": true,
"isInstalled": true,
"isRunning": true,
"name": "network",
"port": 8081,
"releaseChannel": "beta",
"required": true,
"state": "active",
"status": "ok",
"statusMessage": "",
"swaiVersion": 3,
"type": "controller",
"uiVersion": "8.4.20.0",
"unadoptedDevices": [],
"updatable": true,
"updateAvailable": null,
"version": "8.4.20"
},
{
"abridged": true,
"controllerStatus": "READY",
"features": {
"stackable": false
},
"initialDeviceListSynced": true,
"installState": "installed",
"installable": true,
"isConfigured": true,
"isGeofencingEnabled": false,
"isInstalled": true,
"isRunning": true,
"name": "protect",
"port": 7080,
"releaseChannel": "beta",
"restorePercentage": 100,
"state": "active",
"status": "ok",
"statusMessage": "",
"swaiVersion": 5,
"type": "controller",
"uiVersion": "3.1.22",
"unadoptedDevices": [],
"updatable": true,
"updateAvailable": null,
"version": "4.0.33"
},
{
"installState": "uninstalled",
"installable": false,
"isConfigured": false,
"isInstalled": false,
"isRunning": false,
"name": "access",
"port": 12080,
"releaseChannel": "beta",
"state": "inactive",
"status": "offline",
"statusMessage": "",
"type": "controller",
"unadoptedDevices": [],
"updatable": true,
"version": null
},
{
"installState": "uninstalled",
"installable": false,
"isConfigured": false,
"isInstalled": false,
"isRunning": false,
"name": "talk",
"port": 30080,
"releaseChannel": "beta",
"state": "inactive",
"status": "offline",
"statusMessage": "",
"type": "controller",
"unadoptedDevices": [],
"updatable": true,
"version": null
},
{
"installState": "uninstalled",
"installable": false,
"isConfigured": false,
"isInstalled": false,
"isRunning": false,
"name": "connect",
"port": 54480,
"releaseChannel": "beta",
"state": "inactive",
"status": "offline",
"statusMessage": "",
"type": "controller",
"unadoptedDevices": [],
"updatable": true,
"version": null
},
{
"installState": "uninstalled",
"installable": false,
"isConfigured": false,
"isInstalled": false,
"isRunning": false,
"name": "innerspace",
"port": 17080,
"releaseChannel": "beta",
"state": "inactive",
"status": "offline",
"statusMessage": "",
"type": "controller",
"unadoptedDevices": [],
"updatable": true,
"version": null
}
],
"country": 840,
"deviceErrorCode": null,
"deviceState": "setup",
"deviceStateLastChanged": 1718804749,
"directConnectDomain": "f4e2c6c23f1307bc5608082112aa0651cbf10.id.ui.direct",
"features": {
"cloud": {
"applicationEvents": true,
"applicationEventsHttp": true
},
"cloudBackup": true,
"deviceList": {
"autolinkDevices": true,
"partialUpdates": true,
"ucp4Events": true
},
"directRemoteConnection": true,
"hasGateway": true,
"hasLCM": true,
"hasLED": false,
"infoApis": {
"firmwareUpdate": true
},
"isAutomaticFailoverAvailable": false,
"mfa": true,
"notifications": true,
"sharedTokens": true,
"supportForm": true,
"teleport": false,
"teleportState": "DISABLED",
"uidService": true
},
"firmwareUpdate": {
"latestAvailableVersion": null
},
"hardware": {
"bom": "113-00917-42",
"cpu.id": "411fd073-00000000",
"debianCodename": "bullseye",
"firmwareVersion": "4.0.6",
"hwrev": 234794,
"mac": "F4E2C6C23F13",
"name": "UniFi Dream Machine SE",
"qrid": "QwWvUy",
"reboot": "30",
"serialno": "f4e2c6c23f13",
"shortname": "UDMPROSE",
"subtype": "",
"sysid": 59948,
"upgrade": "310",
"uuid": "eae0f123-0000-5111-b111-f833f56eade5"
},
"host_type": 59948,
"hostname": "unifi.yourdomain.com",
"internetIssues5min": {
"periods": [
{
"index": 5731574
}
]
},
"ip": "192.168.1.226",
"ipAddrs": [
"fe80::f6e2:c6ff:fec2:3f15",
"fe80::f6e2:c6ff:fec2:3f17",
"192.168.1.226",
"fe80::f6e2:c6ff:fec2:3f1b",
"192.168.0.1",
"fe80::f4e2:c6ff:fec2:3f14"
],
"isStacked": false,
"location": {
"lat": 56.9496,
"long": 24.0978,
"radius": 200,
"text": "-----------"
},
"mac": "F4E1C6C11F00",
"mgmt_port": 443,
"name": "unifi.yourdomain.com",
"releaseChannel": "beta",
"state": "connected",
"timezone": "Europe/Riga",
"uidb": {
"guid": "0fd8c390-a0e8-4cb2-b93a-7b3051c83c46",
"id": "e85485da-54c3-4906-8f19-3cef4116ff02",
"images": {
"default": "3008400039c483c496f4ad820242c447",
"nopadding": "67b553529d0e523ca9dd4826076c5f3f",
"topology": "8371ecdda1f00f1636a2eefadf0d7d47"
}
},
"unadoptedUnifiOSDevices": [],
"version": "4.0.180"
},
"type": "console",
"userData": {
"apps": [
"users"
],
"consoleGroupMembers": [
{
"mac": "F4E2C6C23F13",
"role": "UNADOPTED",
"roleAttributes": {
"applications": {
"access": {
"owned": false,
"required": false,
"supported": true
},
"connect": {
"owned": false,
"required": false,
"supported": true
},
"innerspace": {
"owned": false,
"required": false,
"supported": true
},
"network": {
"owned": false,
"required": true,
"supported": true
},
"protect": {
"owned": false,
"required": false,
"supported": true
},
"talk": {
"owned": false,
"required": false,
"supported": true
}
},
"candidateRoles": [
"PRIMARY"
],
"connectedState": "CONNECTED",
"connectedStateLastChanged": "2024-04-17T13:27:12.380Z"
},
"sysId": 59948
}
],
"controllers": [
"network",
"protect",
"access",
"talk",
"connect",
"innerspace"
],
"email": "unifi@test-ui.com",
"features": {
"deviceGroups": true,
"floorplan": {
"canEdit": true,
"canView": true
},
"manageApplications": true,
"notifications": true,
"pion": true,
"webrtc": {
"iceRestart": true,
"mediaStreams": true,
"twoWayAudio": true
}
},
"fullName": "UniFi User",
"localId": "f537f425-945d-49bf-8b88-e7ed6469b2bb",
"permissions": {
"network.management": [
"admin"
],
"protect.management": [
"admin"
],
"system.management.location": [
"admin"
],
"system.management.user": [
"admin"
]
},
"role": "owner",
"roleId": "eb0ac6f9-21d7-4121-98e5-078ae8bacd96",
"status": "ACTIVE"
}
},
"httpStatusCode": 200,
"traceId": "a7dc15e0eb4527142d7823515b15f87d"
}
Responses
200
network-server
code
Optional
data
object
Optional
hardwareId
string
Optional
id
string
Optional
ipAddress
string
Optional
isBlocked
boolean
Optional
lastConnectionStateChange
string
Optional
date-time
latestBackupTime
string
Optional
date-time
owner
boolean
Optional
registrationTime
string
Optional
date-time
reportedState
Optional
type
string
Optional
userData
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
"data": {
"hardwareId": "b000b21e-0000-1111-add9-c1eed3897602",
"id": "1d9cf3ee-0c0f-466e-933c-9af829f09b50",
"ipAddress": "192.168.1.124",
"isBlocked": false,
"lastConnectionStateChange": "2024-06-10T07:52:23.382Z",
"latestBackupTime": "",
"owner": true,
"registrationTime": "2024-02-07T10:25:21.981Z",
"reportedState": {
"controller_uuid": "b000b21e-0000-1111-add9-c1eed3897602",
"deviceId": "1d9cf3ee-0c0f-466e-933c-9af829f09b50",
"firmware_version": null,
"hardware_id": "b000b21e-0000-1111-add9-c1eed3897602",
"host_type": 0,
"hostname": "example-domain.ui.com",
"inform_port": 8080,
"ipAddrs": [
"192.168.1.124"
],
"mgmt_port": 8443,
"name": "Self-Hosted Site",
"override_inform_host": false,
"release_channel": "release",
"state": "connected",
"version": "8.3.11"
},
"type": "network-server",
"userData": null
},
"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
404
not found
code
Optional
data
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
"code": "NOT_FOUND",
"httpStatusCode": 404,
"message": "thing not found: 942A6F00301100000000074A6BA90000000007A3387E0000000063EC9853:714694",
"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 get host
code
Optional
data
Optional
httpStatusCode
integer
Optional
message
string
Optional
traceId
string
Optional
Example Response
{
"code": "server_error",
"httpStatusCode": 500,
"message": "failed to get host",
"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"
}