Skip to content

列出投递记录 ​

接口说明 ​

分页读取 Webhook 投递记录。

接口信息 ​

字段值
方法GET
路径/openapi/v2/webhook-deliveries
Operation IDlistWebhookDeliveries
鉴权Bearer OpenAPI key

入参 ​

名称位置必填类型示例说明
webhookIdquery否stringwebhook-11111111-1111-4111-8111-111111111111Webhook 标识。
limitquery否integer50最多返回的记录数量。部署环境可能采用更低的上限。
cursorquery否stringcursor_123当前接口返回的下一页分页标记。

请求体 ​

这个接口没有请求体。

请求示例 ​

bash
curl -X GET "https://openapi.example.com/openapi/v2/webhook-deliveries?webhookId=webhook-11111111-1111-4111-8111-111111111111&limit=50" \
  -H "Authorization: Bearer <openapi-key>"

成功响应 ​

200 ​

返回 Webhook 投递记录分页。

字段必填类型说明
items是array<WebhookDelivery>当前分页中的记录。
nextCursor是string | null当前接口返回的分页标记。只能在接口和筛选条件不变时继续使用;被拒绝时请移除 cursor 并从第一页重新读取。

成功响应示例 ​

json
{
  "items": [
    {
      "deliveryId": "delivery-11111111-1111-4111-8111-111111111111",
      "webhookId": "webhook-11111111-1111-4111-8111-111111111111",
      "eventId": "event-11111111-1111-4111-8111-111111111111",
      "eventType": "document.available",
      "payload": {
        "knowledgeBaseId": "knowledge-base-11111111-1111-4111-8111-111111111111",
        "operationId": "document-operation-11111111-1111-4111-8111-111111111111",
        "sourceFileId": "source-file-11111111-1111-4111-8111-111111111111",
        "state": "available",
        "errorCode": null,
        "occurredAt": "2026-06-17T00:00:00.000Z"
      },
      "status": "success",
      "attemptCount": 1,
      "httpStatus": 200,
      "errorCode": null,
      "createdAt": "2026-06-17T00:00:00.000Z",
      "updatedAt": "2026-06-17T00:00:00.000Z"
    }
  ],
  "nextCursor": null
}

错误码 ​

下表列出这个接口已声明的全部错误响应。

HTTP 状态错误码说明
401UNAUTHORIZEDBearer API key 缺失、格式错误、未知、已撤销或已删除。
422VALIDATION_ERROR请求未通过校验。
429RATE_LIMITED请求超过当前配置的速率限制。
500INTERNAL_ERRORAPI 遇到内部错误。
503DATABASE_REPOSITORY_UNAVAILABLE当前接口所需的数据暂时不可用。

后续操作 ​