lenovo-inventory

POST /lenovo-inventory/bios

Get Lenovo BIOS settings

Returns BIOS attributes and options from the Lenovo XCC, retrying without TLS verification on failure; a failed read returns empty settings with 200.

Request JSON Object:
  • bmc_ip (string) – (required)

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • bios_options[].allowed_values[] (string)

  • bios_options[].attribute_name (string)

  • bios_options[].current_value (string)

  • bios_options[].description (string)

  • bios_options[].key (string)

  • bios_settings (object)

POST /lenovo-inventory/bios/patch

Patch Lenovo BIOS attributes

Holds the BMC lock, patches the given BIOS attributes on the Lenovo XCC and writes an audit log entry.

Status Codes:
POST /lenovo-inventory/bios/pending

Get pending Lenovo BIOS attributes

Returns the BIOS attributes staged on the Lenovo XCC, retrying without TLS verification on failure.

Request JSON Object:
  • bmc_ip (string) – (required)

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • pending_attributes (object)

POST /lenovo-inventory/bios/restart

Restart a Lenovo server to apply BIOS settings

Holds the BMC lock and restarts the server through the Lenovo XCC so pending BIOS settings apply.

Request JSON Object:
  • bmc_ip (string) – (required)

  • password (string)

  • username (string)

Status Codes:
POST /lenovo-inventory/bios/update

Update Lenovo BIOS firmware

Holds the BMC lock and starts a BIOS firmware update on the Lenovo XCC from the given image URI.

Request JSON Object:
  • bmc_ip (string) – (required)

  • image_uri (string) – (required)

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • message (string)

  • status (string)

  • task_id (string)

POST /lenovo-inventory/bmc/update

Update Lenovo BMC firmware

Holds the BMC lock and starts a BMC firmware update on the Lenovo XCC from the given image URI.

Request JSON Object:
  • bmc_ip (string) – (required)

  • image_uri (string) – (required)

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • message (string)

  • status (string)

  • task_id (string)

POST /lenovo-inventory/collect

Collect Lenovo hardware inventory

Reads the Lenovo XCC hardware inventory over Redfish and returns it; credentials fall back to the stored BMC record when omitted.

Request JSON Object:
  • bmc_ip (string) – (required)

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • bmc.firmware_version (string)

  • bmc.ip (string)

  • bmc.model (string)

  • bmc.uuid (string)

  • memory.total_gib (integer)

  • processors.cores (integer)

  • processors.count (integer)

  • processors.model (string)

  • processors.threads (integer)

  • settings.bmc_hostname (string)

  • settings.bmc_ip_address (string)

  • settings.bmc_license (string)

  • settings.bmc_version (string)

  • settings.front_usb_ownership (string)

  • settings.lxpm_version (string)

  • settings.machine_type_model (string)

  • settings.power_status (string)

  • settings.system_name (string)

  • settings.uefi_version (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 /lenovo-inventory/firmware

Get Lenovo firmware inventory

Returns the firmware inventory read from the Lenovo XCC.

Request JSON Object:
  • bmc_ip (string) – (required)

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • bios.build (string)

  • bios.component (string)

  • bios.release_date (string)

  • bios.status (string) – Active / Inactive

  • bios.updateable (boolean)

  • bios.version (string)

  • bmc.build (string)

  • bmc.component (string)

  • bmc.release_date (string)

  • bmc.status (string) – Active / Inactive

  • bmc.updateable (boolean)

  • bmc.version (string)

  • components[].build (string)

  • components[].component (string)

  • components[].release_date (string)

  • components[].status (string) – Active / Inactive

  • components[].updateable (boolean)

  • components[].version (string)

  • model (string)

  • serial (string)

  • system.build (string)

  • system.component (string)

  • system.release_date (string)

  • system.status (string) – Active / Inactive

  • system.updateable (boolean)

  • system.version (string)

  • updateable (boolean)

POST /lenovo-inventory/firmware/update

Update Lenovo firmware

Holds the BMC lock and starts a firmware update from the image URI, routed to the BMC update or the generic firmware update by the image name; records the attempt in the audit log as in progress.

Request JSON Object:
  • bmc_ip (string) – (required)

  • image_uri (string) – (required)

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • message (string)

  • status (string)

  • task_id (string)

POST /lenovo-inventory/power

Get Lenovo power state

Returns the server power state and allowed actions from the Lenovo XCC; a transient read error returns 200 with power_state Unknown and a message.

Request JSON Object:
  • bmc_ip (string) – (required)

  • password (string)

  • username (string)

Status Codes:
POST /lenovo-inventory/power/action

Run a Lenovo power action

Maps on, off and reset aliases to Redfish reset types, holds the BMC lock and sends it to the Lenovo XCC.

Status Codes:
GET /lenovo-inventory/power/sse

Stream Lenovo power state

Server-sent event stream that polls the Lenovo XCC 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:
GET /lenovo-inventory/task/{task_id}

Get Lenovo task status

Proxies a Redfish TaskService poll to the Lenovo XCC using stored credentials and finalizes the firmware audit entry when the task completes or fails.

Parameters:
  • task_id (string) – Redfish task ID

Query Parameters:
  • bmc_ip (string) – BMC IP address

Status Codes:
POST /lenovo-inventory/virtualmedia/check

Check Lenovo virtual media

Returns the virtual media state read from the Lenovo XCC.

Request JSON Object:
  • bmc_ip (string) – (required)

  • password (string)

  • username (string)

Status Codes:
POST /lenovo-inventory/virtualmedia/eject

Eject Lenovo virtual media

Holds the BMC lock and ejects the virtual media through the Lenovo XCC OEM Redfish flow.

Request JSON Object:
  • bmc_ip (string) – (required)

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • message (string)

  • status (string)

  • steps[] (string)

POST /lenovo-inventory/virtualmedia/mount

Mount the reveal ISO on a Lenovo server

Allocates a reveal IP, stamps the reveal ISO, mounts it through the Lenovo XCC OEM virtual media flow with retries and reboots the server into it.

Request JSON Object:
  • bmc_ip (string) – (required)

  • control_node_ip (string) – (required)

  • iso_file (string) – (required)

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • message (string)

  • status (string)

  • steps[] (string)