1

I'm having a problem getting all the items related to certain Content Type through REST API from a document library, I did a test reducing the amount of documents under that Content Type and the app started to show the items, so I wonder if is there a restriction or limit in the amount of files or items that I can get and how can I fix it

The endpoint I'm using is this:

var url = _spPageContextInfo.siteAbsoluteUrl + "/_api/lists/getbytitle('Documents')/items?$select=FileRef,ServerRedirectedEmbedUrl,Title,URL,File&$expand=File&$filter=ContentType eq '" + cttypeName + "'";
  • Yes it is limited to 100 items. Use paging. use the search bar at the top of the page and search for REST API paging. – Bunzab Apr 12 '17 at 20:21
0

The API by default only returns 100 items so the way I could get more was using $top=number_of_items in the REST Endpoint.

var url = _spPageContextInfo.siteAbsoluteUrl + "/_api/lists/getbytitle('Documents')/items?$top=1000&$select=FileRef,File&$expand=File&$filter=ContentType eq '" + cttypeName + "'";

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.