Webhooks in Project and Repository
Webhooks can be set up to notify external services, such as an issue tracker, a CI server, or a deployment tool, about events that occur in Space. Webhooks are a way to push notifications to external services which is usually preferable to polling. When an event occurs, Space will send an HTTP POST request to the specified URL.
You can create webhooks for the entire project as well as for individual repositories in your project.
Set up a project webhook to send notifications when a project is created, project's properties get updated or the project is deleted.
Set up a repository webhook to send notifications when the repository is updated with new commits or its settings get changed.
See Repository Webhooks for instructions.
At this time, webhooks do not support JSON payloads, however you can use URL macros to pass the project name in a webhook by adding macros to the URL string.
Navigate to the project.
On the project sidebar menu, choose.
Existing project webhooks are listed on the Webhooks page.
To edit a webhook, click next to it. To create a new one, click New webhook.
Give your webhook a name and description, check Enabled.
Specify the URL of the service that should be be notified. You can add the macro
%project%to pass the project name.
Pick one or more triggering events:
Project is created
Project is updated
Project is deleted
Choose an SSL keystore if required for the connection.
Select authorization method depending on the external service requirements:
Anonymous— service accepts anonymous requests.
Basic— service requires credentials provided with the request. Specify username and password that the service will accept.
Bearer— service requires a token provided with the request. Get a token that the service will accept and paste it here.
Accepted HTTP response codes. The external service should acknowledge a successful receipt of a webhook by returning any 2XX status code. By default, any other response code will be treated as a failure. You can specify some other response codes that Space should treat as a success.
Click Save when done.