GET /api/v1/forward/batches
返回当前 PAT 用户创建的 Batch 列表,按创建时间倒序排列。
请求头
查询参数
示例请求
示例响应
HTTP 200 OK响应字段
错误码
注意事项
has_more=true时用last_id作为after_id继续翻页。output_file_id/error_file_id在终态生成后才出现。error_message仅failed状态出现。- 只返回当前 PAT 用户创建的 Batch。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
分页列出当前用户的 Batch 列表。
GET /api/v1/forward/batches
返回当前 PAT 用户创建的 Batch 列表,按创建时间倒序排列。
| Header | 是否必填 | 说明 |
|---|---|---|
| Authorization | 是 | Bearer <PAT> |
| 参数 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| status | string | 否 | - | 按状态过滤。 |
| limit | integer | 否 | 20 | 分页大小,最大 100。 |
| after_id | string | 否 | - | 向后翻页游标。 |
| before_id | string | 否 | - | 向前翻页游标。 |
curl -s -X GET 'https://api.qoder.com/api/v1/forward/batches?limit=10' \
-H "Authorization: Bearer $QODER_PAT"
{
"object": "list",
"data": [
{
"id": "batch_completed001",
"object": "batch",
"status": "completed",
"input_file_id": "file_input001",
"output_file_id": "file_output001",
"completion_window": "24h",
"created_at": "2026-07-07T07:25:01Z",
"expires_at": "2026-07-08T07:25:01Z",
"request_counts": {
"total": 30,
"pending": 0,
"running": 0,
"completed": 30,
"failed": 0,
"cancelled": 0,
"expired": 0
},
"usage": null
},
{
"id": "batch_processing001",
"object": "batch",
"status": "processing",
"input_file_id": "file_input002",
"completion_window": "24h",
"created_at": "2026-07-06T11:59:02Z",
"expires_at": "2026-07-07T11:59:02Z",
"request_counts": {
"total": 50,
"pending": 20,
"running": 5,
"completed": 25,
"failed": 0,
"cancelled": 0,
"expired": 0
},
"usage": null
}
],
"has_more": true,
"first_id": "batch_completed001",
"last_id": "batch_processing001"
}
| 字段 | 类型 | 说明 |
|---|---|---|
| object | string | 固定为 list。 |
| data | array | 当前页的 Batch 对象。 |
| first_id | string | 当前页第一条记录 ID。 |
| last_id | string | 当前页最后一条记录 ID。 |
| has_more | boolean | 是否还有更多记录。 |
| HTTP | Type | Code | 触发条件 |
|---|---|---|---|
| 400 | invalid_request_error | invalid_pagination | 分页参数不合法。 |
| 401 | authentication_error | authentication_required | PAT 无效或已过期。 |
has_more=true 时用 last_id 作为 after_id 继续翻页。output_file_id / error_file_id 在终态生成后才出现。error_message 仅 failed 状态出现。