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

How to set repository users and roles using bitbucket api

Eyal Heinemann July 4, 2017

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

0 votes
Answer accepted
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 6, 2017

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
TAGS
AUG Leaders

Atlassian Community Events