Skip to main content
get/knowledge-fs/spaces/{knowledge_base_id}/background-tasks
Request example
Response
get/knowledge-fs/spaces/{knowledge_base_id}/background-tasks

Authorization

Authorizationstringheaderrequired#

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

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

Path parameters

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

Query parameters

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

Length: max 3699Pattern: ^[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}$

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

Length: 1–8192

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

Default: 50

Range: 1–100

Responses

application/json
一页任务,或查找到的任务。
dataobject[]#
任务,最新的在前。传入 task_ids 时,先列出找到的索引任务,再列出找到的批量任务。
next_cursorstring#
用于获取更早任务的游标;在最后一页或传入 task_ids 时为 null。将其作为 cursor 传回。