Volumes

volumes

Methods

Change Volume Type -> { id, attachments, bootable, 19 more... }
post/v1/volumes/{project_id}/{region_id}/{volume_id}/retype

Initiate volume type change

Create Volume -> { tasks }
post/v1/volumes/{project_id}/{region_id}

Create volume

Delete Volume -> { tasks }
delete/v1/volumes/{project_id}/{region_id}/{volume_id}

Delete volume

Extend Volume -> { tasks }
post/v1/volumes/{project_id}/{region_id}/{volume_id}/extend

Extend volume

List Volumes -> OffsetPage<{ id, attachments, bootable, 19 more... }>
get/v1/volumes/{project_id}/{region_id}

List volumes

Parameters
project_id: number
region_id: number
bootable: boolean
Optional

Filter by a bootable field

cluster_id: string
Optional

Can be used to only show volumes of a specific k8s cluster

has_attachments: boolean
Optional

Filter by the presence of attachments

id_part: string
Optional

Filter the volume list result by the ID part of the volume

instance_id: string
Optional

Can be used to only show volumes of a specific instance

limit: number
Optional

Limit the number of returned volumes

metadata_k: string
Optional

Filter by metadata keyss. Must be a valid JSON string. curl -G --data-urlencode "metadata_k=["key1", "key2"]" --url "http://localhost:1111/v1/volumes/1/1"

metadata_kv: string
Optional

Filter by metadata key-value pairs. Must be a valid JSON string. curl -G --data-urlencode "metadata_kv={"key": "value"}" --url "http://localhost:1111/v1/volumes/1/1"

name_part: string
Optional

Filter out volumes by name_part inclusion in volume name. Any substring can be used and volumes will be returned with names containing the substring. Example: "test".

offset: number
Optional

Offset value is used to exclude the first set of records from the result

Response fields
count: number
Optional

Number of objects

results: Array<{ id, attachments, bootable, 19 more... }>
Optional

Objects

Request example
200Example
Rename Volume ->
patch/v1/volumes/{project_id}/{region_id}/{volume_id}

Rename volume

Get Volume ->
get/v1/volumes/{project_id}/{region_id}/{volume_id}

Get volume

Revert Volume To It S Last Snapshot -> { tasks }
post/v1/volumes/{project_id}/{region_id}/{volume_id}/revert

Revert volume to it's last snapshot

Domain types

Volume = { id, bootable, created_at, 17 more... }
Volumes

Attach

volumes.attach

Methods

Deprecated Attach Volume ->
post/v1/volumes/{project_id}/{region_id}/{volume_id}/attach

Attach the volume to instance. Note: ultra volume can only be attached to an instance with shared flavor

Attach Volume V2 -> { tasks }
post/v2/volumes/{project_id}/{region_id}/{volume_id}/attach

Attach the volume to instance. Note: ultra volume can only be attached to an instance with shared flavor

Domain types

AttachVolumeToInstance = { instance_id, attachment_tag }

Attach volume to instance schema

Volumes

Detach

volumes.detach

Methods

Deprecated Detach Volume ->
post/v1/volumes/{project_id}/{region_id}/{volume_id}/detach

Detach the volume from instance

Detach Volume V2 -> { tasks }
post/v2/volumes/{project_id}/{region_id}/{volume_id}/detach

Detach the volume from instance

Domain types

InstanceID = { instance_id }
Volumes

Metadata

volumes.metadata

Methods

Create Or Update Volume Metadata ->
post/v1/volumes/{project_id}/{region_id}/{volume_id}/metadata

Create or update one or more metadata items for a volume. If an item does not exist, it gets created. If an item already exists, it's value is overwritten

List Volume Metadata -> { count, results }
get/v1/volumes/{project_id}/{region_id}/{volume_id}/metadata

List all metadata for a volume

Replace Volume Metadata ->
put/v1/volumes/{project_id}/{region_id}/{volume_id}/metadata

All existing metadata is deleted and replaced with the metadata from the request.

Volumes

Metadata Item

volumes.metadata_item

Methods

Delete Volume Metadata Item By Key ->
delete/v1/volumes/{project_id}/{region_id}/{volume_id}/metadata_item

Delete volume metadata item by key

Get Volume Metadata Item By Key -> { key, read_only, value }
get/v1/volumes/{project_id}/{region_id}/{volume_id}/metadata_item

Get volume metadata item by key