WebHooks + REST Subscription

66 views
Skip to first unread message

Nathan

unread,
Oct 3, 2009, 12:56:33 AM10/3/09
to WebHooks
I have been looking at REST and WebHooks a lot lately. One of the
features of REST I find particularly interesting is the potential
simplification of permissions. In SOA I would typically create
permissions like "CanCreateUser", "CanViewOrder", etc. With REST and
the "HTTP Interface" we can simply define permissions based on
resources and the HTTP methods ( GET,POST,PUT,DELETE). You may be
wondering what this has to do with WebHooks; we can use the same
principle for WebHooks. Instead of creating hooks like "OnNewUser",
"OnDeleteAccount" we can use RESTful resource URIs. Eg:

POST http://my.website.com/accounts/deleted-webhooks
POST http://my.website.com/accounts/myaccount/users/posted-webhooks

DELETE http://my.website.com/accounts/deleted-webhooks/myhandle
DELETE http://my.website.com/accounts/myaccount/users/posted-webhooks/myhandle

Combining the two concepts we can apply permissions to the
subscription/deletion of the hooks themselves.

Just a few thoughts,
Nathan Winder

Nathan

unread,
Oct 6, 2009, 5:14:46 PM10/6/09
to WebHooks
You can read more about RESTful WebHooks at http://webhooks.pbworks.com/RESTful-WebHooks

On Oct 2, 10:56 pm, Nathan <winder.nat...@gmail.com> wrote:
> I have been looking at REST and WebHooks a lot lately. One of the
> features of REST I find particularly interesting is the potential
> simplification of permissions. In SOA I would typically create
> permissions like "CanCreateUser", "CanViewOrder", etc. With REST and
> the "HTTP Interface" we can simply define permissions based on
> resources and the HTTP methods ( GET,POST,PUT,DELETE). You may be
> wondering what this has to do with WebHooks; we can use the same
> principle for WebHooks. Instead of creating hooks like "OnNewUser",
> "OnDeleteAccount" we can use RESTful resource URIs. Eg:
>
> POSThttp://my.website.com/accounts/deleted-webhooks
> POSThttp://my.website.com/accounts/myaccount/users/posted-webhooks
>
> DELETEhttp://my.website.com/accounts/deleted-webhooks/myhandle
> DELETEhttp://my.website.com/accounts/myaccount/users/posted-webhooks/myhandle
Reply all
Reply to author
Forward
0 new messages