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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Bitbucket Cloud API - Remove write access

I'm trying to setup branch permissions via the API and would like to remove the ability to write to the branch for everyone, aside from a single group of users. However, I can't seem to figure out how to tell the API NOT to give write permissions to "Everyone".

I figured if I simply didn't give a list of users, it would work, but no. This is the call I attempted:

{ "kind": "delete", "branch_match_kind": "branching_model", "branch_type": "release", "pattern": ""}

I also tried the following:

{ "kind": "delete", "branch_match_kind": "branching_model", "branch_type": "release", "pattern": "", "users": [], "groups": []}

Documentation is pretty useless in helping me figure out how to do this.

In summary: how would I remove the ability for users to write to a branch via the API?

1 answer

1 accepted

0 votes
Answer accepted

Ok, so it's a pretty confusing behaviour I find, but I have figured out how to set it up. Apparently, if you specify any "kind", with no user or an empty list, it will default to allowing write for everyone.

What you need to do is setup push permissions first with the users and groups you want to be able to write to the repository, or an empty list of users and groups, then you can setup your other permissions.

Suggest an answer

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

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

464 views 4 4
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