Create Volume
/v3/{project_id}/volumesTo 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_idstringrequiredpathUUID of the project in a multi-tenant cloud.
volumeobjectrequiredbodyVolume wrapper object.
namestringrequiredbodyOptional. Volume name.
sizeintegerrequiredbodyVolume size in GiB.
descriptionstringrequiredbodyOptional. Volume description.
multiattachbooleanrequiredbodyOptional. Allow attaching to multiple servers; default false. Support depends on volume type.
source_volidstringrequiredbodyOptional. Source volume UUID; new volume same size unless larger requested.
snapshot_idstringrequiredbodyOptional. Snapshot UUID; volume created in same availability zone and size as snapshot.
backup_idstringrequiredbodyOptional. Backup UUID. New in v3.47.
imageRefstringrequiredbodyOptional. Image UUID to create the volume; required for bootable volumes.
volume_typestringrequiredbodyOptional. Volume type (name or ID). Needed for multi-backend setups; scheduler selects backend by type.
metadataobjectrequiredbodyOptional. Key-value metadata to associate with the volume.
consistencygroup_idstringrequiredbodyConsistency group UUID.
OS-SCH-HNTobjectrequiredbodyOptional. Scheduler hints dictionary.
Sample Request
- cURL
- HTTP
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
POST https://api.vietnix.cloud:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes
with body
{
"volume": {
"size": 1,
"description": "Volume 2",
"name": "vol2",
"volume_type": "nvmer3"
}
}
Response
Parameters
volumeobjectrequiredA volume object.
migration_statusstringVolume migration status. Admin only.
attachmentsarrayrequiredInstance attachment info; includes server_id, attachment_id, attached_at, host_name, volume_id, device, id. Empty if not attached.
idstringrequiredUUID of the volume.
linksarrayrequiredVolume links.
namestringrequiredVolume name.
sizeintegerrequiredSize in GiB.
bootablestringrequiredBootable attribute; instances can boot from this volume.
statusstringrequiredVolume status.
created_atstringrequiredCreation time in ISO 8601 (CCYY-MM-DDThh:mm±hh).
availability_zonestringrequiredAvailability zone name; may be default or null.
descriptionstringrequiredVolume description.
multiattachbooleanrequiredIf true, volume can attach to multiple instances.
source_volidstringSource volume UUID; new volume same size unless larger requested.
volume_typestringrequiredAssociated volume type name.
encryptedbooleanrequiredIf true, the volume is encrypted.
updated_atstringrequiredLast update time in ISO 8601 or null if never updated.
replication_statusstringrequiredVolume replication status.
snapshot_idstringSnapshot UUID; volume created in same AZ and size as the snapshot.
user_idstringrequiredUser UUID.
metadataobjectrequiredMetadata key-value pairs associated with the volume.
group_idstringGroup ID.
consistencygroup_idstringrequiredConsistency group UUID.
Status Codes
Success
| Code | Reason |
|---|---|
| 202 Accepted | Request 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": []
}
}