How do I return all the metadata from the Mail REST API that is part of Office 365 APIs Preview?
The msdn docs seem to be indicating that you send an Accept header with the value of "application/json;odata.metadata=full", but that results in the limited number of properties being returned and doesn't include the body of the email.
http://msdn.microsoft.com/en-us/library/office/dn605901(v=office.15).aspx
I have also tried "odata=verbose" with the same result. Here is the json that gets returned in either case:
{
"@odata.context":"",
"@odata.id":"",
"@odata.editLink":"",
"Id":"",
"Subject":"",
"DateTimeReceived":"",
"From":{},
"[email protected]":""
}
UPDATE:
REST endpoint: https://outlook.office365.com/ews/odata/Me/Inbox/Messages
Rohit Nagarmal's answer pointed me in the right direction. I had a list of fields specified in the $select query parameter, which was overriding the Accept header's full metadata setting. Once I removed the $select query, full metadata was returned.