# Get the user's OKR list

Get OKR list based on user id.

**Notice**：` tenant_access_token ` requires additional application permissions <md-perm href = "/ssl: ttdoc/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN"> to access OKR information as an application </md-perm >

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/okr/v1/users/:user_id/okrs
HTTP Method | GET
Rate Limit | [100 per minute](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.**<br>Enable any scope from the list | Obtain OKR information(okr:okr:readonly)<br>Update OKR(okr:okr)
Required field scopes | **Notice**：The response body of the API contains the following sensitive fields, and they will be returned only after corresponding scopes are added. If you do not need the fields, it is not recommended that you request the scopes.<br>Obtain user ID(contact:user.employee_id:readonly)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>or<br>`user_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)

### Path parameters

Parameter | Type | Description
---|---|---
user_id | string | Target user id<br>**Example value**: "ou-xxxx"

### Query parameters

Parameter | Type | Required | Description
---|---|---|---
user_id_type | string | No | User ID categories<br>**Example value**: open_id<br>**Optional values are**:<br>- open_id：Identifies a user to an app. The same user has different Open IDs in different apps. [How to get Open ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-openid)<br>- union_id：Identifies a user to a tenant that acts as a developer. A user has the same Union ID in apps developed by the same developer, and has different Union IDs in apps developed by different developers. A developer can use Union ID to link the same user's identities in multiple apps.[How to get Union ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-union-id)<br>- user_id：Identifies a user to a tenant. The same user has different User IDs in different tenants. In one single tenant, a user has the same User ID in all apps （including store apps）. User ID is usually used to communicate user data between different apps. [How to get User ID](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-obtain-user-id)<br>- people_admin_id：Identify users by people_admin_id<br>**Default value**: `open_id`<br>**When the value is `user_id`, the following field scopes are required**:<br>Obtain user ID(contact:user.employee_id:readonly)
offset | string | Yes | The offset of the request list (corresponding to the okr_list field of the response body), offset>=0<br>**Example value**: 0
limit | string | Yes | The length of the request list, 0 < limit < = 10, in the request Query<br>**Example value**: 0
lang | string | No | Request the language version of OKR (such as @'s name), lang = en_us/zh_cn, request Query<br>**Example value**: zh_cn<br>**Default value**: `zh_cn`
period_ids | string\[\] | No | period_id list, up to 10<br>**Example value**: 6990181559036610092<br>**Data validation rules**:<br>- Maximum length: `10`

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
total | int | Total number of OKR cycles
okr_list | okr_batch\[\] | OKR List
id | string | OKR ID
permission | int | Access to OKR<br>**Optional values are**:<br>- 0：No permission<br>- 1：Has permission
period_id | string | OKR Period ID
name | string | Name
objective_list | okr_objective\[\] | Objective list
id | string | Objective ID
permission | int | Permissions<br>**Optional values are**:<br>- 0：No permission<br>- 1：Has permission
content | string | Objective content
progress_report | string | Objective progress record content
score | int | Objective score (0 - 100)
weight | number(float) | Objective weight (0 - 100)
progress_rate | okr_objective_progress_rate | Objective progress
percent | int | Objective progress percent > = 0
status | string | Objective progress status<br>- "-1" not yet<br>- "0" normal<br>- "1" risk<br>- "2" postpone
kr_list | okr_objective_kr\[\] | Objective KeyResult List
id | string | Key Result ID
content | string | KeyResult
score | int | KeyResult (0 - 100)
weight | int | KeyResult weight (0 - 100) (abandoned)
kr_weight | number(float) | KeyResult weight (0 - 100)
progress_rate | okr_objective_progress_rate | KR Progress
percent | int | Objective progress percent > = 0
status | string | Objective progress status<br>- "-1" not yet<br>- "0" normal<br>- "1" risk<br>- "2" postpone
progress_record_list | progress_record_simplify\[\] | Progress list for this KeyResult
id | string | OKR progress record ID
progress_rate_percent_last_updated_time | string | Last progress percentage update time, milliseconds
progress_rate_status_last_updated_time | string | Last status update in milliseconds
progress_record_last_updated_time | string | The last time you added or edited progress in the sidebar, in milliseconds
progress_report_last_updated_time | string | Time of last edit of progress/notes, milliseconds
score_last_updated_time | string | Last score update time, milliseconds
deadline | string | Deadline, milliseconds
mentioned_user_list | okr_objective_aligned_objective_owner\[\] | List of persons referred to in the Objective
open_id | string | User open_id
user_id | string | User user_id
aligned_objective_list | okr_objective_aligned_objective\[\] | List of Objectives aligned to the Objective
id | string | Objective ID
okr_id | string | OKR ID
owner | okr_objective_aligned_objective_owner | Owner of the Objective
open_id | string | User open_id
user_id | string | User user_id
aligning_objective_list | okr_objective_aligned_objective\[\] | List of Objectives to which the Objective is aligned
id | string | Objective ID
okr_id | string | OKR ID
owner | okr_objective_aligned_objective_owner | Owner of the Objective
open_id | string | User open_id
user_id | string | User user_id
progress_record_list | progress_record_simplify\[\] | Progress list for this Objective
id | string | OKR progress record ID
progress_rate_percent_last_updated_time | string | Last progress percentage update time, milliseconds
progress_rate_status_last_updated_time | string | Last status update in milliseconds
progress_record_last_updated_time | string | The last time you added or edited progress in the sidebar, in milliseconds
progress_report_last_updated_time | string | Time of last edit of progress/notes, milliseconds
score_last_updated_time | string | Last score update time, milliseconds
deadline | string | Deadline, milliseconds
mentioned_user_list | okr_objective_aligned_objective_owner\[\] | List of persons referred to in the Objective
open_id | string | User open_id
user_id | string | User user_id
confirm_status | int | OKR Confirmation Status<br>**Optional values are**:<br>- 0：Initial state<br>- 1：Pending/uncommitted<br>- 2：Pending / pending confirmation<br>- 3：Rejected/suggested<br>- 4：Passed/confirmed

### Response body example
```json
{
    "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": "6887399402823058952"
                                    }
                                ],
                                "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"
                                    }
                                ],
                                "progress_report_last_updated_time": "0",
                                "score": 100,
                                "score_last_updated_time": "1646907586244",
                                "weight": 50
                            }
                        ],
                        "mentioned_user_list": [
                            {
                                "open_id": "ou_ab08720df94e64045cc8c2b7694ef2a0",
                                "user_id": "6886701186532001294"
                            }
                        ],
                        "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": "7073360502990061587"
                            }
                        ],
                        "progress_report": "红豆泥",
                        "progress_report_last_updated_time": "1646907387911",
                        "score": 100,
                        "score_last_updated_time": "1646907590472",
                        "weight": 40
                    }
                ],
                "period_id": "7067724095781142548",
                "permission": 1
            }
        ],
        "total": 14
    },
    "msg": "success"
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
500 | 1009999 | Unknown error. Please contact Feishu Assistant or your customer success manager. | Internal error
500 | 1009998 | system exception | System anomaly
400 | 1001001 | Invalid parameters. Please check document and modify accordingly. | Invalid parameter
400 | 1001002 | No permission. | No permission
400 | 1001003 | User not found. | User does not exist
400 | 1001004 | OKR data not found. | Okr data does not exist

