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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,913
Community Members
 
Community Events
184
Community Groups

Unable to create group with the rest api function when using "administrator" personal access token

Currently I am writing a script to test the Rest API functions of BitBucket. Using the administrator personal access token, I was able to use most of the Rest API functions, such as creating projects, repository. The administrator account also has "system admin" set in the global permission.

However, when I try to use the create group API function (http://hostname:7990/rest/api/1.0/admin/groups?name=testcreategroup) , it will result in error code : 401.

[errors:[
[context: null,
message: You are not permitted to access this resource, exceptionName:com.atlassian.bitbucket.AuthorisationException]
]
]

 

When I test using curl in the command line, using the administrator token will result in the same error. However if I use username and password instead (-u admin:password), the command will be successfully executed and the group created. 

Would like to clarify if this is an issue/bug, or is this an expected behavior from using personal access token for group creation? or am I actually missing out some permission setting for the administrator account/token? 

Thanks in advance.

2 answers

Bumping this as I am experiencing the same issue but with deleting groups.

I have been unable to find a way to generate a token that has permission to do this.

Was this resolved? I'm facing a similar issue as well. I'm able to hit the admin/groups on my bitbucket server api endpoint using the personal access token I've created for my admin account, but I'm not able to hit admin/permissions/groups (I get the same error message that Ling has posted). I have no troubles when I use my username and password for authentication though.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events