# Batch acquisition of key metric details of the person being evaluated for the specified period

Batch acquisition of key metric details of the person being evaluated in the specified period

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/performance/v2/metric_details/query
HTTP Method | POST
Rate Limit | [20 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 | 管理关键指标数据(performance:metric:write)<br>获取关键指标数据(performance:metric:read)
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>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-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)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

### 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><md-enum-item key="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)

### Request body

Parameter | Type | Required | Description
---|---|---|---
semester_id | string | Yes | Cycle ID, only 1 cycle is allowed to be queried at a time, semester_id can be obtained through the [[Get Cycle](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v1/semester/list)] interface<br>**Example value**: "6992035450862224940"
reviewee_user_ids | string\[\] | Yes | List of assessee IDs. If not passed on, return key metric details of all participating assessees for the period<br>**Example value**: ["ou_3245842393d09e9428ad4655da6e30b3"]<br>**Data validation rules**:<br>- Length range: `1` ～ `50`

### Request body example
```json
{
    "semester_id": "6992035450862224940",
    "reviewee_user_ids": [
        "ou_3245842393d09e9428ad4655da6e30b3"
    ]
}
```

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
semester_id | string | Cycle ID
reviewee_metrics | reviewee_metric\[\] | Detailed list of indicators
reviewee_user_id | user | Assessor
open_id | string | User's open_id
user_id | string | The user's user_id, the value is consistent with user_id_type
metric_template_id | string | The indicator template ID to which the person being evaluated belongs in the cycle
metric_details | metric_detail | Detailed data of the evaluated person under the cycle
metric_id | string | indicator ID
name | string | Indicator name, the name of the indicator in this detail
fields | metric_field_in_details\[\] | Metric field information
field_id | string | Indicator field ID. The indicator field IDs preset by the system are: indicator 1; weight 2; indicator unit 3; target value 4; completion value 5; completion instructions 7. More indicator field details can be obtained through the [[Get Indicator Field Details](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_field/query)] interface
field_value | string | field value
field_value_person | user | Field value, which has a value when the field is person information
open_id | string | User's open_id
user_id | string | The user's user_id, the value is consistent with the user_id_type
dimension_id | string | The metric dimension ID to which the metric belongs
dimension_name | i18n | Metric dimension name
zh_cn | string | Chinese
en_us | string | English
dimension_weight | string | The dimension weight of the metric dimension, if not set, returns empty, Unit is percentage
add_from | string | Indicator Add Source<br>**Optional values are**:<br>- reviewee：Metric setter Add<br>- admin：Admin Add
is_from_library | boolean | Whether the indicator is quoted from the indicator library
reviewee_stage_statuses | reviewee_stage_status\[\] | list of stage status for metrics
stage_id | string | Stage ID
stage_type | string | Stage type<br>**Optional values are:**<br>- `kpi_metric_setting`：Metric development<br>- `kpi_result_recording`：Metric result input
stage_status | int | Stage progress<br>**Optional values are:**<br>- `0`：Not started<br>- `1`：To be completed<br>- `2`：Overdue<br>- `3`：Pending confirmation<br>- `4`：Rejected<br>- `5`：Completed

### Response body example
```json
{
    "code": 0,
    "msg": "success",
    "data": {
        "semester_id": "7291278856547794964",
        "reviewee_metrics": [
            {
                "reviewee_user_id": {
                    "open_id": "od-asd2dasdasd",
                    "user_id": "ou-ux987dsf6x"
                },
                "metric_template_id": "7294570803306168339",
                "metric_details": {
                    "metric_id": "7272581996315099155",
                    "name": "示例指标",
                    "fields": [
                        {
                            "field_id": "7296082067266207764",
                            "field_value": "90",
                            "field_value_person": {
                                "open_id": "od-asd2dasdasd",
                                "user_id": "ou-ux987dsf6x"
                            }
                        }
                    ],
                    "dimension_id": "7303895818346430484",
                    "dimension_name": {
                        "zh_cn": "体验",
                        "en_us": "Interactive experience"
                    },
                    "dimension_weight": "90%",
                    "add_from": "admin",
                    "is_from_library": true
                },
                "reviewee_stage_statuses": [
                    {
                        "stage_id": "1",
                        "stage_type": "kpi_metric_setting",
                        "stage_status": 0
                    }
                ]
            }
        ]
    }
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
500 | 1580101 | internal error | Internal error, please try again later, it still appears You can [consult customer service](https://applink.feishu.cn/client/helpdesk/open?id=6626260912531570952&extra=%7B%22channel%22%3A14%2C%22created_at%22%3A1614493146%2C%22scenario_id%22%3A6885151765134622721%2C%22signature%22%3A%22ca94c408b966dc1de2083e5bbcd418294c146e98%22%7D)
400 | 1580102 | param is invalid | Request parameter error. Check if the request parameters are valid
400 | 1580105 | invalid semester ID | Semester ID does not exist
400 | 1580901 | tenant no licnese | The tenant has no performance seat, please contact the tenant administrator to open a performance seat.

For more information on error codes, see [Generic Error Code](https://open.feishu.cn/document/ukTMukTMukTM/ugjM14COyUjL4ITN).

