Where a system update stands
const url = 'http://127.0.0.1:7700/api/update';const options = {method: 'GET', 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 GET \ --url http://127.0.0.1:7700/api/update \ --header 'Authorization: Bearer <token>'How this computer updates, read from what box-update leaves behind. Only an installed image has
update slots A and B. A checkout installed with core/install.sh, or the install disc running live,
has none, and its state is unknown. Nothing looks for updates by itself yet, so automatic is
always false and Settings autoUpdate and updateChannel change nothing. See
Update and roll back.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The version and the update state.
object
unknown off an installed image. ready: a new system is written and waits for a restart. trial: it is running on trial. rolledBack: the last update did not start or was rolled back.
The slot this computer booted
The last result line box-update wrote.
Whether this install has update slots A and B.
Nothing looks for updates by itself yet.
The slot the boot menu starts by default.
The other slot.
object
A write to it did not finish
The slot that is on trial.
Examples
{ "version": "0.1.0", "build": "3c4626c", "state": "current", "slot": "a", "install": "image", "slots": true, "automatic": false, "default": "a", "other": { "slot": "b" }}{ "version": "0.1.0", "build": "dev", "state": "unknown", "install": "checkout", "slots": false, "automatic": false}