4

How can I get all the items of lists and document libraries within a specific SharePoint site collection using SharePoint Search REST API?

1
  • sitecollection/_api/search/…' This search show the all site but its don't show private site collection. Anyone Can brief how to get complete site collection with private site collection?
    – Dilip
    Commented Mar 21, 2017 at 10:30

1 Answer 1

8

You could go with this:

http://sitecollection/_api/search/query?querytext='Path:http:%2f%2fsitecollection+ContentClass:STS_ListItem+ContentClass:STS_ListItem_DocumentLibrary'&trimduplicates=false&rowlimit=20

Replace "sitecollection" with your address (note that there are 2 places where this needs to be changed) and adjust rowlimit to how many results maximum you would like to get.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.