Use the DeleteKnowledgeBase operation to delete a specified knowledge base and all Document and Chunk data under it. This operation is irreversible. Deleting a knowledge base also deletes all Document and Chunk data under it.
Prerequisites
-
An AgentStorage instance has been created and is in the
normalstate, and the instance endpoint and instance name have been obtained. -
Confirm that the data under the knowledge base can be deleted. The operation is irreversible.
Request parameters
|
Parameter |
Type |
Description |
|
|
string |
The name of the knowledge base. (Required) |
Request example
When you use API Key authentication, pass the instance name and API Key through the x-ots-instancename and x-ots-apikey request headers.
curl -X POST https://<endpoint>/DeleteKnowledgeBase \
-H "x-ots-instancename: <instance-name>" \
-H "x-ots-apikey: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"knowledgeBaseName": "product_docs_kb"}'
Response
{"code":"SUCCESS","data":{},"message":"succeed"}