Skip to content

storage post create

Marco-Garro edited this page Dec 30, 2024 · 3 revisions

POST /api/v1.0/create

Create a disk on the cloud provider.

Request

Headers

Header Value
content-type application/json

Body

{
  "creatorID": "ffffffff-ffff-ffff-ffff-ffffffffffff",
  "name": "cool_volume",
  "private": false,
  "readonly": false,
  "shareable": false,
  "bootable": true,
  "size": 10
}

Body Attributes

creatorID

Type: string
Description:
The uuid4 that identifies the client.

name

Type: string
Description:
The name of the volume given by the client.

private

Type: boolean
Description:
Whether the volume is private or public.

readonly

Type: boolean
Description:
Whether the volume is read-only.

shareable

Type: boolean
Description:
Whether the volume is shareable between more machines.

bootable

Type: boolean
Description:
Whether the volume is bootable.

size

Type: integer
Description:
The size of the volume in GB.

Response

Brief description.

Headers

Header Value
content-type application/json

NOTE: The async header is optional. If set to true, the request will be processed asynchronously and the response will contain a poolingURL with the URL to check the status of the request. If set to false, the request will be processed synchronously and the response will contain the result of the request.

Body

Synchronous Response

{
  "creatorID": "ffffffff-ffff-ffff-ffff-ffffffffffff",
  "name": "volume",
  "private": false,
  "bootable": true,
  "readonly": false,
  "shareable": false,
  "size": 100,
  "vid": "ffffffff-ffff-ffff-ffff-ffffffffffff"
}

Body Attributes

The response is the same as the request with the addition of the following attribute:

vid

Type: string
Description:
The uuid4 that identifies the volume.

Async Response

{
  "vid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
  "poolingURL": "https://<meson_ip>:7772/api/v1.0/running/<vid>"
}

Body Attributes

vm_uid

Type: string
Description:
The unique identifier of the volume on the cloud provider.

poolingURL

Type: string
Description:
The URL to check the status of the request.

Clone this wiki locally