Skip to main content
GET
获取查询分段列表

Authorizations

Authorization
string
header
required

每个请求都通过 API Key 认证:Authorization: Bearer {API_KEY}。应用接口使用应用 API Key,知识库接口使用知识库 API Key(快速开始)。

API Key 应保存在服务端,切勿嵌入客户端代码。缺失或无效的 Key 会返回 HTTP 401(unauthorized)。

Path Parameters

knowledge_base_id
string<uuid>
required

知识库 ID:即知识库 API 访问 对话框中所示服务 API 端点的最后一段(…/knowledge-fs/spaces/<knowledge base ID>),也是地址栏中 /datasets/new/ 之后的那一段。

query_record_id
string<uuid>
required

查询记录 ID:即 运行查询 返回的 x-query-run-id 响应头,或 获取查询记录列表 中的 id。

Query Parameters

cursor
string

游标,取自上一页的 next_cursor。条目按偏移量定位,因此 0 表示从第一条开始。

Required string length: 1 - 1000
limit
integer
default:100

每页条目数。

Required range: 1 <= x <= 100

Response

一页分段条目。name 和 target_id 均为分段 ID,resource_type 为 node。

consistency_class
string | null

在这些视图中始终为 null。

data
object[]

本页的条目,按本次运行记录的顺序排列。

next_cursor
string | null

下一页的游标,最后一页时为 null。将其作为 cursor 传回。

path
string

视图的内部路径,例如 /queries/<query_record_id>/evidence。仅供参考,此 API 不提供该路径。

preview
boolean | null

在这些视图中始终为 null。

truncated
boolean

本页之后还有更多条目时为 true。沿 next_cursor 读取后续条目。