Office365报告REST API - "查询无效."

Pau*_*bro 13 rest office365

为什么我能够使用以下请求查询Office365的Reporting API:

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$select=Subject,SenderAddress,RecipientAddress,Status,Received,Received&$filter=SenderAddress eq 'foo@bar.com' and RecipientAddress eq 'bar@foo.com' and StartDate eq datetime'2016-10-01T00:00:00' and EndDate eq datetime'2016-10-03T00:00:00'
Run Code Online (Sandbox Code Playgroud)

但是当我修改它以过滤主题时,它会返回一个错误:

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$select=Subject,SenderAddress,RecipientAddress,Status,Received,Received&$filter=SenderAddress eq 'foo@bar.com' and RecipientAddress eq 'bar@foo.com' and StartDate eq datetime'2016-10-01T00:00:00' and EndDate eq datetime'2016-10-03T00:00:00' and Subject eq 'Test'
Run Code Online (Sandbox Code Playgroud)

{"odata.error":{"code":"InvalidQueryException","message":{"lang":"","value":"查询无效." }}}

小智 1

尝试类似的东西

startswith(Subject,'Test')
Run Code Online (Sandbox Code Playgroud)