Looking for API to get the list of all users in a JIRA project in JIRA Data Center

Srikanth Inuganty
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 27, 2025

I got thru the below API that retrieves users from a JIRA Project but limits it to 100 even when the maxResults is set to "250".  

I used the below API:

/rest/api/2/user/assignable/multiProjectSearch

and am passing the below parameters

projectKeys=RPSO&startAt=0&maxResults=250

 

Appreciate if you can please help me in getting all the users.  Also is there a way I can retrieve last login time for each of the user?

1 answer

0 votes
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2025

Hi @Srikanth Inuganty 

The multiProjectSearch API limits results to 100 (it's the hard limit), so it has no effect even if you set a higher value. To retrieve all users, you need to paginate through the results by incrementing startAt in multiples of 100.

You can use a loop to fetch users until there are no more results

rest/api/2/user/assignable/multiProjectSearch?projectKeys=<project-key>&startAt=0&maxResults=100

Start with a base value and keep increasing startAt by 100 (startAt=100, startAt=200 and so on) until you receive fewer than 100 users.

To obtain last login times, use the Get User API: /rest/api/2/user?username=<username>

I hope this helps.

Suggest an answer

Log in or Sign up to answer