Skip to main content

Deleting a Volume

DELETE /v3/{project_id}/volumes/{volume_id}

To delete a volume, you can send a DELETE request to the /v3/{project_id}/volumes/{volume_id} endpoint of the volume service, replacing {project_id} with your project ID and {volume_id} with the ID of the volume you want to delete. This request requires an authentication token, which you should include in the request headers.

warning

Deleting a volume is a permanent action and cannot be undone. Ensure that you have backed up any important data before proceeding with the deletion.

info

Request

Parameters

NameInTypeDescription
project_idpathstringThe UUID of the project in a multi-tenancy cloud.
volume_idpathstringThe UUID of the volume.
cascadequerybooleanOptional. Remove any snapshots along with the volume. Default is false.
forcequerybooleanOptional. Indicates whether to force delete a volume even if the volume is in deleting or error_deleting. Default is false. New in version 3.23.

Sample Request

Using curl

curl -ks -X DELETE -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:8776/v3/{PROJECT_ID}/volumes/{VOLUME_ID}

Using HTTP request

DELETE https://api.vietnix.cloud:8776/v3/{PROJECT_ID}/volumes/{VOLUME_ID}

Response

Status Codes

Success

Status CodeDescription
202Accepted. Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request.