Application Insights 响应代码 400 错误请求

Application Insights response code 400 Bad request

当尝试使用此 url 调用 application insights api 服务时,它给了我 400 Bad request

https://api.applicationinsights.io/beta/apps/appID/events/pageViews?timespan=P30D&$filter=包含(pageView/url,'valid-url')&$count=true

appID 和 valid-url 设置正确,我在这个问题中删除了它们以使其更易于阅读

使用 $filter=contains 有什么问题吗???

验证这些内容的最简单方法是使用 api 资源管理器和演示应用程序:

https://dev.applicationinsights.io/apiexplorer/events

这个 url 表明 startswith 工作正常:

https://dev.applicationinsights.io/apiexplorer/events?appId=DEMO_APP&apiKey=DEMO_KEY&eventType=pageViews&timespan=P30D&$filter=startswith(pageView%2Furl%2C'http%3A%2F%2Faiconnect')

如果您 "need" 包含类似的内容,您可以使用 $search(虽然它会查看大多数字段,并且有自己的 AND/OR 文本搜索逻辑)

https://dev.applicationinsights.io/apiexplorer/events?appId=DEMO_APP&apiKey=DEMO_KEY&eventType=pageViews&timespan=P30D&$search=%22Customers%2FCreate%22