Jira
Overview of the Jira provider and registering webhooks
Overview
There are three ways to interact with the Jira API through our platform:
Jira API Quirks
Every Jira REST API request requires a project name
to be associated with it (this helps identify the project you want to register the webhook for). Because of this, you will need to display a dropdown menu to your users so they can choose. We provide a hook that helps you display this data easily. See the example below on how to use it.
Creating a Webhook for a User
-
Display list of the user projects using useGetJiraProjects: Using this hook, you can easily get a typed list of the current users projects.
create-GitHub.ts -
Create a webhook using all the information you gatherd in the previous steps:
Updating a Webhook for a User
If you don’t want to create a new webhook, you can update an existing one. This is useful if you want to change the callbackUrl
or eventType
. The resulting webhook will be under the same project and endpointId so you don’t need to worry about updating things in your database/storage.
Here is how that would look:
Example Payloads
With each provider we have example payloads so you can test the webhook events. This can be useful for debugging and testing your application.
To import, each payload example starts with the provider name and then the event name. For example, figmaFileCommentEventExamplePayload
. Use intelligent auto-complete in your IDE to find the payload you need.
Here’s an example of the Jira Issue Created Example Payload
(you can import as jiraIssueCreatedExamplePayload
):
Types
We also provide types for all supported event payloads. This can be helpful when you are consuming webhooks on your endpoint. Instead of the payload body being an any
type, now you can do something like this:
Zod Schemas - Coming Soon
This will allow you to validate the incoming webhook body against a schema. This can be useful for ensuring the body is correct before processing it.
Internal company webhooks
If you want to use Syncd as an internal webhook sending, regestration, and managment service, the dashboard has you covered. We handle and mange the access tokens with one click.