Salto for
Jira
Articles
SHARE
Patrick Li
June 24, 2024
10
min read
Let’s dive deeper into webhooks after we introduced the Jira REST API in a previous blog post. Organizations use different applications for different purposes, such as Jira for software development, Salesforce for customer relationship management, etc. Oftentimes, there is a need for these applications to integrate with each other. Traditionally, custom development will be needed to create these integrations. However, for many simple use cases, such as updating a record in one application as a result of a change in another application, the traditional approach of writing custom code to use APIs can be too much overhead, and this is where webhook comes in, as a quick, simple, and effective alternative.
A webhook is a mechanism that allows for lightweight, event-driven communication between two applications, usually based on the HTTP/HTTPS protocol. It is sometimes referred to as an event-based API, as webhooks are usually triggered by events such as a user action and then react to that trigger by sending a request to a URL endpoint, which can be a REST API.
Some of the key benefits of webhooks are:
There are two types of webhooks: incoming and outgoing.
An incoming webhook sometimes referred to as an inbound webhook, listens to other applications to make incoming calls, hence the name. It usually exposes an HTTP endpoint, and once it receives an incoming request, it processes the request and performs its functions, such as creating or updating records in the local application.
An outgoing webhook, sometimes referred to as an outbound webhook, makes outbound HTTP requests to other systems and applications. It often waits for a trigger, such as when an issue is created or updated in Jira, and then requests a specific URL. The URL would usually be a REST API endpoint, but it can be any valid URL that is accessible by the webhook.
Jira (both Cloud and Data Center) supports both incoming and outgoing webhooks via the Automation feature. Jira does have a classic version of webhooks, but it is less intuitive and flexible to work with, so we will be using the newer and more advanced Automation alternative.
In this blog post, we will create an outgoing webhook in Jira to call a REST API in Aha! whenever an issue is created. For those who are not familiar with it, Aha! is a popular ideation and roadmap tool. Many organizations use Jira and Aha! together, and this will be a great example of how we can use webhooks to create an integration between the two applications without writing a single line of code.
The first step we need is to get an Aha! API key that we can use to authenticate our requests to Aha!'s REST API:
With the API key created, we can use it to make authenticated REST API calls to Aha! In the next section, we will create the outgoing webhook in Jira that automatically creates new Features in Aha! whenever a new issue is created in Jira.
Now that we have Aha! 's API key, we can start creating our outgoing webhook in Jira to call Aha!'s REST API.
We will be using the Create a feature REST API from Aha!, and the API expects a JSON payload, such as below. We are also using Jira’s smart value to automatically populate the payload with the Jira issue’s summary and description values:
Since this REST API also needs authentication, we need to pass in the API key we created early by adding a custom HTTP header called Authorization with the value of Bearer YOUR_API_KEY.
And this is it. Now, we have an outgoing webhook that will be triggered whenever an issue is created. It will automatically create a new Feature in Aha! based on the values of the Jira issue that triggered it, as shown below. We can extend this use case further by adding another webhook to be triggered when issues are updated in Jira, and we will update the corresponding Aha! features to keep records in both systems in sync.
Webhook is an easy way to create integrations between different applications by reacting to user actions and sending data between them. Jira supports both incoming webhooks that can listen for requests from other applications and outgoing webhooks that can make requests to other applications. We looked at an example of integrating Jira and Aha! by using webhooks, but you can do so much more with it.
For example, you can leverage webhooks to send status messages to Slack whenever something happens in Jira. In future articles, we will look at more examples of how you can automate processes such as this with Jira Automation, webhooks, and REST APIs.
Salto for
Jira
Jira
SHARE
Patrick Li
June 24, 2024
10
min read
Let’s dive deeper into webhooks after we introduced the Jira REST API in a previous blog post. Organizations use different applications for different purposes, such as Jira for software development, Salesforce for customer relationship management, etc. Oftentimes, there is a need for these applications to integrate with each other. Traditionally, custom development will be needed to create these integrations. However, for many simple use cases, such as updating a record in one application as a result of a change in another application, the traditional approach of writing custom code to use APIs can be too much overhead, and this is where webhook comes in, as a quick, simple, and effective alternative.
A webhook is a mechanism that allows for lightweight, event-driven communication between two applications, usually based on the HTTP/HTTPS protocol. It is sometimes referred to as an event-based API, as webhooks are usually triggered by events such as a user action and then react to that trigger by sending a request to a URL endpoint, which can be a REST API.
Some of the key benefits of webhooks are:
There are two types of webhooks: incoming and outgoing.
An incoming webhook sometimes referred to as an inbound webhook, listens to other applications to make incoming calls, hence the name. It usually exposes an HTTP endpoint, and once it receives an incoming request, it processes the request and performs its functions, such as creating or updating records in the local application.
An outgoing webhook, sometimes referred to as an outbound webhook, makes outbound HTTP requests to other systems and applications. It often waits for a trigger, such as when an issue is created or updated in Jira, and then requests a specific URL. The URL would usually be a REST API endpoint, but it can be any valid URL that is accessible by the webhook.
Jira (both Cloud and Data Center) supports both incoming and outgoing webhooks via the Automation feature. Jira does have a classic version of webhooks, but it is less intuitive and flexible to work with, so we will be using the newer and more advanced Automation alternative.
In this blog post, we will create an outgoing webhook in Jira to call a REST API in Aha! whenever an issue is created. For those who are not familiar with it, Aha! is a popular ideation and roadmap tool. Many organizations use Jira and Aha! together, and this will be a great example of how we can use webhooks to create an integration between the two applications without writing a single line of code.
The first step we need is to get an Aha! API key that we can use to authenticate our requests to Aha!'s REST API:
With the API key created, we can use it to make authenticated REST API calls to Aha! In the next section, we will create the outgoing webhook in Jira that automatically creates new Features in Aha! whenever a new issue is created in Jira.
Now that we have Aha! 's API key, we can start creating our outgoing webhook in Jira to call Aha!'s REST API.
We will be using the Create a feature REST API from Aha!, and the API expects a JSON payload, such as below. We are also using Jira’s smart value to automatically populate the payload with the Jira issue’s summary and description values:
Since this REST API also needs authentication, we need to pass in the API key we created early by adding a custom HTTP header called Authorization with the value of Bearer YOUR_API_KEY.
And this is it. Now, we have an outgoing webhook that will be triggered whenever an issue is created. It will automatically create a new Feature in Aha! based on the values of the Jira issue that triggered it, as shown below. We can extend this use case further by adding another webhook to be triggered when issues are updated in Jira, and we will update the corresponding Aha! features to keep records in both systems in sync.
Webhook is an easy way to create integrations between different applications by reacting to user actions and sending data between them. Jira supports both incoming webhooks that can listen for requests from other applications and outgoing webhooks that can make requests to other applications. We looked at an example of integrating Jira and Aha! by using webhooks, but you can do so much more with it.
For example, you can leverage webhooks to send status messages to Slack whenever something happens in Jira. In future articles, we will look at more examples of how you can automate processes such as this with Jira Automation, webhooks, and REST APIs.