How to set repository users and roles using bitbucket api

I've created a repository in BitBucket using the api:

curl -v -X POST -d '{"scm": "git", "is_private": "true", "fork_policy": "no_forks", "project": {"key": "MARS"}}' -H "Content-Type: application/json" https://api.bitbucket.org/2.0/repositories/myteam/test -u <user-name>


How can I set user-access roles for the new repository?

Specifically I want to set a group TeamAdmins to have admin privileges

 

Thanks

1 answer

1 accepted

This widget could not be displayed.

Hi Eyal, if you're using the version 1 of the API you can achieve that as explained in the article Group privileges endpoint.

If you're using the version 2, I'm afraid it won't be possible, you'll need to do it from the web interface. 

Regards,

Ana

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,196 views 8 10
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you