Skip to main content
知识库

更新知识库

修改指定知识库的描述信息

POST
/api/v1/indices/rag/index/update
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index/update" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "your_index_id",
    "name": "企业帮助文档库",
    "description": "更新后的知识库描述",
    "rerankMinScore": 0.01
  }'
{
  "code": "Success",
  "status_code": 200,
  "data": {
    "updated_at": 1782191157000,
    "created_at": 1782180218000,
    "id": "your_kb_id"
  },
  "success": true,
  "message": "success",
  "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "SUCCESS"
}
参数名为 id,不是 index_idindexId。请注意与其他接口的命名差异。

Authorizations

string
header
required

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

Body

application/json
string
required

知识库 ID。注意参数名为 id,不是 index_idindexId

string

知识库名称。长度 1~20 字符,支持 Unicode letter 分类字符(含英文、中文、数字等),可含半角冒号(:)、下划线(_)、半角句号(.)或短划线(-)。

length: 1–20
string

知识库描述信息。

number

重排序最低分数阈值,取值范围 [0, 1]。分数低于该值的切片会被过滤。

0 <= x <= 1

Response

200-application/json
string

响应码,成功时为 Success

integer

HTTP 状态码。

string

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

object
Managed Agent API
RAG API
Connector API
Memory API
框架集成
  • 框架