Skip to main content

Update Knowledge Base

Update the description of a Knowledge Base.

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",
    "description": "Updated Knowledge Base description"
  }'
{
  "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"
}
The parameter is id — not index_id or indexId. Watch for the naming difference compared to other endpoints.

Authorizations

string
header
required

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

Body

application/json
string
required

Knowledge Base ID. The parameter name is id, not index_id or indexId.

string

Knowledge Base description.

string

Knowledge Base name. 1 to 20 characters. Supports Unicode letter characters (including English, Chinese, and digits) and may contain a colon (:), underscore (_), period (.), or hyphen (-).

length: 1–20
number

Minimum Rerank score threshold, in the range [0, 1]. Chunks scoring below this value are filtered out.

0 <= x <= 1

Response

200-application/json
string

Response code. Success on success.

integer

HTTP status code.

string

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

object
boolean

Whether the request succeeded.

string

Informational message; success on success.

string

Request status: SUCCESS or FAILED.