FastGPTFastGPT

Update Dataset Collection

Update collection name, parent folder, disabled flag, or tags by collection ID or by datasetId and externalFileId.

Endpoint Overview

  • Method : POST
  • Path : /api/core/dataset/collection/update
  • Module : Datasets / Collections
  • 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/%E9%9B%86%E5%90%88%E7%AE%A1%E7%90%86/POST/core/dataset/collection/update )

Description & Notes

Update collection metadata by collection ID or datasetId + externalFileId (requires collection write permission). Changing parentId moves the collection, requiring manage permissions on source and target parents (plus team dataset creation permission when moving between root and a folder); inheritPermission is not accepted and existing inheritance mode is preserved.

Request Parameters

Request Body ( application/json )

Shared Parameters Across Branches

FieldTypeRequiredDefaultConstraints & Description
parentIdstring | nullNo-Parent folder ID
namestringNo-Collection name
tagsstring | object[]No-Tag list (supports legacy string names or { tag, value } objects)
forbidbooleanNo-Whether the collection is disabled
createTimestringNo-Creation time

Mutually Exclusive Branches ( anyOf )

  • Identify by id
FieldTypeRequiredDefaultConstraints & Description
idstringYes-Collection ID (mutually exclusive with datasetId + externalFileId ). pattern: ^[0-9a-fA-F]{24}$
datasetIdstringNo-Dataset ID used together with externalFileId
externalFileIdstringNo-External file ID used together with datasetId
  • Identify by datasetId & externalFileId
FieldTypeRequiredDefaultConstraints & Description
datasetIdstringYes-Dataset ID used together with externalFileId
externalFileIdstringYes-External file ID used together with datasetId
idstringNo-Collection ID (mutually exclusive with datasetId + externalFileId ). pattern: ^[0-9a-fA-F]{24}$

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 POST "https://cloud.fastgpt.io/api/core/dataset/collection/update" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "id": "68ee0bd23d17260b7829b137"
}'

Minimal Valid JSON Body

{
  "id": "68ee0bd23d17260b7829b137"
}

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

Successfully updated collection metadata

Returns the standard FastGPT success envelope ( { "code": 200, "statusText": "", "message": "", "data": ... } ). The exact data payload schema is not declared in this OpenAPI contract; refer to the status description above or inspect runtime responses.

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.