Delete table¶
Delete the specified table. This operation is irreversible; please confirm that the data in the table is no longer needed before executing it.
HTTP
POST $CLOUDSIGMA_API_BASE/meta/table/drop
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
You can first query the table in the database to confirm the name.
Request¶
Replace caller-specific values in the example with actual values.
Shell
curl -X POST "$CLOUDSIGMA_API_BASE/meta/table/drop" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d "{\"db_name\":\"$DATABASE\",\"table_name\":\"$TABLE\"}"
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
db_name | string | Required | The name of the database where the table is located. |
table_name | string | Required | The name of the table to delete. |
Successful response¶
JSON
{"code":200,"data":null}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
integer |
|
|
null |
This operation does not return a result object. |
A successful response does not return an object. Then query the table in the database to confirm that the table no longer appears.
Error response¶
JSON
{
"code": 400,
"message": "db_name 不能为空"
}
| Field | Type | Description |
|---|---|---|
code | integer or string | Error code or status. |
message | string | Error message. |
Follow-up operations¶
View table field, confirm that the target no longer appears.
Last updated on