Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to set mainbranch in bitbucket via api v2

I connect to the question, I need to periodically create new branches and change main branch

but I can not appoint main branch

this action is not mentioned in the documentation


not working, I send

'type': 'branch',
'name': 'branch_name'}


not working, I send

{'parents': 'master', 'branch': 'branch_name'}


1 answer

2 votes

Hello Денис

With the v2 API being so new we have noticed a few people asking the same. This short answer if you can make modifications to the main branch within the v2 API is no. The longer answer is there are feature requests and there is more to come within the v2 API in the future. With the changes spawned from GDPR, there is work that needs to be done beforehand. There is a feature request I would suggest you vote and watch to receive updates on its status. You may find this request at Issue #13306.

I hope this proves helpful and helps to clarify what is possible within the v2 API.

Stephen Sifers

I understand everything, but the task has been hanging since 2016, how many votes do you need to solve this problem?

Hello Денис,

Feature requests don’t always come down to votes themselves, there are other factors which may cause one feature to move to production and other features to have to wait. The best explanation of how new features get approved is within the Implementation of New Features Policy. This policy explains all of what is evaluated when a new feature gets approved.

I hope this is helpful in explaining what is needed to approve a feature request.

Stephen Sifers

@Stephen Sifers a year later and this hasn't been prioritized or worked on. what gives?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,762 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you