Last post Mar 28, 2017 03:01 AM by Chris Zhao
Mar 25, 2017 07:06 PM|jkrobertson88|LINK
Currently building a web service for work and I need some advice/help.
The two related entities are Sites and Site Records (Site records being a entity collection inside of Site).
There is a Boolean property in Site Record called IsPublic which acts as a flag for when the record has undergone review and been approved for public consumption.
I currently have all of the routes working off of this logic
Sites/ - A list of all sites that have publicly available records
Sites(id)/SiteRecords - the list of all publicly available records for a site.
The problem is that if you do an expand on Sites/?expand=SiteRecords it will return to you the list of all Site Records regardless of flag set. Does anyone have any suggestions on how to best handle this?
Thanks in advance for any help offered,
Mar 28, 2017 03:01 AM|Chris Zhao|LINK
$expand Expands related entities inline.
Query options can be applied to the expanded navigation property by appending a semicolon-separated list of query options, enclosed in parentheses, to the navigation property name. Allowed system query options are
$filter, $select, $orderby,
$skip, $top, $count, $search, and
Example 93: all categories and for each category all related products with a discontinued date equal to null
$expand=Products($filter=DiscontinuedDate eq null)