I am using the the Calendar REST in Office 365 API and I try to post a event according to the example in: http://msdn.microsoft.com/en-us/library/office/dn792114(v=office.15).aspx
The response I get is
{error: {code: "ErrorInvalidRequest" message: "Cannot read the request body."} }
when I post with Avanced Rest Client to URL https://outlook.office365.com/ews/odata/Me/Events with Content-Type: application/json and I'm using an office365 service account.
The JSON I post is copied from the example in the link above
{
"@odata.type": "#Microsoft.Exchange.Services.OData.Model.Event",
"Subject": "Discuss the Calendar REST API",
"Body": {
"ContentType": "HTML",
"Content": "I think it will meet our requirements!"
},
"Start": "2014-07-02T18:00:00Z",
"End": "2014-07-02T19:00:00Z",
"Location": {
"DisplayName": "Conference Room 1"
},
"ShowAs": "Busy",
"Attendees": [
{
"Name": "Alex Darrow",
"Address": "[email protected]",
"Type": "Required"
},
{
"Name": "Anne Wallace",
"Address": "[email protected]",
"Type": "Optional"
},
{
"Name": "Conference Room 1",
"Address": "[email protected]",
"Type": "Resource"
}
]
}
If "@odata.type": "#Microsoft.Exchange.Services.OData.Model.Event" is removed together with "Attendees" the post is successful.
If anyone could help out would be much appreciated.