ReconnectHost
API Request
URLs
PUT zstack/v1/hosts/{uuid}/actionsHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"reconnectHost": {},
"systemTags": [],
"userTags": []
}
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"reconnectHost":{}}' \
http://localhost:8080/zstack/v1/hosts/26caa95d6fb53d08ad6716ef03bf4b28/actions
Request Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The resource UUID. | 0.6 | |
| systemTags | List | body | Optional. The system tags. | 0.6 | |
| userTags | List | body | Optional. The user tags. | 0.6 |
API Response
When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes 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 Sample
Java
SDK
ReconnectHostAction action = new ReconnectHostAction();
action.uuid = "1c44c6b269724a62b7fb69bd25e5a8a9";
action.sessionId = "ccc6f95bad044da59080a87e710587c0";
ReconnectHostAction.Result res = action.call();Python
SDK
ReconnectHostAction action = ReconnectHostAction()
action.uuid = "562400a5ff1e4532aacedf708d3ad75e"
action.sessionId = "eb137b7f6e45448691b652fe4245a52b"
ReconnectHostAction.Result res = action.call()