Query Mini Storage

GET/zstack/v1/primary-storage/mini
GET/zstack/v1/primary-storage/mini/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Examples

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/mini
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/mini/02ad1f188ca93f4596ad540b2f5b6c7e

Queryable Fields

Run the CLI command tool, enter QueryMiniStorage and press Tab to view all queryable fields and resource names that support cross-table queries.

API Response

Response Example

{
  "inventories": [
    {
      "miniStorageType": "Basic",
      "uuid": "aa25b07260403bbba2987e8421fedd1a",
      "name": "test primary storage",
      "description": "test primary storage description",
      "availableCapacity": 1073741824,
      "availablePhysicalCapacity": 1073741824,
      "type": "MiniStorage",
      "state": "Enabled",
      "status": "Connected",
      "createDate": "Nov 14, 2017 2:20:57 PM",
      "lastOpDate": "Nov 14, 2017 2:20:57 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, indicates the operation failed. This field is null when the operation succeeds. For details, see error0.6
inventoriesListFor details, see inventories0.6

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier for the error, such as SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot cause. The source error that triggered the current error. If there is no original error, this field is null0.6

inventories

NameTypeDescriptionStarting Version
diskIdentifierString 0.6
uuidStringResource UUID, uniquely identifies the resource0.6
zoneUuidStringData Center UUID0.6
nameStringResource name0.6
urlString 0.6
descriptionStringDetailed description of the resource0.6
totalCapacityLong 0.6
availableCapacityLong 0.6
totalPhysicalCapacityLong 0.6
availablePhysicalCapacityLong 0.6
systemUsedCapacityLong 0.6
typeString 0.6
stateString 0.6
statusString 0.6
mountPathString 0.6
createDateTimestampCreation time0.6
lastOpDateTimestampLast modification time0.6
attachedClusterUuidsList 0.6
miniStorageTypeMiniStorageTypeFor details, see miniStorageType0.6

miniStorageType

NameTypeDescriptionStarting Version
BasicMiniStorageType 0.6

SDK Examples

Java SDK

QueryMiniStorageAction action = new QueryMiniStorageAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryMiniStorageAction.Result res = action.call();

Python SDK

QueryMiniStorageAction action = QueryMiniStorageAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryMiniStorageAction.Result res = action.call()