You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hello,
I'm trying to commit files to a specific branch (That's already created) using the Bitbucket API. When executing in Postman it creates a commit on master rather than on a specific branch I've specified according to the documentation.
Specifically this is the endpoint I'm using:
https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/src#post
Here's my request:
POST https://api.bitbucket.org/2.0/repositories/{workspace}/{slug}/src/?parents=master&branch=TestBranch
I've tried omitting parents and just using branch but all attempts fallback to comitting to the master branch.
What's the proper way to call this endpoint to commit to a specified branch?
Thanks in advance.
I managed to get it working by posting those Query Parameters as form data as well along with my attached files. I guess I was thrown off a bit when reading the documentation and separated my files in form-data and query parameters attached to the endpoint URL.
Here's the Postman setup I used to get it working:
Announced in this blog, this holiday season we’re celebrating all things CI/CD and between now and the end of 2019 we’ll be showcasing content, use cases, feature announcements and more. One featur...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.