How to get lists of employees and departments
To get the list of employees: api_employees
Request:
{
"server_token": "...",
"app_version": "...",
"controller": "api_employees"
}
Response:
{
"items":
[{
"employee_id": 1,
"is_deleted": 0,
"display_name": "Petrov Ivan",
"first_name": "Ivan",
"second_name": "Petrov",
"email": "petrov@mail.loc",
"privilege": -1,
"time_zone": "Europe/Moscow",
"parent_group_id": 1
}]
}
items | List of employees; |
employee_id | Employee’s ID; |
is_deleted | If an employee’s profile was deleted from the AD, but remained in the system. |
display_name | Display name; |
first_name | Employee’s name; |
second_name | Employee’s surname; |
Employee’s e-mail; | |
time_zone | Time zone ID; |
parent_group_id | Parent group ID; |
To get the tree of departments: api_departments
Request:
{
"server_token": "...",
"app_version": "...",
"controller": "api_departments"
}
Respone:
{
"items":
[{
"department_id": 21,
"display_name": "Head office",
"items":
[{
"department_id": 38,
"display_name": "Logistics Department",
"items":
[{
"employee_id": 120,
"first_name": "Ivan",
"second_name": "Petrov"
}]
}]
}]
}
items | List of employees; |
department_id | Department’s ID; |
display_name | Department’s name; |
employee_id | Employee’s ID; |
first_name | Employee’s name; |
second_name | Employee’s surname; |