In previous recipes, we looked at how to integrate JIRA with specific applications and platforms. In this recipe, we will look at webhooks, a different way of implementing integration with JIRA.
Perform the following steps to set up a webhook:
WebHook for Slack #support chatroom
.Webhooks follow an event-based mechanism, where the source system (in this case, JIRA) will make an HTTP POST call to all the registered webhooks when a registered event occurs. This is very similar to JIRA's internal notification system where e-mails are sent based on events.
With the event-based approach, instead of requiring the remote application to constantly poll JIRA for changes, which is both inefficient and inadequate for situations where changes need to be processed in real time, the remote application can be registered in JIRA with a webhook, and JIRA will call the application when the event occurs.
You can also trigger webhooks from workflow post functions with the Trigger a Webhook post function. All you have to do is select the transition that will be the trigger, add the post function, and select the webhook to be triggered. This is particularly useful since the webhook configuration panel only lists some of the basic event types, but not any custom event types that are used in workflows.