Forums

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

Jira API not returning all the data because of pagination

jmweli
Contributor
December 8, 2023

Hi Atlassian Community Developers,

 I am using this API - rest/api/2/users/search to return all the users in Jira. The API is returning the data however it is not returning all of it. When I look at the data I can see that some users are missing and yet they do exist in Jira. I think the reason the API is behaving this way is because it is missing the pagination parameters.

 Do you guys know how do I specify pagination in Jira? For instance, what parameter(s) should I specify in order for this Jira API to return all the data that I am looking for.

 Please advise.

 Thank you,

Johannes

1 answer

1 accepted

0 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 8, 2023

Hi @jmweli 

Please try using the startAt and maxResults parameters with your call:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-search-get

For example:

yourJiraUrl/rest/api/3/user/search/?query=displayName%20!%3D%20bill&startAt=51

 

Kind regards,
Bill

jmweli
Contributor
December 12, 2023

Thanks Bill, that worked!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events