I'm using REST API to get search results from a subsite. What I want to do is to include results from a particular Document Library based on if the property from the user's User Profile is set to true.

  • If property1 = Yes - Include results from DocLib1
  • If property1 = No - DO not include results from DocLib1

Is is possible to do ?

  • Is the document library located on the same subsite or is it somewhere else?
    – user2536
    Aug 3, 2016 at 9:42

1 Answer 1


Yes, you'd just have different REST urls with different parameters being passed. The queries would look something like this (not fully tested):



The key portion is -Path: to exclude items from the desired path.

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.