Configuring web hooks
Web Hooks allow you to post changeset information to a specific URL. For each commit indexed by FishEye, the changeset data will be sent in JSON format to all configured URLs using a POST request.
You can use this feature to build integration with applications such as issue trackers, continuous integration solutions or notification systems.
Adding web hooks
Web Hooks can be added or edited from the configuration page accessible from the Administration interface.
Go to the Admin area and click Web Hooks, under 'Repository Settings'.
Click Add to create a new Web Hook. Choose a repository and enter your URL. Click Test and Save to verify and store your configuration. Web Hooks also support basic authentication, which can be configured in the Advanced Options:
Disabling web hooks
To disable Web Hooks, go to the Administration interface > Plugins
Show System Plugins and navigate to the FishEye/Crucible Web Hooks Plugin and click Disable.
Demonstration of web hooks
PostBin is a service for debugging web hooks.
Start by going to http://www.postbin.org and click Make a PostBin.
Grab your PostBin URL and create a Web Hook with it using a test repository.
When you click Test a dummy changeset will be sent to the PostBin URL. Refresh your PostBin page and you should see the data sent by FishEye.
This is a demonstration of the data sent by FishEye with a configured WebHook. The next step would be to write a service which captures this data and processes it.
Web hook data
Web Hooks will send changeset data in the following JSON representation:
Sample web hook scripts
The following script examples show you how to set up Web Hooks in various languages.
This example requires the simplejson library.
Ruby and Sinatra
The example below will display the changeset information in the logs of the Sinatra server.
Was this helpful?
Thanks for your feedback!