跳转到主要内容
POST
/
datasets
/
snapshots
/
{id}
/
deliver
cURL
curl --request POST \
  --url https://api.brightdata.com/datasets/snapshots/{id}/deliver \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deliver": {
    "type": "webhook",
    "filename": {
      "template": "<string>",
      "extension": "json"
    },
    "endpoint": "<string>"
  },
  "compress": false
}
'
{
  "id": "<string>"
}

授权

Authorization
string
header
必填

在 Authorization 头中使用您的 Bright Data API Key 作为 Bearer token。

认证方法:

  1. 从 Bright Data 账户设置获取您的 API Key: https://brightdata.com/cp/setting/users
  2. 在请求的 Authorization 头中包含 API Key
  3. 格式: Authorization: Bearer YOUR_API_KEY

示例:

Authorization: Bearer b5648e1096c6442f60a6c4bbbe73f8d2234d3d8324554bd6a7ec8f3f251f07df

了解如何获取 Bright Data API Key: https://docs.brightdata.com/cn/api-reference/authentication#如何生成新的-api-key?

路径参数

id
string
必填

快照 ID 是特定数据快照的唯一标识符,用于通过 API 触发的数据采集任务中获取结果。更多信息请参阅 Snapshot ID

示例:

"snap_m2bxug4e2o352v1jv1"

请求体

application/json
deliver
object

Deliver configuration

compress
boolean
默认值:false

以 gzip 格式压缩传输文件

响应

成功

id
string

交付任务 ID