Pull Request POST service management
Repository administrators can add a Pull Request POST service to a repository. Bitbucket Cloud POSTs pull request event data to a service URL you specify. You specify a URL in the format:
Bitbucket Cloud supports HTTPS and basic authentication. When configuring the pull request POST service, you can choose to get event data about the following:
|Approve / Unapprove||Fires when user sets or unsets Approve for a pull request.|
|Comments||Fires when a user creates, edits, or deletes a pull request comment.|
|Create / Edit / Merge / Decline||Fires when a user creates, edits, merges, or declines a pull request.|
The content header of the POST has an
application/json type. This services behave similarly to an HTTP publish/subscribe service. The payload is a json document.
The POST request originates from the IP addresses 220.127.116.11 and 18.104.22.168. You may need to configure your firewall to accept connections from these IP addresses.
Configure the Pull Request POST service
You can 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 Bitbucket.
Manually configure from the repository administration page
- Go to the repository's settings.
- Click Services in the left-hand navigation.
The Services page appears.
- Select the Pull Request 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.
- Choose the pull request events you are interested in by checking the corresponding box.
- Press Save.
Automatically configure the URL from another application
If you are integrating with Bitbucket Cloud 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
Examples of POST data
When a user makes pull request's against a repository, Bitbucket POSTs to the URL you provided. The POST request body contains information about the pull request change.
Was this helpful?
Thanks for your feedback!