【问题标题】:Office 365 Calendar Event "IsCancelled" will not updateOffice 365 日历事件“已取消”将不会更新
【发布时间】:2015-02-06 23:41:51
【问题描述】:

我无法让 IsCancelled 更新事件,但我似乎可以更新其他所有内容,并且尝试时不会出错。我尝试了 ResponseRequested,它也是一个布尔数据类型。

这里声明值是可写的:https://msdn.microsoft.com/office/office365/APi/complex-types-for-mail-contacts-calendar#EventResource

网址:https://outlook.office365.com/api/v1.0/me/events/EVENTID

正文:

{
    "Subject": "Test",
    "IsCancelled": true,
    "ResponseRequested": true,
    "ShowAs": "Free"
}

请求类型:PATCH

响应码:200

===== 开始响应正文 =====

{  
   "@odata.context":"https://outlook.office365.com/api/v1.0/$metadata#Me/Events/$entity",
       "@odata.id":"https://outlook.office365.com/api/v1.0/Users('EMAILREMOVED')/Events('EVENTIDREMOVED')",
   "@odata.etag":"W/\"REMOVED",
   "Id":"EVENTIDREMOVED",
   "ChangeKey":"REMOVED",
   "Categories":[  

   ],
   "DateTimeCreated":"2015-02-05T20:16:58.2868803Z",
   "DateTimeLastModified":"2015-02-05T20:30:05.7761882Z",
   "Subject":"Test",
   "BodyPreview":"Event Details: Invitee: NAMEREMOVED Invitee Email: EMAILREMOVED Note: Should you need to cancel the event, COMPANYNAMEREMOVED recommends you use the event cancellation feature in COMPANYNAMEREMOVED.",
   "Body":{  
      "ContentType":"HTML",
      "Content":"<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n</head>\r\n<body>\r\nEvent Details: Invitee: NAMEREMOVED Invitee Email: EMAILREMOVED Note: Should you need to cancel the event, COMPANYNAMEREMOVED recommends you use the event cancellation feature in COMPANYNAMEREMOVED.\r\n</body>\r\n</html>\r\n"
   },
   "Importance":"Normal",
   "HasAttachments":false,
   "Start":"2015-02-06T21:30:00Z",
   "End":"2015-02-06T21:45:00Z",
   "Location":{  
      "DisplayName":""
   },
   "ShowAs":"Free",
   "IsAllDay":false,
   "IsCancelled":false,
   "IsOrganizer":true,
   "ResponseRequested":true,
   "Type":"SingleInstance",
   "SeriesMasterId":null,
   "Attendees":[  
      {  
         "EmailAddress":{  
            "Address":"EMAILREMOVED",
            "Name":"NAMEREMOVED"
         },
         "Status":{  
            "Response":"None",
            "Time":"0001-01-01T00:00:00Z"
         },
         "Type":"Required"
      },
      {  
         "EmailAddress":{  
            "Address":"EMAILREMOVED",
            "Name":"NAMEREMOVED"
         },
         "Status":{  
            "Response":"None",
            "Time":"0001-01-01T00:00:00Z"
         },
         "Type":"Required"
      }
   ],
   "Recurrence":null,
   "Organizer":{  
      "EmailAddress":{  
         "Address":"EMAILREMOVED",
         "Name":"NAMEREMOVED"
      }
   }
}

===== 结束响应正文 =====

【问题讨论】:

    标签: json rest exchangewebservices office365


    【解决方案1】:

    这是文档中的错误。您不能直接更新该属性。要取消事件,您只需将其删除。服务器将发送所有需要的取消。

    【讨论】:

    • 感谢杰森的帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多