为什么我能够使用以下请求查询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'
但是当我修改它以过滤主题时,它会返回错误:
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'
{" odata.error":{ "代码":" InvalidQueryException", " message":{ " lang":"", "值":"查询无效。" }}
答案 0 :(得分:1)
尝试类似
的内容startswith(Subject,'Test')