关于 omni-webhooks
omni-webhooks 介绍通过 API 管理 Webhook 端点、事件订阅和投递重试的操作,适用于使用 OmniRoute API 管理通知的用户。
主要功能
- 01注册、查看、更新和删除端点
- 02配置事件订阅
- 03查看 Webhook 投递记录
- 04测试端点并验证 URL
- 05管理投递重试
适用场景
- 01为已完成或失败的请求设置通知
- 02跟踪配额超限事件
- 03正式使用前测试 Webhook
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ cheaper-inference/ omniroute --skill omni-webhooks安装后在 Claude Code 中输入/omni-webhooks确认已加载。
详细介绍
概述
注册、列出、测试和移除 webhook 端点。配置事件订阅(request.completed、request.failed、quota.exceeded 等),并管理投递重试。
身份验证
所有请求都需要有效的 Bearer 令牌或会话 Cookie。通过 POST /api/auth/login 获取令牌,或在本地开发时配置 REQUIRE_API_KEY=false。
端点
GET /api/webhooks
GET webhooks
curl http://localhost:20128/api/webhooks \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST /api/webhooks
POST webhooks
curl -X POST http://localhost:20128/api/webhooks \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET /api/webhooks/{id}
GET webhooks ›
curl http://localhost:20128/api/webhooks/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
PUT /api/webhooks/{id}
PUT webhooks ›
curl -X PUT http://localhost:20128/api/webhooks/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
DELETE /api/webhooks/{id}
DELETE webhooks ›
curl -X DELETE http://localhost:20128/api/webhooks/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
GET /api/webhooks/{id}/deliveries
GET webhooks › › deliveries
curl http://localhost:20128/api/webhooks/{id}/deliveries \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST /api/webhooks/{id}/test
POST webhooks › › test
curl -X POST http://localhost:20128/api/webhooks/{id}/test \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST /api/webhooks/validate-url
POST webhooks › validate url
curl -X POST http://localhost:20128/api/webhooks/validate-url \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
负载
详细的请求/响应架构请参阅完整的 OpenAPI 规范:GET /api/openapi/spec 或 docs/openapi.yaml。
评论
支持 Markdown