Document navigation

QueryKvmHypervisorInfo

API Request

URLs
GET zstack/v1/hosts/kvm/hypervisor/info
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/hosts/kvm/hypervisor/info?q=uuid=dd025c0199ef3b7080120db73772234f

Queryable Fields

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

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "a3097e5ebe8a35929e1f2fe4304893f1",
      "hypervisor": "qemu-kvm",
      "version": "4.2.0-632.g6a6222b.el7",
      "matchState": "Matched",
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM"
    }
  ]
}
Name Type Description Starting Version
success boolean Whether the query is successful or not. 4.6.21
inventories List See inventories. 4.6.21
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 4.6.21
#inventories
Name Type Description Satring Version
uuid String The UUID of the host or the VM instance. 4.6.21
hypervisor String The hypervisor name, such as qemu-kvm. 4.6.21
version String The version number, such as 4.2.0-632.g6a6222b.el7 4.6.21
matchState String Whether the current version is consistent with the recommended version. The values may be Matched, Unmatched,or Unknown 4.6.21
createDate Timestamp The creation date. 4.6.21
lastOpDate Timestamp The last operation date. 4.6.21
#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.6.21
description String The brief description of the error. 4.6.21
details String The details about the error. 4.6.21
elaboration String The reserved field. Default value: null. 4.6.21
opaque LinkedHashMap The reserved field. Default value: null. 4.6.21
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.6.21

SDK Sample

Java SDK
QueryKvmHypervisorInfoAction action = new QueryKvmHypervisorInfoAction();
action.conditions = asList("uuid=0601103239cd30c2bd738b98d4440199");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryKvmHypervisorInfoAction.Result res = action.call();
Python SDK
QueryKvmHypervisorInfoAction action = QueryKvmHypervisorInfoAction()
action.conditions = ["uuid=838e20e529cc3a19a9f0efa50e9e2409"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryKvmHypervisorInfoAction.Result res = action.call()
API Reference | 5.4.12 | ZStack Cloud · ZCF | ZStack Resource Center