4

When I submit a search REST call, I am providing the sourceid of the list I want to search (an asset library). The results returned from the query are not limited to the items in the list, rather they appear to be all lists across the entire SharePoint site.

Here is the query I am using:

http://site/teams/me/_api/search/query?querytext='*'&sourceid='c10ebb71-4b3d-415b-a457-a9bac5edf0f9'
10

Source ID looks to be the GUID of search scopes. It looks like you want to use ListId: instead. Source

LIST Search (document library)

https://myhost.com/rnd/mennysite1/_api/search/query?querytext='horses+AND+ListId:4f87042a-22cb-4c45-b043-972bd1b414b7'&clienttype='Custom'

Things to notice:
Notice the listId property is using “:” (contains) and not equals. For some strange reason this is how it works, the equals returns nothing

  • I marked this as an answer - I will upvote when I have enough reputation points. Thanks again. – S. Hebert Aug 15 '13 at 17:13

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.