Reboot Host
Headers
Authorization: OAuth the-session-uuidBody
{
"powerResetHost": {
"returnEarly": false,
"method": "AUTO"
},
"systemTags": [],
"userTags": []
}In the above example, systemTags and userTags fields can be omitted. They are listed to indicate that these two 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 '{"powerResetHost":{"returnEarly":false,"method":"AUTO"}}' //localhost:8080/zstack/v1/hosts/power/cbe0a6dc2b2b3dc9a84928f27461816b/actionsParameter List
Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
uuid | String | url | Resource UUID, uniquely identifies the resource |
| 4.7.0 |
method (optional) | String | body (contained in powerResetHost structure) | Reboot method |
| 4.7.0 |
systemTags (optional) | List | body | System tag |
| 4.7.0 |
userTags (optional) | List | body | User tag |
| 4.7.0 |
returnEarly (optional) | boolean | body (contained in powerResetHost structure) | Whether to return early |
| 4.7.0 |
API Response
On success, this API returns an empty JSON structure {}. 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
PowerResetHostAction action = new PowerResetHostAction();
action.uuid = "cbe0a6dc2b2b3dc9a84928f27461816b";
action.returnEarly = false;
action.method = "AUTO";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
PowerResetHostAction.Result res = action.call();Python SDK
PowerResetHostAction action = PowerResetHostAction()
action.uuid = "cbe0a6dc2b2b3dc9a84928f27461816b"
action.returnEarly = false
action.method = "AUTO"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
PowerResetHostAction.Result res = action.call()