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. The following events are available:
a project is created
a project is updated
a project is deleted
a repository is updated (new commit, settings changed)
an article is published
an article is unpublished
At this time, webhooks do not support JSON payloads, however for project- and repository-related events, you can pass project name and repository name respectively in the form of URL macros, by adding them to the URL string.
|Project is created|
|Project is updated|
|Project is deleted|
|Repository is updated (commits, settings, etc.)|
To set up a webhook:
On the navigation bar, click Administration and choose Webhooks.
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 a macro if the selected event supports it.
Pick one or more triggering events.
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.
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.