Actions37
- 对话 Actions
- 知识库 Actions
- 集合 Actions
- 数据 Actions
- 应用 Actions
集合 → 删除一个集合
AI-generatedSummary
Deletes one or more collections from a FastGPT knowledge base by sending a DELETE request to /core/dataset/collection/delete with a comma-separated list of collection IDs.
Inputs
- 集合ID列表 (datasetCollectionIds) (required) — Collection IDs to delete, comma-separated (e.g. id1,id2). The string is split on commas, trimmed, and empty entries dropped, then sent as the collectionIds array in the request body.
- 父级目录ID (datasetParentId) — Parent folder ID, copied from the browser URL in FastGPT. Sent in the body as parentId. It also feeds the knowledge base dropdown list.
- 选择知识库 (datasetKnowledgeId) — Knowledge base to operate in, chosen from a dropdown loaded from /core/dataset/list (type 'dataset' only). Sent in the body as datasetId.
- Request Options — Optional node settings: batching (items per batch, interval), ignore SSL issues, proxy, and timeout (default 10000 ms).
Output shape
The parsed JSON response from the FastGPT delete endpoint, returned as the node's output item.
The node sets ignoreHttpStatusErrors, then checks the response. It throws a NodeApiError if the HTTP status is 4xx or 5xx, or if the body's code field is present and not 200. The exact response fields are not defined in the source. The request is a DELETE, but the IDs are sent in the body.
Examples
Example 1: Remove two obsolete collections from a knowledge base.
Select the knowledge base, set 集合ID列表 to 'abc123,def456', and leave the parent folder ID empty.
Example 2: Delete a collection whose ID comes from an earlier node.
Set 集合ID列表 to an expression such as {{$json.data[0]._id}} from a previous 获取集合列表 step.