Skip to main content

Update Chunk

Update the content of a single chunk.

POST
/api/v1/indices/rag/index/chunk/update
cURL
curl -X POST "https://{workspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/indices/rag/index/chunk/update?pipelineId=your_index_id" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "chunkId": "chunk_abc123",
    "dataId": "data_xyz789",
    "content": "Updated Chunk content"
  }'
{
  "code": "Success",
  "status_code": 200,
  "request_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
Chunk content must be between 10 and 6000 characters.

Authorizations

string
header
required

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

Query Parameters

string
required

Knowledge Base ID (same as the KB id field returned by createIndex).

Body

application/json
string
required

Knowledge Base ID.

string
required

Chunk ID.

string
required

Data ID.

string
required

Chunk content. Length must be between 10 and 6000 characters.

length: 10–6000
boolean
required

Whether to display the Chunk content.

string

Chunk title.

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.

boolean

Whether the operation succeeded.

string

Response message. success on success.

string

Request status: SUCCESS or FAILED.