跳转到主要内容
资源中心/云资源池/云盘相关接口
GETVolume Operations起始版本 0.6同步需要认证

查询云盘

查询云盘

调试可用性

在线调试

使用当前认证信息和示例参数提交 Mock 请求。

请求参数

此接口无需请求参数。

响应状态

200 OK

该 API 成功时返回以下响应结构。

  • errorErrorCode必填

    错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error

    • codeString必填

      错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001

    • descriptionString必填

      错误的概要描述

    • detailsString必填

      错误的详细信息

    • elaborationString必填

      保留字段,默认为null

    • opaqueLinkedHashMap必填

      保留字段,默认为null

    • causeErrorCode必填

      根错误,引发当前错误的源错误,若无原错误,该字段为null

  • inventoriesList必填

    详情参考inventories

    • uuidString必填

      资源的UUID,唯一标示该资源

    • nameString必填

      资源名称

    • descriptionString必填

      资源的详细描述

    • primaryStorageUuidString必填

      主存储UUID

    • vmInstanceUuidString必填

      云主机UUID

    • diskOfferingUuidString必填

      云盘规格UUID

    • rootImageUuidString必填

      根镜像UUID。

    • installPathString必填

      安装路径。

    • typeString必填

      类型。

    • formatString必填

      数据格式或导出格式。

    • sizeLong必填

      返回记录数。

    • actualSizeLong必填

      实际大小。

    • deviceIdInteger必填

      设备ID。

    • stateString必填

      当前状态。

    • statusString必填

      状态信息。

    • createDateTimestamp必填

      创建时间

    • lastOpDateTimestamp必填

      最后一次修改时间

    • isShareableBoolean必填

      是否可分享。

请求地址

GET/zstack/v1/volumes

/zstack/v1/volumes

操作 ID

QueryVolume

永久链接

请求示例

curl -X GET 'http://{host}/zstack/v1/volumes' -H 'Authorization: OAuth {sessionUuid}'

响应示例

200
{ "inventories": [ { "uuid": "b289ce8ac3874e88b4d4ce5cc4fc4c6e", "name": "test-volume", "primaryStorageUuid": "8749501379364105ba214227fc79578f", "vmInstanceUuid": "4cf370ed63bb43f99d88755b87f722c1", "diskOfferingUuid": "9e4d1d1a0e1a483da86eac0ab99c96ce", "rootImageUuid": "0116e6093d80474693ddac2e670122e4", "installPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-b289ce8ac3874e88b4d4ce5cc4fc4c6e/b289ce8ac3874e88b4d4ce5cc4fc4c6e.qcow2", "type": "Root", "format": "qcow2", "size": 1.073741824E11, "actualSize": 2.147483648E10, "deviceId": 0.0, "state": "Enabled", "status": "Ready", "createDate": "Jun 7, 2017 9:20:25 PM", "lastOpDate": "Jun 7, 2017 9:20:25 PM" } ] }

变更历史

此 API 暂无变更历史记录。

查看全部变更历史