Add users in Stash

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

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

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

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

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

22,452 views 26 12
Join discussion

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