查询统计表头
POST
/open-apis/attendance/v1/user_stats_fields/query
/open-apis/attendance/v1/user_stats_fields/query
错误码
HTTP状态码 | 错误码 | 描述 | 排查建议 |
---|---|---|---|
400 | 1220001 | 参数错误 | 请检查参数是否符合要求 |
400 | 1220002 | 租户不存在 | 请检查 tenant_access_token 是否正确 |
500 | 1228000 | 统计服务系统错误 | 详见错误信息 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.feishu.cn/open-apis/attendance/v1/user_stats_fields/query?employee_type=employee_id' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"locale": "zh",
"stats_type": "daily",
"start_date": 20210316,
"end_date": 20210323
}'
响应示例响应示例
{
"code": 0,
"msg": "",
"data": {
"user_stats_field": {
"fields": [
{
"child_fields": [
{
"code": "50103",
"title": "Employee ID"
}
],
"code": "501",
"title": "Basic info"
},
{
"child_fields": [
{
"code": "52108",
"title": "Attendance group name"
},
{
"code": "52101",
"title": "Required attendance days"
},
{
"code": "52102",
"title": "Days of attendance"
},
{
"code": "52104",
"time_unit": "Minute",
"title": "Required attendance duration"
},
{
"code": "52105",
"time_unit": "Minute",
"title": "Actual attendance duration"
},
{
"code": "52107",
"title": "Overtime hours"
}
],
"code": "521",
"title": "Attendance statistics"
},
{
"child_fields": [
{
"code": "52201",
"title": "Late in times"
},
{
"code": "52203",
"title": "Early out times"
},
{
"code": "52207",
"title": "No records"
}
],
"code": "522",
"title": "Abnormal statistics"
},
{
"child_fields": [
{
"code": "2021-03-16",
"title": "2021-03-16 Tue"
},
{
"code": "2021-03-17",
"title": "2021-03-17 Wed"
},
{
"code": "2021-03-18",
"title": "2021-03-18 Thu"
},
{
"code": "2021-03-19",
"title": "2021-03-19 Fri"
},
{
"code": "2021-03-20",
"title": "2021-03-20 Sat"
},
{
"code": "2021-03-21",
"title": "2021-03-21 Sun"
},
{
"code": "2021-03-22",
"title": "2021-03-22 Mon"
},
{
"code": "2021-03-23",
"title": "2021-03-23 Tue"
}
],
"code": "524",
"title": "Daily statistics"
}
],
"stats_type": "month",
"user_id": "ec8ddg56"
}
}
}
请求参数
Query 参数
employee_type
必需
示例值:
employee_id
Header 参数
Authorization
string
必需
默认值:
Bearer {{access_token}}
Content-Type
string
必需
默认值:
application/json; charset=utf-8
Body 参数application/json
返回响应
修改于 2023-01-28 08:40:04