QueryMiniStorage
API Request
URLs
GET zstack/v1/primary-storage/mini
GET zstack/v1/primary-storage/mini/{uuid}Headers
Authorization: OAuth the-session-uuidCurl Examples
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/minicurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/mini/02ad1f188ca93f4596ad540b2f5b6c7eQueryable 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"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | Whether the operation succeeded. | 0.6 |
| error | ErrorCode | Error code. If not null, indicates the operation failed. This field is null when the operation succeeds. For details, see error | 0.6 |
| inventories | List | For details, see inventories | 0.6 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier for the error, such as 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 triggered the current error. If there is no original error, this field is null | 0.6 |
#inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| diskIdentifier | String | The disk identifier. | 0.6 |
| 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 | Detailed description of the resource | 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 | Creation time | 0.6 |
| lastOpDate | Timestamp | Last modification time | 0.6 |
| attachedClusterUuids | List | The attached cluster UUIDs. | 0.6 |
| miniStorageType | MiniStorageType | For details, see miniStorageType | 0.6 |
#miniStorageType
| Name | Type | Description | Starting Version |
|---|---|---|---|
| Basic | MiniStorageType | The Basic value. | 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()