Delete volume

Delete the specified root volume. Before deleting, confirm that files in the volume have been processed.

HTTP
POST $CLOUDSIGMA_API_BASE/catalog/volume/delete

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

First query the object in the database to obtain the volume ID.

Set the operation-specific values used in the request:

  • $VOLUME_ID: Root volume ID to delete.

Request

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/volume/delete" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "id": '"$VOLUME_ID"'
  }'

Request body

Parameter

Type

Required

Description

id

integer

Yes

The ID of the root volume to delete.

Successful response

Returns 200 on success, data is null.

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": null
}

The response fields are as follows.

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

null

null when deletion is complete.

Error response

JSON
{
  "code": "ErrServer",
  "msg": "服务器内部错误",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

ErrParamInvalid

The volume ID is invalid.

Try again using the root volume ID.

403

ErrForbidden

The current identity does not have permission to delete volumes.

Use authorized credentials.

500

ErrServer

The server failed to delete the volume.

Log the error message and try again.

Last updated on