2016-10-04 25 views
11

Tại sao tôi có thể truy vấn API báo cáo Office365 bằng cách sử dụng các yêu cầu sau đây:API REST báo cáo Office365 - "Truy vấn không hợp lệ".

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$select=Subject,SenderAddress,RecipientAddress,Status,Received,Received&$filter=SenderAddress eq '[email protected]' and RecipientAddress eq '[email protected]' and StartDate eq datetime'2016-10-01T00:00:00' and EndDate eq datetime'2016-10-03T00:00:00' 

nhưng khi tôi thay đổi nó để lọc trên đề là tốt, nó sẽ trả về một lỗi:

https://reports.office365.com/ecp/reportingwebservice/reporting.svc/MessageTrace?$select=Subject,SenderAddress,RecipientAddress,Status,Received,Received&$filter=SenderAddress eq '[email protected]' and RecipientAddress eq '[email protected]' and StartDate eq datetime'2016-10-01T00:00:00' and EndDate eq datetime'2016-10-03T00:00:00' and Subject eq 'Test' 

{ "odata.error": { "code": "InvalidQueryException", "message": { "lang": "", "value": "The query is invalid." } } }

+0

Bạn có nhớ gửi lược đồ và một hàng mẫu không? – briansrls

Trả lời

1

thử một cái gì đó giống như

startswith(Subject,'Test') 
+0

Thật không may, điều đó cũng không hiệu quả. Chúng tôi đã thực hiện một số quy trình hậu xử lý (không hiệu quả) để lọc kết thúc của chúng tôi. –

Các vấn đề liên quan