Forum Discussion
Radosław Szymczak
Jul 20, 2017Copper Contributor
SharePoint 2016 – REST API, stratswith and ContentTypeId
We run into quite interesting issue. When you use REST API and want to filter results using ContentTypeId in document library, e.g. $filter=startswith(ContentTypeId, ‘0x0120’), it works well until nu...
Velin Georgiev
Jul 22, 2017Brass Contributor
There might be a threshold limit for `starts with`. Have you tried to get more with paging. Something like:
Get the first 400:
$filter=startswith(ContentTypeId, ‘0x0120’)&$top=400
Then for the next page (400) go with:
$filter=startswith(ContentTypeId, ‘0x0120’)&$top=400&$skip=400
Radosław Szymczak
Jul 22, 2017Copper Contributor
I will try that. Can work. Althought top and skips filters didn't work very well in SP2013, but maybe in SP2016...? Either way, it is worth to try. Thanks for suggestion.