StackJack Feature Request — UniFi: device-to-site attribution
Summary
unifi_sm_list_devices returns the full device inventory across every reachable console, but individual device records carry no site identifier. On a multi-tenant console this makes it impossible to attribute any device to a specific customer site, which prevents the tool from being used for per-customer inventory work.
Current behaviour
unifi_sm_list_devices(scoped byhostIds) returns all devices across the shared console. Records include MAC, model, IP and adoption state, and are grouped by host — but no site field appears on the device record itself.unifi_sm_list_sitesreturns site metadata including per-site device counts, confirming the site-to-device relationship exists upstream, but provides no device list or device identifiers per site.There is no site-scoped parameter on
unifi_sm_list_devices.
Net effect: we can see that a site has, for example, 14 devices, and we can see 400 devices account-wide, but there is no supported way to determine which 14 belong to that site.
Requested change
Either of the following would resolve it:
Add a site identifier to device records returned by
unifi_sm_list_devices(e.g.siteId/siteName), orAdd a site-scoping parameter to
unifi_sm_list_devicesso devices can be requested per site.
Option 1 is preferable — it keeps the account-wide single-call efficiency, which is one of this connector's strengths, and avoids a per-site fan-out.
Why it matters
We use UniFi as a discovery source in a multi-customer asset reconciliation pipeline. UniFi is the only source that sees network hardware installed by a sister company without our RMM ever registering it, so it is specifically the source that surfaces unmonitored devices. Without site attribution, every UniFi-discovered device lands in an unattributed bucket and cannot be tied to the customer it belongs to, which defeats the purpose of including the connector in per-customer reporting.
UniFi is otherwise one of the most efficient connectors in our stack — one call returns the entire account inventory. This single missing field is what keeps that call from being usable.
Context
The UniFi Site Manager API models sites as first-class objects and reports per-site device counts, so the relationship appears to exist at the vendor layer. It may be that the device response shape simply does not surface it, in which case this could be a connector-mapping change rather than a new capability against the vendor API — worth checking before scoping this as larger work.
Impact if resolved
Unblocks per-customer network device inventory across our full client book, and removes the largest unattributed bucket from our asset reconciliation.
Log in to comment and vote
Comments1
Christopher Scaminaci
Sep 8
Checked against Ubiquiti's Site Manager API: a device record carries no site field and the endpoint takes no site parameter, so neither option exists at the vendor layer. What shipped instead is the honest cross-reference: unifi_sm_list_devices now says so in its own description and points at the per-site path, unifi_net_list_devices(consoleId, siteId) with the site ids from unifi_net_list_sites, one call per site. That is the per-site fan-out you were trying to avoid, and I don't have a better answer while the vendor's device record has no site on it. It keeps the account-wide call for inventory and gives you the site membership from the Network API when you need it.