Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acc783520f | ||
|
|
e95961834b |
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user