inventory

POST /inventory/add-hardware

Add hardware info to device

Add NICs, PCIe devices, and storage devices to a NetBox device

Request JSON Object:
  • bmc_ip (string) – BmcIP is the base-first (NetBox-absent) linkage key: the canonical device is resolved by bmc_ip (dcim_devices.bmc_ip), since AtlasDeviceID/DeviceID is NULL/meaningless base-first. Empty in the NetBox-present path.

  • device_id (integer) – (required)

  • nics[].interface (string) – (required)

  • nics[].ipv4 (string)

  • nics[].ipv6 (string)

  • nics[].legacy_name (string)

  • nics[].mac (string) – (required)

  • nics[].state (string) – “up” or “down”

  • pcie[].class (string) – (required)

  • pcie[].device (string) – (required)

  • pcie[].slot (string) – (required)

  • pcie[].vendor (string) – (required)

  • storage[].controller_driver (string)

  • storage[].controller_name (string)

  • storage[].device_path (string)

  • storage[].dwpd (string)

  • storage[].existing_fs (string)

  • storage[].has_zfs_label (string)

  • storage[].interface (string) – (required)

  • storage[].model (string) – (required)

  • storage[].name (string) – (required)

  • storage[].partition_count (integer)

  • storage[].rotational (integer)

  • storage[].serial_number (string)

  • storage[].size (string) – (required)

  • storage[].smart_status (string)

  • storage[].smr_detected (string)

  • storage[].type (string) – (required)

  • storage[].wear_level (string)

  • storage[].wwn (string)

Status Codes:
Response JSON Object:
  • device_id (integer)

  • errors[] (string)

  • interfaces_created (integer)

  • interfaces_skipped (integer)

  • inventory_items_created (integer)

  • inventory_items_skipped (integer)

  • device_id

  • errors[]

  • interfaces_created

  • interfaces_skipped

  • inventory_items_created

  • inventory_items_skipped

DELETE /inventory/bin/{filename}

Delete Firmware Binary or ISO File

Deletes firmware binary (.bin, .exe) or ISO (.iso) files from the bin_files directory.

Parameters:
  • filename (string) – Firmware filename (.bin, .BIN, .exe, .EXE, .iso, .ISO)

Status Codes:
PATCH /inventory/bios

Patch BIOS Attributes

Updates BIOS attributes on a baremetal server’s BMC using Redfish APIs. The request must include BMC IP, credentials, and the attributes to be updated.

Request JSON Object:
  • attributes (object) – (required)

  • bmc_ip (string) – (required)

  • password (string)

  • username (string)

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

  • pending_attributes (object)

  • status (string)

POST /inventory/bios-update

Trigger BIOS Update

Triggers a BIOS firmware update on the target system using BMC IP and Username and password are optional; if omitted, credentials will be fetched from the database. Ensures the system is powered off before initiating the update.

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

  • image_uri (string) – (required)

  • password (string)

  • target (string) – (required)

  • transfer_protocol (string) – (required)

  • username (string)

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

  • status (string)

  • task_id (string)

  • task_monitor (string)

POST /inventory/bios/pending

Get Pending BIOS Attributes

Returns pending BIOS attributes for a given BMC using Redfish APIs.

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

  • password (string)

  • username (string)

Status Codes:
POST /inventory/bios/restart

Trigger Graceful Restart

Triggers a graceful restart on a baremetal server’s BMC to apply BIOS changes using Redfish APIs. The request must include BMC IP and Username and password are optional; if omitted, credentials will be fetched from the database..

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

  • password (string)

  • username (string)

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

  • status (string)

POST /inventory/bmc-reset

Reset BMC (Unit Reset)

Reboots the BMC firmware process tree via Redfish Manager.Reset. This is the equivalent of the SMC web UI “Maintenance → Unit Reset” button. The host server is NOT power-cycled — only the BMC restarts (~60-120s offline). Primary use case is clearing stuck virtual-media sessions on legacy X11 nodes where ATEN iKVM has orphaned a mount/unmount. Username and password are optional; if omitted, credentials will be fetched from the database.

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

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • estimated_recovery_seconds (integer)

  • message (string)

  • reset_type_used (string)

  • status (string)

POST /inventory/bmc-update

Trigger BMC Update

Triggers a BMC firmware update on the target system using BMC IP and Username and password are optional; if omitted, credentials will be fetched from the database. Ensures the system is powered off before initiating the update.

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

  • image_uri (string) – (required)

  • password (string)

  • target (string) – (required)

  • transfer_protocol (string) – (required)

  • username (string)

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

  • status (string)

  • task_id (string)

  • task_monitor (string)

POST /inventory/boot/vmedia-check

Check Virtual Media Boot Availability

Iterates the Redfish BootOptions collection and returns whether a virtual media boot option is available. Useful as a pre-check before legacy node boot configuration.

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

  • password (string)

  • username (string)

Status Codes:
Response JSON Object:
  • available (boolean)

  • boot_ref (string)

  • display_name (string)

POST /inventory/capture-progress/last

Get Last Hardware Capture Progress

Retrieves the most recent hardware capture progress status for a specific BMC node.

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

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

  • component (string) – e.g., “Network Init”, “CPU Collection”

  • created_at (string)

  • id (integer)

  • message (string)

  • percent_complete (integer)

  • status (string) – “running”, “completed”, “failed”

  • updated_at (string)

POST /inventory/captureinfo

Capture Hardware Inventory

Captures hardware inventory data (typically from a running live ISO) and stores it in the database, associated with the given BMC IP.

Status Codes:
POST /inventory/collect

Collect Baremetal Inventory

Collects hardware inventory from a baremetal server’s BMC using Redfish APIs. The request must include BMC IP and Username and password are optional; if omitted, credentials will be fetched from the database..

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.iommu (string)

  • bios_settings.pxe_ipv4 (string)

  • bios_settings.rebar (string)

  • bios_settings.sriov (string)

  • bios_settings.svm (string)

  • bmc.firmware_version (string)

  • bmc.ip (string)

  • bmc.last_reset (string)

  • bmc.model (string)

  • bmc.uuid (string)

  • cpu.count (integer)

  • cpu.max_speed_mhz (integer)

  • cpu.microcode (string)

  • cpu.model (string)

  • cpu.tdp_watts (integer)

  • cpu.total_cores (integer)

  • cpu.total_threads (integer)

  • memory.modules[].manufacturer (string)

  • memory.modules[].serial (string)

  • memory.modules[].size_mib (integer)

  • memory.modules[].slot (string)

  • memory.modules[].speed_mhz (integer)

  • memory.modules[].type (string)

  • memory.total_gib (integer)

  • network.interfaces[].id (string)

  • network.interfaces[].ipv4_address (string) – Added for onboarding

  • network.interfaces[].ipv6_address (string) – Added for onboarding

  • network.interfaces[].link_status (string)

  • network.interfaces[].mac (string) – Field name in JSON is still “mac” but struct field is MACAddress

  • network.interfaces[].name (string)

  • network.interfaces[].speed_mbps (integer)

  • system.bios_version (string)

  • system.health (string)

  • system.manufacturer (string)

  • system.model (string)

  • system.power_state (string)

  • system.serial (string)

  • system.uuid (string)

GET /inventory/device-by-bmc

Get device ID by BMC IP

Looks up NetBox device_id associated with a BMC IP from the hardware inventory database

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

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

  • device_id (integer)

POST /inventory/firmware

Get Firmware Inventory

Retrieves firmware inventory information for both BIOS and BMC from a baremetal server’s BMC using Redfish APIs. The request must include BMC IP and Username and password are optional; if omitted, credentials will be fetched from the database..

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

  • password (string)

  • username (string)

Status Codes:
GET /inventory/iso-active-job

Get Active ISO Build Job

Returns the latest live building/pending ISO job for a BMC IP, or 204 if none.

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

Status Codes:
GET /inventory/iso-job/{id}

Get Inventory ISO Job Status

Retrieves the status and result of a custom inventory ISO build job by job ID.

Parameters:
  • id (string) – Job ID

Status Codes:
POST /inventory/iso/boot-isolate

Prepare BIOS for ISO Boot

Disables all non-virtual-media boot options and IPv4/IPv6 PXE/HTTP BIOS attributes so the next reboot boots only from virtual media. Call this before POST /iso/mount.

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

  • password (string)

  • username (string)

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

  • message (string)

  • status (string)

  • steps[] (string)

POST /inventory/iso/build

Build Custom Inventory ISO

Starts a job to build a custom inventory ISO for a given BMC IP and control node IP.

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

  • control_node_ip (string) – (required)

  • force_rebuild (boolean)

Status Codes:
POST /inventory/iso/job/{id}/cancel

Cancel Inventory ISO Build

Cancels a running custom inventory ISO build job by job ID.

Parameters:
  • id (string) – Job ID

Status Codes:
POST /inventory/iso/mount

Mount ISO via Redfish Virtual Media

Ejects any existing virtual media, mounts the specified ISO, sets one-time boot to CD, and reboots the system using Redfish APIs.

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:
  • error (string)

  • message (string)

  • status (string)

  • steps[] (string)

DELETE /inventory/iso/{filename}

Delete Custom Inventory ISO

Deletes a custom inventory ISO (.iso) file from the iso_files directory.

Parameters:
  • filename (string) – ISO filename

Status Codes:
GET /inventory/isolist

List Available Inventory ISOs

Lists all custom inventory ISO files (.iso) available in the iso_files directory.

Status Codes:
GET /inventory/list

List BIOS Firmware Binaries

Lists all BIOS firmware binary (.bin) files available in the bin_files directory.

Status Codes:
GET /inventory/listhw

List Hardware Inventories

Lists all captured hardware inventories, optionally filtered by BMC IP.

Query Parameters:
  • bmc_ip (string) – Filter by BMC IP

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

  • [].created_at (string)

  • [].data (object)

  • [].device_id (integer)

  • [].id (integer)

  • [].updated_at (string)

POST /inventory/power-control

Power Control

Controls the power state of a system using BMC IP and Username and password are optional; if omitted, credentials will be fetched from the database.

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

  • password (string)

  • reset_type (string) – (required)

  • username (string)

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

  • status (string)

GET /inventory/power-state/sse

Monitor Power State (SSE)

Streams real-time power state updates from BMC via Server-Sent Events.

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

  • username (string) – BMC username (optional if stored in DB)

  • password (string) – BMC password (optional if stored in DB)

POST /inventory/update-task

Monitor Firmware Update Task

Monitors the status of a firmware update task using BMC IP, credentials, and task ID.

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

  • password (string)

  • task_id (string) – (required)

  • username (string)

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

  • message (string)

  • percent_complete (integer)

  • start_time (string)

  • task_state (string)

GET /inventory/update-task/sse

Monitor Firmware Task (SSE)

Streams real-time firmware update task progress from BMC via Server-Sent Events.

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

  • task_id (string) – Redfish Task ID

  • username (string) – BMC username (optional if stored in DB)

  • password (string) – BMC password (optional if stored in DB)

POST /inventory/upload/fwbins

Upload BIOS Firmware Binary

Uploads a BIOS firmware binary (.bin) file to the server’s bin_files directory for later use in firmware updates. Optionally validates SHA256 checksum if vendor_checksum is provided.

Status Codes:
Response JSON Object:
  • bin_file (string) – Original fields (always present)

  • checksum_algorithm (string)

  • computed_checksum (string) – Optional validation fields (only when validation is performed)

  • file_size (integer)

  • note (string)

  • url (string)

  • validation_status (string)

  • vendor_checksum (string)