QuerySoftwarePackage

GET/zstack/v1/software-package
GET/zstack/v1/software-package/{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/software-package?q=uuid=ff04e1736ec6391f9a1f023b524d0a00
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/software-package/dbe8d717b4f7335580774fabc403cc78

Queryable 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"
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 4.10.20
inventoriesListSee inventories.4.10.20
errorErrorCodeSee error.4.10.20

inventories

NameTypeDescriptionStarting Version
uuidStringThe resource UUID.4.10.20
nameStringThe resource name.4.10.20
hostUuidStringThe Host UUID.4.10.20
managementNodeUuidStringThe Management Node UUID.4.10.20
installPathStringThe installation path.4.10.20
unzipInstallPathStringThe unzip installation path.4.10.20
typeStringThe installation package type.4.10.20
md5sumStringThe installation package MD5 checksum value.4.10.20
statusStringThe installation package status.4.10.20
sizelongThe installation package size.4.10.20
createDateTimestampThe creation date.4.10.20
lastOpDateTimestampThe last operation date.4.10.20

error

NameTypeDescriptionStarting Version
codeStringThe error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.0.6
descriptionStringThe brief description of the error.0.6
detailsStringThe details about the error.0.6
elaborationStringReserved field. Default value: null.0.6
opaqueLinkedHashMapReserved field. Default value: null.0.6
causeErrorCodeThe 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()