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 Parameters

task_ids
string

要查找的索引任务或批量任务 ID,以逗号分隔,最多 100 个。不能与 cursor 同时使用。

Maximum string length: 3699
Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(,[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}){0,99}$
cursor
string

游标,取自上一页的 next_cursor。不能与 task_ids 同时传入。

Required string length: 1 - 8192
limit
integer
default:50

每页任务数。传入 task_ids 时忽略。

Required range: 1 <= x <= 100

Response

一页任务,或查找到的任务。

data
object[]

任务,最新的在前。传入 task_ids 时,先列出找到的索引任务,再列出找到的批量任务。

next_cursor
string | null

用于获取更早任务的游标;在最后一页或传入 task_ids 时为 null。将其作为 cursor 传回。