Hi,

We have a question on the functionality of the 'List' api (GET). We need to  understand the behavior for pagination. 

For the scenario:

https://cloud.na.sagecrm.com/sdata/XXXXXXXX/sagecrm2/-/Address?startindex=1&count=5


We see the following response:

{
   $url: "https://cloud.na.sagecrm.com/sdata/XXXXXXXX/sagecrm2/-/Address?startindex=1&count=10"
   $first: "https://cloud.na.sagecrm.com/sdata/XXXXXXXX/sagecrm2/-/Address?startindex=1&count=5"
   $next: "https://cloud.na.sagecrm.com/sdata/XXXXXXXX/sagecrm2/-/Address?startindex=6&count=5"
   $last: "https://cloud.na.sagecrm.com/sdata/XXXXXXXX/sagecrm2/-/Address?startindex=5&count=5"
   $totalResults: 8
   $startIndex: 1 .....

Considering that we have only 8 items in our result, our 'next' should be same as 'last'. But, we see a difference in the startindex values (for next, startindex is 6, and for last, startindex is 5). As per our understanding, next and last urls have to be same in such a scenario. Is there something we miss in our understanding? How is the startindex determined for the $last url ?


Thanks,

Harish