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

How to update branch permission using bitbucket server api?

KingDrogba March 11, 2020

I wanted to updated the branch permission using bitbucket server api but I did not found any. Also, I want to update in such a way that all branches under a repo should exhibit this permissions and any new branch created should also have this permission.

Please advise.

I am following this api documentation - https://docs.atlassian.com/bitbucket-server/rest/6.1.1/bitbucket-rest.html?utm_source=%2Fstatic%2Frest%2Fbitbucket-server%2Flatest%2Fbitbucket-rest.html&utm_medium=301&_ga=2.247349636.1680944313.1583739652-561280368.1579901771#idp238

Thanks, 

Neelmani 

1 answer

1 accepted

0 votes
Answer accepted
Evan Slaughter
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2020

Hey @KingDrogba  - it looks like the REST API endpoints you're looking for are actually going to be over at our Ref restriction endpoint documentation. Specifically, making a POST to the following endpoint should allow you to make the changes you're describing:

  • /rest/branch-permissions/2.0/projects/{projectKey}/repos/{repositorySlug}/restrictions

Lastly - just so you have it, the full list of available REST API endpoints can be found here in our REST API documentation.

Hope this helps!

Thanks,

Evan Slaughter

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events