2

I'm trying to implement paging in SP 2013 REST. This is the endpoint / querystring that I have:

/_api/web/lists/getbytitle('Projects')/Items?$top=15&$orderby=Created%20desc&$filter=(((Status%20eq%20%27Manager%20Review%27)))&$skiptoken=Paged=TRUE&p_ID=2761

Notice the "&$skiptoken=Paged=TRUE&p_ID=2761" - When I change the p_ID parameter - the results doesn't change. I understand that $skip doesn't work so I should do $skiptoken instead. But I've tried many times and the results stay the same.

Can someone point me in the right direction?

4

As per OData V4 specification, SharePoint implements server-side paging and you can use the link provided in the "next" variable contained in the API results.

In case of XML/Atom response, you will find the next variable at XPath:

/feed/link/@href

or in case of JSON response, you will find the next variable:

{
    d: {
            results: [],
            __next: "https://ServerUrl/sites/SiteColl/_api/web/lists/getbytitle('Testing%20List')/items?%24skiptoken=Paged%3dTRUE%26p_SortBehavior%3d1%26p_ID%3d1&%24top=1"
       }
}

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.