Skip to content

创建 OKR 周期

根据周期规则创建一个 OKR 周期。

请求

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

请求头

名称类型必填描述
Authorizationstringtenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token
Content-Typestring固定值:"application/json; charset=utf-8"

请求体

名称类型必填描述
period_rule_idstring周期规则 id
示例值:"6969864184272078374"
start_monthstring周期起始年月
示例值:"2022-01"

请求体示例

json
{
    "period_rule_id": "6969864184272078374",
    "start_month": "2022-01"
}

响应

响应体

名称类型描述
codeint错误码,非 0 表示失败
msgstring错误描述
data\--
  └ period_idstring周期id
  └ start_monthstring周期起始年月
  └ end_monthstring周期结束年月

响应体示例

json
{
    "code": 0,
    "msg": "success",
    "data": {
        "period_id": "6969864184272078374",
        "start_month": "2022-01",
        "end_month": "2022-01"
    }
}

错误码

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企业版
4001001008Conflict period existed.对应时间的周期已存在,无需再度创建
4001001009Start date does not fit for given period rule.起始日期和周期规则不匹配

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