Restarting BMSs

Function

This API is used to restart BMSs of specified IDs. You can restart a maximum of 1000 BMSs at a time.

This API is an asynchronous API. Calling the API successfully indicates that the task is delivered successfully. To check whether the task is successful, use the Querying Task Statuses API.

URI

POST /v1/{project_id}/baremetalservers/action

Table 1 lists the URI 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.

Request

  • Request parameters

    In the request, the parameters to restart BMSs must be sent using the parameter reboot. For details, see the example request.

    Parameter

    Mandatory

    Type

    Description

    reboot

    Yes

    Object

    Specifies the operation to restart BMSs. For details, see Table 2.

    Table 2 reboot field data structure description

    Parameter

    Mandatory

    Type

    Description

    type

    Yes

    String

    Specifies the BMS reboot type.

    • SOFT: soft restart (invalid)
    • HARD: hard restart (default)

    servers

    Yes

    Array of objects

    Specifies BMS IDs. For details, see Table 3.

    Table 3 servers field data structure description

    Parameter

    Mandatory

    Type

    Description

    id

    Yes

    String

    Specifies the BMS ID.

    You can obtain the BMS ID from the BMS console or using the Querying BMSs (Native OpenStack API) API.

  • Example request
    1
    POST https://{BMS Endpoint}/v1/bbf1946d374b44a0a2a95533562ba954/baremetalservers/action
    
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    {
        "reboot": {
            "type": "HARD",
            "servers": [
                {
                    "id": "616fb98f-46ca-475e-917e-2563e5a8cd19"
                },
                {
                    "id": "726fb98f-46ca-475e-917e-2563e5a8cd20"
                }
            ]
        }
    }
    

Response

See Task ID Response.

Returned Values

Normal values

Returned Values

Description

200

The server has successfully processed the request.

For details about other returned values, see Status Codes.

Error Codes

See Error Codes.