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,
"first_name": "Иван",
"second_name": "Петров",
"email": "petrov@mail.loc"
}]
}

itemsList of employees;
employee_idEmployee’s ID;
first_nameEmployee’s name;
second_nameEmployee’s surname;
emailEmployee’s e-mail;
is_deletedIf an employee’s profile was deleted from the AD, but remained in the system.

To get the tree of departments: api_departments

Request:

{
  "server_token": "...",
  "app_version": "...",
  "controller": "api_departments"
}

Respone:

{
"items":
[{
"department_id": 21,
"display_name": "Головной офис",
"items":
[{
"department_id": 38,
"display_name": "Отдел логистики",
"items":
[{
"employee_id": 120,
"first_name": "Иван",
"second_name": "Петров"
}]
}]
}]
}

itemsList of employees;
department_idDepartment’s ID;
display_nameDepartment’s name;
employee_idEmployee’s ID;
first_nameEmployee’s name;
second_nameEmployee’s surname;
is_deletedIf an employee’s profile was deleted from the AD, but remained in the system.