Skip to main content
知识库

删除知识库

永久删除指定的知识库及其所有文档和切片

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 '{"id": "your_index_id"}'
{
  "code": "Success",
  "status_code": 200,
  "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
此操作不可逆。删除后,该知识库下的所有文档、切片和索引数据将被一并移除,且无法恢复。请在调用前确认目标知识库已无业务依赖。

Authorizations

string
header
required

DashScope API Key,在控制台 API Key 页面(https://rag.console.aliyun.com/settings/apikey)获取。

Body

application/json
string
required

要删除的知识库 ID。

Response

200-application/json
string

响应码,成功时为 Success

integer

HTTP 状态码。

string

请求唯一标识,排查问题时请提供此 ID。

object

操作成功时返回空对象。

{}
boolean

操作是否成功。

string

响应消息,成功时为 success