我通过提供以下JSON输入,通过Outlook API创建Outlook事件:
{
"subject":"bla bla bla",
"start":{
"dateTime":"2018-01-14T17:00:00",
"timeZone":"India Standard Time"
},
"Attendees": [
{
"EmailAddress": {
"Address": "janets@a830edad9050849NDA1.onmicrosoft.com",
"Name": "Janet Schorr"
},
"Type": "Required"
}
]
}
但是我收到以下错误回复:
{
"error": {
"code": "ErrorPropertyValidationFailure",
"message": "At least one property failed validation.",
"innerError": {
"request-id": "6f3d1676-77cc-49b0-87a2-b96b6ed1f15d",
"date": "2018-01-12T05:25:10"
}
}
}
如果我在上面的JSON中传递 end属性,则会成功创建事件。以下JSON工作正常:
{
"subject":"bla bla bla",
"start":{
"dateTime":"2018-01-14T17:00:00",
"timeZone":"India Standard Time"
},
"end":{
"dateTime":"2018-01-14T17:00:00",
"timeZone":"India Standard Time"
},
"Attendees": [
{
"EmailAddress": {
"Address": "janets@a830edad9050849NDA1.onmicrosoft.com",
"Name": "Janet Schorr"
},
"Type": "Required"
}
]
}
是否需要传递结束属性才能创建活动?或者上面的JSON输入有问题吗?
答案 0 :(得分:0)
是的,end
是必需的。 Outlook / Exchange不支持没有结束日期的事件:)