Delete volume¶
Delete the specified root volume. Before deleting, confirm that files in the volume have been processed.
POST https://moi.matrixorigin.cn/newmoi/catalog/volume/delete
Preparation before calling¶
First query the object in the database to obtain the volume ID. Prepare the personal access token, target workspace ID, and volume ID that have access to the target workspace.
The example below uses:
$AI_STUDIO_API_KEY: The actual personal access token, passed through theX-API-KeyHeader.$WORKSPACE_ID: Target workspace ID, passed throughX-Workspace-IDHeader.$VOLUME_ID: Root volume ID to delete.
Request example¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/catalog/volume/delete" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"id": '"$VOLUME_ID"'
}'
Request body¶
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
The ID of the root volume to delete. |
Successful response¶
Returns 200 on success, data is null.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
|
Error response¶
{
"code": "ErrServer",
"msg": "服务器内部错误",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The volume ID is invalid. |
Try again using the root volume ID. |
|
|
The current identity does not have permission to delete volumes. |
Use authorized credentials. |
|
|
The server failed to delete the volume. |
Log the error message and try again. |