Working with Webhooks in QBank

Webhooks are a common way for different applications to communicate with each other and notify the other of an event that has taken place in the respective system. You can use webhooks in QBank straight from the backend or through the QBank API

Webhooks might be set up just from one system to another, or for both of them to communicate back and forth. In short, you can describe a webhook as a signal that is sent whenever a specific event occurs in the system, which should cause a related response in the system that receives the signal. QBank implements the standard webhook features a long with a few QBank adaptions. Webhooks, as the name implies, work over the web, so the applications must be able to send and/or receive HTTP(S) communication.

When can webhooks be used with QBank?

Whenever you want to build an integration between systems that require constant synchronisation or quick updates, the only practical solution is to use webhooks. If another application wants to know whenever an asset is uploaded in QBank, the only reliable solution for this is to have QBank tell the application whenever that happens.

An alternative method for applications to communicate is to use "polling", which basically means that an application asks another application if a certain event has occurred (in opposite to being told when it happened). There are certain times where polling is a better alternative to webhooks, for example if an application is interested in knowing how many assets were uploaded to QBank in the last 24 hours. It might then be better to ask (polling) QBank for this information once every 24 hours, instead of having QBank (through a webhook) inform the system each time an asset is uploaded. Another caveat is that polling requires that the application has an API to request information through. Fortunately QBank has both an API and WebHook support.

Webhooks in QBank

Webhooks can be created through QBank backend and also through the QBank API. A webhook consists of:

  • The URL (commonly referred to as 'callback') to signal
  • The event(s) that should trigger the signal
  • The type of signal that should be sent (HTTP method)
  • If event data should be included (For example, if an asset is uploaded, should the signal include the asset ID, uploader ID, etc)
  • How the optional event data is attached (HTTP data type) 

You can configure certain webhooks to only apply in case the event was triggered by certain user groups, and you can also add custom HTTP headers with the request (basic authentication for example). 

You can create any number of webhooks to fully cover any integration needs, or possibly several integrations and their respective needs. As usual, it's also possible to control who can create and edit webhooks.

QBank allows you to hook into nearly every event that takes place in the system, no matter how big or small. All in all, there are currently over 200 different events that applications may be notified of, covering all aspects of the basic QBank backend usage.

TIP: Contact your Sales representative or QBank support if you want to know more about the possibilities with Webhooks.