Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Srikanth Inuganty 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

1 vote
Tuncay Senturk _Snapbytes_
Community Champion
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.

Srikanth Inuganty February 28, 2025

Thank you @Tuncay Senturk _Snapbytes_ ,

I tried the below 

 

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

It still retrieves the same result set (same results as startAt= 0) and the results are limited to 100.  Please suggest.

Tuncay Senturk _Snapbytes_
Community Champion
March 2, 2025

Are you sure you tried the below two URLs? 

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

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

Suggest an answer

Log in or Sign up to answer