Skip to main content

Delete Knowledge Base

Permanently delete a Knowledge Base along with all of its documents and chunks.

POST
/api/v1/indices/rag/index/delete
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index/delete" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"index_id": "your_index_id"}'
{
  "code": "Success",
  "status_code": 200,
  "success": true,
  "message": "success",
  "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "SUCCESS"
}
This operation is irreversible. Deleting the Knowledge Base also removes every document, chunk, and index it contains, with no way to recover them. Confirm nothing depends on it before calling.

Authorizations

string
header
required

DashScope API Key, obtained from the API Key page in the console.

Body

application/json
string
required

ID of the Knowledge Base to delete (the data.pipelineId returned by create_v2).

Response

200-application/json
string

Response code. Success on success.

integer

HTTP status code.

boolean

Whether the operation succeeded.

string

Response message. success on success.

string

Unique request identifier. Include this ID when reporting an issue.

string

Request status. SUCCESS on success.