How to get lists of employees and departments

To get the list of employees: api_employees

Request:

controller=api_employees&session=
44de3a99578d6aede5f7706049f61e13e35f5f4e8f674761ba0a3f570631de57

sessionUser’s session.

Respone:

{
"items":
[{
"employee_id": 1,
"first_name": "John",
"second_name": "Dow",
"email": "dow@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:

controller=api_departments&session=
44de3a99578d6aede5f7706049f61e13e35f5f4e8f674761ba0a3f570631de57

sessionUser’s session.

Respone:

{
"items":
[{
"department_id": 21,
"display_name": "Head Office",
"items":
[{
"department_id": 38,
"display_name": "Accounting Department",
"items":
[{
"employee_id": 120,
"first_name": "John",
"second_name": "Dow"
}]
}]
}]
}

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.