Delete table¶
Delete the specified table and its data. Deletion cannot be undone.
POST $CLOUDSIGMA_API_BASE/catalog/table/delete
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First Query table information to confirm the target table.
Set the operation-specific values used in the request:
$TABLE_ID: Table ID to delete.
This operation deletes the table and its data irreversibly.
Request¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/table/delete" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": '"$TABLE_ID"'
}'
Request body
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Table ID. |
Successful response¶
Returns 200 on success, data is null. This operation deletes the table and its data irreversibly.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
Fixed to |
Error response¶
{
"code": "ErrReadonlySystemDatabase",
"msg": "数据库不可写",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
Pass in a valid table ID. |
|
|
The current identity does not have the permission to delete the table. |
Use credentials with write access, or contact your administrator for authorization. |
|
|
The table is located in a read-only system database. |
Select a table in a writable database. |
|
|
The service cannot delete the table. |
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.