Query Mini Storage Host Reference
Headers
Authorization: OAuth the-session-uuidCurl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/mini/host-refscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/mini/{primaryStorageUuid}/host-refsQueryable Fields
Run the CLI command utility, enter QueryMiniStorageHostRef and press Tab to view all queryable fields and resource names that support cross-table queries.
API Response
Response Example
{
"inventories": [
{
"primaryStorageUuid": "54ca847d448537108e580878e9a496b5",
"hostUuid": "f4b47ca5b95a3611a6798288792af2da",
"totalCapacity": 1073741824,
"availableCapacity": 1073741824,
"totalPhysicalCapacity": 1073741824,
"availablePhysicalCapacity": 1073741824,
"status": "Connected",
"createDate": "Nov 14, 2017 2:20:57 PM",
"lastOpDate": "Nov 14, 2017 2:20:57 PM"
},
{
"primaryStorageUuid": "a720d914f25933799f28409f3ca70ed6",
"hostUuid": "9a1c9e0f25eb35d5ab24bbb356b2111d",
"totalCapacity": 1073741824,
"availableCapacity": 1073741824,
"totalPhysicalCapacity": 1073741824,
"availablePhysicalCapacity": 1073741824,
"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 | 0.6 | |
| 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 |
|---|---|---|---|
| primaryStorageUuid | String | Primary Storage UUID | 0.6 |
| hostUuid | String | Host UUID | 0.6 |
| totalCapacity | Long | 0.6 | |
| availableCapacity | Long | 0.6 | |
| totalPhysicalCapacity | Long | 0.6 | |
| availablePhysicalCapacity | Long | 0.6 | |
| createDate | Timestamp | Create Time | 0.6 |
| lastOpDate | Timestamp | Last Modification Time | 0.6 |
| status | PrimaryStorageHostStatus | See status | 0.6 |
status
| Name | Type | Description | Starting Version |
|---|---|---|---|
| name | String | Resource Name | 0.6 |
| ordinal | int | 0.6 |
SDK Examples
Java SDK
QueryMiniStorageHostRefAction action = new QueryMiniStorageHostRefAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryMiniStorageHostRefAction.Result res = action.call();Python SDK
QueryMiniStorageHostRefAction action = QueryMiniStorageHostRefAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryMiniStorageHostRefAction.Result res = action.call()