Hi all,
im new to JIRA Rest api. I want to save all the JIRA users to my database.
How do I get all the users from JIRA REST API?
Btw I'm using Java to save to my database.
You cannot get all users via REST API. You can only search using a search string.
Another option is to get all users in a group. If all of your users are in a group like "jira-users", you can try that: https://docs.atlassian.com/jira/REST/latest/#d2e31
If possible, I would suggest to get all users directly from a database since it's easier.
Thank you Jobin, Is there a way to get all the groups? . i was thinking of getting all groups after that get all users in group by group.
Thank you Treethawat, nope its not possible to get from database directly
Nope, you can only search for groups using a search string (just like users). If you don't have a single group that has all users, the only other option is to write a custom plugin to expose a new REST resource I guess.
if i have a group called "SE" how am i gonna get all users who are in that group. Please provide me a REST call url. Thank you!
Came across this issue and I noticed that there is a way to do this:
GET /rest/api/latest/user/search?startAt=0&maxResults=1000&username=%
This will get you a full user list (by default, will show active users only); see the documentation for more features (paging, showing inactive users, etc.).
This doesn't work with JIRA 7.2.0
If you replace '%' by '.' it works
GET /rest/api/2/user/search?username=.
And now you need to replace the "." with "_" as of November 2016
This still seems to show inactive users. Also if you want to filter by a ".", how do you do it? I used to use "%.%" to get first.last usernames only. Now I have to use "." and I get a lot of inactive users and local db users instead of the ones I want.
I don't think this is true as a blanket statement. It is very possible, as that is how you find the users attributing to the active licenses per Atlassian's recommendation. I don't like the solution that much since you need the db password, etc, but it is a great workaround if you are in a bind.
HI,
Cam someone please let me know how to use above GEt rest API statement with jira url prefix to fetch alla ctive users in jira
<myjira url>/GET/rest/api/latest/user/search?startAt=0&maxResults=10&username
Is this the correct way to use?
Thanks,
Madhuri
Underscore "_" does not work for me. However, all users can be assumed to have an email address, thus, "@ and ." works.
GET /rest/api/2/user/search?username=@&amp;startAt=0&maxResults=1000&includeActive=true&includeInactive=false
or
GET /rest/api/2/user/search?username=.&startAt=0&maxResults=1000&includeActive=true&includeInactive=false
Best regards,George
Not working for me with Jira v7.7.1. Both are returning internal server error...
Edit: Only v7.7.1 seems to be affected. v7.7.0 and v7.8.0 are working.
In Jira 7.3.0, it does not appear to be possible to search for "@ or %40". If it were, then we could iterate over a-z and 0-9 and search for "CHAR@". Also:
I'm currently able to get a list of all users by alternating between Active and Inactive users, but this will fail when my company adds 90 users. We need a better solution.
all above solutions are not working for me as i have 2000 resources,
and beyond 1000 users it is not returning any recordi tried applying wild search a..z
but it doesnt work for characters 'c' and 'g'
if anyone have any idea please share
This doesn't seem to work either for me on the latest jira cloud
HI!Can anybody help me to get the list of ALL users? I tried to use all of the cases, but nothing worked. I get the empty list every time. Response status is OK.
It looks like you're new here. Sign in or register to get started.