Firmware
Generated from the committed OpenAPI document, bmcd 2.28.0. Do not edit this file: just refresh-api rewrites it.
GET /api/bmc/firmware/available
Every enabled source's candidates; refresh=1 re-polls behind the answer
Legacy form: GET /api/bmc?opt=get&type=firmware_available with the same parameters in the query string. That form answers {"response":[{"result":…}]} and puts a refusal's message in result; this path answers the bare result and a refusal as application/problem+json.
| parameter |
in |
required |
description |
refresh |
query |
no |
1 starts a re-poll of every source behind the answer; the answer itself is what was cached |
| response |
body |
meaning |
200 |
application/json — Catalog |
The result. |
204 |
empty |
Done, with nothing to report. |
default |
application/problem+json — Problem |
A refusal, RFC 9457. |
200 body (application/json): Catalog
| field |
type |
required |
description |
age_seconds |
integer (uint64) |
yes |
How old these answers are. A caller that needs to say "as of a minute ago" should not have to parse checked_at and trust two clocks. |
checked_at |
string |
yes |
|
refreshing |
boolean |
yes |
These are the previous answers and a refresh is running behind them. The page draws a spinner on its "check now" control and leaves the list underneath readable, rather than blanking or freezing. Skipped when false so a settled catalogue serialises as it always did. |
running |
string |
yes |
|
sources |
array of SourceCatalog |
yes |
|
default body (application/problem+json): Problem
| field |
type |
required |
description |
detail |
string |
no |
|
status |
integer |
yes |
|
title |
string |
yes |
|
type |
string |
no |
|
GET /api/bmc/firmware/check
Whether a newer release exists, per channel
Legacy form: GET /api/bmc?opt=get&type=update_check with the same parameters in the query string. That form answers {"response":[{"result":…}]} and puts a refusal's message in result; this path answers the bare result and a refusal as application/problem+json.
| response |
body |
meaning |
200 |
application/json — UpdateCheck |
The result. |
204 |
empty |
Done, with nothing to report. |
default |
application/problem+json — Problem |
A refusal, RFC 9457. |
200 body (application/json): UpdateCheck
| field |
type |
required |
description |
checked_at |
string |
yes |
When this was last resolved, in the board's own idea of the time. |
edge |
object |
no |
The edge channel: the newest release including pre-releases. |
error |
string or null |
no |
Why a channel is missing, when one is. Present WITH a channel too, when only one of the two could be resolved. |
stable |
object |
no |
The stable channel: what GitHub marks Latest, pre-releases excluded. |
default body (application/problem+json): Problem
| field |
type |
required |
description |
detail |
string |
no |
|
status |
integer |
yes |
|
title |
string |
yes |
|
type |
string |
no |
|
POST /api/bmc/firmware/install
Stage a version from a source for the next boot
Legacy form: GET /api/bmc?opt=set&type=firmware_install with the same parameters in the query string. That form answers {"response":[{"result":…}]} and puts a refusal's message in result; this path answers the bare result and a refusal as application/problem+json.
Request body (application/json)
| field |
type |
required |
description |
allow_downgrade |
string |
no |
1 for a version that is not newer than the running one |
force |
string |
no |
1 replaces an image that is already staged |
source |
string |
no |
a source id from GET /firmware/sources |
version |
string |
no |
a version that source offers |
Request body (application/x-www-form-urlencoded)
| field |
type |
required |
description |
allow_downgrade |
string |
no |
1 for a version that is not newer than the running one |
force |
string |
no |
1 replaces an image that is already staged |
source |
string |
no |
a source id from GET /firmware/sources |
version |
string |
no |
a version that source offers |
| response |
body |
meaning |
200 |
application/json — — |
The result. Its shape is not described in this document. |
204 |
empty |
Done, with nothing to report. |
default |
application/problem+json — Problem |
A refusal, RFC 9457. |
default body (application/problem+json): Problem
| field |
type |
required |
description |
detail |
string |
no |
|
status |
integer |
yes |
|
title |
string |
yes |
|
type |
string |
no |
|
GET /api/bmc/firmware/slots
The A/B slots: running, rollback, what is staged, the last promotion
Legacy form: GET /api/bmc?opt=get&type=firmware_slots with the same parameters in the query string. That form answers {"response":[{"result":…}]} and puts a refusal's message in result; this path answers the bare result and a refusal as application/problem+json.
| response |
body |
meaning |
200 |
application/json — FirmwareSlots |
The result. |
204 |
empty |
Done, with nothing to report. |
default |
application/problem+json — Problem |
A refusal, RFC 9457. |
200 body (application/json): FirmwareSlots
| field |
type |
required |
description |
last_promotion |
object |
no |
The last line the promotion script wrote, when there is a log. |
nextboot |
string or null |
no |
The raw nextboot variable when it is set, so a caller can see what is staged and not merely that something is. |
present |
boolean |
yes |
Whether the UBI device is there at all. False on a board that boots from something else, and on any kernel without UBI: the rest of the fields are then empty because there is nothing to read, not because something failed. |
promotion_history |
object |
no |
How the gate has decided over this board's life. None on a board with no log, which is a board that has never taken an OTA update. |
rollback |
object |
no |
The slot a rollback would land on, when one can be named without guessing. |
running |
object |
no |
The slot the board booted from, identified by which volume has an attached ubiblock device. |
staged |
object |
no |
Which image is staged, when whatever staged it left a note. None means no note was found -- on a board where update_staged is true that means the image was staged by something that does not write one, not that nothing is staged. |
update_staged |
boolean or null |
no |
Whether an update is staged for the next boot. null means the U-Boot environment could not be read at all -- no fw_printenv on the board -- which is not the same as "no update is staged". |
default body (application/problem+json): Problem
| field |
type |
required |
description |
detail |
string |
no |
|
status |
integer |
yes |
|
title |
string |
yes |
|
type |
string |
no |
|
GET /api/bmc/firmware/sources
Where the board looks for firmware
Legacy form: GET /api/bmc?opt=get&type=firmware_sources with the same parameters in the query string. That form answers {"response":[{"result":…}]} and puts a refusal's message in result; this path answers the bare result and a refusal as application/problem+json.
| response |
body |
meaning |
200 |
application/json — Sources |
The result. |
204 |
empty |
Done, with nothing to report. |
default |
application/problem+json — Problem |
A refusal, RFC 9457. |
200 body (application/json): Sources
| field |
type |
required |
description |
sources |
array of Source |
yes |
|
default body (application/problem+json): Problem
| field |
type |
required |
description |
detail |
string |
no |
|
status |
integer |
yes |
|
title |
string |
yes |
|
type |
string |
no |
|
POST /api/bmc/firmware/sources
Replace the firmware sources
Legacy form: GET /api/bmc?opt=set&type=firmware_sources with the same parameters in the query string. That form answers {"response":[{"result":…}]} and puts a refusal's message in result; this path answers the bare result and a refusal as application/problem+json.
Request body (application/json)
| field |
type |
required |
description |
sources |
string |
no |
the sources document; a JSON body that is the document itself is accepted as-is |
Request body (application/x-www-form-urlencoded)
| field |
type |
required |
description |
sources |
string |
no |
the sources document; a JSON body that is the document itself is accepted as-is |
| response |
body |
meaning |
200 |
application/json — — |
The result. Its shape is not described in this document. |
204 |
empty |
Done, with nothing to report. |
default |
application/problem+json — Problem |
A refusal, RFC 9457. |
default body (application/problem+json): Problem
| field |
type |
required |
description |
detail |
string |
no |
|
status |
integer |
yes |
|
title |
string |
yes |
|
type |
string |
no |
|