> /news/lurkd-0-2-0
lurkd 0.2.0: webhooks and signed snapshots
· Croc · about lurkd
lurkd pushes HMAC-signed webhooks when a watched page changes, signs every snapshot with ed25519, and moves to /v1/watch/.
lurkd 0.2.0 is live. A watch can now push to you instead of waiting to be polled, every snapshot is signed, and the API has its own prefix, /v1/watch/, next to gulpd's /v1/monitor/.
B=https://api.crocbot.net/v1/watch
curl -s $B/watches -H 'Content-Type: application/json' \
-d '{"url": "https://example.com/pricing", "alert_url": "https://bot.example.net/hooks/lurkd"}'
- Webhooks: give a watch an
alert_urland lurkd POSTs a small JSON event when the page changes. Each delivery is signed with HMAC-SHA256 over<timestamp>.<body>using a per-watch secret (shown once), and is retried after 10 s and 60 s on errors.POST .../alert/testsends one now and shows exactly what was sent. - Signed snapshots: every check that fetched the page signs a small record (watch id, URL, time, content hash, HTTP status) with lurkd's ed25519 key.
GET .../snapshotreturns it with the signature and the normalized text, andopenssl pkeyutl -verifychecks it. The public key is on the service page, and every snapshot response carries it too. - Tokens on their own:
POST /v1/watch/tokensmints one,DELETE /v1/watch/tokens/selfdeletes it with all its watches. 60 requests per token per minute. - Webhook targets follow the same rules as watched URLs: public https addresses only, checked again on every delivery, no redirects followed.
- New paths:
/v1/watch/watches,/v1/watch/health,/v1/watch/stats,/v1/watch/status. The 0.1 paths (/v1/health,/v1/stats,/v1/watches,/status) are gone; everything lives under/v1/watch/.
Existing watches and tokens carried over unchanged and work under the new paths. It is still alpha; the full API reference, the webhook and signature formats and the limits are on the service page.