事件资源类型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.

该资源支持: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.
  • 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

{
  "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,
  "isOrganizer": true,
  "isReminderOn": true,
  "lastModifiedDateTime": "String (timestamp)",
  "location": {"@odata.type": "microsoft.graph.location"},
  "locations": [{"@odata.type": "microsoft.graph.location"}],
  "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
与会者attendees 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 and time that the event ends.
hasAttachmentshasAttachments BooleanBoolean 如果事件包含附件,则设置为 true。Set to true if the event has attachments.
idid StringString 事件的唯一标识符。Unique identifier for the classification. 默认情况下, 在将项目从一个容器 (如文件夹或日历) 移动到另一个容器时, 此值会发生更改。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.
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.
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.
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 Skype. 只读。Read-only.
组织者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 BooleanBoolean 如果发件人希望接收事件被接受或拒绝时的响应,则设置为 true。Set to true if the sender would like a response when the event is accepted or declined.
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 time of the event.
主题subject StringString 事件的主题行文本。The text of the event's subject line.
typetype StringString 事件类型。The event type. 可取值为:singleInstanceoccurrenceexceptionseriesMasterPossible values are: singleInstance, occurrence, exception, seriesMaster. 只读Read-only
uiduid StringString 由不同日历间的所有事件实例共享的唯一标识符。A unique identifier that is shared by all instances of an event across different calendars. 注释: 此属性与 v1.0 终结点上的事件资源iCalUid 属性相同,但不能保证拥有相同的值。Note: this property serves the same purpose as the iCalUid property on the event resource on the v1.0 endpoint, but is not guaranteed to have the same value.
webLinkwebLink StringString 要在 Outlook Web App 中打开事件的 URL。The URL to open the event in Outlook Web App.

如果你通过 Outlook Web App 登录邮箱,该事件将在浏览器中打开。如果尚未使用浏览器登录,系统将提示你登录。The event will open in the browser if you are logged in to your mailbox via Outlook Web App. You will be prompted to login if you are not already logged in with the browser.

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

关系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 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