0

Is there any way to query subsites via REST and include $filter for properties in SPWeb's property bag, like this:

http://site.company.com/workspaces/_api/web/webs?$expand=AllProperties&$select=Title,ServerRelativeUrl,AllProperties/WorkspaceType&$filter=(AllProperties/WorkspaceType eq 'IT')

So I've created SPWeb, added WorkspaceType property with value IT in the AllProperties of the SPWeb, and would like to list all SPWebs under the /workspaces site that have a specific value in the WorkspaceType property.

Omitting the $filter does return the subwebs fine, including that specific property.

1
  • If you run this request, what does it return? A 400? Commented Apr 19, 2017 at 21:51

1 Answer 1

0

I think you'll find that filtering by specific properties in the property bag is not possible. I can think of two possible ways to work around that limitation:

  1. Do the filtering in code after fetching all the subwebs.
  2. Use Search and Indexed Properties instead of the Webs API endpoint

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.