finish06 / pyunifi

https://unifi-sdn.ubnt.com/
MIT License
223 stars 99 forks source link

List or query multiple sites #57

Closed superfishlu closed 3 years ago

superfishlu commented 3 years ago

Hello,

As per the documentation, we need to give the site ID when connecting to the controller. Is it possible to list the controller for sites and query multiple sites? E.g. search for a client across all sites or create a given setting for all existing sites on the controller? Likewise, can one create a new site with this API client?

Thanks a lot.

finish06 commented 3 years ago

Per my understanding of API, that would not be possible because the API URL needs the site ID. However, the work around would be to use the get_sites method. Then loop through the different sites searching for clients, settings, etc.