Power Off Bare Metal Chassis

PUT/zstack/v1/baremetal/chassis/{chassisUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "powerOffBaremetalChassis": {},
  "systemTags": [],
  "userTags": []
}

In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that these fields can be included in the body.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"powerOffBaremetalChassis":{}}' \
http://localhost:8080/zstack/v1/baremetal/chassis/ee53c6d1f4ad3ebb8971aa5933d6f9d6/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
chassisUuidStringurlBare metal chassis UUID 2.6.0
systemTags (Optional)ListbodySystem Tag 2.6.0
userTags (Optional)ListbodyUser Tag 2.6.0

API Response

This API returns an empty JSON structure {} on success. On error, the returned JSON structure contains an error field, for example:

{
  "error": {
    "code": "SYS.1001",
    "description": "A message or a operation timeout",
    "details": "Create VM on KVM timeout after 300s"
  }
}

SDK Examples

Java SDK

PowerOffBaremetalChassisAction action = new PowerOffBaremetalChassisAction();
action.chassisUuid = "ee53c6d1f4ad3ebb8971aa5933d6f9d6";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
PowerOffBaremetalChassisAction.Result res = action.call();

Python SDK

action = PowerOffBaremetalChassisAction()
action.chassisUuid = "ee53c6d1f4ad3ebb8971aa5933d6f9d6"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()