Image Storage Related InterfacesImage Related Interfaces

Update Image Package

PUT/zstack/v1/image-packages/{uuid}

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateImagePackage": {
    "name": "ova-update",
    "description": "description-update"
  },
  "systemTags": [],
  "userTags": []
}

In the above example, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/image-packages/eeed157556d2328c9c3aeec71ab75463

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlResource UUID, uniquely identifies the resource 4.4.6
name (Optional)Stringbody (contained in updateImagePackage structure)Resource name 4.4.6
description (Optional)Stringbody (contained in updateImagePackage structure)Detailed description of the resource 4.4.6
systemTags (Optional)ListbodySystem Tags 4.4.6
userTags (Optional)ListbodyUser Tags 4.4.6

API Response

Response Example

{
  "inventory": {
    "uuid": "ecdea1f236a13e74a5712edabb4cfe9e",
    "name": "ova",
    "description": "description",
    "vmUuid": "21c4183acbf737128aba034313e1f909",
    "backupStorageUuid": "99630920a09138ab93823380286efc57",
    "state": "Exported",
    "exportUrl": "http://bs-host-name/path/to/ova.ova",
    "md5Sum": "sampleMd5Sum",
    "format": "OVA",
    "size": 10737418240.0,
    "createDate": "May 10, 2022 5:27:16 AM",
    "lastOpDate": "May 10, 2022 5:27:16 AM"
  }
}
NameTypeDescriptionStarting Version
successboolean 4.4.6
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error4.4.6
inventoryImagePackageInventorySee inventory4.4.6

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier for the error, for example SYS.1000, HOST.10014.4.6
descriptionStringBrief description of the error4.4.6
detailsStringDetailed error information4.4.6
elaborationStringReserved field, defaults to null4.4.6
opaqueLinkedHashMapReserved field, defaults to null4.4.6
causeErrorCodeRoot cause. The source error that triggered the current error. This field is null if there is no original error4.4.6

inventory

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource4.4.6
nameStringResource name4.4.6
descriptionStringDetailed description of the resource4.4.6
vmUuidStringSource VM UUID4.4.6
backupStorageUuidStringImage Storage UUID where the Image Package file is located4.4.6
exportUrlStringDownload URL4.4.6
md5SumStringImage Package file MD5 checksum4.4.6
formatStringImage Package file format4.4.6
sizeLongImage Package file size4.4.6
createDateTimestampCreation time4.4.6
lastOpDateTimestampLast modification time4.4.6
stateImagePackageStateSee state4.4.6

state

NameTypeDescriptionStarting Version
ExportingImagePackageStateExporting4.4.6
ExportedImagePackageStateExported4.4.6

SDK Examples

Java SDK

QueryImagePackageAction action = new QueryImagePackageAction();
action.conditions = asList("uuid=5319396fe8f0393d998ac6c0939e780e");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryImagePackageAction.Result res = action.call();

Python SDK

QueryImagePackageAction action = QueryImagePackageAction()
action.conditions = ["uuid=99435bfd7903372289db27c8a2b1038c"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryImagePackageAction.Result res = action.call()