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

Add users in Stash

Susant Prusty September 13, 2014

Hi,

I have to add 300 users to stash, is there a script available to add all users at one go?

Thank you

Regards,

Susant

2 answers

2 votes
ThiagoBomfim
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 14, 2014

Hi Susant,

I believe that you meant create users in Stash by saying "add users to Stash", right? 

Please refer to this REST API in order to create users in Stash. The example below will create the user with the following characteristics:

  • Username: testuser4
  • Password: testuser4
  • Display name: Test User 4
  • Email: test@user4.com
  • Group: not assigned to any group

$ curl -H "Content-Type:application/json" -H "Accept:application/json" --user admin:admin -X POST 'http://localhost:7990/rest/api/1.0/admin/users?name=testuser4&password=testuser4&displayName=Test%20User%204&emailAddress=test@user4.com&addToDefaultGroup=false'

To add the created users to a group, please follow the guidelines I posted on this answer here.

I hope that info is helpful to you!

Best regards,
Thiago Bomfim
Atlassian Support - DevTools

Jewel Francis September 24, 2014

Hi Thiago, I believe what Susant asked was, to create the users inside Stash. Not in a group inside Stash. Just as we discussed before, with the help of REST API, addition of users into a Stash group is possible. But the same can be applied to Stash in general? That is, can we create 300 users in Stash in a single go. (These users are not in Stash now) Do we have a plug in to import the users from some kind of file (.csv) to Stash and create them in it? Regards, -Jewel

ThiagoBomfim
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 29, 2014

Hi Jewel, This cURL call above will create a user inside Stash. If you create a script with 300 cURL calls like the one above you will be able to create 300 users. You will have to create a script to parse your CSV file and generate the cURL call commands above. There is no plugin to do that. As I explained the cURL call above creates a user with those characteristics. Let us know how you go. Best regards, Thiago Bomfim Atlassian Support

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2014

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events