【发布时间】:2016-05-25 22:52:06
【问题描述】:
Office 365 REST API 中似乎存在某种限制,阻止添加日期较早的事件,但我无法确定具体限制。例如,以下 JSON 负载会导致请求失败并返回 400 响应:
{
"Subject":"Task/Other",
"Location":{},
"Body": {
"ContentType":"Text",
"Content":"Appointment text"
},
"Start": {
"DateTime":"1983-05-12T19:00:00",
"TimeZone":"America/New_York"
},
"End": {
"DateTime":"1983-05-12T19:30:00",
"TimeZone":"America/New_York"
}
}
但是,以下负载成功:
{
"Subject":"Task/Other",
"Location":{},
"Body": {
"ContentType":"Text",
"Content":"Appointment text"
},
"Start": {
"DateTime":"2016-05-12T19:00:00",
"TimeZone":"America/New_York"
},
"End": {
"DateTime":"2016-05-12T19:30:00",
"TimeZone":"America/New_York"
}
}
唯一的区别是最近的活动日期。我无法在 API 文档中找到有关任何此类约束的任何内容。我错过了什么?
【问题讨论】:
-
按照示例 github.com/microsoftgraph/uwp-csharp-snippets-rest-sample,我在 1983 年成功创建了活动。
-
@Jackie - 我在使用 Graph 时仍然遇到与使用 REST API 时相同的模糊 ErrorPropertyValidationFailure 错误
标签: office365 office365api office365-restapi