Expand description
REST endpoints for automations (#220).
Scheduling and signature checking belong to prospero-core’s
AutomationEngine; these handlers only resolve the route, hand over the
request, and shape the reply — the one-directional api → core rule of
ADR 0006.
One thing is deliberately not delegated: the trigger endpoint reads the
raw request body. Axum’s Json extractor would give us a parsed value,
and re-serializing that produces different bytes than the sender signed, so
every honest caller’s signature would fail to verify.
Structs§
- Runs
Query - Query for the run-history endpoint.
Constants§
- SIGNATURE_
HEADER - Header carrying a webhook’s HMAC signature,
sha256=<hex>.
Functions§
- create_
automation POST /api/automations— create one, returning a webhook key if it has a webhook trigger.- delete_
automation DELETE /api/automations/{id}— remove it and its run history.- list_
automations GET /api/automations— every configured automation.- list_
runs GET /api/automations/{id}/runs— recent runs, newest first.- run_now
POST /api/automations/{id}/run— fire it now, whatever its trigger.- set_
enabled PUT /api/automations/{id}/enabled— enable or disable without deleting.- trigger
POST /api/automations/{id}/trigger— an inbound signed webhook.