FastGPTFastGPT

Update Dataset Data Item

Update the question, answer, and custom vector indexes of a dataset data item, automatically triggering re-embedding.

Endpoint Overview

  • Method : PUT
  • Path : /api/core/dataset/data/update
  • Module : Datasets / Dataset Data
  • Authentication : Authorization: Bearer <apiKey>—Personal API Key (access scoped by team member permissions) (see API Getting Started )
  • Interactive Try-It-Out : Open in Scalar API Explorer (self-hosted instances: replace the origin with <instance>/apidoc/systemopenapi#tag/%E6%95%B0%E6%8D%AE%E7%AE%A1%E7%90%86/PUT/core/dataset/data/update )

Description & Notes

Update q , a , and custom vector indexes for a dataset data item, triggering re-embedding.

Request Parameters

Request Body ( application/json )

FieldTypeRequiredDefaultConstraints & Description
dataIdstringYes-Data item ID. pattern: ^[0-9a-fA-F]{24}$
qstringYes-Primary chunk content / question
astringNo-Supplementary answer / text
indexesobject[]No-Vector index list
indexes[].typestring (enum)No"custom"Index type (external callers omit or use custom ; other types are system-generated). Allowed values: default , imageEmbedding , summary , question , image , custom
indexes[].textstringYes-Indexed text content by default; for imageEmbedding , the image objectKey or URL
indexes[].dataIdstringNo-Optional vector store ID used to reuse matching indexes without re-embedding
imageIdstringNo-Image ID
indexPrefixstringNo-Prefix title for indexes

Request Examples

Replace YOUR_API_KEY and placeholder IDs before running. Self-hosted users should replace the base URL with <instance>/api .

cURL Example

curl --fail-with-body -X PUT "https://cloud.fastgpt.io/api/core/dataset/data/update" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "dataId": "68ad85a7463006c963799a05",
  "q": "What is FastGPT?"
}'

Minimal Valid JSON Body

{
  "dataId": "68ad85a7463006c963799a05",
  "q": "What is FastGPT?"
}

Response Schema & Examples

Successful /api/* calls return the standard FastGPT envelope { "code": 200, "statusText": "", "message": "", "data": ... } , where data matches the 200 schema below (when a payload schema is declared; otherwise refer to the status description for runtime data semantics).

HTTP 200

Updated successfully

Content-Type : application/json

FieldTypeRequiredDefaultConstraints & Description
qstringNo-Display primary question/text with internal S3 image links signed
astringNo-Display supplementary answer/text with internal S3 image links signed
Edit on GitHub

Last updated

On this page

Put your business knowledge to work with AI

Import company documents and build accurate, reliable, traceable AI answers.