POST service webhook for Stash
Repository administrators can add a POST service to a repository. Stash POSTs to the service URL you specify.
You can use an URL with the following format:
The service receives a POST whenever the user pushes to the repository.
The content type header of the POST has an
application/json type. The content is a JSON payload that represents the repository push.
Setting up the POST service
You can either set up the POST service manually or you can write a service to automate this. You would write a service if you are integrating an application with Stash.
Set up in the repository settings
- Go to the repository's settings.
- Click Hooks in the left-hand navigation.
- Click Enable for the 'Post-Receive Webhooks' item. You can add up to 5 URLs for where Stash should send its update messages:
- Press Save.
When a user pushes to a repository, Stash POSTs to the URL you provided. The body of the POST request contains information about the repository where the change originated, a list of recent commits, and the name of the user that made the push.
Example of payload
This is an example of a push that contains one commit that changes 2 files (pom.xml) in folders iridium-common and iridium-magma.
Some of the system-wide properties for the Webhook Plugin can be overridden in the Stash configuration file. The available properties are listed in Stash config properties.
Was this helpful?
Thanks for your feedback!