Disk

Entity

Disk

Disk resource:

Field

Explanation

status

disk status

add_to_linux_fstab

add to linux fstab

mount_point

disk mount point

locked

is locked

data_store_group_id

data store group id

data_store_id

data store id

created_at

date of creation

updated_at

date of update

is_swap

is swap

autobackup

has automatic bk

error

has error

disk_size

disk size

virtual_machine_id

vm identifier

id

disk identifier

Disk_list resource:

[disk resource 1, disk resource 2, …]

Operations

Delete disk

Method

DELETE

Url

/account/<account_id>/disk/<disk_id>

Success Code

202

Returned Data

No data returned

Has Token

Yes

Remove a disk.

Curl example

curl -i -X DELETE https://api.gigas.com/account/ACCOUNT_ID/disk/DISK_ID -H "Authorization: $TOKEN" -H "Content-Type: application/json"

Warning

data in this disk will be erased.

Edit disk

Method

PUT

Url

/account/<account_id>/disk/<disk_id>

Success Code

200/202

Returned Data

Disk resource

Has Token

Yes

Change disk parameters. Some of the options will require a reboot of the virtual machine to which it is attached.

Parameters:

  • disk_size: The disk space in GB

  • virtual_machine_id: the id of virtual machine to attach the disk

  • autobackup: active the autocreation of backup

  • mount_point: a physical location in the partition used as a root filesystem

  • add_to_linux_fstab: set true to add

  • autobackup: set to 1 to activate autobackup; otherwise set to 0

  • force_reboot: whether force reboot or not

Get disk

Method

GET

Url

/account/<account_id>/disk/<disk_id>

Success Code

200

Returned Data

Disk resource

Has Token

No

Get a precise disk.

Build disk

Method

POST

Url

/account/<account_id>/disk/<disk_id>/build

Success Code

202

Returned Data

Disk resource

Has Token

Yes

Format disk.

List disks

Method

GET

Url

/account/<account_id>/disks

Success Code

200

Returned Data

Disk List resource

Has Token

No

List user’s disks.

Filters:

  • data_store_id: The ID of a data store where disks are located

  • virtual_machine_id: ID of the VM mounting the disk

  • is_swap: filters disk used as swap

  • mount_point: filters disk based on mount point containing the string

  • data_store_group_id

  • primary

Get backups from disk

Method

GET

Url

/account/<account_id>/disk/<disk_id>/backups

Success Code

200

Returned Data

backup list resource

Has Token

No

List all the backups created from target disk.

Filters:

  • min_disk_size

Curl example

curl -i -X GET https://api.gigas.com/account/ACCOUNT_ID/disk/DISK_ID/backups -H "Authorization: $TOKEN" -H "Content-Type: application/json"

Create backup

Method

POST

Url

/account/<account_id>/disk/<disk_id>/backup

Success Code

202

Returned Data

Backup resource

Has Token

Yes

Create a backup from a disk.

Curl example

curl -i -X POST https://api.gigas.com/account/ACCOUNT_ID/disk/DISK_ID/backup -H "Authorization: $TOKEN" -H "Content-Type: application/json"

Create template

Method

POST

Url

/account/<account_id>/disk/<disk_id>/template

Success Code

202

Returned Data

Backup resource

Has Token

Yes

Create a template from a disk.

Mandatory parameters:

  • label

  • console_id