FastGPT icon

FastGPT

AI智能客服平台

知识库 → 获取知识库列表

AI-generated

Summary

Lists the knowledge bases (datasets) and folders in FastGPT under a given parent folder, or at the root if none is given, by calling POST /core/dataset/list.

Inputs

  • parentId — ID of the parent folder or knowledge base to list from. Leave empty for the root. It is sent in the request body and also as the parentId query string parameter.
  • requestOptions — Standard n8n request settings: batching (items per batch and interval), ignore SSL issues, proxy, and timeout (default 10000 ms).

Output shape

The FastGPT API response, which contains the list of knowledge base and folder entries under data. Entries have fields such as _id, name and type.

The request goes to the base URL from the fastGPTApi credential. HTTP 4xx/5xx responses, or a body code other than 200, throw a node API error carrying the response message. Entries of type folder are included, so filter on type if you only want datasets.

Examples

Example 1: List all top-level knowledge bases and folders

Resource: 知识库; Operation: 获取知识库列表; leave 父级知识库ID empty.

Example 2: List the contents of a specific folder

Set 父级知识库ID to the folder's _id, copied from an earlier list result or from the FastGPT URL.

Links

Discussion