POST service management
Repository administrators can add a POST service to a repository. Bitbucket POSTs to a service URL you specify. Bitbucket supports HTTPS and basic authentication. For example, you can use a URL in the format:
The POST request originates from the IP addresses described in our firewall information page. You may need to configure your firewall to accept connections from these IP addresses.
The service receives an POST whenever user pushes to the repository. The content header of the POST has an
application/x-www-form-urlencoded type. This service behave similarly to an HTTP publish/subscribe service. The payload has
payload= prepended to the actual payload. The payload is url encoded content.
Set up the POST service
You can set up the POST service manually or you can automate the creation of a service from your own application.
Manually from Repository Administration
- Go to the repository's settings.
- Click Services in the left-hand navigation.
The Services page appears.
- Select the POST service from the services dropdown.
- Click Add service.
A new section appears for the POST service.
Enter the URL where Bitbucket should send its update messages.
- Press Save.
Automatically fill in from another application
If you are integrating with Bitbucket and looking for an easy way to add the service for your users, there are two methods you can use to automate this. You can send the user to a URL structured in the following way:
If you're using OAuth or passing through basic authentication, you can use the api to accomplish this as well
When a user makes a push against a repository, Bitbucket POSTs to the URL you provided. The body of POST request contains information about the repository where the change originated, a list of recent commits, and the user that made the push.
Was this helpful?
Thanks for your feedback!