2017-10-18 10:09:55 +02:00
|
|
|
## UniFi Controller API client class
|
2017-09-05 11:48:35 +02:00
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
A PHP class that provides access to Ubiquiti's [**UniFi Network Controller**](https://unifi-network.ui.com/) API.
|
|
|
|
|
2023-12-18 12:32:03 +01:00
|
|
|
UniFi Network Controller software versions 4.X.X, 5.X.X, 6.X.X, 7.X.X, and 8.X.X (version **8.0.21** has been confirmed to work)
|
|
|
|
are supported as well as Network Applications on **UniFi OS-based consoles**. This class is used by our API browser tool which can be found
|
2022-03-28 11:57:57 +02:00
|
|
|
[here](https://github.com/Art-of-WiFi/UniFi-API-browser).
|
2017-09-05 11:48:35 +02:00
|
|
|
|
2021-09-29 10:41:39 +02:00
|
|
|
The package can be installed manually or by using
|
2021-10-19 10:39:17 +02:00
|
|
|
composer/[packagist](https://packagist.org/packages/art-of-wifi/unifi-api-client) for
|
|
|
|
easy inclusion in your projects.
|
2021-01-23 11:44:12 +01:00
|
|
|
|
2018-12-14 11:27:20 +01:00
|
|
|
## Requirements
|
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
- a server with:
|
2023-12-18 12:32:03 +01:00
|
|
|
- PHP 5.5.0 or higher (soon this requirement will be raised to PHP **7.4**)
|
2021-10-19 10:39:17 +02:00
|
|
|
- PHP json and PHP cURL modules
|
2021-12-18 12:00:56 +01:00
|
|
|
- tested on Apache 2.4 with PHP 5.6.1 and cURL 7.42.1 and with PHP 7.4.9 and cURL 7.68.0
|
2022-03-28 11:57:57 +02:00
|
|
|
- direct network connectivity between this server and the host and port (usually TCP port 8443 or port 443 for
|
2021-10-19 10:39:17 +02:00
|
|
|
UniFi OS) where the UniFi Controller is running
|
2022-03-28 11:57:57 +02:00
|
|
|
- you must use **accounts with local access**, not UniFi Cloud accounts, to access the UniFi Controller API
|
|
|
|
through this class
|
2020-06-07 14:11:52 +02:00
|
|
|
|
2021-01-06 17:03:21 +01:00
|
|
|
## UniFi OS Support
|
2020-01-31 12:14:52 +01:00
|
|
|
|
2022-03-28 11:57:57 +02:00
|
|
|
Support for UniFi OS-based controllers has been added as of version 1.1.47:
|
|
|
|
- UniFi Dream Router (UDR)
|
|
|
|
- UniFi Dream Machine (UDM)
|
|
|
|
- UniFi Dream Machine Pro (UDM PRO)
|
2023-03-28 12:19:29 +02:00
|
|
|
- UniFi Cloud Key Gen2 (UCK G2), firmware version 2.0.24 or higher
|
|
|
|
- UniFi Cloud Key Gen2 Plus (UCK G2 Plus), firmware version 2.0.24 or higher
|
|
|
|
- UniFi Cloud Console, details [here](https://help.ui.com/hc/en-us/articles/4415364143511)
|
2022-03-28 11:57:57 +02:00
|
|
|
|
2023-12-18 12:32:03 +01:00
|
|
|
The class automatically detects UniFi OS consoles and adjusts the URLs and several functions/methods accordingly.
|
|
|
|
|
2022-03-28 11:57:57 +02:00
|
|
|
If your own code implements strict validation of the URL that is passed to the constructor, please adapt your
|
|
|
|
logic to allow URLs without a port suffix or with port 443 when working with a UniFi OS-based controller.
|
2020-01-31 12:14:52 +01:00
|
|
|
|
2023-12-18 11:11:27 +01:00
|
|
|
> **IMPORTANT NOTE**: cookies are no longer supported with UniFi OS-based controllers. If your application code does use cookies,
|
|
|
|
they will be ignored automatically when working with UniFi OS-based controllers.
|
|
|
|
|
2021-01-23 11:44:12 +01:00
|
|
|
|
2020-01-31 12:14:52 +01:00
|
|
|
## Installation
|
2018-12-14 11:27:20 +01:00
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
Use [Composer](#composer), [Git](#git) or simply [Download the Release](#download-the-release) to install the
|
|
|
|
API client class.
|
2021-01-23 11:44:12 +01:00
|
|
|
|
2018-12-14 11:27:20 +01:00
|
|
|
### Composer
|
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
The preferred installation method is through [composer](https://getcomposer.org).
|
|
|
|
Follow these [installation instructions](https://getcomposer.org/doc/00-intro.md) if you don't have composer
|
|
|
|
installed already.
|
2018-12-14 11:27:20 +01:00
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
Once composer is installed, simply execute this command from the shell in your project
|
|
|
|
directory:
|
2018-12-14 11:27:20 +01:00
|
|
|
|
|
|
|
```sh
|
|
|
|
composer require art-of-wifi/unifi-api-client
|
|
|
|
```
|
|
|
|
|
2021-09-29 10:41:39 +02:00
|
|
|
Or manually add the package to your composer.json file:
|
2018-12-14 11:27:20 +01:00
|
|
|
|
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
"require": {
|
|
|
|
"art-of-wifi/unifi-api-client": "^1.1"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Finally, be sure to include the autoloader in your code:
|
|
|
|
|
|
|
|
```php
|
2021-01-21 10:59:27 +01:00
|
|
|
require_once 'vendor/autoload.php';
|
2018-12-14 11:27:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
### Git
|
|
|
|
|
|
|
|
Execute the following `git` command from the shell in your project directory:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone https://github.com/Art-of-WiFi/UniFi-API-client.git
|
|
|
|
```
|
|
|
|
|
|
|
|
When git is done cloning, include the file containing the class like so in your code:
|
|
|
|
|
|
|
|
```php
|
2021-01-21 10:59:27 +01:00
|
|
|
require_once 'path/to/src/Client.php';
|
2018-12-14 11:27:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
### Download the Release
|
|
|
|
|
2021-09-29 10:41:39 +02:00
|
|
|
If you prefer not to use composer or git,
|
2021-11-08 10:30:22 +01:00
|
|
|
simply [download the package](https://github.com/Art-of-WiFi/UniFi-API-client/archive/master.zip), unpack the zip
|
2021-09-29 10:41:39 +02:00
|
|
|
file, then include the file containing the class in your code like so:
|
2018-12-14 11:27:20 +01:00
|
|
|
|
|
|
|
```php
|
2021-01-21 10:59:27 +01:00
|
|
|
require_once 'path/to/src/Client.php';
|
2018-12-14 11:27:20 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Example usage
|
|
|
|
|
|
|
|
A basic example how to use the class:
|
|
|
|
|
|
|
|
```php
|
|
|
|
/**
|
|
|
|
* load the class using the composer autoloader
|
|
|
|
*/
|
2021-01-21 10:59:27 +01:00
|
|
|
require_once 'vendor/autoload.php';
|
2018-12-14 11:27:20 +01:00
|
|
|
|
|
|
|
/**
|
2021-09-29 10:41:39 +02:00
|
|
|
* initialize the UniFi API connection class, log in to the controller and request the alarms collection
|
2018-12-14 11:27:20 +01:00
|
|
|
* (this example assumes you have already assigned the correct values to the variables used)
|
|
|
|
*/
|
2021-10-22 17:35:05 +02:00
|
|
|
$unifi_connection = new UniFi_API\Client($controller_user, $controller_password, $controller_url, $site_id, $controller_version, true);
|
2018-12-14 11:27:20 +01:00
|
|
|
$login = $unifi_connection->login();
|
|
|
|
$results = $unifi_connection->list_alarms(); // returns a PHP array containing alarm objects
|
|
|
|
```
|
|
|
|
|
2021-09-29 10:41:39 +02:00
|
|
|
Please refer to the `examples/` directory for some more detailed examples which can be used as a starting point for your
|
|
|
|
own PHP code.
|
2021-01-23 11:44:12 +01:00
|
|
|
|
2018-12-14 11:27:20 +01:00
|
|
|
#### IMPORTANT NOTES:
|
|
|
|
|
2021-09-29 10:41:39 +02:00
|
|
|
1. In the above example, `$site_id` is the short site "name" (usually 8 characters long) that is visible in the URL when
|
|
|
|
managing the site in the UniFi Network Controller. For example with this URL:
|
2018-12-14 11:27:20 +01:00
|
|
|
|
|
|
|
`https://<controller IP address or FQDN>:8443/manage/site/jl3z2shm/dashboard`
|
|
|
|
|
2019-01-21 09:41:47 +01:00
|
|
|
`jl3z2shm` is the short site "name" and the value to assign to $site_id.
|
2018-12-14 11:27:20 +01:00
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
2. The 6th optional parameter that is passed to the constructor in the above example (`true`), enables validation of
|
2021-09-29 10:41:39 +02:00
|
|
|
the controller's SSL certificate which is otherwise **disabled** by default. It is **highly recommended** to enable
|
|
|
|
this feature in production environments where you have a valid SSL cert installed on the UniFi Controller that is
|
|
|
|
associated with the FQDN in the `controller_url` parameter. This option was added with API client version 1.1.16.
|
2021-01-23 11:44:12 +01:00
|
|
|
|
2021-11-08 10:30:22 +01:00
|
|
|
3. Using an administrator account (`$controller_user` in the above example) with **read-only** permissions can limit
|
2022-03-28 11:57:57 +02:00
|
|
|
visibility on certain collection/object properties. See this
|
|
|
|
[issue](https://github.com/Art-of-WiFi/UniFi-API-client/issues/129) and this
|
|
|
|
[issue](https://github.com/Art-of-WiFi/UniFi-API-browser/issues/94) for an example where the WPA2 password isn't
|
|
|
|
visible for **read-only** administrator accounts.
|
2021-11-08 10:30:22 +01:00
|
|
|
|
2019-04-29 17:35:09 +02:00
|
|
|
## Functions/methods supported
|
2017-09-05 11:48:35 +02:00
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
The class currently supports the following functions/methods to GET/POST/PUT/DELETE data
|
|
|
|
through the UniFi Controller API. Please refer to the comments in the source code for
|
2021-10-23 11:14:25 +02:00
|
|
|
more details on each of the functions/methods and their respective parameters.
|
2018-02-01 16:56:17 +01:00
|
|
|
|
2017-09-05 11:48:35 +02:00
|
|
|
- login()
|
|
|
|
- logout()
|
|
|
|
- adopt_device()
|
2017-10-19 11:24:24 +02:00
|
|
|
- archive_alarm()
|
2020-06-20 16:12:13 +02:00
|
|
|
- assign_existing_admin()
|
2017-09-05 11:48:35 +02:00
|
|
|
- authorize_guest()
|
|
|
|
- block_sta()
|
2020-06-20 16:12:13 +02:00
|
|
|
- cancel_rolling_upgrade()
|
2020-10-26 09:51:41 +01:00
|
|
|
- check_controller_update()
|
|
|
|
- check_firmware_update()
|
2021-10-19 10:39:17 +02:00
|
|
|
- cmd_stat()
|
|
|
|
- count_alarms()
|
2020-10-26 09:51:41 +01:00
|
|
|
- create_apgroup() (supported with controller versions 6.0.X and higher)
|
2020-06-20 16:12:13 +02:00
|
|
|
- create_dynamicdns()
|
2018-08-19 12:00:19 +02:00
|
|
|
- create_firewallgroup()
|
2017-09-05 11:48:35 +02:00
|
|
|
- create_hotspotop()
|
2017-09-08 12:36:12 +02:00
|
|
|
- create_network()
|
|
|
|
- create_radius_account()
|
|
|
|
- create_site()
|
2018-07-02 15:06:31 +02:00
|
|
|
- create_user()
|
2020-06-20 16:12:13 +02:00
|
|
|
- create_usergroup()
|
2017-09-05 11:48:35 +02:00
|
|
|
- create_voucher()
|
2017-09-08 12:36:12 +02:00
|
|
|
- create_wlan()
|
2019-04-29 17:35:09 +02:00
|
|
|
- custom_api_request()
|
2020-10-26 09:51:41 +01:00
|
|
|
- delete_apgroup() (supported with controller versions 6.0.X and higher)
|
2018-02-01 16:56:17 +01:00
|
|
|
- delete_device()
|
2018-08-19 12:00:19 +02:00
|
|
|
- delete_firewallgroup()
|
2017-09-08 12:36:12 +02:00
|
|
|
- delete_network()
|
|
|
|
- delete_radius_account()
|
2017-09-05 11:48:35 +02:00
|
|
|
- delete_site()
|
2017-09-08 12:36:12 +02:00
|
|
|
- delete_usergroup()
|
|
|
|
- delete_wlan()
|
2017-09-05 11:48:35 +02:00
|
|
|
- disable_ap()
|
2020-10-26 09:51:41 +01:00
|
|
|
- edit_apgroup() (supported with controller versions 6.0.X and higher)
|
2018-10-20 14:29:08 +02:00
|
|
|
- edit_client_fixedip()
|
2021-10-23 10:34:39 +02:00
|
|
|
- edit_client_name()
|
2018-08-19 12:00:19 +02:00
|
|
|
- edit_firewallgroup()
|
2017-09-08 12:36:12 +02:00
|
|
|
- edit_usergroup()
|
|
|
|
- extend_guest_validity()
|
2018-07-02 15:06:31 +02:00
|
|
|
- forget_sta() (supported on controller version 5.9.X and higher)
|
2023-03-28 12:19:29 +02:00
|
|
|
- generate_backup()
|
|
|
|
- generate_backup_site()
|
2018-03-30 13:57:59 +02:00
|
|
|
- invite_admin()
|
2017-09-05 11:48:35 +02:00
|
|
|
- led_override()
|
|
|
|
- list_admins()
|
|
|
|
- list_alarms()
|
2020-06-20 16:12:13 +02:00
|
|
|
- list_all_admins()
|
2020-10-26 09:51:41 +01:00
|
|
|
- list_apgroups() (supported with controller versions 6.0.X and higher)
|
2017-09-05 11:48:35 +02:00
|
|
|
- list_aps() (deprecated but still available as alias)
|
2018-10-20 14:29:08 +02:00
|
|
|
- list_backups()
|
2017-09-05 11:48:35 +02:00
|
|
|
- list_clients()
|
2018-03-24 10:46:42 +01:00
|
|
|
- list_country_codes()
|
2017-09-08 12:36:12 +02:00
|
|
|
- list_current_channels()
|
2017-09-05 11:48:35 +02:00
|
|
|
- list_dashboard()
|
2021-01-23 11:44:12 +01:00
|
|
|
- list_device_name_mappings()
|
2021-10-19 10:39:17 +02:00
|
|
|
- list_devices()
|
2017-09-08 12:36:12 +02:00
|
|
|
- list_dpi_stats()
|
2017-09-05 11:48:35 +02:00
|
|
|
- list_dynamicdns()
|
|
|
|
- list_events()
|
|
|
|
- list_extension()
|
2018-08-19 12:00:19 +02:00
|
|
|
- list_firewallgroups()
|
2020-06-08 12:52:32 +02:00
|
|
|
- list_firmware()
|
2017-09-05 11:48:35 +02:00
|
|
|
- list_guests()
|
|
|
|
- list_health()
|
|
|
|
- list_hotspotop()
|
2017-10-18 08:25:48 +02:00
|
|
|
- list_known_rogueaps()
|
2017-09-05 11:48:35 +02:00
|
|
|
- list_networkconf()
|
|
|
|
- list_portconf()
|
|
|
|
- list_portforward_stats()
|
|
|
|
- list_portforwarding()
|
|
|
|
- list_radius_accounts() (supported on controller version 5.5.19 and higher)
|
2017-09-08 12:36:12 +02:00
|
|
|
- list_radius_profiles()
|
2017-09-05 11:48:35 +02:00
|
|
|
- list_rogueaps()
|
2020-06-08 12:52:32 +02:00
|
|
|
- list_routing()
|
2017-09-05 11:48:35 +02:00
|
|
|
- list_self()
|
|
|
|
- list_settings()
|
|
|
|
- list_sites()
|
|
|
|
- list_tags() (supported on controller version 5.5.19 and higher)
|
|
|
|
- list_usergroups()
|
|
|
|
- list_users()
|
|
|
|
- list_wlan_groups()
|
|
|
|
- list_wlanconf()
|
2017-09-08 12:36:12 +02:00
|
|
|
- locate_ap()
|
2018-02-01 16:56:17 +01:00
|
|
|
- move_device()
|
2017-10-18 08:25:48 +02:00
|
|
|
- power_cycle_switch_port()
|
2020-06-20 16:12:13 +02:00
|
|
|
- reboot_cloudkey()
|
2017-09-05 11:48:35 +02:00
|
|
|
- reconnect_sta()
|
|
|
|
- rename_ap()
|
2020-01-27 13:19:49 +01:00
|
|
|
- restart_ap() (deprecated but still available as alias)
|
|
|
|
- restart_device()
|
2020-06-20 16:12:13 +02:00
|
|
|
- revoke_admin()
|
2017-09-05 11:48:35 +02:00
|
|
|
- revoke_voucher()
|
|
|
|
- set_ap_radiosettings()
|
2017-10-18 08:25:48 +02:00
|
|
|
- set_device_settings_base()
|
2020-06-20 16:12:13 +02:00
|
|
|
- set_dynamicdns()
|
2020-08-22 17:47:50 +02:00
|
|
|
- set_element_adoption() (supported on controller version 5.13.X and higher)
|
2017-09-05 11:48:35 +02:00
|
|
|
- set_guestlogin_settings()
|
2018-03-24 10:46:42 +01:00
|
|
|
- set_guestlogin_settings_base()
|
2018-10-24 09:54:43 +02:00
|
|
|
- set_ips_settings_base() (supported on controller version 5.9.10 and higher)
|
2017-09-05 11:48:35 +02:00
|
|
|
- set_locate_ap() (deprecated but still available as alias)
|
2017-09-08 12:36:12 +02:00
|
|
|
- set_networksettings_base()
|
|
|
|
- set_radius_account_base()
|
2018-03-24 10:46:42 +01:00
|
|
|
- set_site_connectivity()
|
|
|
|
- set_site_country()
|
|
|
|
- set_site_guest_access()
|
|
|
|
- set_site_locale()
|
|
|
|
- set_site_mgmt()
|
|
|
|
- set_site_name()
|
|
|
|
- set_site_ntp()
|
|
|
|
- set_site_snmp()
|
2017-09-05 11:48:35 +02:00
|
|
|
- set_sta_name()
|
|
|
|
- set_sta_note()
|
2020-06-20 16:12:13 +02:00
|
|
|
- set_super_identity_settings_base()
|
|
|
|
- set_super_mgmt_settings_base()
|
|
|
|
- set_super_smtp_settings_base()
|
2017-09-05 11:48:35 +02:00
|
|
|
- set_usergroup()
|
2017-09-06 17:16:32 +02:00
|
|
|
- set_wlan_mac_filter()
|
2017-09-08 12:36:12 +02:00
|
|
|
- set_wlansettings()
|
|
|
|
- set_wlansettings_base()
|
2017-09-05 11:48:35 +02:00
|
|
|
- site_leds()
|
|
|
|
- site_ledsoff() (deprecated but still available as alias)
|
|
|
|
- site_ledson() (deprecated but still available as alias)
|
2017-09-08 12:36:12 +02:00
|
|
|
- spectrum_scan()
|
|
|
|
- spectrum_scan_state()
|
2020-06-20 16:12:13 +02:00
|
|
|
- start_rolling_upgrade()
|
|
|
|
- stat_5minutes_aps() (supported on controller version 5.5.X and higher)
|
|
|
|
- stat_5minutes_gateway() (supported on controller version 5.7.X and higher)
|
|
|
|
- stat_5minutes_site() (supported on controller version 5.5.X and higher)
|
|
|
|
- stat_5minutes_user (supported on controller version 5.7.X and higher)
|
2017-09-05 11:48:35 +02:00
|
|
|
- stat_allusers()
|
|
|
|
- stat_auths()
|
|
|
|
- stat_client()
|
2017-10-10 09:37:29 +02:00
|
|
|
- stat_daily_aps()
|
2018-10-20 14:29:08 +02:00
|
|
|
- stat_daily_gateway() (supported on controller version 5.7.X and higher)
|
2017-10-10 09:37:29 +02:00
|
|
|
- stat_daily_site()
|
2018-07-02 15:06:31 +02:00
|
|
|
- stat_daily_user() (supported on controller version 5.7.X and higher)
|
2021-10-19 10:39:17 +02:00
|
|
|
- stat_full_status()
|
2020-06-20 16:12:13 +02:00
|
|
|
- stat_hourly_aps()
|
|
|
|
- stat_hourly_gateway() (supported on controller version 5.7.X and higher)
|
|
|
|
- stat_hourly_site()
|
|
|
|
- stat_hourly_user() (supported on controller version 5.7.X and higher)
|
|
|
|
- stat_ips_events() (supported on controller version 5.9.10 and higher)
|
2021-10-19 10:39:17 +02:00
|
|
|
- stat_monthly_aps()
|
|
|
|
- stat_monthly_gateway()
|
|
|
|
- stat_monthly_site()
|
|
|
|
- stat_monthly_user()
|
2017-09-05 11:48:35 +02:00
|
|
|
- stat_payment()
|
|
|
|
- stat_sessions()
|
|
|
|
- stat_sites()
|
2018-10-20 14:29:08 +02:00
|
|
|
- stat_speedtest_results()
|
2017-09-05 11:48:35 +02:00
|
|
|
- stat_sta_sessions_latest()
|
2017-10-18 08:25:48 +02:00
|
|
|
- stat_status()
|
2017-09-05 11:48:35 +02:00
|
|
|
- stat_sysinfo()
|
|
|
|
- stat_voucher()
|
2017-09-08 12:36:12 +02:00
|
|
|
- unauthorize_guest()
|
|
|
|
- unblock_sta()
|
|
|
|
- unset_locate_ap() (deprecated but still available as alias)
|
|
|
|
- upgrade_device()
|
|
|
|
- upgrade_device_external()
|
2017-09-05 11:48:35 +02:00
|
|
|
|
2020-03-19 16:07:31 +01:00
|
|
|
Other functions, getters/setters:
|
2018-02-01 16:56:17 +01:00
|
|
|
|
2020-06-20 16:12:13 +02:00
|
|
|
- get_class_version()
|
2020-03-19 16:07:31 +01:00
|
|
|
- get_cookie() (renamed from getcookie(), deprecated but still available, use get_cookies() instead)
|
2020-06-20 16:12:13 +02:00
|
|
|
- get_cookies()
|
2021-10-19 10:39:17 +02:00
|
|
|
- get_curl_connection_timeout()
|
|
|
|
- get_curl_http_version()
|
|
|
|
- get_curl_method()
|
|
|
|
- get_curl_request_timeout()
|
|
|
|
- get_curl_request_timeout()
|
|
|
|
- get_curl_ssl_verify_host()
|
|
|
|
- get_curl_ssl_verify_peer()
|
2020-06-20 16:12:13 +02:00
|
|
|
- get_debug()
|
|
|
|
- get_is_unifi_os()
|
2017-09-05 11:48:35 +02:00
|
|
|
- get_last_error_message()
|
2020-06-20 16:12:13 +02:00
|
|
|
- get_last_results_raw()
|
|
|
|
- get_site()
|
2020-03-19 16:07:31 +01:00
|
|
|
- set_connection_timeout()
|
2020-06-20 16:12:13 +02:00
|
|
|
- set_cookies()
|
2021-10-19 10:39:17 +02:00
|
|
|
- set_curl_http_version()
|
|
|
|
- set_curl_request_timeout()
|
|
|
|
- set_curl_ssl_verify_host()
|
|
|
|
- set_curl_ssl_verify_peer()
|
2020-06-20 16:12:13 +02:00
|
|
|
- set_debug()
|
2020-03-19 16:07:31 +01:00
|
|
|
- set_is_unifi_os()
|
2021-01-21 10:59:27 +01:00
|
|
|
- set_request_method()
|
2021-10-19 10:39:17 +02:00
|
|
|
- set_request_timeout()
|
2020-06-20 16:12:13 +02:00
|
|
|
- set_site()
|
2020-03-19 16:07:31 +01:00
|
|
|
|
2017-09-07 12:27:20 +02:00
|
|
|
## Need help or have suggestions?
|
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
There is still work to be done to add functionality and further improve the usability of
|
|
|
|
this class, so all suggestions/comments are welcome. Please use the GitHub
|
|
|
|
[issue list](https://github.com/Art-of-WiFi/UniFi-API-client/issues) or the Ubiquiti
|
|
|
|
Community forums (https://community.ubnt.com/t5/UniFi-Wireless/PHP-class-to-access-the-UniFi-controller-API-updates-and/td-p/1512870)
|
2021-09-29 10:41:39 +02:00
|
|
|
to share your suggestions and questions.
|
2021-01-23 11:44:12 +01:00
|
|
|
|
2017-09-07 12:27:20 +02:00
|
|
|
## Contribute
|
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
If you would like to contribute code (improvements), please open an issue and include
|
|
|
|
your code there or else create a pull request.
|
2021-01-23 11:44:12 +01:00
|
|
|
|
2017-09-11 16:50:24 +02:00
|
|
|
## Credits
|
|
|
|
|
2019-04-29 17:35:09 +02:00
|
|
|
This class is based on the initial work by the following developers:
|
|
|
|
|
2021-09-29 10:41:39 +02:00
|
|
|
- domwo: https://community.ui.com/questions/little-php-class-for-unifi-api/933d3fb3-b401-4499-993a-f9af079a4a3a
|
2017-09-11 16:50:24 +02:00
|
|
|
- fbagnol: https://github.com/fbagnol/class.unifi.php
|
2019-04-29 17:35:09 +02:00
|
|
|
|
|
|
|
and the API as published by Ubiquiti:
|
|
|
|
|
2023-03-28 12:19:29 +02:00
|
|
|
- https://dl.ui.com/unifi/7.0.25/unifi_sh_api
|
2021-01-23 11:44:12 +01:00
|
|
|
|
2017-09-05 11:48:35 +02:00
|
|
|
## Important Disclaimer
|
2017-09-07 12:27:20 +02:00
|
|
|
|
2021-10-19 10:39:17 +02:00
|
|
|
Many of the functions in this API client class are not officially supported by Ubiquiti
|
|
|
|
and as such, may not be supported in future versions of the UniFi Controller API.
|