UniFi-API-client

A PHP API client class to interact with Ubiquiti's UniFi Controller API

MIT License

Downloads
238.7K
Stars
1.1K
Committers
11

Bot releases are hidden (Show)

UniFi-API-client - API client class v1.1.34

Published by malle-pietje about 6 years ago

  • added spaces throughout Client.php following PSR-2 guidelines
  • changed checks to prevent 0 (zero), and "0" values from being submitted to the API for routes where this can have negative side effects
UniFi-API-client - API client class v1.1.33

Published by malle-pietje about 6 years ago

  • merged PR #28, thanks go to @jamieaitken
  • further cleanup to follow PSR-2 as much as possible
  • added stat_5minutes_gateway(), stat_hourly_gateway() and stat_daily_gateway() methods
  • added changes to ensure we always use lowercase MAC addresses in API routes and payload (we have seen several issues with controllers ignoring uppercase MAC addresses)
UniFi-API-client - API client class v1.1.32

Published by malle-pietje about 6 years ago

  • added stat_speedtest_results() method/function to collect results from scheduled speed tests
  • added list_backups() method/function to list auto backups
UniFi-API-client - API client class v1.1.31

Published by malle-pietje about 6 years ago

updated comments for stats-related methods/function to make clear start/end values must be provided in milliseconds
changed use of objects as payload input for json_encode, to associative arrays for consistency
added functions/methods for firewall groups: list_firewallgroups(), create_firewallgroup(), edit_firewallgroup(), delete_firewallgroup()
added checks for required boolean parameters

merged PR by @Warafux:
added edit_client_fixedip() function/method
added optional parameter to list_networkconf() to fetch config details for a specific network

clean up after resolving merge conflicts

UniFi-API-client - API client class v1.1.30

Published by malle-pietje over 6 years ago

added user/client device stats methods/functions:
stat_5minutes_user()
stat_hourly_user()
stat_daily_user()
added example to demonstrate use of these new functions

UniFi-API-client - API client class v1.1.29

Published by malle-pietje over 6 years ago

added unblock_list.php and block_list.php examples, contributed by @malcolmcif ( #20 )
added create_user() method/function
added forget_sta() method/function which is supported on controller version 5.9.* and higher

UniFi-API-client - API client class v1.1.28

Published by malle-pietje over 6 years ago

re-added the upgrade_device() function/method

UniFi-API-client - API client class v1.1.27

Published by malle-pietje over 6 years ago

added start_rolling_upgrade() and cancel_rolling_upgrade() methods/functions

UniFi-API-client - API client class v1.1.26

Published by malle-pietje over 6 years ago

added invite_admin() and revoke_admin() functions/methods

UniFi-API-client - Finalised merge of PRs #10, #11, #12 and #13

Published by malle-pietje over 6 years ago

General code cleanup (replace tabs by spaces, etc.)
Methods/functions added:

  • list_country_codes()
  • set_guestlogin_settings_base()
  • 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()
    Examples added:
  • ap_upgrade_firmware.php
  • site_provisioning_example
  • update_ac-iw_ports.php
UniFi-API-client - merge PR and added several examples

Published by malle-pietje over 6 years ago

merged in PR #7
added examples:

  • create site
  • delete site
  • modify WLAN settings for controller version 5.5.X and higher using the set_device_settings_base() method, also demonstrates the use of get_last_results_raw()
UniFi-API-client - API client class v1.1.23

Published by malle-pietje almost 7 years ago

  • minor code cleanup and input validation/sanitization improvements
  • added delete_device() function/method
  • added move_device() function/method
  • added optional type parameter to stat_sessions()
  • updated README
UniFi-API-client - API client class v1.1.22

Published by malle-pietje about 7 years ago

fixed issue #2 caused by a typo with "if (in_array()...", thanks go to @LuFlo for catching that

UniFi-API-client - API client class v1.1.21

Published by malle-pietje about 7 years ago

  • minor code clean up
  • added archive_alarm() function/method
UniFi-API-client - API client class v1.1.20: fixed typo in list_known_rogueaps()

Published by malle-pietje about 7 years ago

UniFi-API-client - API client class v1.1.19: addition of several new functions/methods and minor code cleanup

Published by malle-pietje about 7 years ago

  • added list_known_rogueaps() function/method
  • added stat_status() function/method
  • added power_cycle_switch_port() function/method
UniFi-API-client - API client class v1.1.18: code optimization, improved parameter validation and debug messages

Published by malle-pietje about 7 years ago

  • removed repetitive code (json_decode and $this>baseurl)
  • added capture of JSON decoding errors when debug = true
  • use intval() on function/method parameters which must be an integer
  • further parameter validation/checks
UniFi-API-client - API client class version v1.1.17

Published by malle-pietje about 7 years ago

added new functions for 5-minutes stats and minor code cleanup:

  • added stat_5minutes_site() method/function
  • added stat_5minutes_aps() method/function
  • added optional parameter to list_dashboard() method/function to allow fetching of 5minutes stats
UniFi-API-client - minor code cleanup and various changes

Published by malle-pietje about 7 years ago

  • added a 6th parameter to the constructor to enable SSL cert verification, recommended for production environments
  • added examples/change_wlan_password.php to demonstrate WLAN password/PSK change
  • updated main README accordingly
UniFi-API-client - various tweaks and addition of a connection testing script to examples/

Published by malle-pietje about 7 years ago

  • more relaxed handling of $site in set_site(), now we only issue an error message when provided (short) site name is probably incorrect and debug mode is true
  • added test_connection.php, a command line script which can be used to quickly test the connection to your controller with various cURL options which you can quickly change