Document navigation

QueryVmSchedHistory

API Request

URLs
GET zstack//v1/vm/sched-history
GET zstack//v1/vm/sched-history/{vmInstanceUuid}
Headers
Authorization: OAuth the-session-uuid
Curl Samples
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm/sched-history?q=vmInstanceUuid=15b5b8ab631d300592bf83d66331f914
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm/sched-history/{vmInstanceUuid}?q=vmInstanceUuid=4240a319fabf3728960d1d7639f3fc0f

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryVmSchedHistory, and pressing the Tab key.

API Response

{
  "inventories": [
    {
      "id": 0.0,
      "vmInstanceUuid": "ec8fe40b4b0a38bc8f195bfc8bfc72e9",
      "accountUuid": "b07dda064256343c894cecfa5d50b42c",
      "schedType": "VMHA",
      "success": true,
      "lastHostUuid": "d4d26f65cfff3fafb98d3da284290455",
      "destHostUuid": "bc001bb4d762395db4b2ed97c6d6dae3"
    }
  ]
}
Name Type Description Starting Version
success boolean 0.6
inventories List See inventories 4.4.24
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error 0.6
#inventories
Name Type Description Starting Version
vmInstanceUuid String The VM UUID. 4.4.24
accountUuid String The account UUID. 4.4.24
schedType String 4.4.24
success Boolean 4.4.24
lastHostUuid String 4.4.24
destHostUuid String 4.4.24
createDate Timestamp The creation date. 4.4.24
lastOpDate Timestamp The last operation date. 4.4.24
#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.4.24
description String The brief description of the error. 4.4.24
details String The details about the error. 4.4.24
elaboration String The reserved field. Default value: null. 4.4.24
opaque LinkedHashMap The reserved field. Default value: null. 4.4.24
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.4.24

SDK Sample

Java SDK
QueryVmSchedHistoryAction action = new QueryVmSchedHistoryAction();
action.conditions = asList("vmInstanceUuid=b35d14e4af4c3f4c8f745e73df083020");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryVmSchedHistoryAction.Result res = action.call();
Python SDK
QueryVmSchedHistoryAction action = QueryVmSchedHistoryAction()
action.conditions = ["vmInstanceUuid=f9bd0652c3843cb285c2e7b8c9f4561b"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryVmSchedHistoryAction.Result res = action.call()
API Reference | 5.5.30 | ZStack Cloud · ZCF | ZStack Resource Center