Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

API responds with Cannot get programs. The node count limit of '100' has been exceeded. To increase

Janu Shah May 3, 2023

While executing the below request:

 

https://opshub.jiraalign.com/rest/align/api/2/Programs?$filter=portfolioId+eq+4+or+portfolioId+eq+8+or+portfolioId+eq+9+or+portfolioId+eq+10+or+portfolioId+eq+11+or+portfolioId+eq+12+or+portfolioId+eq+13+or+portfolioId+eq+14+or+portfolioId+eq+15+or+portfolioId+eq+16+or+portfolioId+eq+17+or+portfolioId+eq+18+or+portfolioId+eq+19+or+portfolioId+eq+20+or+portfolioId+eq+24+or+portfolioId+eq+26+or+portfolioId+eq+27+or+portfolioId+eq+29+or+portfolioId+eq+30+or+portfolioId+eq+31+or+portfolioId+eq+32+or...

 

I am facing the following API response with status code 400 bad request.

Error message: Cannot get programs. The node count limit of '100' has been exceeded. To increase the limit, set the 'MaxNodeCount' property on EnableQueryAttribute or ODataValidationSettings.

 

What is the cause for this api error?

3 answers

1 vote
Heidi Hendry May 3, 2023

Hi Janu,

Are you looping your request?

API 2.0 GET usage and filters – Jira Align

 In addition, because of the number of records that can be returned in a GET API call, 100 items is the maximum that can be returned in a single call. Thus when using the API, you must loop through batches of 100 to get all items.

0 votes
James Webber May 3, 2023

I am not sure about Align but in Jira I thought the default limit was 100 Max 100 records when we do API calls against the C... (atlassian.com)

I gave up trying to use API to get data from Align and moved back to export to xlsx/csv manually.

0 votes
Allan Maxwell
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 3, 2023

I'm guessing you have hit the limit on how many "OR"s you can have.  Can you alter the filter to something smaller such as: {{base_JA_url}}/Programs?$filter=portfolioId EQ 1

Allan Maxwell
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 4, 2023

The ODataValidationSettings.MaxNodeCount is a setting on the backend web service and thus you will not be able to change it.  Your best option is to reconstruct your $filter clause such that there a 99 or fewer "OR"s.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events