UniFi API Access on a Hosted Console
We do not restrict API access on a hosted UniFi OS Server console. It runs the same UniFi OS Server and Network software as any other install, so the official UniFi Network API works as Ubiquiti documents it, and we add no rate limiting or blocking. Point your scripts at your console address and authenticate with an API key.
Ubiquiti's API documentation
Ubiquiti publishes and maintains the API reference. Use it for endpoints, parameters and examples:
- UniFi API documentation on Ubiquiti's developer site, which opens at a recent Network version
- Getting Started with the Official UniFi API
The Integrations page on your console links to the documentation for the Network version you have installed. If your version differs from the developer site, follow that link.
Create an API key
- Sign in to your console.
- Open Integrations, the plug icon near the bottom of the left-hand menu.
- Click Create New API Key, give the key a name and create it.
- Copy the key straight away. It is only shown once.
Use an API key rather than having a script log in on every call. Repeated logins put avoidable load on the console.
The address to call
Ubiquiti's documentation shows a console on a local IP address. On a hosted console, use your console address in its place:
https://yourname.netconsole.cloud/proxy/network/integration/
Your own domain works here too. The connection is standard HTTPS on port 443, so there is no port number to add, and the certificate is valid, so your scripts do not need to skip certificate checks.
Ubiquiti's getting started guide also describes keys created in Site Manager at unifi.ui.com. These are a separate kind of key: they call Ubiquiti's cloud at api.ui.com rather than your console address, and your console needs to be linked to your Ubiquiti account. See Remote Access.
Moving to us from another controller
- Change the address in your scripts to your new console address.
- Test each script after the move. If a key from your old controller is rejected, create a new one as above.
- Scripts written for the classic Network Application need their paths updating, because on UniFi OS, requests to Network go through
/proxy/network.
On the standalone Network Application
The standalone UniFi Network Application has no Integrations page or API keys, so scripts sign in with a local admin account. To use API keys, upgrade to UniFi OS Server.
Related:
UniFi and UniFi OS are trademarks of Ubiquiti Inc. Cloud UniFi is an independent hosting provider and is not affiliated with, authorised by or endorsed by Ubiquiti Inc.