日历资源类型calendar resource type

日历即事件容器。A calendar which is a container for events. 可以是用户的日历,也可以是 Office 365 的默认日历。It can be a calendar for a user, or the default calendar of an Office 365 group.

注意: 有几个您可以与用户日历和日历组进行交互的方式不同:Note: There are a few minor differences in the way you can interact with user calendars and group calendars:

  • 您可以组织只有用户日历中calendarGroupYou 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. 您可以为仅用户日历snooze消除提醒You can snooze or dismiss a reminder for user calendars only.

方法Methods

方法Method 返回类型Return Type 说明Description
列出日历List calendars 日历 集合calendar collection 获取所有用户的日历,或者获取默认或其他特定日历组中的日历。Get all the user's calendars, or the calendars in the default or other specific calendar group.
创建日历Create calendar calendarcalendar 在默认日历组或用户的指定日历组中新建日历。Create a new calendar in the default calendar group or specified calendar group for a user.
Get calendarGet calendar calendarcalendar 获取 calendar 对象的属性和关系。Get the properties and relationships of a calendar object. 可以是用户的日历,也可以是 Office 365 组的默认日历。The calendar can be one for a user, or the default calendar of an Office 365 group.
UpdateUpdate calendarcalendar 更新 calendar 对象的属性。Update the properties of a calendar object. 可以是用户的日历,也可以是 Office 365 组的默认日历。The calendar can be one for a user, or the default calendar of an Office 365 group.
DeleteDelete None 删除 calendar 对象。Delete calendar object.
列出 calendarViewList calendarView 事件 集合event collection 从用户的主日历 (../me/calendarview) 或指定日历中,获取由时间范围定义的日历视图中的事件发生次数、异常和单个实例。Get the occurrences, exceptions, and single instances of events in a calendar view defined by a time range, from the user's primary calendar (../me/calendarview) or from a specified calendar.
列出事件List events 事件 集合event collection 检索日历中的事件列表。该列表包含单个实例会议和系列主控形状。Retrieve a list of events in a calendar. The list contains single instance meetings and series masters.
创建事件Create event 事件event 创建默认或指定的日历中的新事件。Create a new event in the default or specified calendar.
findMeetingTimesfindMeetingTimes meetingTimeSuggestionsResultmeetingTimeSuggestionsResult 建议的会议时间内和基于组织者和与会者可用性和时间或位置的约束位置。Suggest meeting times and locations based on organizer and attendee availability, and time or location constraints.
创建单值扩展属性Create single-value extended property 日历calendar 在新建或现有日历中创建一个或多个单值扩展属性。Create one or more single-value extended properties in a new or existing calendar.
获取包含单值扩展属性的日历Get calendar with single-value extended property 日历calendar 通过使用 $expand$filter 获取包含一个单值扩展属性的日历。Get calendars that contain a single-value extended property by using $expand or $filter.
创建多值扩展属性Create multi-value extended property 日历calendar 在新建或现有的日历中创建一个或多个多值扩展属性。Create one or more multi-value extended properties in a new or existing calendar.
获取包含多值扩展属性的日历Get calendar with multi-value extended property 日历calendar 使用 $expand 获取包含一个多值扩展属性的日历。Get a calendar that contains a multi-value extended property by using $expand.

属性Properties

属性Property 类型Type 说明Description
canEditcanEdit 布尔Boolean 如果用户可以写入日历则为 true,否则为 false。对于创建此日历的用户,此属性为 true。此属性对于共享日历并且授予写入访问权限的用户同样为 true。True if the user can write to the calendar, false otherwise. This property is true for the user who created the calendar. This property is also true for a user who has been shared a calendar and granted write access.
canSharecanShare 布尔Boolean 如果用户有权共享日历则为 ture,否则为 false。只有创建日历的用户才可以进行共享。True if the user has the permission to share the calendar, false otherwise. Only the user who created the calendar can share it.
canViewPrivateItemscanViewPrivateItems BooleanBoolean 如果用户可以读取已标记为私有的日历项,则为 true,否则返回 false。True if the user can read calendar items that have been marked private, false otherwise.
changeKeychangeKey 字符串String 标识 calendar 对象的版本。每次日历更改时,changeKey 也将更改。这样,Exchange 可以将更改应用于该对象的正确版本。只读。Identifies the version of the calendar object. Every time the calendar is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only.
colorcolor calendarColorcalendarColor 在 UI 中指定将该日历与其他日历区分开来的颜色主题。属性值有:LightBlue=0、LightGreen=1、LightOrange=2、LightGray=3、LightYellow=4、LightTeal=5、LightPink=6、LightBrown=7、LightRed=8、MaxColor=9、Auto=-1Specifies the color theme to distinguish the calendar from other calendars in a UI. The property values are: LightBlue=0, LightGreen=1, LightOrange=2, LightGray=3, LightYellow=4, LightTeal=5, LightPink=6, LightBrown=7, LightRed=8, MaxColor=9, Auto=-1
idid StringString 组的唯一标识符。只读。The group's unique identifier. Read-only.
namename StringString 日历名称。The calendar name.
ownerowner emailAddressemailAddress 如果设置,则表示创建或添加日历的用户。对于用户创建或添加的日历,将 owner 属性设置为用户。对于与用户共享的日历,将 owner 属性设置为与此用户共享该日历的人员。If set, this represents the user who created or added the calendar. For a calendar that the user created or added, the owner property is set to the user. For a calendar shared with the user, the owner property is set to the person who shared that calendar with the user.

关系Relationships

关系Relationship 类型Type 说明Description
calendarViewcalendarView 事件 集合Event collection 日历的日历视图。导航属性。只读。The calendar view for the calendar. Navigation property. Read-only.
eventsevents 事件 集合Event collection 日历中的事件。导航属性。只读。The events in the calendar. Navigation property. Read-only.
multiValueExtendedPropertiesmultiValueExtendedProperties multiValueLegacyExtendedProperty 集合multiValueLegacyExtendedProperty collection 为日历定义的多值扩展属性的集合。只读。可为 Null。The collection of multi-value extended properties defined for the calendar. Read-only. Nullable.
singleValueExtendedPropertiessingleValueExtendedProperties singleValueLegacyExtendedProperty collectionsingleValueLegacyExtendedProperty collection 为日历定义的单值扩展属性的集合。只读。可为 Null。The collection of single-value extended properties defined for the calendar. Read-only. Nullable.

JSON 表示形式JSON representation

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

{
  "canEdit": "boolean",
  "canShare": "boolean",
  "canViewPrivateItems": "boolean",
  "changeKey": "string",
  "color": "String",
  "id": "string (identifier)",
  "name": "string",
  "owner": {"@odata.type": "microsoft.graph.emailAddress"}
}