GetBareMetal2ChassisPowerStatus
API Request
URLs
GET zstack/v1/baremetal2/chassis/{uuid}/powerstatus
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/baremetal2/chassis/5b681b2883c33eee8d536dde6fc6edc0/powerstatus
Request Parameters
Name | Type | Location | Description | Valid Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The UUID of the bare metal chassis. | 4.0.0 | |
systemTags | List | query | Optional. The system tags. | 4.0.0 | |
userTags | List | query | Optional. The user tags. | 4.0.0 |
API Response
Sample Response
{
"status": "ON"
}
Name | Type | Description | Starting Version |
---|---|---|---|
status | String | The power status of the chassis. | 4.0.0 |
success | boolean | Indicates whether the power status is successfully retrieved. | 4.0.0 |
error | ErrorCode | See error. | 4.0.0 |
#error
Name | Type | Description | Starting Version |
---|---|---|---|
code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 4.0.0 |
description | String | The brief description of the error. | 4.0.0 |
details | String | The details about the error. | 4.0.0 |
elaboration | String | The reserved field. Default value: null. | 4.0.0 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 4.0.0 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.0.0 |
SDK Sample
Java
SDK
GetBareMetal2ChassisPowerStatusAction action = new GetBareMetal2ChassisPowerStatusAction();
action.uuid = "5b681b2883c33eee8d536dde6fc6edc0";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetBareMetal2ChassisPowerStatusAction.Result res = action.call();
Python
SDK
GetBareMetal2ChassisPowerStatusAction action = GetBareMetal2ChassisPowerStatusAction()
action.uuid = "5b681b2883c33eee8d536dde6fc6edc0"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetBareMetal2ChassisPowerStatusAction.Result res = action.call()