Delete knowledge base¶
Deletes the knowledge base and its definitions; the Catalog tables and files containing the source are not deleted. Before deleting, please confirm that the agent, workflow, or application no longer references the knowledge base.
DELETE $CLOUDSIGMA_API_BASE/semantic-models/{model_id}
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query the knowledge base details and confirm the knowledge base to be deleted.
Set the operation-specific values used in the request:
$MODEL_ID: ID of the knowledge base to be deleted.
Request¶
curl -X DELETE "$CLOUDSIGMA_API_BASE/semantic-models/$MODEL_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameters |
Type |
Description |
|---|---|---|
|
integer |
The ID of the knowledge base to be deleted. |
Successful response¶
The knowledge base was deleted when code in the response was OK and data.deleted was true.
{
"code": "OK",
"msg": "OK",
"data": {
"deleted": true
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
boolean |
|
Error response¶
{
"code": "ErrNotFound",
"msg": "resource not found",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
Use the knowledge base |
|
|
The API Key is invalid or has expired. |
Check API Key. |
|
|
The caller does not have permission to delete the knowledge base. |
Check workspace and object authorization. |
|
|
The knowledge base does not exist or is not visible to the current caller. |
Relist the knowledge base and confirm the ID. |
|
|
The service rejects the current delete operation. |
Handle the object or state pointed to by the conflict first. |
|
|
The service failed to complete deletion. |
Keep the desensitized response information and try again. |
Follow-up operations¶
Query the knowledge base list Confirm that the knowledge base has been removed.