Trigger a URL on commit with Web Hooks
What are web hooks?
Web hooks allow you to customize, extend and integrate the web applications you use with anything else you can access programmatically. To web developers, web hooks are a simple design pattern that only require the ability to make web requests and to store some extra data about users. To users, web hooks are a way to get events and data in realtime from their web applications.
By using web hooks on your Beanstalk repository, you can get information about each commit to your Beanstalk repository.
How to activate web hook integration for your repository
In order to integrate Web hooks, you must first setup the integration settings within your repository. To do this, go to your Repository then Setup → Integration → Web hooks. To get started with the setup, click on Activate inside the page.
After clicking on the Activate button, you will need to enter Web Hook URL. Beanstalk will request this URL with POST data every time you commit something, passing along information about the commit.

After setting up a Web Hook URL, all you need to do is click Next step button and activate web hook integration for the repository you have chosen.

How to use it
Information about the commits is sent with JSON formatted data. On your side, you have a variety of options for parsing the post data. Check JSON homepage for a library in your favorite language.
http authentication on the web hooks
You can use http authentification on the web hooks, by providing the username/pass in the web hook url, like this:
http://myuser:mylogin@www.mydomain.com/myhook
{
message: "Sample commit comment.",
changed_files: [
["README","edit"],
["test/vimrc","edit"]
],
time: "2008/12/25 11:54:22 +0000",
author: "daffy",
author_full_name: "John Smith",
author_email: "john@beanstalkapp.com",
changeset_url: "https://account.beanstalkapp.com/repo/changesets/1",
revision: 2,
changed_dirs: []
}
What is included in the JSON data?
The JSON formatted data sends the following data on each commit:
- Message: The comment from the commit.
- Changed Files: The affected files.
- Time: The time and date of the commit.
- Author: The username of the person who made the commit.
- Author's Full Name: The full name of the author.
- Author's Email: Email address of the author.
- Changeset URL: The URL to exact revision in Beanstalk's web application (not the svn URL).
- Revision: The revision number for this changeset.
- Changed Directories: A list of directories that were updated.