Art-of-WiFi / UniFi-API-client

A PHP API client class to interact with Ubiquiti's UniFi Controller API
MIT License
1.09k stars 217 forks source link

Updates to new API versions #109

Closed galvesribeiro closed 3 years ago

galvesribeiro commented 3 years ago

Hello!

Just curious, how are you keeping those APIs updated when there is a new version of the controller? Is there a Swagger spec on the controller or somewhere Ubiquiti publishes all the APIs?

Thanks!

malle-pietje commented 3 years ago

No swagger available I’m afraid. Besides that, swagger is unable to deal with the specific login process, especially with the detection of UniFi OS devices.

It’s mainly a matter of community effort in testing and sharing any changes that get identified.

galvesribeiro commented 3 years ago

Understood...

I'm working on create an OSS platform that would basically do what Unifi Cloud is supposed todo but that people can deploy privately and don't need any of the Unifi crap. For that to work, either I can use the API or implement things by using the CLI.

The thing is that both the CLI and the API are not documented anywhere :/

The project will live on this org https://github.com/Unifi-Tools along other tools that are in the works.

I'll investigate more to see whether there is something we can use to re-generate the API (just like we do with swagger) so it make our lives easier. It would be quite hard to keep those methods up-to-date without something like this...

malle-pietje commented 3 years ago

Interesting. I’ll keep an eye on that. I totally agree with your last remarks. Swagger would make life a lot easier...