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.74

Published by malle-pietje almost 3 years ago

  • minor refactoring
  • fixed minor typos
  • updated README to reflect limited visibility when using read-only administrator accounts, reported by @KetchupBomb and @NickDunas
UniFi-API-client - API client class v1.1.73

Published by malle-pietje almost 3 years ago

  • minor spacing changes based on Scrutinizer feedback
  • updated create_wlan() method/function to work with the new way of assigning a VLAN which now requires passing the _id value of the VLAN, reported by @BeneReuthlinger
  • merged #132, README update, contributed by @pauloboc
  • merged #133, adds edit_client_name() method, contributed by @pauloboc
UniFi-API-client - API client class v1.1.72

Published by malle-pietje about 3 years ago

  • added property $request_timeout to control the cURL option CURLOPT_TIMEOUT, contributed by @mreho
  • added setter and getter for $request_timeout, contributed by @mreho
  • changed default value for the cURL option CURLOPT_HTTP_VERSION to CURL_HTTP_VERSION_1_1:
  • added property $curl_http_version to hold the value for CURLOPT_HTTP_VERSION
  • added setter and getter for $curl_http_version
  • switched to using a constant to hold the class version
  • updated the README file
UniFi-API-client - API client class v1.1.71

Published by malle-pietje about 3 years ago

  • modified create_radius_account() method to make Tunnel Type and Medium optional parameters, contributed by @mreho
  • added advanced_adopt_device() method for more advanced adoption capabilities, contributed by @Sarrus
  • refactored several code sections
  • updated connection test script
UniFi-API-client - API client class v1.1.70

Published by malle-pietje over 3 years ago

  • shortened several property names based on Code Inspector feedback
  • refactored several code sections based on Code Inspector feedback
UniFi-API-client - API client class v1.1.69

Published by malle-pietje over 3 years ago

  • added list_device_states() function/method, as suggested by @hoerter
  • implemented fix to prevent cURL from sending an Expect: 100-continue header with each POST request
  • implemented a callback function with the CURLOPT_HEADERFUNCTION option to process the response headers after each request and extract the Cookie contents
  • general cleanup
UniFi-API-client - API client class v1.1.68

Published by malle-pietje over 3 years ago

  • fixed a bug that was introduced with 1.1.67 and would occur in certain corner cases
  • 1.1.67 should therefore not be used in production
UniFi-API-client - API client class v1.1.67

Published by malle-pietje over 3 years ago

fixed a bug where the request headers for subsequent function calls within the same Client instance would not always be cleared

UniFi-API-client - API client class v1.1.66

Published by malle-pietje over 3 years ago

  • simplified code based on Scrutinizer reports
UniFi-API-client - API client class v1.1.65

Published by malle-pietje over 3 years ago

  • applied minor improvements based on Scrutinizer reports
  • applied minor changes to authorize_guest() to further improve the handling of 0/null/empty values passed
  • restricted protocols to be used by cURL to only allow HTTP and HTTPS for improved security
  • added methods/functions list_device_name_mappings() and stat_full_status()
UniFi-API-client - API client class v1.1.64

Published by malle-pietje over 3 years ago

  • added information to several docblocks
  • changed handling of request headers, added a private property for this
  • applied changes for improved use of require_once in the README and examples
  • added list_sites() example
  • potential breaking changes:
    renamed get_request_type() and set_request_type() functions/methods to get_request_method() and set_request_method() respectively
UniFi-API-client - API client class v1.1.63

Published by malle-pietje almost 4 years ago

  • changed references to UbiOS back to UniFi OS
  • removed capitalization from all header strings (per RFC, header fields are case-insensitive: https://tools.ietf.org/html/rfc7230#section-3.2)
  • removed charset parameter from headers (not required per RFC)
  • added x-csrf-token header to all requests except GET when talking to UniFi OS-based controllers, thanks go to @paciks for raising #86
UniFi-API-client - API client class v1.1.62

Published by malle-pietje almost 4 years ago

  • added several monthly stats methods: stat_monthly_gateway(), stat_monthly_site(), stat_monthly_aps(), stat_monthly_user(), thanks go to @Roel Janssens for spotting these MongoDB collections
  • test for object or resource in get_curl_resource(), closes PR #82 submitted by @banakito
  • applied changes to comments in example/modify_smartpower_pdu_outlet.php based on a suggestion by @thesohoguy
  • removed unnecessary variable from list_apgroups(), thanks to Stephen Davies for reporting
  • added an optional parameter $ap_group_ids to the create_wlan() function/method for UniFi controller versions 6.0.X and higher, thanks to Stephen Davies for contributing
UniFi-API-client - API client class v1.1.61

Published by malle-pietje almost 4 years ago

  • minor improvements of comments contents
  • fixed naming error in comments for list_devices()
  • updated supported controller versions in the main README
  • change variable names used from MBytes to megabytes for improved consistency
UniFi-API-client - API client class v1.1.60

Published by malle-pietje almost 4 years ago

  • minor syntax improvements based on Scrutinizer CI feedback
  • added support for PATCH requests (for future use)
  • completed updating method/function comments to PHPDoc format (PSR-5)
UniFi-API-client - API client class v1.1.59

Published by malle-pietje almost 4 years ago

  • added methods/functions to manage AP groups: list_apgroups(), create_apgroup(), edit_apgroup(), and delete_apgroup() (only supported with controller versions 6.0.X and higher)
  • adapted code to handle the behavior of the new v2 API routes that were added with controller versions 6.0.X and higher
  • merged PR #76 which adds methods/functions check_controller_update() and check_firmware_update(), contributed by @brenard
  • further work on updating method/function comments to PHPDoc format (PSR-5)
UniFi-API-client - API client class v1.1.58

Published by malle-pietje almost 4 years ago

  • changed several references from UniFi SDN controller to UniFi Network controller
  • added optional payload parameter to the list_alarms() method/function, contributed by @MikeSiekkinen through PR #68
  • added example showing how to disable/enable a switch port
  • updated restart_device() function/method, thanks go to @leonardogyn for reporting this
  • added example to modify outlet settings on a UniFi SmartPower PDU Pro, thanks go to @panthergm for providing access
UniFi-API-client - API client class v1.1.57

Published by malle-pietje about 4 years ago

  • increased minimum required PHP version to 5.5.0
  • minor syntax improvement based on Scrutinizer feedback
  • added create_dynamicdns() and set_dynamicdns() methods, "borrowed" routes from @smos
  • added set_element_adoption() method, contributed by @VWT-Dan
  • made a start at changing the function/method comments to PHPDoc format (PSR-5) which will support auto-generated class documentation (https://github.com/php-fig/fig-standards/blob/master/proposed/phpdoc.md#5-the-phpdoc-format)
  • added check to throw an error when the $baseurl ends with a / character, thanks to @infraweavers for submitting #66
  • fixed issue with logout() on UDM PROs, thanks go to @Olivier6767 for providing access to a UDM PRO, addresses #63
  • applied several code styling improvements
UniFi-API-client - API client class v1.1.56

Published by malle-pietje over 4 years ago

UniFi-API-client - API client class v1.1.55

Published by malle-pietje over 4 years ago

  • general code clean up
  • removed repetitive code (checks using $this->is_loggedin())
  • updated the main README to include the latest added functions/methods