Webhooks
The Webhooks feature lets you receive notifications about events in your PatchKit Panel. You can use this feature to integrate PatchKit with your systems.
Currently, there’s only one event type available: Version Published
. This event is triggered when a new version of an application is published.
How to set up Webhooks?
To set up Webhooks, you need to:
- Go to the Applications page.
- Select one of your applications.
- Click on the Webhooks tab.
- Click on the New Webhook button.
On the next page, you will be asked to provide:
- Event - the event type that will trigger the webhook.
- Request Method - the HTTP method that will be used to send the request.
- URL - the URL that will receive the webhook.
- Headers - the headers that will be sent with the request. Must be provided in JSON format.
- Request Format - the format of the request body.
- Payload - the payload that will be sent to the webhook. Must be provided in JSON format.
Finally, click on the Create button to create a webhook.
Headers example
Headers must be provided in JSON format. Example:
{
"Authorization": "Bearer <your_token>"
}
Payload example
The payload must be provided in JSON format. Example:
{
"msg": "Application published!"
}
Using variables
You can use variables in the payload, headers, and URL. The following variables are available:
{{app.name}}
- the name of the application.{{app.display_name}}
- the display name of the application.{{app.group_name}}
- the name of the application group (when using channels).{{app.download_url}}
- the download URL of the application launcher.{{app.direct_download_url}}
- direct download URL of the application launcher.{{version.id}}
- the ID of the published version.{{version.label}}
- the label of the published version.{{version.published_at}}
- the date and time when the version was published.{{version.humanized_content_size}}
- the size of the published version in human-readable format.{{version.humanized_diff_size}}
- the size of the published version’s diff in human-readable format.{{version.changes}}
- the change list of the published version.
Example:
{
"msg": "Application {{app.display_name}} version {{version.label}} has been published!"
}
How to test Webhooks?
You can test any webhook by clicking on the Test button on the webhooks page. This will send a test request to the webhook’s URL.