How to view statistics of employees’ activity and clock-in/out records

To get employee's activity statistics: api_employee_activity

Request:

controller=api_employee_activity&session=
44de3a99578d6aede5f7706049f61e13e35f5f4e8f674761ba0a3f570631de57&
query=
{
"interval":[1393632e3,1395964799],
"employees":[1],
"columns":
{
"schedule_type":1,
"activity_type":1,
"visible_columns":[1,2]
}
}

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.

"schedule_type":
1 — work time,
2 — scheduled time,
3 — non-scheduled time

"activity_type":
1 — all types,
2 — computer,
3 — non-computer

"visible_columns" — columns to be returned:
1 — worked time in seconds,
2 — productive time in seconds,
3 — non-productive time in seconds,
4 — non-core time in seconds,
5 — unknown time in seconds,
6 — number of schedule violations,
7 — number of times being late,
8 — number of times leaving early,
9 — number of absences,
10 — lateness time in seconds,
11 — average lateness time in seconds,
12 — early leave time in seconds,
13 — average early leave time in seconds,
14 — number of days worked,
15 — amount of time worked in seconds,
16 — work hours in seconds,
17 — number of working days according to schedule,
18 — total overtime in seconds.
"schedule_type" and "activity_type" only affect calculation of columns 1, 2, 3, 4, and 5.

Response:

{
"items":
[{
"employee_id": 1,
"first_name": "John",
"second_name": "Dow",
"schedule_day_count": 40,
"work_day_count": 39,
"nonspecialized_time": 98914,
"late_time": 52974,
"late_count": 9,
"work_time": 1140446,
"permitted_time": 905906,
"forbidden_time": 69723,
"early_end_count": 3,
"early_end_time": 18812,
"absenteeism": 3,
"unknown_time": 90017,
"incident_count": 15,
"norm": 1296000,
}]
}

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;
schedule_day_count Number of workdays accoring to a schedule;
work_day_count Number of days worked;
nonspecialized_time Non-core time in seconds;
late_time Lateness time in seconds;
late_count Number of times being late;
work_time Worked time in seconds;
permitted_time Productive time in seconds;
forbidden_time Non-productive time in seconds;
early_end_count Number of times leaving early;
early_end_time Early leave time in seconds;
absenteeism Number of absences;
unknown_time Unknown time in seconds;
incident_count Number of schedule violations;
norm Work hours in seconds;
diff Total overtime in seconds.

To get employees' clock-in/out records: api_employee_work_periods

Request:

controller=api_employee_work_periods&session=
44de3a99578d6aede5f7706049f61e13e35f5f4e8f674761ba0a3f570631de57&
query=
{
"day":1393632000,
"employees":[120]
}

session User's session.
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": "John",
"second_name": "Dow",
"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;
is_deleted If an employee’s profile is deleted;
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.