lundi 5 janvier 2015

Issue with $skip in REST API



Here is a sample list i am using


enter image description here


I am testing some REST filters in the browser directly and checking the XML feed returned by the REST request. Below is the REST query which I used to get the first two items of the list and this works perfectly.



http://sharepointsite/sites/POC/_api/web/lists/getbytitle('samplelist')/items?$filter=Designation eq 'Developer' and Company eq 'Some Corp'


Now I used $top=1 at the end which also worked well and returned only the first item.



http://sharepointsite/sites/POC/_api/web/lists/getbytitle('samplelist')/items?$filter=Designation eq 'Developer' and Company eq 'Some Corp'&$top=1


However, instead of $top=1 when I use $skip=1, the feed still returns the first two items.



http://sharepointsite/sites/POC/_api/web/lists/getbytitle('samplelist')/items?$filter=Designation eq 'Developer' and Company eq 'Some Corp'&$skip=1


Where is this going wrong ?








0 commentaires:

Enregistrer un commentaire