Delete database

Delete the specified database. Before deleting, make sure the database is not used by publishing or subscription.

HTTP
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

Shell
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

id

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

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": null
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data

null

null when deletion is complete.

Error response

JSON
{
  "code": "ErrDatabasePublished",
  "msg": "数据库已发布"
}

Field

Type

Description

code

string

error code.

msg

string

error message.

Last updated on