Skip to main content
Solved

RSD pagination with incrementing value


Niels Jonker
Contributor
Forum|alt.badge.img+1

Hey community,

I am trying to set up pagination for my REST connector to ADP. I need to use the CData parameters $skip & $top.

My first call should be: https://api.eu.adp.com/hr/v2/workers?$skip=0&$top=100

Then I need to increment the $skip parameter by 100 so the next call would be: https://api.eu.adp.com/hr/v2/workers?$skip=100&$top=100

In need to end when I receive an empty response. 

Anyone that has experience with this?

Best answer by Thomas Lind

Hi @Niels Jonker 

I know it is not an REST data source, but if you are already using RSD files the same options should apply to this.

<api:set attr="EnablePaging" value="true"/>
<api:set attr="pageoffsetparam" value="$skip" />
<api:set attr="pagesizeparam"   value="$top" />
<api:set attr="pagesize"        value="100" />
View original
Did this topic help you find an answer to your question?

4 replies

Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1017 replies
  • Answer
  • June 8, 2023

Hi @Niels Jonker 

I know it is not an REST data source, but if you are already using RSD files the same options should apply to this.

<api:set attr="EnablePaging" value="true"/>
<api:set attr="pageoffsetparam" value="$skip" />
<api:set attr="pagesizeparam"   value="$top" />
<api:set attr="pagesize"        value="100" />

Niels Jonker
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 20 replies
  • June 8, 2023

@Thomas Lind wow that worked like a charm. So the offset parameter is incremented by the value of the page size starting at 0? Thanks a lot!


Thomas Lind
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 1017 replies
  • June 8, 2023

Exactly, it makes it way easy to set up pagination for RSD files.

The only issue is that it doesn’t match with nested calls, so you will have to make Query Slicers for that.

 


Matt Thomas
Starter

Awesome thanks @Thomas Lind - exactly the answer I was looking for with our pagination requirement!!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings