创建事件时Microsoft Graph API错误请求

时间:2018-05-16 15:25:39

标签: json microsoft-graph

我正在尝试使用带有以下请求正文的图谱API在Office 365上创建一个事件,

{
  "subject": null,
  "body": {
    "contentType": "0",
    "content": "Event9e890101-30eb-41e1-99ac-aebd453d27a9"
  },
  "start": {
    "dateTime": {
      "dateTime": "2018-05-19T11:17:30.2069056-04:00",
      "timeZone": "Eastern Standard Time"
    }
  },
  "_end": {
    "dateTime": {
      "dateTime": "2018-05-19T12:17:30.2119221-04:00",
      "timeZone": "Eastern Standard Time"
    }
  },
  "location": { "displayName": "Your office" },
  "attendees": {
    "type": "0",
    "emailAddress": { "address": "email@calendar.onmicrosoft.com" }
  }
}

但我得到400回复,

{
  "error": {
    "code": "BadRequest",
    "message": "Requests must contain extension changes exclusively.",
    "innerError": { "request-id": "67884664-d5e8-4502-ad5b-94aa0e538341", "date": "2018-05-16T15:17:47" }
  }
}

我没有使用任何扩展程序。我尝试在请求正文中添加一个也没有工作的扩展。有什么指示吗?

1 个答案:

答案 0 :(得分:1)

_end不是event的有效属性,应为end

},
"end": {