跳转到主要内容
GET
/
v1
/
batches
/
{batch_id}
/
items
获取特定批次的已完成或失败项目列表,可选择包含内容
curl --request GET \
  --url https://api.olostep.com/v1/batches/{batch_id}/items \
  --header 'Authorization: Bearer <token>'
{
  "batch_id": "batch_abc123def456",
  "object": "list",
  "status": "completed",
  "items": [
    {
      "custom_id": "product-123",
      "retrieve_id": "ret_xyz789",
      "url": "https://example.com/product/123",
      "metadata": {
        "source": "catalog_sync",
        "priority": "high"
      }
    },
    {
      "custom_id": "product-456",
      "retrieve_id": "ret_abc456",
      "url": "https://example.com/product/456"
    }
  ],
  "items_count": 2
}
元数据: 如果你在创建批处理时将 metadata 附加到各个项目上,它将在响应中随每个项目一起返回。

授权

Authorization
string
header
必填

Bearer 认证头的格式为 Bearer ,其中 是你的认证令牌。

路径参数

batch_id
string
必填

要获取项目的批次ID。

查询参数

status
enum<string>

要获取的URL状态(已完成或失败)。

可用选项:
completed,
failed
cursor
integer

分页游标。第一次请求时省略此参数。对于后续请求,使用上一个响应中的 cursor 值。详情请参见 Pagination

limit
integer

要返回的结果数量(推荐10-50)。

响应

成功响应,包含批次项目。

batch_id
string
object
string
status
string
items
object[]
items_count
integer
cursor
integer

分页游标。当有更多结果可用时出现。在下一个请求的 cursor 参数中使用此值。详情请参见 分页