list_devices
list_devices
Section titled “list_devices”List every UniFi device adopted by this controller.
Side effects: None (read-only).
Returns one record per device (gateway, AP, switch). By default that
is the full controller record (_id, mac, type, model,
name, ip, version, state, uptime, num_sta,
satisfaction and every other field the controller carries, which
runs to roughly 35 KB per device). With compact=True each record
is reduced to _id, name, mac, model, type, ip
and state, which is what an inventory or “which AP is that”
question needs and fits a context window at any fleet size.
Example
Section titled “Example”list_devices(controller="default", compact=True)Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
controller |
string |
no | “default” | Name of the UniFi controller to target. Defaults to "default". |
compact |
boolean |
no | false | True returns the seven identity fields per device instead of the full record. Default False keeps the existing full output. |