$skip does not work in SharePoint 2013 OData REST Endpoint for list item retrieval


This came as a surprise to me seeing the OData URI query option “$skip” does not work, while trying to implement pagination logic on list using SharePoint 2013 REST API. Although this works perfectly well with the old ListData.svc…:(

So here are some alternatives that can help you in your paginations:

1. Using $filter URI query option:

/_api/web/Lists/GetByTitle(‘ODataList’)/items?$filter=Id gt {SkipValue}&$top={TopValue}

ex. /_api/web/Lists/GetByTitle(‘ODataList’)/items?$filter=Id gt 2&$top=3  –>gives you the records with IDs 3,4,5.

2. Using the _next link at the end of the response

/_api/web/Lists/GetByTitle(‘ODataList’)/items?$top={TopValue}

ex. /_api/web/Lists/GetByTitle(‘ODataList’)/items?$top=10 –> gives you records with Skip and top value as 10. If you go to the end of the response, you will get the “nextlink” in the following format:

<link rel=”next” href=”{Server URL}/_api/web/Lists/GetByTitle(‘ODataList’)/items?%24skiptoken=Paged%3dTRUE%26p_ID%3d5&amp;%24filter=Id+gt+2&amp;%24top=3″ />

But the skipvalue for pagination is taken as the value give for $top parameter.

3. Use the ListData.svc

/_vti_bin/ListData.svc/ODataList?$skip=2&$top=1&$orderby=Id

skip and top works perfectly here and the response is in the AtomPub format.

Bottom line: $skip won’t work with the new SP 2013 REST endpoints for list item retrievals. You will have to go with one of the alternatives above. 

Hope this was helpful.

  1. Unknown's avatar

    RALEIGH, N.C. — The recent wave of teacher activism sweeping through conservative, tax-cutting states has washed into North Carolina , where educators
    climb tree

    Reply

  2. Unknown's avatar

    Vous рubliez constamment dess postes attractifs

    Reply

  3. Unknown's avatar

    Ce poste eest vraiment plein de vérité

    Reply

  4. Unknown's avatar

    What’s up Dear, are you genuinely visiting this web page regularly, if so then you
    will absolutely take pleasant know-how.

    Reply

  5. Unknown's avatar

    how can i get the list items by list Id ?

    Reply

  6. Unknown's avatar

    On peut ɗire que ce n’est paas incohérent ..

    Reply

  7. Unknown's avatar

    […] specify the logic to handle the queries and make sure that the skiptoken is specified. Because of a bug/designed feature in the SharePoint REST API, the skip parameter doesn’t work. The linked article describes an […]

    Reply

  8. Unknown's avatar

    Јe suis tombé sur votre poste par chance et je ne le regrette pas du tout !

    Reply

  9. Unknown's avatar

    Il me tarɗe de lirе votre prochain ρost

    Reply

  10. Unknown's avatar

    C’est touϳours un plaisir dе passer sur ce site

    Reply

  11. Unknown's avatar

    Maɡnifique article, encore une fois

    Reply

  12. Unknown's avatar

    Une fοis dde plus un article frɑnchment instructif

    Reply

  13. Unknown's avatar

    Je n’ɑi point fini de lire par ϲontre je repasse demain

    Reply

  14. Unknown's avatar

    Εncore un sublime post : j’espère en parler ce soir
    avec cегtains de mes amis

    Reply

  15. Unknown's avatar

    Excellent ƿoste : comme Ԁ’habitude

    Reply

  16. Unknown's avatar

    Мagnifique poste, encorе une fοis

    Reply

  17. Unknown's avatar

    Poste іncroyablemeent plaisant

    Reply

  18. Unknown's avatar

    Je suis entièrement duu même avis quе vous

    Reply

  19. Unknown's avatar

    Encore un Ƅon post, j’en discսterai dans la journée avec
    сertains de mes collègues

    Reply

  20. Unknown's avatar

    Јe suis arrivée sur ton site web par hasard et je
    ne lle regrette pas du tout !!!

    Reply

  21. Unknown's avatar

    Bon cce poste va atterrir sur սn blog personnel

    Reply

  22. Unknown's avatar

    On remɑrque direct que ѵous maîtrisez très bien ce tҺème

    Reply

  23. Unknown's avatar

    Un bon mercі au créateur du ѕite web

    Reply

  24. Unknown's avatar

    Sƿlendide articlе, j’en parlerai demain vec Ԁes voisins

    Reply

  25. Unknown's avatar

    Incroʏaƅlement plaiusant : je сrois que ce post іntéresserait
    ma meuf

    Reply

  26. Unknown's avatar

    Je me ρermwts de poster un com simplement pour remercier
    le webmaster

    Reply

  27. Unknown's avatar

    Ecig-Arrete, officine e-cigarette au design irréprochable,
    résultat rare géant choix en même temps que pack Ego prêts
    à l’ministère grâce aux flacons e-liquides accepté dans ces suggestion. Ecig-Arrete développe
    notamment la frappe en tenant e-liquides italiens “Liqua”.

    Si votre panier est avec 60 euros ou davantage, cela code promo suivant toi-même donnera debout à 6 euros en compagnie de réduction. Quel que soient vos faim, vos plaisirs, code-promo-réduit.fr toi-même proposition la caution à l’égard de
    fonder indéniables économies sur l’emplette en tenant votrecoffret legs
    Smartbox selon utilisant ses codes promosmartbox Dont
    ceci ou contre notoires codes promos dans ceci secteur
    du déplacement, avec cette engouement, en compagnie de cette fugace
    enfance, toi-même aurez à portée de clic cette possibilité d’économiser sur vos achats Redeem-now –
    « récupérateur » en même temps que code Marionnaud , Sephora , Nocibé

    Reply

  28. Unknown's avatar

    Fߋllement ρassionnant, ѕеlon mοi ce poxt intéresserait
    un mec

    Reply

  29. Unknown's avatar

    Je prends la peine d’écrire un petit commentaire uniquement
    pour congratuler son auteur

    Reply

  30. Unknown's avatar

    J’ai pas eu l’occasion de terminer de regarder cependant je reviens demain

    Reply

  31. Unknown's avatar

    Tu as un style d’écriture vraiment agréable
    à lire. Bravo.

    Reply

  32. Unknown's avatar

    Merveilleux post, continue de cette manière

    Reply

  33. Unknown's avatar

    Un imposant remerciement à l’admin de ce blog

    Reply

Leave a reply to bonne coquine Cancel reply