Forums

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

Not all Projects Shown with REST API "/rest/api/3/project/search?expand=insight"

Jesse Ortega Jr
Contributor
October 31, 2024

Hello. I am using REST API "/rest/api/3/project/search?expand=insight" to get a list of projects and their last update but I am only getting 50 out of 180 projects. Is there something that is missing in this REST API?

3 answers

4 votes
Trudy Claspill
Community Champion
October 31, 2024

Hello @Jesse Ortega Jr 

Reviewing the documentation for the endpoint:

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

...that endpoint returns paginated results, and the maxResults parameter by default is set to 50.

You need to call the endpoint multiple times to get all the pages of data. Refer to information in the Pagination section:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#expansion

You can also try increasing the maxResults parameter and including that in your endpoint call. The pagination section talks about how to find the maximum value that can be used for maxResults for a given endpoint.

0 votes
Jesse Ortega Jr
Contributor
November 4, 2024

Thank you both for your response and help with this. Unfortunately, I'm still facing issues, but the good thing is that I was told this is no longer needed. 

0 votes
Joseph Chung Yin
Community Champion
October 31, 2024

@Jesse Ortega Jr =

The default maxResults is 50 projects, and once should be able to  change parameter to return more results.  After that point, paging must be used with the startAt parameter.  You should  experimenting to increase the parameter for maxResults to see if more can be returned.

Take a look at this documentation -

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

Hope this helps.

Best, Joseph

Suggest an answer

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

Atlassian Community Events