3

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 ?

UPDATE

Apparently this has been moved to the "investigation queue". Here is a similar question.

3

The $skip parameter does not work in SharePoint 2013 for list items. It only works for collection of data (like list collections, etc).

Paging using REST/OData with SP 2013

A workaround is to use __next property which gives you the next URL you should query.

https://stackoverflow.com/questions/18964936/using-skip-with-the-sharepoint-2013-rest-api

  • 1
    So the skip example given here is actually wrong !! – Vipul Kelkar Jan 5 '15 at 16:03
  • @VipulKelkar, if it is not working for you with the same syntax. Then that means its not supported. I can't test currently to confirm. – Amal Hashim Jan 5 '15 at 16:06
  • 2
    What do you mean by Collection of data? Are list items not a collection of data? That line does not make any sense to me. – NLV Dec 1 '15 at 17:46
1

So the issue is with URL encoding, This url works:

https://[YOURSITE]/_api/web/lists/getbytitle('updates')/items?%24skiptoken=Paged%3dTRUE%26p_ID%3d2&%24top=2

But this decoded version does not:

https://[YOURSITE]/_api/web/lists/getbytitle('updates')/items?$skiptoken=Paged=TRUE&p_ID=2&$top=2

  • Just to clarify for others, the p_ID is referring to the previous item's ID value, not the page number. – Tracy Nov 2 '18 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.