megarac-inventory
- POST /megarac-inventory/bios
Get MegaRAC BIOS settings
Returns the curated MegaRAC BIOS toggles with their current values and allowable options.
- Request JSON Object:
bmc_ip (string) – (required)
password (string)
username (string)
- Status Codes:
200 OK – bios_settings and bios_options
400 Bad Request – Invalid request
404 Not Found – BMC credentials not found
502 Bad Gateway – Reading BIOS settings from the BMC failed
- POST /megarac-inventory/bios/patch
Stage MegaRAC BIOS changes
Holds the BMC lock and stages the given BIOS toggle changes on the MegaRAC BMC; they apply on the next restart.
- Request JSON Object:
attributes (object) – (required)
bmc_ip (string) – (required)
password (string)
username (string)
- Status Codes:
200 OK – status and message
400 Bad Request – Invalid request
404 Not Found – BMC credentials not found
409 Conflict – BMC operation locked
502 Bad Gateway – BIOS patch on the BMC failed
- POST /megarac-inventory/bios/pending
Get pending MegaRAC BIOS changes
Returns the BIOS toggle changes staged on the MegaRAC BMC but not yet applied.
- Request JSON Object:
bmc_ip (string) – (required)
password (string)
username (string)
- Status Codes:
200 OK – pending_attributes
400 Bad Request – Invalid request
404 Not Found – BMC credentials not found
502 Bad Gateway – Reading pending attributes from the BMC failed
- POST /megarac-inventory/bios/restart
Gracefully restart a MegaRAC server
Triggers a graceful restart through the MegaRAC BMC so staged BIOS changes apply.
- Request JSON Object:
bmc_ip (string) – (required)
password (string)
username (string)
- Status Codes:
200 OK – OK
400 Bad Request – Invalid request
404 Not Found – BMC credentials not found
502 Bad Gateway – Restart on the BMC failed
- Response JSON Object:
message (string)
status (string)
- POST /megarac-inventory/collect
Collect MegaRAC hardware inventory
Reads the BMC and system summary from the MegaRAC BMC over Redfish; credentials fall back to the stored BMC record when omitted.
- Request JSON Object:
bmc_ip (string) – (required)
password (string)
username (string)
- Status Codes:
200 OK – OK
400 Bad Request – Invalid request
404 Not Found – BMC credentials not found
502 Bad Gateway – Inventory collection from the BMC failed
- Response JSON Object:
bmc.firmware_version (string)
bmc.ip (string)
bmc.model (string)
bmc.uuid (string)
system.bios_version (string)
system.health (string)
system.manufacturer (string)
system.model (string)
system.power_state (string)
system.serial (string)
system.uuid (string)
- POST /megarac-inventory/firmware
Get MegaRAC firmware inventory
Returns the live BMC and BIOS firmware versions read from the MegaRAC BMC.
- Request JSON Object:
bmc_ip (string) – (required)
password (string)
username (string)
- Status Codes:
200 OK – inventory
400 Bad Request – Invalid request
404 Not Found – BMC credentials not found
502 Bad Gateway – Reading firmware inventory from the BMC failed
- POST /megarac-inventory/firmware/flash
Flash MegaRAC firmware
Holds the BMC lock, ensures the BMC preserves its configuration, stages the uploaded image over HTTPS and starts a Redfish SimpleUpdate; returns the task ID to follow on update-task/sse.
- Request JSON Object:
bmc_ip (string) – (required)
control_node_ip (string)
filename (string) – (required)
password (string)
username (string)
- Status Codes:
200 OK – task_id, task_monitor, status and message
400 Bad Request – Invalid request or missing filename
404 Not Found – BMC credentials or firmware image not found
409 Conflict – BMC operation locked
412 Precondition Failed – Preserve configuration could not be ensured
500 Internal Server Error – Staging the image for HTTPS failed
502 Bad Gateway – Starting the firmware update failed
- GET /megarac-inventory/firmware/list
List MegaRAC firmware images
Lists the uploaded MegaRAC firmware images with size and modification time; an unreadable directory yields an empty list.
- Status Codes:
200 OK – files
- POST /megarac-inventory/firmware/upload
Upload a MegaRAC firmware image
Saves an uploaded MegaRAC firmware image (.ima, .bin or .rom) to the firmware staging directory for a later flash.
- Status Codes:
200 OK – status, filename and size
400 Bad Request – No file or unsupported extension
500 Internal Server Error – Staging directory or file save failed
- POST /megarac-inventory/iso/mount
Mount the reveal ISO on a MegaRAC server
Allocates a reveal IP, stamps the reveal ISO, stages it for HTTPS serving, mounts it as virtual media on the MegaRAC BMC and boots the server from it.
- Request JSON Object:
bmc_ip (string) – (required)
control_node_ip (string) – (required)
iso_file (string) – (required)
password (string)
username (string)
- Status Codes:
200 OK – OK
400 Bad Request – Invalid request
404 Not Found – BMC credentials not found
409 Conflict – BMC operation locked
500 Internal Server Error – Staging the ISO for HTTPS failed
502 Bad Gateway – Reveal refused, or ISO prepare or mount failed
- Response JSON Object:
error (string)
message (string)
status (string)
steps[] (string)
- POST /megarac-inventory/power
Get MegaRAC power state
Returns the server power state and reset actions; when the BMC advertises none, the default reset action set is returned.
- Request JSON Object:
bmc_ip (string) – (required)
password (string)
username (string)
- Status Codes:
200 OK – power_state and available_actions
400 Bad Request – Invalid request
404 Not Found – BMC credentials not found
502 Bad Gateway – Reading power state from the BMC failed
- POST /megarac-inventory/power/action
Run a MegaRAC power action
Holds the BMC lock and sends the requested power action to the MegaRAC BMC.
- Status Codes:
200 OK – status and message
400 Bad Request – Invalid request or missing action
404 Not Found – BMC credentials not found
409 Conflict – BMC operation locked
502 Bad Gateway – Power action on the BMC failed
- GET /megarac-inventory/power/sse
Stream MegaRAC power state
Server-sent event stream that polls the MegaRAC power state every 3 seconds and broadcasts changes; credentials fall back to the stored BMC record when omitted.
- Query Parameters:
bmc_ip (string) – BMC IP address
username (string) – BMC username
password (string) – BMC password
- Status Codes:
200 OK – SSE stream of power_state events
500 Internal Server Error – SSE client could not be registered
- GET /megarac-inventory/update-task/sse
Stream MegaRAC firmware task progress
Server-sent event stream of Redfish firmware task progress for one BMC task; credentials fall back to the stored BMC record when omitted.
- Query Parameters:
bmc_ip (string) – BMC IP address
task_id (string) – Redfish task ID
username (string) – BMC username
password (string) – BMC password
- Status Codes:
200 OK – SSE stream of task progress events
500 Internal Server Error – SSE client could not be registered