Compare commits

..

2 Commits

Author SHA1 Message Date
Jacob Timmerman
acc783520f Add reboot_os_console method (#286) 2026-01-21 00:27:59 +01:00
malle-pietje
e95961834b applied tweak to wording in README 2025-12-23 14:22:55 +01:00
2 changed files with 20 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ easy inclusion in your projects. See the [installation instructions](#Installati
## Why use this API client?
- Easy to use: clear docs, comprehensive method coverage, and helpful examples.
- Broad coverage: exposes many UniFi endpoints not available in the official APIs.
- Broad coverage: exposes many UniFi endpoints not (yet) available in the official APIs.
- Composer-friendly: installable via [Composer](https://getcomposer.org) and works with modern PHP projects.
- Lightweight and dependency-free: no external libraries required; uses cURL.
- Secure: communicates over TLS and supports optional SSL certificate validation.

View File

@@ -3336,7 +3336,7 @@ class Client
}
/**
* Get the recent firmware update for an UniFi-OS console
* Get the recent firmware update for an UniFi-OS console.
*
* @return array|bool returns an array with a single object containing details of the current known latest
* UniFi OS version info on success, else returns false
@@ -3352,7 +3352,7 @@ class Client
}
/**
* Update the OS for an UniFi-OS console
* Update the OS for an UniFi-OS console.
*
* @note triggers an UniFi OS Update in Control Plane > Updates > UniFi OS
* @return bool true upon success
@@ -3369,6 +3369,23 @@ class Client
return $this->fetch_results_boolean('/api/firmware/update', $payload, true, false);
}
/**
* Reboot an UniFi-OS console.
*
* @return bool true upon success
* @throws Exception
*/
public function reboot_os_console(): bool
{
if (!$this->is_unifi_os) {
throw new NotAUnifiOsConsoleException();
}
$this->curl_method = 'POST';
return $this->fetch_results_boolean('/api/system/reboot', null, true, false);
}
/**
* Check firmware update.
*