Rerun a Scraper Studio job
管理作业
重新运行 Scraper Studio 作业
使用 POST /dca/jobs//rerun 从已有的 Bright Data Scraper Studio 作业启动新运行。可重新运行全部内容,或发送 failed_only 仅重试失败部分。
POST
Rerun a Scraper Studio job
从已有的 Bright Data Scraper Studio 作业启动新的运行。不发送请求体时,将从头重新运行整个作业;发送
添加
在 IDE 作业数据 API 和接收批量数据中,将返回的
将返回的
failed_only: 1 时,仅重新运行失败的步骤。
请求成功后会启动一个新作业并返回其 collection_id。原作业保持不变。
重新运行行为
请求
不发送请求体即可重新运行全部内容:failed_only: 1 可仅重试失败的步骤:
响应
collection_id 用作 job_id。它标识的是新的重新运行作业,而非原作业。
如何查找作业 ID
使用作业列表端点查找您要重新运行的作业 ID:id 值用作 job_id 路径参数。完整参数列表请参见列出 Scraper Studio 作业。
何时使用该端点
- 修复选择器或解析器后,重试批量作业中失败的输入,无需重新采集已成功的输入
- 按计划重新采集完整作业,以刷新会随时间变化的数据
- 在目标网站发生故障并导致大量
blocked或detect_block错误后重新运行
failed_only 之前,查看哪些输入失败及其原因,请使用获取作业错误。
相关
- 获取作业错误:重新运行前确认哪些输入失败
- IDE 作业数据 API:查看原作业的
expired时间戳和失败数量 - 列出 Scraper Studio 作业:查找传入该端点的
job_id - 取消 Scraper Studio 作业:停止误启动的重新运行
授权
Use your Bright Data API Key as a Bearer token in the Authorization header.
How to authenticate:
- Obtain your API Key from the Bright Data account settings at https://brightdata.com/cp/setting/users
- Include the API Key in the Authorization header of your requests
- Format:
Authorization: Bearer YOUR_API_KEY
Example:
Learn how to get your Bright Data API key: https://docs.brightdata.com/api-reference/authentication
路径参数
ID of the job to rerun
请求体
application/json
Omit the body to rerun the full job. Send failed_only: 1 to rerun only the failed steps.
Set to 1 to rerun only the failed steps. Omit to rerun the full job.
示例:
1