Install the newest release
POST
/api/v1/update/latest
const url = 'http://pwrman.local/api/v1/update/latest';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://pwrman.local/api/v1/update/latest \ --header 'Authorization: Bearer <token>'Downloads the newest release the controller knows of, checks its
signature and installs it. While it downloads, the status
update.installing is true and update.progress counts up; then
update.restarting is true until the controller restarts into the
new firmware on trial. Port power stays on throughout.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The download has started.
Media typeapplication/json
object
ok
required
boolean
version
required
The version being installed.
string
Example
{ "ok": true, "version": "0.13.0"}The token is missing or wrong, or no token is set yet.
Media typeapplication/json
object
error
required
Why the request was refused, in words.
string
Examples
{ "error": "bearer token required"}{ "error": "no API token set yet: finish first-time setup first"}No newer release is known yet, or an install cannot start now.
Media typeapplication/json
object
error
required
Why the request was refused, in words.
string
Example
{ "error": "no release is known yet: ask with POST /api/v1/update/check"}USB Type-C® and USB-C® are registered trademarks of USB Implementers Forum.