Skip to main content
Solved

Pagination not working

  • April 23, 2026
  • 5 replies
  • 97 views

Forum|alt.badge.img+2

I have read through the guide(s) and posts, but still not able to solve the issue.

The pagination info is on the top of the API response 
I am on page 2, reteriving only 1 record. I can reterieve max 100.
This the API endpoint i am using: /api/result?pageNumber=2&pageSize=1

{
"pagination": {
"total": 29486,
"pages": 14743,
"page": 2,
"pagesize": 1
},
"data": {
"cases": [
{
"index": 1,
"id": 1,
"subject": "Hidden",
"description": "Hidden",
"plaintext": "Hidden",
"solution": "Hidden",
"status": "Hidden",
"priority": null,
"impact": "Hidden"
}
],
"total": 1
}
}

I have overridden pagination - because not all endpoints are paginated.

I dont want to reterieve all pages (which are 30 if i reterieve 1000 records per pageSize) before i know i can reterieve first 5

This setting should be 500 records, but i am only getting 100

 

Best answer by aftabp

I have got it now.
The issue was parameter name.

In the API resposen, paramter for page numer is page. In actual, the paramter name is pageNumber. After i figured it out, trhings work:

 

5 replies

Forum|alt.badge.img+2
  • Author
  • Champion
  • April 27, 2026

I have had some success after changing a few things, but not quite there yet.
I get data in DWH, but the execution job stops with this error: 
 

Failed to execute endpoint 'GetCases':
Pagination for endpoint 'GetCases' stopped due to hitting configured max limit of 60 pages. Please increase limit.

Total results: 29532
Maximum pages are 60
Results per page: 1000

    "pagination": {
"total": 29532,
"pages": 60,
"page": 1,
"pagesize": 1000
}

For my Override Pagination settings:
 
stopCondition:  /*/*/pagination[page != pages][1]
i have also tried: 
stopCondition: (*/*/*)[1]

Max number of pages: 1000
page:  {TX_NextPage} 
pageSize = 500


 

I am caching to file, and all the raw file are identical 


Forum|alt.badge.img+2
  • Author
  • Champion
  • Answer
  • April 27, 2026

I have got it now.
The issue was parameter name.

In the API resposen, paramter for page numer is page. In actual, the paramter name is pageNumber. After i figured it out, trhings work:

 


Forum|alt.badge.img+2
  • Author
  • Champion
  • August 6, 2026

I have to open this on again and need some help , ​@Thomas Lind 
The data stream stops at this:

{
"pagination": {
"total": 47480,
"pages": 16,
"page": 17,
"pagesize": 3000
},
"data": {
"cases": null,
"total": 0
}
}

I have tried these two stopConditions:
 /*/*/data/cases[1] 
/*/*/data/total[1]

In my logs, i can see that 20 files have been created.


Each files has upto 3000 records
The last file () looks like this:

{
"pagination": {
"total": 47480,
"pages": 16,
"page": 20,
"pagesize": 3000
},
"data": {
"cases": null,
"total": 0
}
}

Its still not working.
I keep on getting:

Failed to execute endpoint 'GetCases':
Pagination for endpoint 'GetCases' stopped due to hitting configured max limit of 20 pages. Please increase limit.

I have tried Max. number of pages as 0, but then it doesnt stop
The number of log files keep on increasing

 


 


Forum|alt.badge.img+2
  • Author
  • Champion
  • August 6, 2026

I have spend a couple of more hours on this with the same result. 
I have now created a ticket


Forum|alt.badge.img+2
  • Author
  • Champion
  • August 7, 2026

After couple of hours of testing, i have resolved the issue. Though i dont know how and i am hoping that someone can shed some light.

Why did Genric worked while flatning the table, and not Column?

When flatning the table, i have used Genric instead of Column (for my previous flattened tables i have used Column):
 

Instead of Override Pagination, i have used Query to define Dynamic values:
 

 

 

WITH Numbers AS
(
SELECT 1 AS pageNumber

UNION ALL

SELECT pageNumber + 1
FROM Numbers
WHERE pageNumber < 20
)
SELECT pageNumber
FROM Numbers
OPTION (MAXRECURSION 20);