Document new /os/boot-slot endpoint (#2107)

* Document new /os/boot-slot endpoint

* `boot_name` to `boot_slot`
This commit is contained in:
Mike Degatano 2024-03-21 13:47:06 -04:00 committed by GitHub
parent c4d46ba490
commit a7f7da3084
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 42 additions and 9 deletions

View File

@ -2270,14 +2270,15 @@ Returns information about the OS.
**Returned data:**
| key | type | description |
| ---------------- | ------- | ------------------------------------------------------------ |
| version | string | The current version of the OS |
| version_latest | string | The latest published version of the OS in the active channel |
| update_available | boolean | `true` if an update is available |
| board | string | The name of the board |
| boot | string | Which slot that are in use |
| data_disk | string | Device which is used for holding OS data persistent |
| key | type | description |
| ---------------- | ------- | ---------------------------------------------------------------------------- |
| version | string | The current version of the OS |
| version_latest | string | The latest published version of the OS in the active channel |
| update_available | boolean | `true` if an update is available |
| board | string | The name of the board |
| boot | string | Which slot that are in use |
| data_disk | string | Device which is used for holding OS data persistent |
| boot_slots | dict | Dictionary of [boot slots](api/supervisor/models.md#boot-slot) keyed by name |
**Example response:**
@ -2288,7 +2289,19 @@ Returns information about the OS.
"update_available": true,
"board": "ova",
"boot": "slot1",
"data_disk": "BJTD4R-0x123456789"
"data_disk": "BJTD4R-0x123456789",
"boot_slots": {
"A": {
"state": "inactive",
"status": "good",
"version": "10.1"
},
"B": {
"state": "active",
"status": "good",
"version": "10.2"
}
}
}
```
@ -2306,6 +2319,18 @@ Update Home Assistant OS
</ApiEndpoint>
<ApiEndpoint path="/os/boot-slot" method="post">
Change the active boot slot, **This will also reboot the device!**
**Payload:**
| key | type | description |
| --------- | ------ | ------------------------------------------------------------------------ |
| boot_slot | string | Boot slot to change to. See options in `boot_slots` from `/os/info` API. |
</ApiEndpoint>
<ApiEndpoint path="/os/datadisk/list" method="get">
Returns possible targets for the new data partition.

View File

@ -307,3 +307,11 @@ Response only fields will be in responses but cannot be included in requests.
| ---------- | ------- | ---------------------------------------------- |
| type | string | Type of error that occurred |
| message | string | Human-readable description of what went wrong |
## Boot Slot
| key | type | description |
| ---------- | ------- | ----------------------------------------------- |
| state | string | Active or inactive (active slot is in use) |
| status | string | Status of the last boot from slot (good or bad) |
| version | string | Version of OS installed |