KartaWeb.Mailgun.WebhookController (Karta v1.0.0)

Mailgun's webhooks API (/v3/domains/<domain>/webhooks), as mailgun-ruby's Mailgun::Webhooks calls it: list the webhook names with their URLs, get one name's URLs, set them (POST with id and url, PUT .../<name> with url; one to three URLs, url repeated) and remove them. The webhooks are the server's in Mailgun's format (Karta.Webhooks.MailgunSettings), for every domain of the server.

Answers are Mailgun's: {"webhooks": {"<name>": {"urls": [...]}}}, {"webhook": {"urls": [...]}}, and for changes {"message": "Webhook has been created" | "updated" | "deleted", "webhook": {"urls": [...]}}. Setting a name's URLs answers the same whether it had URLs or not, so that a client may set them again; getting or removing a name without URLs is "Webhook not found" (404). webhooks:read lists and gets, webhooks:write changes.

Summary

Functions

create(conn, params)

delete(conn, map)

index(conn, params)

show(conn, map)

update(conn, map)