Skip to main content

Volumes

Volumes of the project​

GET /volumes

Parameters​

NameInTypeRequiredDescription
pagequeryintegerNo(minimum 1, default 1)
per_pagequeryintegerNo(minimum 1, maximum 100, default 25)
namequerystringNoExact name (maximum length 64)
label_selectorquerystringNokey, !key, key==v, key=v, key!=v, key in (a,b), key notin (a,b); comma-separated (and) (maximum length 1024)
sortquerystringNo<field>:asc|desc; fields id, name, created; default created:desc (pattern ^(id|name|created):(asc|desc)$)
qquerystringNoEvery word must match, in any case: part of the name, or label:key, label:key=value (minimum length 2, maximum length 100)
statusquerycreating, availableNo

Responses​

StatusDescription
200Volumes
401No valid API key
403The key's scope or the organization's subscription does not allow the request (forbidden), or a quota is exhausted (resource_limit_exceeded)
422A field is missing or malformed (invalid_input, details.fields) or an Idempotency-Key was reused with a different request (idempotency_key_mismatch)
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
volumesarray of VolumeYes
metaMetaYes

Create a volume​

POST /volumes

Counts against the volume quota. Either location or server is given.

Parameters​

NameInTypeRequiredDescription
Idempotency-KeyheaderstringNo16-128 visible ASCII characters; the first response is replayed for 24 hours (pattern ^[\x21-\x7e]{16,128}$)

Request body​

FieldTypeRequiredDescription
namestringYes1-64 printable characters without @ (minimum length 1, maximum length 64)
size_gbintegerYes(minimum 10, maximum 10000)
locationReferenceNo
serverReferenceNo
automountbooleanNo(default false)
formatext4, xfsNo
labelsmap of stringNoAt most 32 keys; keys and values of 1-63 (values may be empty) letters, digits, ., _, -, starting and ending with a letter or digit

Responses​

StatusDescription
201The volume (creating), its action and the attach action when a server was given
401No valid API key
403The key's scope or the organization's subscription does not allow the request (forbidden), or a quota is exhausted (resource_limit_exceeded)
409The request conflicts with the resource's state (conflict) or an Idempotency-Key is still being processed (idempotency_in_progress)
422A field is missing or malformed (invalid_input, details.fields) or an Idempotency-Key was reused with a different request (idempotency_key_mismatch)
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
volumeVolumeYes
actionActionYes
next_actionsarray of ActionYes

One volume​

GET /volumes/{id}

Parameters​

NameInTypeRequiredDescription
idpathstring (uuid)Yes

Responses​

StatusDescription
200The volume
401No valid API key
404No such resource in this project
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
volumeVolumeYes

Rename or relabel a volume​

PUT /volumes/{id}

Parameters​

NameInTypeRequiredDescription
idpathstring (uuid)Yes

Request body​

FieldTypeRequiredDescription
namestringNo1-64 printable characters without @ (minimum length 1, maximum length 64)
labelsmap of stringNoAt most 32 keys; keys and values of 1-63 (values may be empty) letters, digits, ., _, -, starting and ending with a letter or digit

Responses​

StatusDescription
200The volume
401No valid API key
403The key's scope or the organization's subscription does not allow the request (forbidden), or a quota is exhausted (resource_limit_exceeded)
404No such resource in this project
409The request conflicts with the resource's state (conflict) or an Idempotency-Key is still being processed (idempotency_in_progress)
422A field is missing or malformed (invalid_input, details.fields) or an Idempotency-Key was reused with a different request (idempotency_key_mismatch)
423The resource has a running action
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
volumeVolumeYes

Delete a volume​

DELETE /volumes/{id}

Refused while attached or while protection.delete is on (409).

Parameters​

NameInTypeRequiredDescription
idpathstring (uuid)Yes

Responses​

StatusDescription
204Deleted
401No valid API key
403The key's scope or the organization's subscription does not allow the request (forbidden), or a quota is exhausted (resource_limit_exceeded)
404No such resource in this project
409The request conflicts with the resource's state (conflict) or an Idempotency-Key is still being processed (idempotency_in_progress)
423The resource has a running action
429The key's allowance is used up

Actions of a volume​

GET /volumes/{id}/actions

Parameters​

NameInTypeRequiredDescription
idpathstring (uuid)Yes
pagequeryintegerNo(minimum 1, default 1)
per_pagequeryintegerNo(minimum 1, maximum 100, default 25)
statusqueryrunning, success, errorNo
sortquerystringNo<field>:asc|desc; fields id, command, status, started, finished; default started:desc (pattern ^(id|command|status|started|finished):(asc|desc)$)

Responses​

StatusDescription
200Actions
401No valid API key
404No such resource in this project
422A field is missing or malformed (invalid_input, details.fields) or an Idempotency-Key was reused with a different request (idempotency_key_mismatch)
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
actionsarray of ActionYes
metaMetaYes

One action of a volume​

GET /volumes/{id}/actions/{action_id}

Parameters​

NameInTypeRequiredDescription
idpathstring (uuid)Yes
action_idpathstring (uuid)Yes

Responses​

StatusDescription
200The action
401No valid API key
404No such resource in this project
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
actionActionYes

Attach a volume to a server in the same location​

POST /volumes/{id}/actions/attach

Parameters​

NameInTypeRequiredDescription
idpathstring (uuid)Yes
Idempotency-KeyheaderstringNo16-128 visible ASCII characters; the first response is replayed for 24 hours (pattern ^[\x21-\x7e]{16,128}$)

Request body​

FieldTypeRequiredDescription
serverReferenceYes
automountbooleanNo(default false)

Responses​

StatusDescription
201The action
401No valid API key
403The key's scope or the organization's subscription does not allow the request (forbidden), or a quota is exhausted (resource_limit_exceeded)
404No such resource in this project
409The request conflicts with the resource's state (conflict) or an Idempotency-Key is still being processed (idempotency_in_progress)
422A field is missing or malformed (invalid_input, details.fields) or an Idempotency-Key was reused with a different request (idempotency_key_mismatch)
423The resource has a running action
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
actionActionYes

Detach a volume​

POST /volumes/{id}/actions/detach

Parameters​

NameInTypeRequiredDescription
idpathstring (uuid)Yes
Idempotency-KeyheaderstringNo16-128 visible ASCII characters; the first response is replayed for 24 hours (pattern ^[\x21-\x7e]{16,128}$)

Responses​

StatusDescription
201The action
401No valid API key
403The key's scope or the organization's subscription does not allow the request (forbidden), or a quota is exhausted (resource_limit_exceeded)
404No such resource in this project
409The request conflicts with the resource's state (conflict) or an Idempotency-Key is still being processed (idempotency_in_progress)
422A field is missing or malformed (invalid_input, details.fields) or an Idempotency-Key was reused with a different request (idempotency_key_mismatch)
423The resource has a running action
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
actionActionYes

Grow a volume​

POST /volumes/{id}/actions/resize

Only growth; counts against the volume quota.

Parameters​

NameInTypeRequiredDescription
idpathstring (uuid)Yes
Idempotency-KeyheaderstringNo16-128 visible ASCII characters; the first response is replayed for 24 hours (pattern ^[\x21-\x7e]{16,128}$)

Request body​

FieldTypeRequiredDescription
size_gbintegerYes(minimum 10, maximum 10000)

Responses​

StatusDescription
201The action
401No valid API key
403The key's scope or the organization's subscription does not allow the request (forbidden), or a quota is exhausted (resource_limit_exceeded)
404No such resource in this project
409The request conflicts with the resource's state (conflict) or an Idempotency-Key is still being processed (idempotency_in_progress)
422A field is missing or malformed (invalid_input, details.fields) or an Idempotency-Key was reused with a different request (idempotency_key_mismatch)
423The resource has a running action
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
actionActionYes

Protect a volume from deletion​

POST /volumes/{id}/actions/change_protection

Parameters​

NameInTypeRequiredDescription
idpathstring (uuid)Yes
Idempotency-KeyheaderstringNo16-128 visible ASCII characters; the first response is replayed for 24 hours (pattern ^[\x21-\x7e]{16,128}$)

Request body​

FieldTypeRequiredDescription
deletebooleanYes

Responses​

StatusDescription
201The action
401No valid API key
403The key's scope or the organization's subscription does not allow the request (forbidden), or a quota is exhausted (resource_limit_exceeded)
404No such resource in this project
409The request conflicts with the resource's state (conflict) or an Idempotency-Key is still being processed (idempotency_in_progress)
422A field is missing or malformed (invalid_input, details.fields) or an Idempotency-Key was reused with a different request (idempotency_key_mismatch)
423The resource has a running action
429The key's allowance is used up

Response body​

FieldTypeRequiredDescription
actionActionYes