Delete database¶
Delete the specified database. Before deleting, make sure the database is not used by publishing or subscription.
POST $CLOUDSIGMA_API_BASE/catalog/database/delete
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the database list to obtain the database ID. Prepare the personal access token, target workspace ID, and database ID that can access the target workspace.
Request body¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/database/delete" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"id": '"$DATABASE_ID"'
}'
Field |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Database ID to delete. |
The service first records the deletion request, then deletes the database and cleans the business records. When permission ownership records are missing or in abnormal status, deletion may fail.
When you receive the error, the database or some resources may have been deleted. Verify the current status of the database and catalog before deciding whether to try again.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
|
Error response¶
{
"code": "ErrDatabasePublished",
"msg": "数据库已发布"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |