Bulk volume create API
The bulk volume create API creates bulk volumes.
Bulk volume create API option
| Method | URI | Description |
|---|---|---|
|
POST |
|
Creates multiple volumes with a single request. |
Bulk volume create API
The bulk volume create API creates multiple volumes with a single request. The bulk volume create API uses the volume name prefix, generates the volume names, and creates the volumes. This API takes volume name prefix, count, volume type, size, availability zone in the request body. The response body contains the successful created volume details and error details for failed volumes.
- Response codes
-
- Normal response code - OK (200)
- Error response code - Bad Request (400), Forbidden (403), Not Found(404), Server Error (500)
- Request parameters
-
Table 2. Parameters in the request for creating a volume Name Style Type Description nameBody
String
Specifies the volume name prefix to create volumes.
sizeBody
Int
Specifies the size of the volumes.
descriptionBody
Strings
Specifies the description of the volumes.
volume-typeBody
String
Specifies the storage template ID to create volumes.
availability_zoneBody
String
Specifies the availability zone of storage. multiattachBody
Bool
Specifies whether multi-attach volumes must be created or not. The default value is False. countBody
Int
Specifies the number of volumes to be created. - Example of request body
-
{ "volume": { "name": "bulk-volume", "size": 10, "description": "Create bulk volumes", "volume_type": "90c58559-6b27-4903-bb17-65b0895792be", "availability_zone": "zone", "multiattach": True }, "count": 10 } - Response parameters
-
Table 3. Parameters in the response for creating volumes. Name Style Type Description volumesBody
Array
List of successfully created volume objects.
failuresBody
Int
List of error details of failed volumes.
- Example of response body
-
"volumes": [ { "id": "f4875575-b319-4d6a-9618-2d72f686e3db", "_name_id": null, "ec2_id": null, "user_id": "ca2153fdfe514c60bf67f5d3dea03e29", "project_id": "5d2b05e63520405896f216e348cc60c8", "use_quota": true, "snapshot_id": null, "cluster_name": null, "host": null, "size": 1, "availability_zone": "nova", "status": "creating", "attach_status": "detached", "migration_status": null, "scheduled_at": null, "launched_at": null, "terminated_at": null, "display_name": "rajn-bulk-volume-20", "display_description": "Bulk volume create api", "provider_id": null, "provider_location": null, "provider_auth": null, "provider_geometry": null, "volume_type_id": "6373922c-10f9-444f-a1b9-fbbcb1f464bb", "source_volid": null, "encryption_key_id": null, "consistencygroup_id": null, "group_id": null, "deleted": false, "bootable": false, "multiattach": false, "replication_status": null, "replication_extended_status": null, "replication_driver_data": null, "previous_status": null, "metadata": {}, "admin_metadata": {}, "volume_type": { "id": "6373922c-10f9-444f-a1b9-fbbcb1f464bb", "name": "SVC46 base template", "description": null, "is_public": true, "qos_specs_id": null, "created_at": "2025-06-02T07:39:43.000000", "updated_at": null, "deleted_at": null, "deleted": false }, "service_uuid": null, "shared_targets": true, "created_at": "2025-06-06T06:42:25.000000", "updated_at": null, "deleted_at": null, "name": "rajn-bulk-volume-20", "name_id": "f4875575-b319-4d6a-9618-2d72f686e3db", "volume_metadata": [], "volume_admin_metadata": [], "volume_glance_metadata": [] } ], "failures": { "rajn-bulk-volume-30":"failure message" } }