Skip to main content
Webhooks

获取 Webhook Endpoint

根据 Endpoint ID 获取当前配置和投递状态摘要。

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

请求头

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

路径参数

参数类型是否必填说明
endpoint_idstringWebhook Endpoint ID。

示例请求

curl -s 'https://api.qoder.com.cn/api/v1/forward/webhook/endpoints/e149c233-1234-4abc-8def-1234567890ab' \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK
{
  "id": "e149c233-1234-4abc-8def-1234567890ab",
  "url": "https://example.com/webhooks/qoder",
  "description": "Schedule notifications",
  "events": [
    "forward.schedule.created",
    "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"
}

响应字段

字段类型说明
idstringEndpoint ID。
urlstring事件接收地址。
descriptionstringEndpoint 描述;未设置时可能省略。
eventsstring[]当前订阅事件。
metadataobjectEndpoint 元数据。
activebooleanEndpoint 是否接收事件。
last_success_atstring/null最近一次成功投递时间,RFC 3339 格式。
last_failure_atstring/null最近一次失败投递时间,RFC 3339 格式。
disabled_reasonstring停用原因;没有原因时省略。
consecutive_failinteger连续投递失败次数。
created_atstring创建时间,RFC 3339 格式。
updated_atstring更新时间,RFC 3339 格式。
signing_secret 不会通过该接口返回。

错误

HTTPType触发条件
401authentication_error认证信息缺失、无效或已过期。
403permission_error当前令牌不能管理 Webhook。
404not_found_errorEndpoint 不存在或当前账号不可见。
500/502/503api_error服务暂时不可用。

相关