Skip to main content
Webhooks

列出 Webhook Endpoints

获取当前账号可见的 Webhook Endpoint 列表。

Webhook 当前为 Beta 功能,接口、字段和行为可能在后续版本中调整。
GET /api/v1/forward/webhook/endpoints

请求头

Header是否必填说明
AuthorizationBearer <PAT 或管理员 SAT>

查询参数

参数类型是否必填说明
limitinteger每页数量,默认 20,取值范围 1-100
after_idstring上一页响应中的 last_id,用于读取下一页。

示例请求

curl -s 'https://api.qoder.com.cn/api/v1/forward/webhook/endpoints?limit=20' \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK
{
  "data": [
    {
      "id": "e149c233-1234-4abc-8def-1234567890ab",
      "url": "https://example.com/webhooks/qoder",
      "description": "Schedule notifications",
      "events": [
        "forward.schedule_run.succeeded",
        "forward.schedule_run.failed"
      ],
      "metadata": {
        "environment": "production"
      },
      "active": true,
      "last_success_at": "2026-09-01T09:07:59Z",
      "last_failure_at": null,
      "consecutive_fail": 0,
      "created_at": "2026-09-01T08:00:00Z",
      "updated_at": "2026-09-01T09:07:59Z"
    }
  ],
  "first_id": "e149c233-1234-4abc-8def-1234567890ab",
  "last_id": "e149c233-1234-4abc-8def-1234567890ab",
  "has_more": false
}
空列表时,data[]first_idlast_idnullhas_morefalse

响应字段

字段类型说明
dataobject[]当前页的 Endpoint 对象。
first_idstring/null当前页第一条 Endpoint ID。
last_idstring/null当前页最后一条 Endpoint ID,可作为下一页的 after_id
has_moreboolean是否还有下一页。
Endpoint 对象字段见获取 Webhook Endpoint

错误

HTTPType触发条件
400invalid_request_error分页参数不合法。
401authentication_error认证信息缺失、无效或已过期。
403permission_error当前令牌不能管理 Webhook。
500/502/503api_error服务暂时不可用。

相关