Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Add user to group using API

Asra Nousheen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 11, 2018

Hi, I am trying to add an user to group using bitbucket api.

But failing because of naming exceptions.

Bitbucket Version: 5.5.4.

 

POST https://bitbucketURL/rest/api/1.0/admin/groups/add-user

{
"context": "NewGroup",
"itemName": "test1"
}

 

Error:

{"errors":[{"context":null,"message":"No user named 'test1' was found","exceptionName":"com.atlassian.bitbucket.user.NoSuchUserException"}]}

 

Can someone please tell me what is wrong in this

1 answer

0 votes
Lonnie
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 11, 2018

Hello, I use the following syntax:

 

curl -k -u <ADMIN>:<PASSWORD> -X PUT -H "Content-Type: application/vnd.atl.plugins.plugin+json" -d '{"name": "userID","displayName": "USER_NAME","email": "userID@company.com"}' https://<bitbucketURL>/rest/api/1.0/admin/group/add-user

 Having said that, this works only for internal directories

 

I hope this help 

Lonnie

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, compass, developer experience, devex, platform engineering, internal developer platform, component catalog, atlassian learning, productivity tools, developer productivity, software architecture, compass webinar, engineering teams

Discover how Compass drives DevEx and productivity at Atlassian 🏃🏻‍♂️

Learn why Compass was built to tackle dev experience at scale. See how Atlassian uses it to boost visibility, reduce cognitive load, and drive consistency—plus tips to get started and customize your IDP for stronger team engagement.

Join the webinar ✨
AUG Leaders

Atlassian Community Events