Init a volume

POST /volumes/initialize PUT /volumes/uploadfinish

Intialize a volume

Initialize with a remote source

Request:

POST /volumes/initialize HTTP/1.1
Content-Type: application/json

{
  "Volume": [
    {
      "Name": "vol1",
      "Source": "https://raw.githubusercontent.com/hyperhq/hypercli/master/README.md"
    }
  ]
}

Response:

HTTP/1.1 200 OK

JSON Parameters:

  • Name - The name of volume to be initialized.

  • Source - Source to be used to initialize the volume.

Status Codes:

  • 200 - no error

  • 400 - bad request

Initialize with a local source

Initializing a volume with local source is devided into three steps:

  1. Ask to initialize

  2. Upload data

  3. Finish initialize

Ask to initialize

Request:

Response:

After receiving HTTP OK, you have at most 30 minutes to upload your data to destination http://0.1.2.3/data0, using the provided cookie in application/x-tar format.

Upload data

Request:

Query Parameters:

  • cookie: must match the cookie as returned in volume initialize response.

Response:

Finish initialize

Request:

Query Parameters:

  • Session: must match the session as returned in volume initialize response.

Response:

Status Codes:

  • 200 - no error

  • 400 - bad request

Last updated