此 API 参考文档按资源类型编排整理。每种资源类型都有一种或多种数据表示形式以及一个或多个方法。
资源类型
Acl
如需详细了解 Acl 资源,请参阅资源表示形式页面。
| 方法 | HTTP 请求 | 说明 |
|---|---|---|
| 除非另有说明,否则 URI 均为 https://www.googleapis.com/calendar/v3 的相对地址 | ||
| delete |
DELETE /calendars/calendarId/acl/ruleId
|
删除访问权限控制规则。 |
| get |
GET /calendars/calendarId/acl/ruleId
|
返回访问权限控制规则。 |
| insert |
POST /calendars/calendarId/acl
|
创建访问权限控制规则。 |
| list |
GET /calendars/calendarId/acl
|
返回日历的访问权限控制列表中的规则。 |
| patch |
PATCH /calendars/calendarId/acl/ruleId
|
更新访问权限控制规则。此方法支持 patch 语义。请注意,每个 patch 请求会消耗 3 个配额单位;建议使用 get,然后使用 update。您指定的字段值会替换现有值。您未在请求中指定的字段将保持不变。如果指定了数组字段,则会覆盖现有数组;这会舍弃任何之前的数组元素。
|
| update |
PUT /calendars/calendarId/acl/ruleId
|
更新访问权限控制规则。 |
| watch |
POST /calendars/calendarId/acl/watch
|
监视 ACL 资源的变化。 |
CalendarList
如需详细了解 CalendarList 资源,请参阅资源表示形式页面。
| 方法 | HTTP 请求 | 说明 |
|---|---|---|
| 除非另有说明,否则 URI 均为 https://www.googleapis.com/calendar/v3 的相对地址 | ||
| delete |
DELETE /users/me/calendarList/calendarId
|
从用户的日历列表中移除日历。 |
| get |
GET /users/me/calendarList/calendarId
|
从用户的日历列表中返回日历。 |
| insert |
POST /users/me/calendarList
|
将现有日历插入用户的日历列表中。 |
| list |
GET /users/me/calendarList
|
返回用户日历列表中的日历。 |
| patch |
PATCH /users/me/calendarList/calendarId
|
更新用户日历列表中的现有日历。此方法支持 patch 语义。请注意,每个 patch 请求会消耗 3 个配额单位;建议使用 get,然后使用 update。您指定的字段值会替换现有值。您未在请求中指定的字段将保持不变。如果指定了数组字段,则会覆盖现有数组;这会舍弃任何之前的数组元素。
|
| update |
PUT /users/me/calendarList/calendarId
|
更新用户日历列表中的现有日历。 |
| watch |
POST /users/me/calendarList/watch
|
监视 CalendarList 资源的变化。 |
Calendars
如需详细了解 Calendars 资源,请参阅资源表示形式页面。
| 方法 | HTTP 请求 | 说明 |
|---|---|---|
| 除非另有说明,否则 URI 均为 https://www.googleapis.com/calendar/v3 的相对地址 | ||
| clear |
POST /calendars/calendarId/clear
|
清除主日历。此操作会删除与账号的主日历关联的所有活动。 |
| delete |
DELETE /calendars/calendarId
|
删除辅助日历。使用 calendars.clear 可清除主日历中的所有活动。 |
| get |
GET /calendars/calendarId
|
返回日历的元数据。 |
| insert |
POST /calendars
|
创建辅助日历。 请求的经过身份验证的用户将成为新日历的数据所有者。 |
| patch |
PATCH /calendars/calendarId
|
更新日历的元数据。此方法支持 patch 语义。请注意,每个 patch 请求会消耗 3 个配额单位;建议使用 get,然后使用 update。您指定的字段值会替换现有值。您未在请求中指定的字段将保持不变。如果指定了数组字段,则会覆盖现有数组;这会舍弃任何之前的数组元素。
|
| transferOwnership |
POST /calendars/calendarId/transferOwnership
|
在 Google Workspace 组织内的用户之间转移辅助日历。需要使用管理日历管理员权限进行用户身份验证,并使用以下授权范围之一:
useAdminAccess 设置为 true。辅助日历必须处于有效状态才能转移。不支持转移已停用或已删除的日历。
必需的查询参数 : |
| update |
PUT /calendars/calendarId
|
更新日历的元数据。 |
Channels
如需详细了解 Channels 资源,请参阅资源表示形式页面。
| 方法 | HTTP 请求 | 说明 |
|---|---|---|
| 除非另有说明,否则 URI 均为 https://www.googleapis.com/calendar/v3 的相对地址 | ||
| stop |
POST /channels/stop
|
停止通过此渠道监视资源。 |
Colors
如需详细了解 Colors 资源,请参阅资源表示形式页面。
| 方法 | HTTP 请求 | 说明 |
|---|---|---|
| 除非另有说明,否则 URI 均为 https://www.googleapis.com/calendar/v3 的相对地址 | ||
| get |
GET /colors
|
返回日历和活动的颜色定义。 |
Events
如需详细了解 Events 资源,请参阅 资源表示形式 页面。
| 方法 | HTTP 请求 | 说明 |
|---|---|---|
| 除非另有说明,否则 URI 均为 https://www.googleapis.com/calendar/v3 的相对地址 | ||
| delete |
DELETE /calendars/calendarId/events/eventId
|
删除活动。 |
| get |
GET /calendars/calendarId/events/eventId
|
根据活动的 Google 日历 ID 返回活动。如需使用活动的 iCalendar ID 检索活动,请使用 iCalUID 参数调用 events.list 方法。
|
| import |
POST /calendars/calendarId/events/import
|
导入活动。此操作用于向日历添加现有活动的私有副本。只有 eventType 为 default 的活动可以导入。已废弃的行为 :如果导入非 |
| insert |
POST /calendars/calendarId/events
|
创建活动。 |
| instances |
GET /calendars/calendarId/events/eventId/instances
|
返回指定周期性活动的实例。 |
| list |
GET /calendars/calendarId/events
|
返回指定日历中的活动。 |
| move |
POST /calendars/calendarId/events/eventId/move
|
将活动移至另一个日历,即更改活动的组织者。请注意,只有 default 活动可以移动;birthday、focusTime、fromGmail、outOfOffice 和 workingLocation 活动无法移动。
必需的查询参数
|
| patch |
PATCH /calendars/calendarId/events/eventId
|
更新活动。此方法支持 patch 语义。请注意,每个 patch 请求会消耗 3 个配额单位;建议使用 get,然后使用 update。您指定的字段值会替换现有值。您未在请求中指定的字段将保持不变。如果指定了数组字段,则会覆盖现有数组;这会舍弃任何之前的数组元素。
|
| quickAdd |
POST /calendars/calendarId/events/quickAdd
|
根据简单的文本字符串创建活动。
必需的查询参数
|
| update |
PUT /calendars/calendarId/events/eventId
|
更新活动。此方法不支持 patch 语义,并且始终更新整个活动资源。如需执行部分更新,请先执行 get,然后使用 etag 执行 update,以确保原子性。
|
| watch |
POST /calendars/calendarId/events/watch
|
监视 Events 资源的变化。 |
Freebusy
如需详细了解 Freebusy 资源,请参阅资源表示形式页面。
| 方法 | HTTP 请求 | 说明 |
|---|---|---|
| 除非另有说明,否则 URI 均为 https://www.googleapis.com/calendar/v3 的相对地址 | ||
| query |
POST /freeBusy
|
返回一组日历的空闲/忙碌信息。 |
Settings
如需详细了解 Settings 资源,请参阅资源表示形式页面。
| 方法 | HTTP 请求 | 说明 |
|---|---|---|
| 除非另有说明,否则 URI 均为 https://www.googleapis.com/calendar/v3 的相对地址 | ||
| get |
GET /users/me/settings/setting
|
返回单个用户设置。 |
| list |
GET /users/me/settings
|
返回经过身份验证的所有用户设置。 |
| watch |
POST /users/me/settings/watch
|
监视 Settings 资源的变化。 |