Delete Catalog¶
Delete the specified Catalog. Deletion is irreversible; process subordinate databases, volumes, and tables first.
POST $CLOUDSIGMA_API_BASE/catalog/delete
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First Query Catalog details to confirm the target, then process subordinate objects.
Set the operation-specific values used in the request:
$CATALOG_ID: Catalog ID to delete.
Request¶
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/delete" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"id": '"$CATALOG_ID"'
}'
Request body
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
Yes |
Catalog ID to delete. |
Successful response¶
Returns 200 on success, data is null.
{
"code": "OK",
"msg": "OK",
"data": null
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
Fixed to |
Error response¶
{
"code": "ErrCatalogHasChildren",
"msg": "Catalog 包含下级对象",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
The request body or Catalog ID is invalid. |
Positive integer IDs returned using a list. |
|
|
The current identity does not have permission to delete. |
Requesting permission to |
|
|
The target is a read-only system catalog. |
Do not delete this catalog. |
|
|
Catalog still contains subordinate objects. |
Delete or migrate subordinate objects first. |
|
|
Catalog is being used by the knowledge base. |
Process knowledge base dependencies before deleting them. |
|
|
The server failed to delete the Catalog. |
Try again later. |
Follow-up operations¶
Query file products, confirm that the target no longer appears.