QuerySoftwarePackage
Headers
Authorization: OAuth the-session-uuidCurl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/software-package?q=uuid=ff04e1736ec6391f9a1f023b524d0a00curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/software-package/dbe8d717b4f7335580774fabc403cc78Queryable Fields
Run the CLI command tool, enter QuerySoftwarePackage and press Tab to view all queryable fields and resource names that support cross-table queries.
API Response
Sample Response
{
"inventories": [
{
"uuid": "53c0433a817349f89f66532addeb8b6c",
"name": "SoftwarePackage",
"hostUuid": "53c0433a817349f89f66532addeb8b61",
"managementNodeUuid": "53c0433a817349f89f66532addeb8b62",
"installPath": "/root/file/ZStone-common-installer-5.4.18-1932.tar.gz",
"unzipInstallPath": "/root/file/ZStone-common-installer-5.4.18-1932.tar.gz_2c1571fab770b5bab7f411d48aad5029_1762415407323/zstone-installer",
"type": "zstone",
"md5sum": "53c0433a817349f89f66532addeb8b63",
"status": "Uploaded",
"size": 1024,
"createDate": "Nov 14, 2017 2:20:57 PM",
"lastOpDate": "Nov 14, 2017 2:20:57 PM"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 4.10.20 | |
| inventories | List | See inventories. | 4.10.20 |
| error | ErrorCode | See error. | 4.10.20 |
inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 4.10.20 |
| name | String | The resource name. | 4.10.20 |
| hostUuid | String | The Host UUID. | 4.10.20 |
| managementNodeUuid | String | The Management Node UUID. | 4.10.20 |
| installPath | String | The installation path. | 4.10.20 |
| unzipInstallPath | String | The unzip installation path. | 4.10.20 |
| type | String | The installation package type. | 4.10.20 |
| md5sum | String | The installation package MD5 checksum value. | 4.10.20 |
| status | String | The installation package status. | 4.10.20 |
| size | long | The installation package size. | 4.10.20 |
| createDate | Timestamp | The creation date. | 4.10.20 |
| lastOpDate | Timestamp | The last operation date. | 4.10.20 |
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. | 0.6 |
| description | String | The brief description of the error. | 0.6 |
| details | String | The details about the error. | 0.6 |
| elaboration | String | Reserved field. Default value: null. | 0.6 |
| opaque | LinkedHashMap | Reserved field. Default value: null. | 0.6 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
SDK Sample
Java SDK
QuerySoftwarePackageAction action = new QuerySoftwarePackageAction();
action.conditions = asList("uuid=ff04e1736ec6391f9a1f023b524d0a00");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySoftwarePackageAction.Result res = action.call();Python SDK
action = QuerySoftwarePackageAction()
action.conditions = ["uuid=ff04e1736ec6391f9a1f023b524d0a00"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()