更新事件
命名空间:microsoft.graph
更新 event 对象。
此 API 可用于以下国家级云部署。
全局服务 | 美国政府 L4 | 美国政府 L5 (DOD) | 由世纪互联运营的中国 |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
权限
要调用此 API,需要以下权限之一。 若要了解详细信息,包括如何选择权限的信息,请参阅权限。
权限类型 | 权限(从最低特权到最高特权) |
---|---|
委派(工作或学校帐户) | Group.ReadWrite.All |
委派(个人 Microsoft 帐户) | 不支持。 |
应用程序 | 不支持。 |
HTTP 请求
PATCH /groups/{id}/events/{id}
PATCH /groups/{id}/calendar/events/{id}
请求标头
名称 | 类型 | 说明 |
---|---|---|
Authorization | string | 持有者 {token}。 必填。 详细了解 身份验证和授权。 |
请求正文
在请求正文中,提供应更新的相关字段的值。 请求正文中不包括的现有属性将保留其以前的值,或根据对其他属性值的更改重新计算。 为了实现最佳性能,不得添加未变化的现有值。
响应
如果成功,此方法返回 200 OK
响应代码。
示例
请求
以下示例显示了一个请求。
PATCH https://graph.microsoft.com/v1.0/groups/01d4ee64-15ce-491e-bad1-b91aa3223df4/calendar/events/AAMkADZlAAAAABERAAA=
Content-type: application/json
{
"location":{
"displayName":"Conf Room 2"
}
}
响应
以下示例显示了相应的响应。
HTTP/1.1 200 OK
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups('01d4ee64-15ce-491e-bad1-b91aa3223df4')/calendar/events/$entity",
"@odata.etag": "W/\"Na8DfbsBGUG8JeyvlwNi5wAAHMKyZg==\"",
"id": "AAMkADZlAAAAABERAAA=",
"createdDateTime": "2019-04-06T13:19:09.2517612Z",
"lastModifiedDateTime": "2019-05-20T00:14:51.2677891Z",
"changeKey": "Na8DfbsBGUG8JeyvlwNi5wAAHMKyZg==",
"categories": [],
"originalStartTimeZone": "Pacific Standard Time",
"originalEndTimeZone": "Pacific Standard Time",
"iCalUId": "040000008200E00074C5B7101A82E00800000000B7CA7D517BECD40100000000000000001000000011E38F935AD4FF41BDAB12A2F3E15103",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "Planogram Training",
"bodyPreview": "Need more help with visual merchandising?",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.office365.com/owa/?itemid=AAMkADZlAAAAABERAAA%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl": null,
"recurrence": null,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n</head>\r\n<body>\r\n<div>Need more help with visual merchandising?\r\n</div>\r\n</body>\r\n</html>\r\n"
},
"start": {
"dateTime": "2019-04-16T22:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2019-04-16T23:00:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "Conf Room 2",
"locationType": "default",
"uniqueId": "Conf Room 2",
"uniqueIdType": "private"
},
"locations": [
{
"displayName": "Conf Room 2",
"locationType": "default",
"uniqueId": "Conf Room 2",
"uniqueIdType": "private"
}
],
"attendees": [
{
"type": "required",
"status": {
"response": "accepted",
"time": "2019-04-06T13:19:12.1060982Z"
},
"emailAddress": {
"name": "Johanna Lorenz",
"address": "JohannaL@contoso.com"
}
},
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "Retail",
"address": "Retail@contoso.com"
}
},
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "Alex Wilber",
"address": "AlexW@contoso.com"
}
},
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "Megan Bowen",
"address": "MeganB@contoso.com"
}
},
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "Nestor Wilke",
"address": "NestorW@contoso.com"
}
}
],
"organizer": {
"emailAddress": {
"name": "Retail",
"address": "Retail@contoso.com"
}
}
}