Skip to main content

Webhook

Webhook API 提供 Webhook 端点的创建、查询、更新、删除,以及启用、停用、测试、重置密钥与事件查询操作。Webhook 用于接收 Managed Agents 的事件回调投递。

概述

Webhook 端点(Webhook Endpoint)用于接收 Managed Agents 的事件回调投递。创建后默认停用,需启用后才会对事件进行回调投递。每次投递失败会累计连续失败次数,可通过测试接口验证连通性,或通过重置密钥接口轮换签名密钥。

Webhook 操作

操作端点说明
创建 WebhookPOST /webhook_endpoints创建 Webhook 端点,配置回调 URL 与订阅事件
获取 WebhookGET /webhook_endpoints/{id}根据 ID 获取单个 Webhook 详情
列出 WebhookGET /webhook_endpoints列出当前工作区未删除的 Webhook
更新 WebhookPUT /webhook_endpoints/{id}更新回调 URL、订阅事件、描述
删除 WebhookDELETE /webhook_endpoints/{id}删除 Webhook,操作不可恢复
启用 WebhookPOST /webhook_endpoints/{id}/enable启用 Webhook,开始对事件进行回调投递
停用 WebhookPOST /webhook_endpoints/{id}/disable停用 Webhook,停止回调投递
测试 WebhookPOST /webhook_endpoints/{id}/test向回调 URL 发送测试事件,验证连通性
重置密钥POST /webhook_endpoints/{id}/reset_secret重置签名密钥,旧密钥立即失效
查询事件GET /webhook_endpoints/{id}/events分页查询该 Webhook 的投递事件记录