Art-of-WiFi / UniFi-API-browser

Tool to browse data exposed by Ubiquiti's UniFi Controller API
MIT License
1.09k stars 150 forks source link

API Browser Broken on new unifiOS #78

Closed scyto closed 4 years ago

scyto commented 4 years ago

Just to let you know, API browser was broken by the new unifiOS.
Not sure why, unifi poller also broke as a point of reference too.

In API browser i see the error: Error loading sites or no sites available !

[Tue Jan 21   19:17:08 2020] 172.17.0.1:36625 [200]:   /ajax/fetch_about_modal_metrics.php
--
[Tue Jan 21 19:17:08 2020]   172.17.0.1:36620 [200]: /ajax/fetch_sites.php
[Tue Jan 21 19:17:08 2020]   172.17.0.1:36616 [200]: /js/custom.js?2.0.1
[Tue Jan 21 19:17:08 2020]   172.17.0.1:36614 [200]: /css/custom.css?2.0.1
[Tue Jan 21 19:17:08 2020]   172.17.0.1:36613 [200]: /
[Tue Jan 21 19:17:07 2020]   172.17.0.1:36612 [200]: /ajax/update_controller.php
[Tue Jan 21 19:17:05 2020]   172.17.0.1:36598 [200]: /ajax/fetch_about_modal_metrics.php
[Tue Jan 21 19:17:05 2020]   172.17.0.1:36597 [200]: /ajax/fetch_sites.php
[Tue Jan 21 19:17:05 2020]   172.17.0.1:36596 [200]: /js/custom.js?2.0.1
[Tue Jan 21 19:17:05 2020]   172.17.0.1:36593 [200]: /css/custom.css?2.0.1
[Tue Jan 21 19:17:05 2020]   172.17.0.1:36590 [200]: /
[Tue Jan 21 19:17:05 2020]   172.17.0.1:36591 [302]: /login.php
[Tue Jan 21 19:17:05 2020] successful   login for user admin

i think the API returns data in either different structure or way (login is still same). Let me know if there is anything you want me to do in terms of logging etc.

malle-pietje commented 4 years ago

@scyto From what I understand devices running unifiOS (UDM and UDM PRO) have an nginx server which proxies all connections through port 443 to the respective controller (UniFi network controller and UniFi Protect). It seems some routes have also changed but I have not seen any confirmation of that.

Since I don’t have (access to) a unifiOS device I am currently unable to spend time on this.

scyto commented 4 years ago

Yes it is 443, login works just fine, it is what is returned that is the issue. If you want an read only account to my controller let me know. No rush or pressure from me, was just capturing the issue.

malle-pietje commented 4 years ago

Thanks, access would be great so I can have a look around to see what the exact changes are.

scyto commented 4 years ago

now working and i updated the container here https://hub.docker.com/repository/docker/scyto/unifibrowser

malle-pietje commented 4 years ago

Thanks for confirming!👍