Office 365 日历事件 "IsCancelled" 将不会更新

Office 365 Calendar Event "IsCancelled" will not update

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

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

url: 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"
      }
   }
}

=====结束响应体=====

这是文档中的一个错误。您无法直接更新 属性。要取消事件,只需将其删除即可。服务器将发送所有需要的取消。