How do you design Restful Web hook Callback API vs normal Restful API ?

As the definition says, A WebHook is an HTTP callback: an HTTP POST.

When it comes to designing HTTP Callback (HTTP POST) to get notified do you see any difference compared to designing normal RESTFUL API (HTTP POST). What do you think about same ?

0 2 5,977
2 REPLIES 2

Not applicable

An API is a set of instructions that defines how data is exchanged between, say, server and client. A request has to be made to an API which then gives back a response. A webhook, in layman's terms, lets you skip a step in terms of design.

All it takes is registering the webhook with the service provider. No request is necessary for invoking a webhook. It just responds when there's data available (it "listens"). Also, you have the options to specify when you wish to receive the data.

Therefore in the case of getting notified for a situation, a webhook would constantly listen to the changes and notify when it meets the condition (if any) and sends response.

Hope this point of view is relevant.

@ndavuluru , You mean "registering the url with the service provider that implements webhook" ? I am confused, Is webhook a URL here / is it a concept that calls the URL when some event happens ? I believe it's later one. Correct me, If i am wrong.