事件资源类型event resource type

重要

Microsoft Graph 中/beta的版本下的 api 可能会发生更改。APIs under the /beta version in Microsoft Graph are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported.

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

事件中包含的最大与会者人数,以及发送自 Exchange Online 邮箱的 eventMessage 中的收件人数上限都是 500 人。The maximum number of attendees included in an event, and the maximum number of reciepients 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.

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,
  "uid": "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",
  "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" }],
  "singleValueExtendedProperties": [ { "@odata.type": "microsoft.graph.singleValueLegacyExtendedProperty" }],
  "multiValueExtendedProperties": [ { "@odata.type": "microsoft.graph.multiValueLegacyExtendedProperty" }]
}

属性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 集合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. 每个类别对应于为用户定义的 outlookCategorydisplayName 属性。Each category corresponds to the displayName property of an outlookCategory defined for the user.
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.
idid StringString 事件的唯一标识符。Unique identifier for the event. 默认情况下,在将项目从一个容器(如文件夹或日历)移动到另一个容器时,此值会发生更改。By default, this value changes when the item is moved from one container (such as a folder or calendar) to another. 若要更改此行为,请Prefer: IdType="ImmutableId"使用标头。To change this behavior, use the Prefer: IdType="ImmutableId" header. 有关详细信息,请参阅获取 Outlook 资源的不可变标识符See Get immutable identifiers for Outlook resources for more information. 只读。默认情况下,在将项目从一个容器(如文件夹或日历)移动到另一个容器时,此值会发生更改。By default, this value changes when the item is moved from one container (such as a folder or calendar) to another. 若要更改此行为,请Prefer: IdType="ImmutableId"使用标头。To change this behavior, use the Prefer: IdType="ImmutableId" header. 有关详细信息,请参阅获取 Outlook 资源的不可变标识符See Get immutable identifiers for Outlook resources for more information. Read-only.
importanceimportance StringString 事件的重要性。The importance of the event. 可取值为:lownormalhighPossible 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 若此事件包含联机会议信息(即 onlineMeeting 指向 onlineMeetingInfo 资源)则为 True,反之则为 falseTrue if this event has online meeting information (that is, onlineMeeting points to an onlineMeetingInfo resource), false otherwise. 默认值为 falseonlineMeetingnull)。Default is false (onlineMeeting is null). 可选。Optional.
isOnlineMeeting 设置为 true 后,Microsoft Graph 将初始化 onlineMeetingOnce you set isOnlineMeeting to true, Microsoft Graph initializes onlineMeeting. 随后,Outlook 将忽略对 isOnlineMeeting 的任何进一步更改,并且会议仍保持联机。Subsequently Outlook ignores any further changes to isOnlineMeeting, and the meeting remains available online.
isOrganizerisOrganizer BooleanBoolean 如果邮件发件人也是组织者,则设置为 true。Set to true if the message sender is also the organizer.
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'
位置location 位置Location 事件的位置。The location of the event.
位置locations 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. 默认值为 Null。Default is a null object reference. 只读。Read-only.
设置 isOnlineMeetingonlineMeetingProvider 属性以启用联机会议后,Microsoft Graph 将初始化 onlineMeetingOnce you set the isOnlineMeeting and onlineMeetingProvider properties to enable a meeting online, Microsoft Graph initializes onlineMeeting. 设置后,会议仍保持联机,并且不能再次更改 isOnlineMeetingonlineMeetingProvideronlneMeeting 属性。Once set, the meeting remains available online, and you cannot change the isOnlineMeeting, onlineMeetingProvider, and onlneMeeting properties again.
onlineMeetingProvideronlineMeetingProvider onlineMeetingProviderTypeonlineMeetingProviderType 表示联机会议服务提供商。Represents the online meeting service provider. 默认情况下,onlineMeetingProviderunknownBy default, onlineMeetingProvider is unknown. 可取值为:unknownteamsForBusinessskypeForBusinessskypeForConsumerThe possible values are unknown, teamsForBusiness, and skypeForBusiness. 可选。Optional.
设置 isOnlineMeeting 后,Microsoft Graph 将初始化 onlineMeetingOnce you set onlineMeetingProvider, Microsoft Graph initializes onlineMeeting. 随后,你不能再次更改 onlineMeetingProvider,并且会议仍保持联机。Subsequently you cannot change onlineMeetingProvider again, and the meeting remains available online.
onlineMeetingUrlonlineMeetingUrl StringString 联机会议的 URL。A URL for an online meeting. 仅当组织者在 Outlook 中将事件指定为联机会议(如 Skype)才会设置此属性。The property is set only when an organizer specifies an event as an online meeting such as Skype. 只读。Read-only.
若要访问 URL 参加联机会议,请使用通过 eventonlineMeeting 属性公开的 joinUrlTo access the URL to join an online meeting, use joinUrl which is exposed via the onlineMeeting property of the event. 未来即将弃用 onlineMeetingUrl 属性。The onlineMeetingUrl property will be deprecated in the future.
组织者organizer 收件人Recipient 事件的组织者。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 StringString 可能的值是:normalpersonalprivateconfidentialPossible 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 StringString 要显示的状态。The status to show. 可取值为:freetentativebusyoofworkingElsewhereunknownPossible values are: free, tentative, busy, oof, workingElsewhere, unknown.
startstart DateTimeTimeZoneDateTimeTimeZone 事件的开始日期、时间和时区。The start date, time, and time zone of the event. 默认情况下,开始时间使用 UTC 格式。By default, the start time is in UTC.
subjectsubject StringString 事件的主题行文本。The text of the event's subject line.
typetype StringString 事件类型。The event type. 可取值为:singleInstanceoccurrenceexceptionseriesMasterPossible values are: singleInstance, occurrence, exception, seriesMaster. 只读Read-only
uiduid 字符串String 日历事件的唯一标识符。A unique identifier for calendar events. 对于定期事件,Series Master 及其所有事件(包括异常)的此值均相同。For recurring events, the value is the same for the series master and all of its occurences including exceptions. 此属性将替换事件资源中定义的当前 iCalUid 属性(对于序列中各个实例而言各不相同)。This property will replace the current iCalUid property defined in the event resource, which is different for each instance in a series.
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 is its URL format, 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 集合Attachment collection 事件的 FileAttachmentItemAttachmentreferenceAttachment 附件的集合。The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. 导航属性。Navigation property. 只读。Read-only. 可为 Null。Nullable.
日历calendar CalendarCalendar 包含 event. Navigation 属性的日历。只读。The calendar that contains the event. Navigation property. Read-only.
extensionsextensions Extension 集合Extension collection 为事件定义的开放扩展集合。可为空。The collection of open extensions defined for the event. Nullable.
实例instances Event 集合Event collection 事件的实例。导航属性。只读。可为空。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 为事件定义的单值扩展属性的集合。只读。可为空。The collection of single-value extended properties defined for the event. Read-only. Nullable.

方法Methods

方法Method 返回类型Return Type 说明Description
列出事件List events Event 集合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 删除 event 对象。Delete event object.
取消cancel None 将取消消息从组织者发送至所有与会者,并取消指定会议。Send cancellation message from the organizer to all the attendees and cancel the specified meeting.
接受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.
转发forward None 让会议事件的组织者或与会者可以将会议请求转发给新的收件人。Lets the organizer or attendee of a meeting event forward the meeting request to a new recipient.
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 集合Event collection 获取 Event 对象集合。Get a Event object collection.
附件Attachments
列出附件List attachments Attachment 集合Attachment collection 获取事件的所有附件。Get all attachments on an event.
Add attachmentAdd attachment 附件Attachment 通过发布到附件集合,向事件添加新附件。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 to a new or existing resource.
获取开放扩展Get open extension openTypeExtension 集合openTypeExtension collection 获取扩展名称标识的开放扩展。Get an open extension identified by the extension name.
架构扩展Schema extensions
添加架构扩展值Add schema extension values 创建架构扩展定义,然后使用它向资源添加自定义键入数据。Create a schema extension definition and then use it to add custom typed data to a resource.
扩展属性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.

另请参阅See also