跳转到主要内容
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 值。详情请参见 分页

limit
integer

返回结果的数量(建议10-50)。

响应

批量项目的成功响应。

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

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