How to view statistics of employees’ activity and clock-in/out records
To get employee's activity statistics: api_employee_activity
Request:
{
"server_token": "...",
"app_version": "...",
"controller": "api_employee_activity",
"query": {
"interval":[139363203,1395964799],
"employees":[1]
}
}
interval | time period for which the statistics are returned. The beginning and the end of the interval are set as a number of seconds starting from 01.01.1970; |
employees | list of employees’ IDs for which the statistics are returned. |
Response:
{
"items":
[{
"employee_id": 1,
"first_name": "Ivan",
"second_name": "Petrov",
"permitted_time": 905906,
"forbidden_time": 69723,
"unknown_time": 90017,
"late_count": 9,
"early_end_count": 3,
"absenteeism": 3,
"late_time": 52974,
"early_end_time": 18812,
"work_day_count": 39,
"summary_time": 1140446,
"norm": 1296000,
"schedule_day_count": 40
}]
}
items | List of employees with statistics for each of employees; |
employee_id | Employee’s ID; |
first_name | Employee’s name; |
second_name | Employee’s surname; |
permitted_time | Productive time in seconds; |
forbidden_time | Non-productive time in seconds; |
unknown_time | Unknown time in seconds; |
late_count | Number of times being late; |
early_end_count | Number of times leaving early; |
absenteeism | Number of absences; |
late_time | Lateness time in seconds; |
early_end_time | Early leave time in seconds; |
work_day_count | Number of days worked; |
summary_time | Worked time in seconds; |
norm | Work hours in seconds; |
schedule_day_count | Number of workdays accoring to a schedule; |
Request: To get employees' clock-in/out records: api_employee_work_periods
{
"server_token": "...",
"app_version": "...",
"controller": "api_employee_activity",
"query": {
"day":1393632000,
"employees":[120]
}
}
day | day for which the statistics is returned. The day is set as the number of seconds starting from 01.01.1970 until 00:00:00 of the day. |
employees | a list of employees’ ID for whom clock-in and clock-out times are requested. |
Response:
{
"items":
[{
"employee_id": 120,
"first_name": "Ivan",
"second_name": "Petrov",
"day": 1393632000,
"begin": 36706,
"end": 67879
}]
}
items | Employees’ list with clock-in and clock-out times for each employee; |
employee_id | Employee's ID; |
first_name | Employee's name; |
second_name | Employee's surname; |
day | Day for which the statistics is returned. The day is set as the number of seconds starting from 01.01.1970 until 00:00:00 of the day; |
begin | Clock-in time in seconds from the beginning of the day. -1 — undefined time; |
end | Clock-out time in seconds from the beginning of the day. -1 — undefined time. |