Skip to content

获取 OKR 周期规则

获取租户的周期规则列表。

请求

项目
HTTP URLhttps://open.feishu.cn/open-apis/okr/v1/period_rules
HTTP MethodGET
接口频率限制100 次/分钟
支持的应用类型custom,isv
权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 开启任一权限即可okr:okr:readonly 获取 OKR 信息 okr:okr 更新 OKR 信息

请求头

名称类型必填描述
Authorizationstringtenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token

响应

响应体

名称类型描述
codeint错误码,非 0 表示失败
msgstring错误描述
data\--
  └ period_rulesperiod_rule\[\]周期规则列表
    └ period_rule_idstring周期规则ID
    └ typestring周期类型 - year: 年度周期 - month: 月度周期
    └ lengthint周期长度(月)
    └ first_monthint每年首个开始月份

响应体示例

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "period_rules": [
            {
                "period_rule_id": "134",
                "type": "year",
                "length": 12,
                "first_month": 12
            }
        ]
    }
}

错误码

HTTP状态码错误码描述排查建议
5001009999Unknown error. Please contact Feishu Assistant or your customer success manager.内部错误,请联系飞书助手或您的客户成功经理
4001001001Invalid parameters. Please check document and modify accordingly.无效的参数,请对照文档检查输入的参数
4031001002No permission.您无权访问该接口,请确认您的登录凭证
4001001003User not found.用户不存在
4001001004OKR data not found.对应ID的数据不存在
4031000403OpenAPI is unavailable in current edition (Standard edition). Please update to Business edition.您目前的套餐无法使用开放平台接口功能,请升级至OKR企业版

内容来源:飞书开放平台 · 自动爬取整理