QueryCephPrimaryStorage

API Request

URLs
GET zstack/v1/primary-storage/ceph
GET zstack/v1/primary-storage/ceph/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 9b17423dbac84ff4ace2e0d5f4d9e0d2" \
-X GET http://localhost:8080/zstack/v1/primary-storage/ceph?q=uuid=c7b3cbd9ae3e44bb9536728191761cb3
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth c0e6df86e0b34164b3e0471d7b0cdcb4" \
-X GET http://localhost:8080/zstack/v1/primary-storage/ceph/1ffb7b09c405477b95563abfcad506a0

Queryable Fields

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

API Response

Sample Response
{
  "inventories": [
    {
      "name": "Ceph-1",
      "url": "not used",
      "type": "Ceph",
      "state": "Enabled",
      "status": "Connected",
      "attachedClusterUuids": [
        "1b70bb2e338f4a278b9efadda42ad26f"
      ]
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 0.6
inventories List See inventories. 0.6
#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. 0.6
description String The brief description of the error. 0.6
details String The details about the error. 0.6
elaboration String The reserved field. Default value: null. 0.6
opaque LinkedHashMap The reserved field. Default value: null. 0.6
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 0.6
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 0.6
zoneUuid String The zone UUID. 0.6
name String The resource name. 0.6
url String 0.6
description String The detailed description of the resource. 0.6
totalCapacity Long 0.6
availableCapacity Long 0.6
totalPhysicalCapacity Long 0.6
availablePhysicalCapacity Long 0.6
systemUsedCapacity Long 0.6
type String 0.6
state String 0.6
status String 0.6
mountPath String 0.6
createDate Timestamp The creation date. 0.6
lastOpDate Timestamp The last operation date. 0.6
attachedClusterUuids List 0.6

SDK Sample

Java SDK
QueryCephPrimaryStorageAction action = new QueryCephPrimaryStorageAction();
action.conditions = asList("uuid=d351d433b5974116a4c9649ef5b89e64");
action.sessionId = "172c3d6b977b4cbfbd401ace20ad0442";
QueryCephPrimaryStorageAction.Result res = action.call();
Python SDK
QueryCephPrimaryStorageAction action = QueryCephPrimaryStorageAction()
action.conditions = ["uuid=aa79df396a4943f8b9066c4d8057565d"]
action.sessionId = "0aca367c9e7946d29a63044684d5dd71"
QueryCephPrimaryStorageAction.Result res = action.call()