Version check and device selection

Describes the /version and /descriptor endpoints.

GET /version

The “/version” endpoint shows version information and all connected devices handled by this driver.

The “version": “api”: {…} resource must be checked for compatibility by any client.

The “devices” array contains all usable devices and the “slot_number” number must be used to build the further URL.
e.g: “slot_number” is 3:

<HOSTNAME>/api/<service>/<version>/3/descriptor

For the versioning strategy and format, see the Versioning chapter.

Request:

Method: GET
URL : <HOSTNAME>/api/<service>/<version>/

Response:

{
  "version": {
    "api": {
      "major": <uint>,
      "minor": <uint>,
      "patch": <uint>
    },
    "service": {
      "major": <uint>,
      "minor": <uint>,
      "patch": <uint>
    },
    "module_driver": {
      "major": <uint>,
      "minor": <uint>,
      "patch": <uint>
    },
    "kernel_driver": {
      "major": <uint>,
      "minor": <uint>,
      "patch": <uint>
    }
  },
  "devices": [
    {
      "slot_number": <uint>,
      "sdbp_version": {
        "major": <uint>,
        "minor": <uint>,
        "patch": <uint>
      }
    }
  ]
}

Example:

Request:

curl http://<HOSTNAME>/api/bmc/0.9/

Response:

{
  "version": {
    "api": {
      "major": 0,
      "minor": 9,
      "patch": 0
    },
    "service": {
      "major": 0,
      "minor": 9,
      "patch": 0
    },
    "module_driver": {
      "major": 0,
      "minor": 9,
      "patch": 0
    },
    "kernel_driver": {
      "major": 1,
      "minor": 1,
      "patch": 0
    }
  },
  "devices": [
    {
      "slot_number": 0,
      "sdbp_version": {
        "major": 1,
        "minor": 0,
        "patch": 0
      }
    }
  ]
}

GET /descriptor

The “/descriptor” endpoint shows the device descriptor.

Request:

Method: GET
URL : <HOSTNAME>/api/<service>/<version>/descriptor

Response:

{
  "slot_number": <uint>,
  "vendor_product_id": <string>,
  "product_name": <string>,
  "vendor_name": <string>,
  "serial_code": <string>,
  "fw_version": {
    "stability": <string>,
    "version": {
      "major": <uint>,
      "minor": <uint>,
      "patch": <uint>
    }
  },
  "hw_version": {
    "major": <uint>,
    "minor": <uint>,
    "patch": <uint>
  },
  "protocol_version": {
    "major": <uint>,
    "minor": <uint>,
    "patch": <uint>
  },
  "bootloader_state": <string>,
  "max_frame_size": <uint>,
  "max_power_12v": <uint>,
  "max_power_5v0": <uint>,
  "max_power_3v3": <uint>,
  "max_sclk_speed": <uint>
}

Example:

Request:

curl http://<HOSTNAME>/api/bmc/0.9/descriptor

Response:

{
  "slot_number": 0,
  "vendor_product_id": "modules.noreya.tech/bmc",
  "product_name": "Baseboard Management Controller",
  "vendor_name": "NOREYA",
  "serial_code": "0000-0000-2039-3639-424E-5317-003A-0036",
  "fw_version": {
    "stability": "A",
    "version": {
      "major": 0,
      "minor": 9,
      "patch": 3
    }
  },
  "hw_version": {
    "major": 4,
    "minor": 1,
    "patch": 1
  },
  "protocol_version": {
    "major": 1,
    "minor": 0,
    "patch": 0
  },
  "bootloader_state": "supported",
  "max_frame_size": 64,
  "max_power_12v": 0,
  "max_power_5v0": 550,
  "max_power_3v3": 7915,
  "max_sclk_speed": 16000
}
Last modified October 22, 2021