How to get all users in jira using rest api

Hello Everyone !!

I want the list of all user in JIRA account (online) using rest api or want to search user based on email address.

I am trying to get this using below url but this is retuning empty  "[0]" values

https://testjira.atlassian.net/rest/api/2/user/search?username=sonika.jain@test.com

Please suggest

 

3 answers

Hi Sonika,

I am not sure if you can get all users from JIRA rest api, but surely you can search user by username, email id or text from below query

If you are running this directory in browser then make sure you are logged in to JIRA before running this.

You will get Empty value also if there is no user with that email id or name.

I have tested using CURL and running in browser both are working

curl -u testjira:testjira https://testjira.atlassian.net/rest/api/2/user/search?username=sonika.jain@test.com

Taha

0 votes

Hi, Sonica.

About getting all the users, this should give you some information:

https://answers.atlassian.com/questions/140370

Kind regards,
Jaime Kirch da Silveira
Atlassian Cloud Support

Hi,
It is possible to get the list all users (may be with in the limit of maximum returnable results). We need to use the search API.
https://servername/rest/api/2/user/search?username=%


The wildcard character to be used for this purpose is "%".

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,876 views 12 18
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot