Permanently delete a Knowledge Base along with all of its documents and chunks. This operation is irreversible — confirm nothing depends on the Knowledge Base before calling.
Prerequisites
Get an API key and a workspace ID, and configure authentication first. See API overview and Authentication.
Endpoint
POST /api/v1/indices/rag/index/delete
Permanently delete a Knowledge Base. Deleting the Knowledge Base also removes every document, chunk, and index it contains, with no way to recover them. Confirm the operation before calling.
Request body
| Field | Required | Type | Description |
|---|---|---|---|
index_id | Yes | string | ID of the Knowledge Base to delete, that is, the data.pipelineId returned by Create Knowledge Base and Import. |
Request example
BASE_URL is https://{workspace_id}.cn-beijing.maas.aliyuncs.com ({workspace_id} is the workspace ID), and BAILIAN_API_KEY is your Alibaba Cloud Model Studio API key.
Response example
Returns 200 on success.
Response fields
| Field | Type | Description |
|---|---|---|
code | string | Response code. Success when successful. |
status_code | integer | HTTP status code. |
success | boolean | Whether the operation succeeded. |
message | string | Response message. success when successful. |
request_id | string | Unique request identifier. Provide this ID when troubleshooting. |
status | string | Request status. SUCCESS when successful. |