Starting BMSs¶
Function¶
This API is used to start BMSs of specified IDs. You can start a maximum of 1000 BMSs at a time.
Note
This is an asynchronous API. Calling the API successfully indicates that the task is delivered successfully. To check whether the task is successful, call the Querying Task Statuses API.
URI¶
POST /v1/{project_id}/baremetalservers/action
Table 1 lists the parameters.
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 Parameters¶
Note
In the request, the command to start BMSs must be sent with the parameter os-start. For details, see the example request.
Parameter | Mandatory | Type | Description |
---|---|---|---|
os-start | Yes | Object | Specifies the operation to start BMSs. For details, see Table 2. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
servers | Yes | Array of objects | Specifies the BMS IDs. For details, see Table 3. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
id | Yes | String | Specifies the BMS ID. You can obtain the BMS ID from the BMS console or by calling the API Querying BMSs. |
Example Request¶
Starting two BMSs (IDs: 616fb98f-46ca-475e-917e-2563e5a8cd19 and 726fb98f-46ca-475e-917e-2563e5a8cd20)
POST https://{BMS Endpoint}/v1/bbf1946d374b44a0a2a95533562ba954/baremetalservers/action
{
"os-start": {
"servers": [
{
"id": "616fb98f-46ca-475e-917e-2563e5a8cd19"
},
{
"id": "726fb98f-46ca-475e-917e-2563e5a8cd20"
}
]
}
}
Response Parameter¶
Normal response
Parameter | Type | Description |
---|---|---|
job_id | String | Specifies the task ID returned after a task command is issued. The task ID can be used to query the execution status of the task. For details about how to query the task execution status based on job_id, see Querying Task Statuses. |
Abnormal response
Parameter | Type | Description |
---|---|---|
error | Dictionary data structure | Specifies the error returned when a task submission encounters an exception. For details, see Table 6. |
Parameter | Type | Description |
---|---|---|
message | String | Specifies the error message. |
code | String | Specifies the error code. |
Example Response¶
Normal response
{ "job_id": "70a599e0-31e7-49b7-b260-868f441e862b" }
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.