Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • As can be seen from the description of 'signature' above, the user should't tamper with the values of postURL, metadata, expires while making the POST request. Otherwise it would result in an upfront failure during POST request.
  • Request: (this is a POST request)
    • Custom HEADER field to be sent
      • X-metadata: encrypted data returned from getUploadParams API call: required
    • file: the location of the template/volume to be posted as multipart/form-data: required
      • X-signature: signature returned from getUploadParams API call: required
      • X-expires: expires returned from getUploadParams API call: required
    • request parameters
      • file: the location of the template/volume to be posted as multipart/form-data: required
  • Response:
    • '200 OK' on successful upload
    • '401 authorization error' incase 400 Bad Request' if any fields are empty or the signature key validation or any other validation failedvalidation failed or the request expired or metadata cannot be decoded or the post request is already used
    • '500 internal server error' incase the file upload fails with clear error message'409 conflict' incase there is already another upload with same params in-progress/success/errordue to some runtime exception
Volume upload request

curl -X POST "https://1-2-3-4.xyz.com/upload/C7D351D2-F167-4CC8-A9FF-3BECB0A625C4" -F "file=@volume.vhd" -F "signature=-3BECB0A625C4"  -H "X-signature:de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9" -F H "X-metadata=:TKPFeuz2nHmE/kcREEu24mnj1MrLdzOeJIHXR9HLIGgk56bkRJHaD0RRL2lds1rKKhrro4/PuleEh4YhRinhxaAmPpU4e55eprG8gTCX0ItyFAtlZViVdKXMew5Dfp4Qg8W9I1/IsDJd2Kas9/ftDQLiemAlPt0uS7Ou6asOCpifnBaKvhM4UGEjHSnni1KhBzjgEyDW3Y42HKJSSv58Sgmxl9LCewBX8vtn9tXKr+j4afj7Jlh7DFhyo9HOPC5ogR4hPBKqP7xF9tHxAyq6YqfBzsng3Xwe+Pb8TU1kFHg1l2DM4tY6ooW2h8lOhWUkrJu4hOAOeTeRtCjW3H452NKoeA1M8pKWuqMo5zRMti2u2hNZs0YY2yOy8oWMMG+lG0hvIlajqEU=" -F H "X-expires=2014-10-17T12:00:00+0530" -F "file=@volume.vhd" -v

Volume response

200 OK

upload successful.

Template upload request

curl -X POST "https://1-2-3-4.xyz.com/upload/DD0A9FC6-C17E-4180-963C-870B9D03A80A"  -F "file=@templatelocation.vhd" -F "signature=H "X-signature:de7c9b85b8b78aa6bc8a7a36f70a90701c9db4d9" -F H "X-metadata=:TKPFeuz2nHmE/kcREEu24mnj1MrLdzOeJIHXR9HLIGgk56bkRJHaD0RRL2lds1rKKhrro4/PuleEh4YhRinhxaAmPpU4e55eprG8gTCX0ItyFAtlZViVdKXMew5Dfp4Qg8W9I1/IsDJd2Kas9/ftDQLiemAlPt0uS7Ou6asOCpifnBaKvhM4UGEjHSnni1KhBzjgEyDW3Y42HKJSSv58Sgmxl9LCewBX8vtn9tXKr+j4afj7Jlh7DFhyo9HOPC5ogR4hPBKqP7xF9tHxAyq6YqfBzsng3Xwe+Pb8TU1kFHg1l2DM4tY6ooW2h8lOhWUkrJu4hOAOeTeRtCjW3H452NKoeA1M8pKWuqMo5zRMti2u2hNZs0YY2yOy8oWMMG+lG0hvIlajqEU=" -F H "X-expires=2014-10-17T12:00:00+0530" -F "file=@templatelocation.vhd" -v

Template response

200 OK

 upload successful.

Query status of uploaded template/volume

...

  • Global configuration to limit the max upload size of template/volume - upload.post.max.size
  • hidden configuration to save sha1 PSK on the management server - upload.post.psksecret.key
  • management server upload polling interval and polling timeout - upload.postmonitoring.interval, upload.postoperation.timeout
  • time interval at which the GC or cleanup thread should run - upload.post.gc.interval

...