QueryPrimaryStorage

API Request

URLs
GET zstack/v1/primary-storage
Headers
Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth f889c6a0220c4b34b3007f72bd04e839" \
-X GET http://localhost:8080/zstack/v1/primary-storage?q=uuid=2160b1e46b0a422fbc9ce6e4a7de1023

Queryable Fields

Run the CLI command tool, enter QueryPrimaryStorage and press Tab to view all queryable fields and resource names that can be queried across tables.

API Response

Response Example
{
"inventories": [
    {
"name": "PS1",
"url": "/Cloud_ps",
"type": "LocalStorage",
"state": "Enabled",
"status": "Connected",
"attachedClusterUuids": [
"efbdb96e4f9c457eacf11dcb19923af9"
      ]
    }
  ]
}
Name Type Description Starting Version
error ErrorCode Error code. If not null, the operation failed. When the operation succeeds, this field is null. See error 0.6
inventories List See inventories 0.6
#error
Name Type Description Starting Version
code String Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001 0.6
description String Brief description of the error 0.6
details String Detailed error information 0.6
elaboration String Reserved field, defaults to null 0.6
opaque LinkedHashMap Reserved field, defaults to null 0.6
cause ErrorCode Root cause, the source error that caused the current error. If there is no original error, this field is null 0.6
#inventories
Name Type Description Starting Version
uuid String Resource UUID, uniquely identifies the resource 0.6
zoneUuid String Data Center UUID 0.6
name String Resource Name 0.6
url String The URL. 0.6
description String Resource Description 0.6
totalCapacity Long The total capacity. 0.6
availableCapacity Long The available capacity. 0.6
totalPhysicalCapacity Long The total physical capacity. 0.6
availablePhysicalCapacity Long The available physical capacity. 0.6
systemUsedCapacity Long The system used capacity. 0.6
type String The resource type. 0.6
state String The resource state. 0.6
status String The resource status. 0.6
mountPath String The mount path. 0.6
createDate Timestamp Create Time 0.6
lastOpDate Timestamp Last Modification Time 0.6
attachedClusterUuids List The attached cluster UUIDs. 0.6

SDK Examples

Java SDK
QueryPrimaryStorageAction action = new QueryPrimaryStorageAction();
action.conditions = asList("uuid=56235f6bf5c24513bce99d4ec824c63f");
action.sessionId = "16f5568fa9aa48e79b3a3ed579787fd0";
QueryPrimaryStorageAction.Result res = action.call();
Python SDK
QueryPrimaryStorageAction action = QueryPrimaryStorageAction()
action.conditions = ["uuid=52f2459af9ce4c35a0c7de9c98aaebb0"]
action.sessionId = "ade5be353d114f948f976ae43d397815"
QueryPrimaryStorageAction.Result res = action.call()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center