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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,940 views 1 5
Read article

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