Delete folder¶
Delete the specified folder.
POST $CLOUDSIGMA_API_BASE/catalog/folder/delete
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query the file list to obtain the target folder ID.
Set the operation-specific values used in the request:
$FOLDER_ID: ID of the folder to be deleted.
The caller needs write access to the root volume. This operation is irreversible.
Request¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/folder/delete" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": '"$FOLDER_ID"'
}'
Request body
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Folder ID. |
Successful response¶
Returns 200 on success, data is null. This operation is irreversible.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
Fixed to |
Error response¶
{
"code": "ErrReadonly",
"msg": "对象不可写",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
Pass in a valid folder ID. |
|
|
The current identity does not have write permissions to the root volume. |
Use credentials with write access, or contact your administrator for authorization. |
|
|
The database where the folder is located is not writable. |
Select a folder in a writable volume. |
|
|
The service cannot delete the folder. |
Record the request time and error message and try again; if it continues to fail, contact support. |
Follow-up operations¶
Query file products, confirm that the target no longer appears.