Document navigation

QueryVmCdRom

API Request

URLs
GET zstack/v1/vm-instances/cdroms
GET zstack/v1/vm-instances/cdroms/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm-instances/cdroms?q=name=cd-1
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm-instances/cdroms/cd0360ac748b3983897eb41913e97a6b

Query Fields

Run the CLI command, enter QueryVmCdRom and press Tab to view all queryable fields and resources that can be queried across tables.

API Response

Response Example
{
  "inventories": [
    {
      "uuid": "68d090e26a0539f9b1b5d37229ee97de",
      "deviceId": 0,
      "isoUuid": "539acd1389523fb9ab243096d9842a05",
      "name": "cd-1",
      "description": "desc",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 0.6
error ErrorCode Error code. If not null, the operation failed. When the operation succeeds, this field is null. For details, see error 3.3.0
inventories List For details, see inventories 3.3.0
#error
Name Type Description Starting Version
code String Error code number, a globally unique identifier of the error, for example SYS.1000, HOST.1001 3.3.0
description String Brief description of the error 3.3.0
details String Detailed error information 3.3.0
elaboration String Reserved field, defaults to null 3.3.0
opaque LinkedHashMap Reserved field, defaults to null 3.3.0
cause ErrorCode Root cause. The error that triggered the current error. If there is no original error, this field is null 3.3.0
#inventories
Name Type Description Starting Version
uuid String Resource UUID, uniquely identifies the resource 3.3.0
vmInstanceUuid String Virtual Machine UUID 3.3.0
deviceId Integer CD-ROM device number 3.3.0
isoUuid String ISO Image UUID 3.3.0
isoInstallPath String ISO image mount path 3.3.0
name String Resource name 3.3.0
description String Resource description 3.3.0
createDate Timestamp Create time 3.3.0
lastOpDate Timestamp Last update time 3.3.0

SDK Examples

Java SDK
QueryVmCdRomAction action = new QueryVmCdRomAction();
action.conditions = asList("name=cd-1");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryVmCdRomAction.Result res = action.call();
Python SDK
QueryVmCdRomAction action = QueryVmCdRomAction()
action.conditions = ["name=cd-1"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryVmCdRomAction.Result res = action.call()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center