Solved

RSD pagination with incrementing value

  • 8 June 2023
  • 4 replies
  • 166 views

Userlevel 1
Badge +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?

icon

Best answer by Thomas Lind 8 June 2023, 15:17

View original

4 replies

Userlevel 6
Badge +5

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" />
Userlevel 1
Badge +1

@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!

Userlevel 6
Badge +5

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.

 

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

Reply