Skip to main content

Create Volume

POST/v3/{project_id}/volumes

To create a new volume in your project, you can send a POST request to the /v3/{project_id}/volumes endpoint of the volume service. This request requires an authentication token, which you should include in the request headers.

Request​

Body Parameters​

project_idstringrequiredpath

UUID of the project in a multi-tenant cloud.

volumeobjectrequiredbody

Volume wrapper object.

namestringrequiredbody

Optional. Volume name.

sizeintegerrequiredbody

Volume size in GiB.

descriptionstringrequiredbody

Optional. Volume description.

multiattachbooleanrequiredbody

Optional. Allow attaching to multiple servers; default false. Support depends on volume type.

source_volidstringrequiredbody

Optional. Source volume UUID; new volume same size unless larger requested.

snapshot_idstringrequiredbody

Optional. Snapshot UUID; volume created in same availability zone and size as snapshot.

backup_idstringrequiredbody

Optional. Backup UUID. New in v3.47.

imageRefstringrequiredbody

Optional. Image UUID to create the volume; required for bootable volumes.

volume_typestringrequiredbody

Optional. Volume type (name or ID). Needed for multi-backend setups; scheduler selects backend by type.

metadataobjectrequiredbody

Optional. Key-value metadata to associate with the volume.

consistencygroup_idstringrequiredbody

Consistency group UUID.

OS-SCH-HNTobjectrequiredbody

Optional. Scheduler hints dictionary.

Sample Request​

curl -ks -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
-d '{
"volume": {
"size": 1,
"description": "Volume 2",
"name": "vol2",
"volume_type": "nvmer3"
}
}' https://api.vietnix.cloud:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes

with body

{
"volume": {
"size": 1,
"description": "Volume 2",
"name": "vol2",
"volume_type": "nvmer3"
}
}

Response​

Parameters​

volumeobjectrequired

A volume object.

migration_statusstring

Volume migration status. Admin only.

attachmentsarrayrequired

Instance attachment info; includes server_id, attachment_id, attached_at, host_name, volume_id, device, id. Empty if not attached.

idstringrequired

UUID of the volume.

linksarrayrequired

Volume links.

namestringrequired

Volume name.

sizeintegerrequired

Size in GiB.

bootablestringrequired

Bootable attribute; instances can boot from this volume.

statusstringrequired

Volume status.

created_atstringrequired

Creation time in ISO 8601 (CCYY-MM-DDThh:mm±hh).

availability_zonestringrequired

Availability zone name; may be default or null.

descriptionstringrequired

Volume description.

multiattachbooleanrequired

If true, volume can attach to multiple instances.

source_volidstring

Source volume UUID; new volume same size unless larger requested.

volume_typestringrequired

Associated volume type name.

encryptedbooleanrequired

If true, the volume is encrypted.

updated_atstringrequired

Last update time in ISO 8601 or null if never updated.

replication_statusstringrequired

Volume replication status.

snapshot_idstring

Snapshot UUID; volume created in same AZ and size as the snapshot.

user_idstringrequired

User UUID.

metadataobjectrequired

Metadata key-value pairs associated with the volume.

group_idstring

Group ID.

consistencygroup_idstringrequired

Consistency group UUID.

Status Codes​

Success​

CodeReason
202 AcceptedRequest was accepted for processing, but processing has not completed. A Location header is included with a link to check the request’s progress.

Sample Response​

Response body
{
"volume": {
"id": "e767560e-b1b0-4e74-b40f-486127fdb41f",
"status": "creating",
"size": 1,
"availability_zone": "nova",
"created_at": "2025-09-23T04:32:44.133966",
"updated_at": null,
"name": "vol2",
"description": "Volume 2",
"volume_type": "nvmer3",
"snapshot_id": null,
"source_volid": null,
"metadata": {},
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8776/v3/f33507157a634f1cac71e06a70fb558e/volumes/e767560e-b1b0-4e74-b40f-486127fdb41f"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8776/f33507157a634f1cac71e06a70fb558e/volumes/e767560e-b1b0-4e74-b40f-486127fdb41f"
}
],
"user_id": "64166c7effeb4a89b59c073588099640",
"bootable": "false",
"encrypted": false,
"replication_status": null,
"consistencygroup_id": null,
"multiattach": false,
"attachments": []
}
}