Updated on 2025-08-18 GMT+08:00

Querying Details About BMSs

Function

This API is used to query BMSs by filters and display details about the BMSs.

URI

GET /v1.1/{project_id}/baremetalservers/detail

Table 1 lists the parameters.
Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

For details about how to obtain the project ID, see Obtaining a Project ID.

Table 2 Parameters for querying BMSs

Parameter

Mandatory

Type

Description

flavor

No

String

Specifies the ID of the BMS flavor.

name

No

String

Specifies the BMS name.

status

No

String

Specifies the BMS status.

Value range:

  • ACTIVE: The BMS is running, stopped, or being deleted.
  • BUILD: The BMS is being created.
  • ERROR: The BMS is faulty.
  • HARD_REBOOT: The BMS is being forcibly restarted.
  • REBOOT: The BMS is being restarted.
  • SHUTOFF: The BMS is stopped.

limit

No

Integer

Specifies the number of BMSs displayed on each page. The default value is 25 and maximum value is 1000.

offset

No

Integer

Specifies a pagination query.
  • If this parameter is not set, the total number of BMSs that meet the query criteria will be returned, and the server list is empty.
  • If this parameter is set, it specifies the page. The start page is 1, and the number of records displayed on each page is limit.

detail

No

String

Specifies the level for details about BMS query results. A higher level indicates more details about BMS query results.

Available levels include 1, 2, 3, 4, and 5. The default level is 4.

Request Parameters

None

Example Request

Querying BMSs bound to all enterprise projects of the user

GET https://{BMS Endpoint}/v1.1/bbf1946d374b44a0a2a95533562ba954/baremetalservers/detail?offset=1&limit=2

Response Parameters

Parameter

Type

Description

servers

List

Specifies details about BMSs. For details, see Table 3.

The returned details vary depending on the query level.

Table 3 server data structure

Parameter

Type

Description

id

String

Specifies the BMS ID in UUID format.

user_id

String

Specifies the ID of the user that created the BMS. The value is in UUID format.

name

String

Specifies the BMS name.

created

String

Specifies the time when the BMS was created.

The timestamp format is YYYY-MM-DDTHH:MM:SSZ (ISO 8601), for example, 2019-05-22T03:30:52Z.

updated

String

Specifies the time when the BMS was updated.

The timestamp format is YYYY-MM-DDTHH:MM:SSZ (ISO 8601), for example, 2019-05-22T04:30:52Z.

tenant_id

String

Specifies the ID of the tenant owning the BMS. The value is in UUID format.

This parameter has the same function of project_id.

flavor

Object

Specifies the BMS flavor. For details, see Table 4.

status

String

Specifies the BMS status.

Value range:

  • ACTIVE: The BMS is running, stopped, or being deleted.
  • BUILD: The BMS is being created.
  • ERROR: The BMS is faulty.
  • HARD_REBOOT: The BMS is being forcibly restarted.
  • REBOOT: The BMS is being restarted.
  • SHUTOFF: The BMS is stopped.

task_state

String

Task status of the BMS.

Value range:

  • rebooting: The BMS is being restarted.
  • reboot_started: The BMS is normally restarted.
  • reboot_started_hard: The BMS is forcibly restarted.
  • powering-off: The BMS is being powered off.
  • powering-on: The BMS is being powered on.
  • rebuilding: The BMS is being rebuilt.
  • scheduling: The BMS is being scheduled.
  • deleting: The BMS is being deleted.

vm_state

String

Stability status of the BMS.

Value range:

  • active: The BMS is running.
  • shutoff: The BMS is stopped.
  • reboot: The BMS is restarted.

availability_zone

String

Name of the AZ where the BMS is located.

fault

Object

Specifies the cause of a BMS fault. For details, see Table 5.

in_recycle_bin

Boolean

Whether the BMS is in the recycle bin.

Table 4 flavor data structure

Parameter

Type

Description

id

String

Specifies the flavor ID of a BMS.

name

String

Specifies the flavor name of a BMS.

disk

Integer

Specifies the system disk size in the BMS flavor. 0 indicates the size is not limited.

vcpus

Integer

Specifies the number of CPU cores in the BMS flavor.

ram

Integer

Specifies the memory size (MB) in the BMS flavor.

gpus

Array of objects

Specifies the GPU information in the BMS flavor. For details, see Table 6.

asic_accelerators

Array of objects

Specifies the ASIC information in the BMS flavor. For details, see Table 7.

Table 5 fault data structure

Parameter

Type

Description

message

String

Specifies the fault information.

code

Integer

Specifies the fault code.

details

String

Specifies the fault details.

created

String

Specifies the time when the fault occurred. The time is in ISO 8601 format.

Table 6 gpus data structure

Parameter

Type

Description

name

String

Specifies the GPU name.

count

Integer

Specifies the number of GPUs.

memory_mb

Integer

Specifies the GPU memory size, in MB.

Table 7 asic_accelerators data structure

Parameter

Type

Description

name

String

Specifies the ASIC name.

count

Integer

Specifies the number of ASICs.

memory_mb

Integer

Specifies the ASIC memory size, in MB.

Example Response

{
    "servers": [
        {
            "tenant_id": "ce5c827cf74a45e381a2ceba3511xxxx",
            "availability_zone": "cn-north-1a",
            "created": "2025-05-08T02:58:16Z",
            "task_state": "null",
            "vm_state": " active ",
            "flavor": {
                "disk": 0,
                "asic_accelerators": [

                ],
                "gpus": [

                ],
                "name": "xxx",
                "id": "xxx",
                "vcpus": 24,
                "ram": 49152
            },
            "user_id": "521ac9375b8e4661ad8409c0311xxxxx",
            "in_recycle_bin": false,
            "name": "bms-caae",
            "id": "7ef189e7-7795-47e7-9116-47bd50exxxxx",
            "updated": "2025-05-08T02:58:24Z",
            "status": "ACTIVE"
        }
    ],
}

Returned Values

Normal values

Returned Values

Description

200

The request has been successfully processed.

For details about other returned values, see Status Codes.

Error Codes

See Error Codes.