mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-10-28 07:41:23 +00:00
feat: inbound webhooks — public ingest endpoints
core.inbound_hooks (migration 00013): POST /api/v1/hooks/<token> accepts external events. event mode republishes as inbound.received through the signed dispatcher + realtime; job mode triggers a scheduled-job run with the received body as payload. Optional X-Primora-Signature HMAC verify. Dashboard card on the Integrations page. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
2f4de543a9
commit
45a1621909
26 files changed
+1264
-9
No files matched your search
+11
-2
@@ -320,6 +320,17 @@ Telemetry-driven alerts delivered through the existing webhook dispatcher.
|
||||
- CRUD via `/projects/:id/alerts`; Integrations page manages rules next to
|
||||
webhooks and shows live `firing` state.
|
||||
|
||||
## Inbound webhooks (unreleased)
|
||||
|
||||
Project-scoped public ingest for external systems.
|
||||
|
||||
- `POST /api/v1/hooks/<token>` — token is the credential; optional
|
||||
`X-Primora-Signature` HMAC-SHA256 verification when a secret is set.
|
||||
- `event` mode republishes the body as `inbound.received` (webhooks +
|
||||
realtime fan out for free); `job` mode enqueues a scheduled-job run with
|
||||
the received body as payload (`triggered_by: "hook"`).
|
||||
- 256 KiB body cap; `last_received_at` tracked; managed from Integrations.
|
||||
|
||||
## Future phases — candidates
|
||||
|
||||
Ordered loosely by leverage. None committed; each gets scoped when picked.
|
||||
@@ -330,8 +341,6 @@ Ordered loosely by leverage. None committed; each gets scoped when picked.
|
||||
- **Phase 10 — Storage backends** — S3-compatible object storage behind
|
||||
the existing bucket abstraction (deferred from Phase 6), plus
|
||||
presigned-URL uploads for large files.
|
||||
- **Inbound webhooks** — project-scoped ingest endpoints that turn
|
||||
external events into domain events/jobs.
|
||||
- **HA mode** — leader-elected scheduler + distributed locks so two
|
||||
backend replicas don't double-fire jobs; Postgres advisory locks are
|
||||
enough at this scale.
|
||||
|
||||
Reference in new issue
Block a user