System Global Type/Available Resource Query Operations
GETAvailable Resource Query OperationsSince 0.6SynchronousAuth Required
GetCpuMemoryCapacity
GetCpuMemoryCapacity
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Query Parameters
Request Inputs
Query Parameters
zoneUuidsListOptional. The zone UUID list.
clusterUuidsListOptional. The cluster UUID list used for attaching the network and the storage.
hostUuidsListOptional. The host UUID list used for adding and deleting the host.
allbooleanOptional. Default value: false. When false, at least one of the zone UUID, cluster UUID, or host UUID is required, or all are required. When true, the zone UUID, cluster UUID, and host UUID are all optional.
hypervisorTypeStringOptional. The hypervisor type.
Responses
Endpoint
GET/zstack/v1/hosts/capacities/cpu-memory
/zstack/v1/hosts/capacities/cpu-memory
Request Example
curl -X GET 'http://{host}/zstack/v1/hosts/capacities/cpu-memory?zoneUuids=<zoneUuids>&clusterUuids=<clusterUuids>&hostUuids=<hostUuids>&all=True&hypervisorType=<hypervisorType>&systemTags=<systemTags>&userTags=<userTags>' -H 'Authorization: OAuth {sessionUuid}'
Response Example
200{ "totalCpu": 4.0, "availableCpu": 2.0, "totalMemory": 8.0, "availableMemory": 4.0, "managedCpuNum": 4.0, "capacityData": [ { "resourceUuid": "db558260b0b53e36aa8ebf7e40c7c9c6", "totalCpu": 4.0, "availableCpu": 2.0, "totalMemory": 8.0, "availableMemory": 4.0, "managedCpuNum": 4.0 } ], "resourceType": "HostVO" }Change History
This API has no change history records yet.
