具有 Azure 资源管理器资源的 InvalidFilter API
InvalidFilter with Azure Resource Manager resources API
正在尝试使用 Azure 资源管理器API 搜索资源。首先我尝试了这个:
GET /subscriptions/xxx/resources?$filter=startswith(name,%20'web')&api-version=2015-01-01
Invalid $filter 'startswith(name, 'web')'
specified in the query string. Details: 'Unsupported filter function found:'startswith'. Property name:'name'. Supported functions: 'substringof''
然后我试了这个:
GET /subscriptions/xxx/resources?$filter=substringof('web',%20name)%20eq%20true&api-version=2015-01-01
Invalid $filter 'substringof('web', name) eq true'
specified in the query string. Details: 'Unsupported token found in $filter string.'
我不是 OData 专家,所以我不确定我的语法是否有误,或者我是否正在尝试做一些不受此 API 真正支持的事情。
查询必须是:
GET /subscriptions/xxx/resources?$filter=substringof('web',%20name)&api-version=2015-01-01
省略 eq true。尽管它可以被看作是 v2 和 v3 odata 协议的官方示例的一部分,但似乎 Azure API 不支持这个。
正在尝试使用 Azure 资源管理器API 搜索资源。首先我尝试了这个:
GET /subscriptions/xxx/resources?$filter=startswith(name,%20'web')&api-version=2015-01-01
Invalid $filter
'startswith(name, 'web')'
specified in the query string. Details: 'Unsupported filter function found:'startswith'. Property name:'name'. Supported functions: 'substringof''
然后我试了这个:
GET /subscriptions/xxx/resources?$filter=substringof('web',%20name)%20eq%20true&api-version=2015-01-01
Invalid $filter
'substringof('web', name) eq true'
specified in the query string. Details: 'Unsupported token found in $filter string.'
我不是 OData 专家,所以我不确定我的语法是否有误,或者我是否正在尝试做一些不受此 API 真正支持的事情。
查询必须是:
GET /subscriptions/xxx/resources?$filter=substringof('web',%20name)&api-version=2015-01-01
省略 eq true。尽管它可以被看作是 v2 和 v3 odata 协议的官方示例的一部分,但似乎 Azure API 不支持这个。