Can't seem to get paging working using the 2013 syntax:
_api/web/GetFolderByServerRelativeUrl('/sites/Test1/Documents')/Files?$skiptoken=Paged=TRUE&p_ID=5&$top=1
The top
parameter is working but not the skiptoken
.
skiptoken
, there is a skip
token in the documentationURI Conventions (OData Version 2.0)
http://www.odata.org/documentation/odata-version-2-0/uri-conventions/
Use OData query operations in SharePoint REST requests
https://msdn.microsoft.com/en-us/library/office/fp142385.aspx
Search has different syntax
SharePoint Search REST API overview
https://msdn.microsoft.com/library/8a4f7863-e4c1-4099-9189-a1894db36930%28office.15%29.aspx
FAST Query Language (FQL) syntax reference
https://msdn.microsoft.com/en-us/library/office/ff394606.aspx
iREST iDOC
_api/web/GetFolderByServerRelativeUrl('...')/Files doesn't support $skiptoken option use the standard $skip option
$Skip is the simple and standard OData way of implementing Paging it just specifies how many items to skip.
If you're paging 15 items/files/... at a time then you specify:
$top=15&$skip=0
to get the page 1
$top=15&$skip=15
to get the page 2
$top=15&$skip=150
to get the page 11
The "solid" paging option implemented by some SharePoint OData "sources". The format of the token is complex and not something you should ever construct yourselves:
$top=10&$skiptoken=Paged%3dTRUE%26p_SortBehavior%3d0%26p_ID%3d10
to get page 2
Don't try to construct it yourselves. Always use href from <link rel="next" ... />
from prior "page".
web/GetFolderByServerRelativeUrl('/sites/Test1/Documents')/Files?$top=15&$skip=0
Commented
Mar 24, 2017 at 9:45
The skiptoken parameter in rest call works only on Lists/Libraries but not on relative path. Try the following url it works
/sites/Test1/_api/web/getByTitle('Documents')/Items?$skiptoken=Paged=TRUE&p_ID=5&$top=5