# 获取日历

基于当前用户身份根据日历ID获取日历信息。 查询身份必须为日历所有者(后续可能扩展)才可以查询成功。

# 请求

基本
HTTP URL https://hi-qa.weizhipin.com/open-apis/calendar/v2/calendars/:calendar_id
HTTP Method GET
支持的应用类型 自建应用
权限要求 获取日历、日程及闲忙信息

# 请求头

名称 类型 必填 描述
Authorization string tenant_access_token

user_access_token
值格式:"Bearer access_token"
示例值:"Bearer u-7f1bcd13fc57d46bac21793a18e560"

# 查询参数

名称 类型 描述
user_id_type string 用户 ID 类型示例值:"open_id"
可选值有:
open_id:用户的 open id
union_id:用户的 union id
user_id:用户的 user id
默认值:open_id
当值为 user_id,字段权限要求:
获取用户 user ID
user_id string 用户ID,需要与查询参数中的user_id_type类型保持一致。
示例值:"ou_7dab8a3d3cdcc9da365777c7ad535d62"

# 路径参数(url中冒号标识的参数,如":xxxx"请连同:整体替换成对应值)

名称 类型 描述
calendar_id string 日历ID。

# 响应

# 响应体

名称 类型 描述
code int 错误码,非 0 表示失败
msg string 错误描述
data calendar -
 ∟calendar_id string 日历ID。
 ∟summary string 日历标题
 ∟permissions string 日历公开范围
可选值有
* private:私密
* show_busy:对他人展示忙碌
 ∟type string 日历类型
可选值有
* primary:用户的主日历
* third:第三方日历
* custom:自定义日历
 ∟role string 当前身份对于该日历的访问权限
可选值有
* owner:所有者
 ∟owner string 日历所有人

# 响应体示例

{
    "code": 0,
    "traceId": "_Ao59UOIBLPCeAAu",
    "data": {
        "calendar_id": "ce5168c91d31723cwi-L3A~~",
        "summary": "xxx的日程",
        "type": "primary",
        "permissions": "show_busy",
        "role": "owner",
        "owner": "100001"
    },
    "msg": "操作成功"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
最后更新于 : 3/4/2024, 3:29:16 PM