Thursday, August 27, 2020

Webhook



My first encounter with this term is with Github, when I "reactivated" my Github account again early this year.

After reading a few articles, I am not sure if I really get what webhook is, but here's my understanding.

Webhook is something like a callback http api. It is triggered after a defined event happened.

In Github, it can be set in a repository. The target URL (or it's called payload URL) could be setup in other server, which is accessible via http post request. You can select upon which event run, this webhook should be triggered. In Github, the default settings is, when any push actvity happen, this webhook will be called. The target URL could be an API to inform a list of recipient on the push activity.

Due to of this "event-trigger" attribute and always relates to notification, some define webhook as an automated notification. However, webhook can do more than that.

It could be used in sending data to another system, say Kafka, for big data collection, analysis and integration purpose; it could be used in CI/CD, whenever there's a code push, trigger the auto-build and auto-test process; or it could be just simply a notification of an event like account login or money transfer purpose.

Further reads:


No comments:

Post a Comment