Management.Azure.com使用Odata$expand和$filter调用REST API |正文结果未过滤

Management.Azure.com使用Odata$expand和$filter调用REST API |正文结果未过滤,azure,azure-logic-apps,azure-rest-api,Azure,Azure Logic Apps,Azure Rest Api,我无法在RESTAPI get调用上使用Odata中的$expand和$filter获得所需的结果。基本上是为了筛选结果,因此在GET API调用中只返回properties.status='Closed'。到目前为止,expand和filters接收到200 OK,但不尊重正文中的过滤结果 https://management.azure.com/subscriptions/{SUBID}/resourceGroups/{RGNAME}/providers/Microsoft.Operatio

我无法在RESTAPI get调用上使用Odata中的$expand和$filter获得所需的结果。基本上是为了筛选结果,因此在GET API调用中只返回properties.status='Closed'。到目前为止,expand和filters接收到200 OK,但不尊重正文中的过滤结果

https://management.azure.com/subscriptions/{SUBID}/resourceGroups/{RGNAME}/providers/Microsoft.OperationalInsights/workspace/{WorkspaceName}/providers/Microsoft.SecurityInsights/Cases?api版本=2019-01-01-preview&$expand=properties($filter=status eq'Closed'))

最终添加第二个过滤器,如:


&$expand=properties($filter=status eq'Closed'和relatedalertproductnames eq'Azure Security Center')

我认为您错误地指定了
$filter
标准。请尝试以下操作:

$expand=properties&$filter=properties/status eq 'New'

我发现以下方法可以工作,因为值不在数组中,而是在对象中

&$filter=(属性/状态eq“已关闭”)