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
| Name | In | Type | Description |
|---|---|---|---|
| project_id | path | string | UUID of the project in a multi-tenant cloud. |
| volume | body | object | Volume wrapper object. |
| name | body | string | Optional. Volume name. |
| size | body | integer | Volume size in GiB. |
| description | body | string | Optional. Volume description. |
| multiattach | body | boolean | Optional. Allow attaching to multiple servers; default false. Support depends on volume type. |
| source_volid | body | string | Optional. Source volume UUID; new volume same size unless larger requested. |
| snapshot_id | body | string | Optional. Snapshot UUID; volume created in same availability zone and size as snapshot. |
| backup_id | body | string | Optional. Backup UUID. New in v3.47. |
| imageRef | body | string | Optional. Image UUID to create the volume; required for bootable volumes. |
| volume_type | body | string | Optional. Volume type (name or ID). Needed for multi-backend setups; scheduler selects backend by type. |
| metadata | body | object | Optional. Key-value metadata to associate with the volume. |
| consistencygroup_id | body | string | Consistency group UUID. |
| OS-SCH-HNT:scheduler_hints | body | object | Optional. Scheduler hints dictionary. |
Sample Request
Using curl
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
Using HTTP request
POST https://api.vietnix.cloud:8776/v3/f5d834d636c642c7bfe8af86139c6f26/volumes
with body
{
"volume": {
"size": 1,
"description": "Volume 2",
"name": "vol2",
"volume_type": "nvmer3"
}
}
Response
Parameters
| Name | Type | Description |
|---|---|---|
| volume | object | A volume object. |
| migration_status (Optional) | string | Volume migration status. Admin only. |
| attachments | array | Instance attachment info; includes server_id, attachment_id, attached_at, host_name, volume_id, device, id. Empty if not attached. |
| id | string | UUID of the volume. |
| links | array | Volume links. |
| name | string | Volume name. |
| size | integer | Size in GiB. |
| bootable | string | Bootable attribute; instances can boot from this volume. |
| status | string | Volume status. |
| created_at | string | Creation time in ISO 8601 (CCYY-MM-DDThh:mm:ss±hh:mm). |
| availability_zone | string | Availability zone name; may be default or null. |
| description | string | Volume description. |
| multiattach | boolean | If true, volume can attach to multiple instances. |
| source_volid (Optional) | string | Source volume UUID; new volume same size unless larger requested. |
| volume_type | string | Associated volume type name. |
| encrypted | boolean | If true, the volume is encrypted. |
| updated_at | string | Last update time in ISO 8601 or null if never updated. |
| replication_status | string | Volume replication status. |
| snapshot_id (Optional) | string | Snapshot UUID; volume created in same AZ and size as the snapshot. |
| user_id | string | User UUID. |
| metadata | object | Metadata key-value pairs associated with the volume. |
| group_id (Optional) | string | Group ID. |
| consistencygroup_id | string | Consistency 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
{
"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": []
}
}