Hi,
Looking for some guidance on how to create multiple Jira users via the REST API.
I've seen the response to this question but it only covers a single user.
I'm looking to create 2k unique users in one go.
Thanks in advance!
Regards,
Gary
The easiest way is to use the Jira CLI. It handles the WebSudo so you don't need to deal with that manually. There are examples in the documentation to help you get started. We use this a lot when we do this sort of thing. It's a really powerful admin tool, so I recommend it highly.
Dear @Gary Pasquale ,
I just wrote an article on this. Very simple and without fighting with cookies ...
How-to create multiple users in Jira with one batch run
So long
Thomas
Hi @Dave Theodore [Coyote Creek Consulting]
I'm aware of the CLI and that was my first choice.
However, the environment that I'm connecting to isn't allowing a connection via the CLI.
Our server is hosted by a 3rd party, so rather than wasting further time on that I'm interested about how to do it via the API.
Thanks,
Hmm... The Jira CLI uses the REST API, so it should work.
It's a bit more painful to do this in the native API, since you will need to deal with creating a cookie, passing websudo and referencing the saved cookie for future connections. Check this post for some help there using curl. You can add to the bash example or use it as a guide to do this in your favorite scripting language. You will need to create an array containing the minimum requirements for user creation for each user, then pass each element to the appropriate switch in the curl command. It's messy business to do this in bash, so you would be better off using python or something that has more advanced array handling capability. Check the REST documentation to understand how the methods work. You'll at least need the "user" and "group" methods. Good luck!
It looks like you're new here. Sign in or register to get started.