批量获取OKR
GET
/open-apis/okr/v1/okrs/batch_get
自建应用商店应用
使用tenant_access_token需要额外申请权限
以应用身份访问OKR信息
错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
500 | 1009999 | Unknown error. Please contact Feishu Assistant or your customer success manager. | 内部错误,请联系飞书助手或您的客户成功经理 |
500 | 1009998 | system exception | 系统异常 |
400 | 1001001 | Invalid parameters. Please check document and modify accordingly. | 无效的参数,请对照文档检查输入的参数 |
400 | 1001002 | No permission. | 您无权访问该接口,请确认您的登录凭证 |
400 | 1001003 | User not found. | 用户不存在 |
400 | 1001004 | OKR data not found. | 对应ID的数据不存在 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://open.feishu.cn/open-apis/okr/v1/okrs/batch_get?user_id_type=open_id&okr_ids&lang=zh_cn' \
--header 'Authorization;'
响应示例响应示例
{
"code": 0,
"data": {
"okr_list": [
{
"confirm_status": 4,
"id": "7072252816005349396",
"name": "2022 年 3 月",
"objective_list": [
{
"aligned_objective_list": [],
"aligning_objective_list": [],
"content": "需求@刘三",
"deadline": "1648656000000",
"id": "7073360513731690515",
"kr_list": [
{
"content": "1111@张三9",
"deadline": "1648656000000",
"id": "7073360471990140948",
"kr_weight": 50,
"mentioned_user_list": [
{
"open_id": "ou_a79faffdb6aee3618f0da4d42b192466",
"user_id": "ou_a79faffdb6aee3618f0da4d42b192466"
}
],
"progress_rate": {
"percent": 60,
"status": "1"
},
"progress_rate_percent_last_updated_time": "1646907176099",
"progress_rate_status_last_updated_time": "1646907176099",
"progress_record_last_updated_time": "1646907586253",
"progress_record_list": [
{
"id": "7073411057431199764"
},
{
"id": "7073410950174392340"
},
{
"id": "7073360480580010004"
},
{
"id": "7073360513731805203"
}
],
"progress_report_last_updated_time": "0",
"score": 100,
"score_last_updated_time": "1646907586244",
"weight": 50
}
],
"mentioned_user_list": [
{
"open_id": "ou_ab08720df94e64045cc8c2b7694ef2a0",
"user_id": "ou_ab08720df94e64045cc8c2b7694ef2a0"
}
],
"permission": 1,
"progress_rate": {
"percent": 30,
"status": "0"
},
"progress_rate_percent_last_updated_time": "1646907261326",
"progress_rate_status_last_updated_time": "1646907261326",
"progress_record_last_updated_time": "1646907590448",
"progress_record_list": [
{
"id": "7073410950447120403"
},
{
"id": "7073410950174474260"
},
{
"id": "7073360502990094355"
},
{
"id": "7073360502990061587"
}
],
"progress_report": "红豆泥",
"progress_report_last_updated_time": "1646907387911",
"score": 100,
"score_last_updated_time": "1646907590472",
"weight": 40
}
],
"period_id": "7067724095781142548",
"permission": 1
}
]
},
"msg": "success"
}
请求参数
Query 参数
user_id_type
string
可选
示例值:
open_id
okr_ids
array[string]
必需
lang
string
可选
示例值:
zh_cn
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
返回响应
修改于 2023-02-07 07:11:14