...
A new API getUploadParams to enable users to upload volume/template from a local or network file share. The API response has a POST URL to which the volume/template needs to be uploaded. This is available to regular and admin users of Cloudstack. The request and response parameters are described below (all required parameters are in bold font). Required parameters are marked with 'required', some of the parameters are exclusive for admin user and are marked 'admin only'.
- Request
- type: type of upload request. Possible values are volume or template : required
- name: the name of the volume/template : required
- format: the format of the volume/template to be uploaded. Possible values for volume include QCOW2, OVA and VHD. Possible values for template include QCOW2, RAW and VHD : required
- zoneid: the UUID of the zone the volume/template is associated to : required
- checksum: the MD5 checksum of volume/template to be uploaded. If specified this is used to validate the content of the uploaded volume/template for integrity.
- account: an optional account name. Must be used with 'domainid' parameter below.
- domainid: an optional domain to which the account belongs. If the account parameter is used, 'domainid' must also be used.
- projectid: the UUID of the project if the volume/template needs to be associated with one
- 'type' specified as volume
- imagestoreuuid: the UUID of the storage pool where the uploaded volume gets stored. This can be obtained using listImageStores API call (https://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listImageStores.html)
- diskofferingid: the UUID of the disk offering. This must be a custom disk offering as the volume size is not known before the actual upload. If not specified the default custom disk offering is used.
- 'type' specified as template
- displaytext: the display text of the template. This is used for setting a suitable name for display purposes. : required
- hypervisor: the target hypervisor for the template : required
- ostypeid: the UUID of the OS type that best represents the OS of this template : required
- bits: specifies if template supports 32 or 64 bit. Default is 64 bit.
- details: additional template details in key/value pairs
- isdynamicallyscalable: true if template contains XS/VMWare tools in order to support dynamic scaling of VM cpu/memory
- isextractable: true if the template or its derivatives are extractable. Default is false
- isfeatured: true if the template is a featured template, false otherwise
- ispublic: true if the template is available to all users. Default is true.
- isrouting: true if the template type is routing i.e. if template is used to deploy router : admin only
- passwordenabled: true if the template supports the password reset feature. Default is false.
- requireshvm: true if this template requires hardware assisted virtualization support
- sshkeyenabled: true if the template supports the sshkey upload feature. Default is false.
- templatetag: the tag for this template. Used to deploy VMs on hosts with this tag. : admin only
- Response
- uuid: Unique UUID to identify the template/volume. This is used to query the status of volume/template after successful completion of upload
- postURL: POST url to upload the file to; for e.g. "https://ssvmpublicip/upload/uuid".
- payload: encrypted data to be sent in the POST request. This is used to transfer some internal data required for upload
- expires: the timestamp after which the signature expires
- signature: signature is SHA1 key generated using PSK based on 'postURL', 'payload' and 'expires' in the response. This is used to validate that the actual POST request to upload data is a genuine one
...