Document navigation

QueryExponBlockVolume

API Request

URLs
GET zstack/v1/expon/block-volumes
GET zstack/v1/expon/block-volumes/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/expon/block-volumes?q=uuid=xxx&q=name=xxx
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/expon/block-volumes/57dcd9124665304191c221331ee95e6b

Queryable Fields

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

API Response

Sample Response
{
    "inventories": [
        {
            "actualSize": 1406140416,
            "createDate": "Apr 22, 2024 5:01:23 PM",
            "deviceId": 1,
            "exponStatus": "normal",
            "format": "raw",
            "installPath": "expon://pool/55e7b5f5a19e42d6996108a09c0ce22e",
            "isShareable": true,
            "iscsiPath": "iscsi://3260/",
            "lastAttachDate": "Apr 24, 2024 5:49:11 PM",
            "lastDetachDate": "Apr 22, 2024 5:04:15 PM",
            "lastOpDate": "Apr 24, 2024 5:49:11 PM",
            "lastVmInstanceUuid": "ce585c3170c646779c4827e06895d3e2",
            "name": "aaa444dd",
            "primaryStorageUuid": "173d49a118384c00a7d7ebf9815e54e2",
            "protocol": "iSCSI",
            "size": 4294967296,
            "state": "Enabled",
            "status": "Ready",
            "type": "Data",
            "uuid": "150c1b4cce834d0485df7f686a18b34f",
            "vendor": "expon"
        },
        {
            "actualSize": 0,
            "createDate": "Apr 15, 2024 10:04:55 AM",
            "exponStatus": "normal",
            "format": "raw",
            "installPath": "expon://pool/1af65a9e30ef45489a0c545f1aa48c8e",
            "isShareable": true,
            "iscsiPath": "iscsi://3260/",
            "lastAttachDate": "Apr 17, 2024 1:06:07 PM",
            "lastDetachDate": "Apr 17, 2024 1:14:24 PM",
            "lastOpDate": "Apr 17, 2024 1:54:21 PM",
            "lastVmInstanceUuid": "c1d98d17677248dd958ece943401b603",
            "name": "sfa",
            "primaryStorageUuid": "173d49a118384c00a7d7ebf9815e54e2",
            "protocol": "iSCSI",
            "size": 4294967296,
            "state": "Enabled",
            "status": "Ready",
            "type": "Data",
            "uuid": "1c29001448e64a98a5c8efd264a62f2b",
            "vendor": "expon"
        }
Name Type Description Starting Version
success boolean 5.1.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.1.0
inventories List See inventories. 5.1.0
#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. 5.1.0
description String The brief description of the error. 5.1.0
details String The details about the error. 5.1.0
elaboration String The reserved field. Default value: null. 5.1.0
opaque LinkedHashMap The reserved field. Default value: null. 5.1.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 5.1.0
#inventories
Name Type Description Starting Version
actualSize Long The actual size. 5.1.0
createDate String The creation time. 5.1.0
deviceId integer The device ID. 5.1.0
exponStatus String The expon status. 5.1.0
format String The format. 5.1.0
InstallPath String The installation path. 5.1.0
isShareable Boolean Whether the block volume is sharable. 5.1.0
iscsiPath String The ISCSI path. 5.1.0
lastAttachDate Timestamp The last attachment time. 5.1.0
lastDetachDate Timestamp The last detachment time. 5.1.0
lastVmInstanceUuid String The UUID of the instance which the block volume was attached to last time. 5.1.0
name String The resource name. 5.1.0
primaryStorageUuid String The primary storage UUID. 5.1.0
protocol String The protocol. 5.1.0
size Long The block volume size. 5.1.0
state String Whether the block volume is enabled. 5.1.0
status String Whether the block volume is ready. 5.1.0
type String The type. 5.1.0
uuid String The resource UUID. 5.1.0
vendor String The vendor. 5.1.0

SDK Sample

Java SDK
QueryXskyBlockVolumeAction action = new QueryXskyBlockVolumeAction();
action.conditions = asList("uuid=xxx","name=xxx");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryXskyBlockVolumeAction.Result res = action.call();
Python SDK
QueryXskyBlockVolumeAction action = QueryXskyBlockVolumeAction()
action.conditions = ["uuid=xxx","name=xxx"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryXskyBlockVolumeAction.Result res = action.call()
API Reference | 5.5.30 | ZStack Cloud · ZCF | ZStack Resource Center