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.
Community moderators have prevented the ability to post new answers.
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=.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And now you need to replace the "." with "_" as of November 2016
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works perfectly !! thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works perfectly adding '_' thanks guys
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in June 2018 it does not work (not with percent sign, dot sign or underscore) :(
SORRY, I take that back. it works (just have to be careful with the ampersand sign)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
${JIRA_Base_URL)/rest/api/2/group?groupname=SE&expand=users
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
all above solutions are not working for me as i have 2000 resources,
and beyond 1000 users it is not returning any record
i tried applying wild search a..z
but it doesnt work for characters 'c' and 'g'
if anyone have any idea please share
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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=@&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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This doesn't seem to work either for me on the latest jira cloud :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If possible, I would suggest to get all users directly from a database since it's easier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Treethawat, nope its not possible to get from database directly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.