Webhooks
Deprecated: The standalone Webhooks page (
/webhooks) now shows anEmptyStateMessage(“Los webhooks se gestionan desde Reglas” →Ir a Reglas/rules). Create webhooks as Rule Actions instead.
Preferred way: Rule with Webhook Action
In Rules (/rules/new → CreateEditRulePage.vue):
- Choose a patient and a trigger (e.g.
glucose > 200oralways). - Pick up to 3 action services (e.g. Webhook via
webhook.provider.ts+ Telegram + Home Assistant). - Configure each action payload (URL, method, headers, body with
{{sgv}}variables).
The engine (rule.engine.ts + RuleEngine) evaluates triggerConditions and executes each rule_action.payload in executionOrder order via IntegrationFactory (max 3 actions per rule, MAX_ACTIONS_PER_RULE).
Legacy standalone webhooks (removed)
- The old tables
webhooks/webhook_logs, their API routes (/api/v1/webhooks) and the per-reading triggers were removed (migration0061). The UI atWebhooksPage.vue(/webhooks) only shows the notice pointing to Rules. (The session-authenticated/api/v1/wsChannelsroutes are unrelated: they manage dashboard WebSocket channels, mirrored for API keys asGET/POST /api/v1/public/channels— see the API reference.) - Payload (when used via Rules) remains:
{ "event": "glucose.reading", "patient": { "id": "uuid", "name": "John Doe" }, "reading": { "value": 8.2, "unit": "mmol/L", "trend": "rising" }}- Retry: 3× exponential backoff,
X-Levelcast-Signature: sha256=...HMAC.
Use Rules for all automations.