事件资源类型event resource type

命名空间:microsoft.graphNamespace: microsoft.graph

用户日历或 Microsoft 365 默认日历中的事件。An event in a user calendar, or the default calendar of a Microsoft 365 group.

事件中包含的最大与会者人数,以及发送自 Exchange Online 邮箱的 eventMessage 中的收件人数上限都是 500 人。The maximum number of attendees included in an event, and the maximum number of recipients in an eventMessage sent from an Exchange Online mailbox is 500. 有关详细信息,请参阅发送限制For more information, see sending limits.

该资源支持:This resource supports:

注释: 与用户日历、组日历及其事件交互的方式稍有不同:Note: There are a few minor differences in the way you can interact with user calendars, group calendars, and their events:

  • 只可以组织 calendarGroup 中的用户日历。You can organize only user calendars in a calendarGroup.
  • 只能将 attachment 对象添加到用户日历中的事件,而不能添加到组日历中的事件。You can add attachment objects to events in only user calendars, but not to events in group calendars.
  • Outlook 将代表组自动接受所有会议请求。Outlook automatically accepts all meeting requests on behalf of groups. 只可以接受暂时接受拒绝_用户_日历中的会议请求。You can accept, tentatively accept, or decline meeting requests for user calendars only.
  • Outlook 不支持对组事件提供提醒。Outlook doesn't support reminders for group events. 只可以暂停消除_用户_日历中的提醒You can snooze or dismiss a reminder for user calendars only.

方法Methods

方法Method 返回类型Return Type 说明Description
列出事件List events 事件 集合event collection 检索用户邮箱中的 event 对象列表。该列表包含单个实例会议和系列主控形状。Retrieve a list of event objects in the user's mailbox. The list contains single instance meetings and series masters.
创建事件Create event 事件event 通过发布到实例集合创建新事件。Create a new event by posting to the instances collection.
获取事件Get event 事件event 读取 event 对象的属性和关系。Read properties and relationships of event object.
更新Update 事件event 更新事件对象。Update event object.
删除Delete None 删除事件对象。Delete event object.
接受accept None 接受用户日历中的指定事件。Accept the specified event in a user calendar.
tentativelyAccepttentativelyAccept None 暂时接受用户日历中的指定事件。Tentatively accept the specified event in a user calendar.
拒绝decline None 拒绝用户日历中的指定事件邀请。Decline invitation to the specified event in a user calendar.
deltadelta 事件集合event collection 获取用户主日历的 calendarView(事件范围)中已添加、删除或更新的事件集。Get a set of events that have been added, deleted, or updated in a calendarView (a range of events) of the user's primary calendar.
dismissReminderdismissReminder None 消除用户日历中指定事件的提醒。Dismiss the reminder for the specified event in a user calendar.
snoozeRemindersnoozeReminder None 将用户日历中指定事件的提醒推迟至新的时间。Postpone a reminder for the specified event in a user calendar until a new time.
列出实例List instances 事件 集合event collection 获取指定的时间范围的事件的实例(发生次数)。如果事件的类型是 SeriesMaster,这将返回在指定的时间范围内事件的发生次数和异常。Get the instances (occurrences) of an event for a specified time range. If the event is a SeriesMaster type, this returns the occurrences and exceptions of the event in the specified time range.
附件Attachments
列出附件List attachments attachment 集合attachment collection 获取事件的所有附件。Get all attachments on an event.
Add attachmentAdd attachment attachmentattachment 通过发布到附件集合,向事件添加新附件。Add a new attachment to an event by posting to the attachments collection.
开放扩展Open extensions
创建开放扩展Create open extension openTypeExtensionopenTypeExtension 创建开放扩展,并在新建或现有的资源实例中添加自定义属性。Create an open extension and add custom properties in a new or existing instance of a resource.
获取开放扩展Get open extension openTypeExtension 集合openTypeExtension collection 获取通过名称或完全限定的名称识别的一个或多个开放扩展对象。Get an open extension object or objects identified by name or fully qualified name.
扩展属性Extended properties
创建单值扩展属性Create single-value extended property 事件event 在新建或现有事件中创建一个或多个单值扩展属性。Create one or more single-value extended properties in a new or existing event.
获取具有单值扩展属性的事件Get event with single-value extended property 事件event 通过使用 $expand$filter 获取包含单值扩展属性的事件。Get events that contain a single-value extended property by using $expand or $filter.
创建多值扩展属性Create multi-value extended property 事件event 在新建或现有的事件中创建一个或多个多值扩展属性。Create one or more multi-value extended properties in a new or existing event.
获取具有多值扩展属性的事件Get event with multi-value extended property 事件event 使用 $expand 获取包含一个多值扩展属性的事件。Get an event that contains a multi-value extended property by using $expand.

属性Properties

属性Property 类型Type 说明Description
allowNewTimeProposalsallowNewTimeProposals 布尔值Boolean 如果会议组织者允许被邀请者在响应时建议新时间,则为True;否则为 falseTrue if the meeting organizer allows invitees to propose a new time when responding, false otherwise. 可选。Optional. 默认值为 trueDefault is true.
attendeesattendees 与会者 集合attendee collection 事件的与会者集合。The collection of attendees for the event.
bodybody itemBodyitemBody 与事件相关联的邮件正文。可以是 HTML 格式或文本格式。The body of the message associated with the event. It can be in HTML or text format.
bodyPreviewbodyPreview 字符串String 与事件相关联的邮件预览。文本格式。The preview of the message associated with the event. It is in text format.
categoriescategories String collectionString collection 与事件相关联的类别。The categories associated with the event.
changeKeychangeKey StringString 标识 event 对象的版本。每次事件更改时,ChangeKey 也将更改。这样,Exchange 可以将更改应用于该对象的正确版本。Identifies the version of the event object. Every time the event is changed, ChangeKey changes as well. This allows Exchange to apply changes to the correct version of the object.
createdDateTimecreatedDateTime DateTimeOffsetDateTimeOffset 时间戳类型表示使用 ISO 8601 格式的日期和时间信息,并且始终处于 UTC 时间。例如,2014 年 1 月 1 日午夜 UTC 如下所示:'2014-01-01T00:00:00Z'The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'
endend dateTimeTimeZonedateTimeTimeZone 事件结束的日期、时间和时区。The date, time, and time zone that the event ends. 默认情况下,结束时间为 UTC 时间。By default, the end time is in UTC.
hasAttachmentshasAttachments BooleanBoolean 如果事件包含附件,则设置为 true。Set to true if the event has attachments.
iCalUIdiCalUId 字符串String 跨日历事件的唯一标识符。A unique identifier for an event across calendars. 此 ID 对于定期系列中的每个单一事件来说是不同的。This ID is different for each occurrence in a recurring series. 只读。Read-only.
idid StringString 只读。Read-only.
importanceimportance importanceimportance 事件的重要性。The importance of the event. 可能的值包括 lownormalhighThe possible values are: low, normal, high.
isAllDayisAllDay BooleanBoolean 如果事件持续一整天,则设置为 true。Set to true if the event lasts all day.
isCancelledisCancelled BooleanBoolean 如果事件已取消,则设置为 true。Set to true if the event has been canceled.
isOnlineMeetingisOnlineMeeting BooleanBoolean 若此事件包含联机会议信息则为 True,反之则为 falseTrue if this event has online meeting information, false otherwise. 默认为 false。Default is false. 可选。Optional.
isOrganizerisOrganizer BooleanBoolean 如果日历所有者(通过“日历”的“所有者”属性指定)是事件的组织者(通过“事件”的“组织者”属性指定),设定为 true。Set to true if the calendar owner (specified by the owner property of the calendar) is the organizer of the event (specified by the organizer property of the event). 这也适用于代理人代表所有者组织事件。This also applies if a delegate organized the event on behalf of the owner.
isReminderOnisReminderOn BooleanBoolean 如果设置警报以提醒用户有事件,则设置为 true。Set to true if an alert is set to remind the user of the event.
lastModifiedDateTimelastModifiedDateTime DateTimeOffsetDateTimeOffset 时间戳类型表示使用 ISO 8601 格式的日期和时间信息,并且始终处于 UTC 时间。例如,2014 年 1 月 1 日午夜 UTC 如下所示:'2014-01-01T00:00:00Z'The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'
locationlocation 位置location 事件的位置。The location of the event.
locationslocations location 集合location collection 举办或参加活动的地点。The locations where the event is held or attended from. locationlocations 属性总是相互对应。The location and locations properties always correspond with each other. 如果更新 location 属性,locations 集合中所有以前的位置都将被删除并替换为新的 location 值。If you update the location property, any prior locations in the locations collection would be removed and replaced by the new location value.
onlineMeetingonlineMeeting OnlineMeetingInfoOnlineMeetingInfo 关于与会者如何加入联机会议的详细信息。Details for an attendee to join the meeting online. 只读。Read-only.
onlineMeetingProvideronlineMeetingProvider onlineMeetingProviderTypeonlineMeetingProviderType 表示联机会议服务提供商。Represents the online meeting service provider. 可取值为:teamsForBusinessskypeForBusinessskypeForConsumerThe possible values are teamsForBusiness, skypeForBusiness, and skypeForConsumer. 可选。Optional.
onlineMeetingUrlonlineMeetingUrl StringString 联机会议的 URL。A URL for an online meeting. 仅当组织者将事件指定为联机会议(如 Skype 会议)时才会设置此属性。The property is set only when an organizer specifies an event as an online meeting such as a Skype meeting. 只读。Read-only.
organizer - 组织者organizer recipientrecipient 事件的组织者。The organizer of the event.
originalEndTimeZoneoriginalEndTimeZone StringString 创建事件时设置的结束时区。The end time zone that was set when the event was created. tzone://Microsoft/Custom 值表示旧的自定义时区已在桌面版 Outlook 中设置。A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook.
originalStartoriginalStart DateTimeOffsetDateTimeOffset 时间戳类型表示使用 ISO 8601 格式的日期和时间信息,并且始终处于 UTC 时间。例如,2014 年 1 月 1 日午夜 UTC 如下所示:'2014-01-01T00:00:00Z'The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'
originalStartTimeZoneoriginalStartTimeZone 字符串String 创建事件时设置的开始时区。tzone://Microsoft/Custom 值表示旧的自定义时区在桌面版 Outlook 中设置。The start time zone that was set when the event was created. A value of tzone://Microsoft/Custom indicates that a legacy custom time zone was set in desktop Outlook.
recurrencerecurrence patternedRecurrencepatternedRecurrence 事件的定期模式。The recurrence pattern for the event.
reminderMinutesBeforeStartreminderMinutesBeforeStart Int32Int32 事件开始时间(即提醒警报发生时间)之前的分钟数。The number of minutes before the event start time that the reminder alert occurs.
responseRequestedresponseRequested 布尔值Boolean 默认值为 true,表示组织者愿意被邀请者发送事件响应。Default is true, which represents the organizer would like an invitee to send a response to the event.
responseStatusresponseStatus responseStatusresponseStatus 指示在事件消息的响应中发送的响应类型。Indicates the type of response sent in response to an event message.
sensitivitysensitivity 敏感度sensitivity 可能的值包括 normalpersonalprivateconfidentialThe possible values are: normal, personal, private, confidential.
seriesMasterIdseriesMasterId StringString 定期系列主项的 ID(如果此事件是定期系列的一部分)。The ID for the recurring series master item, if this event is part of a recurring series.
showAsshowAs freeBusyStatusfreeBusyStatus 要显示的状态。The status to show. 可能的值包括 freetentativebusyoofworkingElsewhereunknownThe possible values are: free, tentative, busy, oof, workingElsewhere, unknown.
startstart dateTimeTimeZonedateTimeTimeZone 事件开始的日期、时间和时区。The date, time, and time zone that the event starts. 默认情况下,开始时间为 UTC 时间。By default, the start time is in UTC.
subjectsubject StringString 事件的主题行文本。The text of the event's subject line.
transactionIdtransactionId 字符串String 客户端应用为服务器指定的自定义标识符,用于避免因客户端重试创建相同事件而导致冗余的 POST 操作。A custom identifier specified by a client app for the server to avoid redundant POST operations in case of client retries to create the same event. 当低网络连接性导致客户端在从服务器中收到客户端先前创建事件请求的响应之前超时时,此功能很有用。This is useful when low network connectivity causes the client to time out before receiving a response from the server for the client's prior create-event request. 你在创建事件时设置 transactionId,之后不能在后续更新中更改 transactionIdAfter you set transactionId when creating an event, you cannot change transactionId in a subsequent update. 如果应用已设置此属性,则仅在响应有效负载中返回此属性。This property is only returned in a response payload if an app has set it. 可选。Optional.
typetype eventTypeeventType 事件类型。The event type. 可能的值包括 singleInstanceoccurrenceexceptionseriesMasterThe possible values are: singleInstance, occurrence, exception, seriesMaster. 只读。Read-only.
webLinkwebLink StringString 要在 Web 上的 Outlook 中打开事件的 URL。The URL to open the event in Outlook on the web.

如果登录邮件,则 Outlook 网页面会在浏览器中打开事件。Outlook on the web opens the event in the browser if you are signed in to your mailbox. 否则,Outlook 网页面会提示你进行登录。Otherwise, Outlook on the web prompts you to sign in.

可以从 iFrame 中访问此 URL。This URL can be accessed from within an iFrame.

备注

webLink 属性指定了一个 URL,它仅在 Outlook 网页版早期版本中打开事件。The webLink property specifies a URL that opens the event in only earlier versions of Outlook on the web. 以下是 URL 格式,其中 {event-id}id 属性的 URL 编码 值:The following are the URL formats, with {event-id} being the URL-encoded value of the id property:

  • 对于工作或学校帐户:https://outlook.office365.com/owa/?itemid={event-id}&exvsurl=1&path=/calendar/itemFor work or school accounts: https://outlook.office365.com/owa/?itemid={event-id}&exvsurl=1&path=/calendar/item

  • 对于 Microsoft 帐户:https://outlook.live.com/owa/?itemid={event-id}&exvsurl=1&path=/calendar/itemFor Microsoft accounts: https://outlook.live.com/owa/?itemid={event-id}&exvsurl=1&path=/calendar/item

要在 Outlook 网页版的当前版本中打开事件,请将 URL 转换为下述格式之一,并使用该 URL 打开事件:To open the event in a current version of Outlook on the web, convert the URL to one of the following formats, and use that URL to open the event:

  • 对于工作或学校帐户:https://outlook.office365.com/calendar/item/{event-id}For work or school accounts: https://outlook.office365.com/calendar/item/{event-id}

  • 对于 Microsoft 帐户:https://outlook.live.com/calendar/item/{event-id}For Microsoft accounts: https://outlook.live.com/calendar/item/{event-id}

关系Relationships

关系Relationship 类型Type 说明Description
attachmentsattachments 附件 集合attachment collection 事件的 fileAttachmentitemAttachment 附件集合。导航属性。只读。可为 Null。The collection of fileAttachment and itemAttachment attachments for the event. Navigation property. Read-only. Nullable.
日历calendar 日历calendar 包含事件的日历。导航属性。只读。The calendar that contains the event. Navigation property. Read-only.
extensionsextensions 扩展集合Extension collection 为事件定义的开放扩展集合。只读。可为 Null。The collection of open extensions defined for the event. Read-only. Nullable.
instancesinstances 事件 集合event collection 事件的实例。导航属性。只读。可为 Null。The instances of the event. Navigation property. Read-only. Nullable.
multiValueExtendedPropertiesmultiValueExtendedProperties multiValueLegacyExtendedProperty 集合multiValueLegacyExtendedProperty collection 为事件定义的多值扩展属性的集合。只读。可为 Null。The collection of multi-value extended properties defined for the event. Read-only. Nullable.
singleValueExtendedPropertiessingleValueExtendedProperties singleValueLegacyExtendedProperty collectionsingleValueLegacyExtendedProperty collection 为事件定义的单值扩展属性的集合。只读。可为 Null。The collection of single-value extended properties defined for the event. Read-only. Nullable.

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。Here is a JSON representation of the resource

{
  "allowNewTimeProposals": "Boolean",
  "attendees": [{"@odata.type": "microsoft.graph.attendee"}],
  "body": {"@odata.type": "microsoft.graph.itemBody"},
  "bodyPreview": "string",
  "categories": ["string"],
  "changeKey": "string",
  "createdDateTime": "String (timestamp)",
  "end": {"@odata.type": "microsoft.graph.dateTimeTimeZone"},
  "hasAttachments": true,
  "iCalUId": "string",
  "id": "string (identifier)",
  "importance": "String",
  "isAllDay": true,
  "isCancelled": true,
  "isOnlineMeeting": true,
  "isOrganizer": true,
  "isReminderOn": true,
  "lastModifiedDateTime": "String (timestamp)",
  "location": {"@odata.type": "microsoft.graph.location"},
  "locations": [{"@odata.type": "microsoft.graph.location"}],
  "onlineMeeting": {"@odata.type": "microsoft.graph.onlineMeetingInfo"},
  "onlineMeetingProvider": "string",
  "onlineMeetingUrl": "string",
  "organizer": {"@odata.type": "microsoft.graph.recipient"},
  "originalEndTimeZone": "string",
  "originalStart": "String (timestamp)",
  "originalStartTimeZone": "string",
  "recurrence": {"@odata.type": "microsoft.graph.patternedRecurrence"},
  "reminderMinutesBeforeStart": 1024,
  "responseRequested": true,
  "responseStatus": {"@odata.type": "microsoft.graph.responseStatus"},
  "sensitivity": "String",
  "seriesMasterId": "string",
  "showAs": "String",
  "start": {"@odata.type": "microsoft.graph.dateTimeTimeZone"},
  "subject": "string",
  "transactionId": "string",
  "type": "String",
  "webLink": "string",

  "attachments": [ { "@odata.type": "microsoft.graph.attachment" } ],
  "calendar": { "@odata.type": "microsoft.graph.calendar" },
  "extensions": [ { "@odata.type": "microsoft.graph.extension" } ],
  "instances": [ { "@odata.type": "microsoft.graph.event" }],
  "multiValueExtendedProperties": [ { "@odata.type": "microsoft.graph.multiValueLegacyExtendedProperty" }],
  "singleValueExtendedProperties": [ { "@odata.type": "microsoft.graph.singleValueLegacyExtendedProperty" }]

}

另请参阅See also