Access Control

journal

request
GET /api/v2/access-control?startOn=2018-08-06&finishOn=2021-08-06&userIds=1000000005,%201000000004&departmentId=1000000001&userGroupId=1000000008&ip=54.76.10.24&size=3 HTTP/1.1
Table 3. request description
Parameter Description

startOn

filter’s start date

finishOn

filter’s finish date

userGroupId

user group id

departmentId

department id

userIds

List of user id (comma separated → userIds=1000000022, 1000000004).

ip

user ip address

pageable

Pageable description

response
HTTP/1.1 200 OK

{
  "content" : [ {
    "loginAt" : "2020-03-18T17:54:00.000Z",
    "user" : {
      "id" : 1000000005,
      "login" : "topmanager",
      "firstName" : "Иван",
      "familyName" : "Иванов",
      "patronymicName" : null,
      "departmentName" : "Центральный офис",
      "userGroupName" : "Топ-менеджмент",
      "fired" : false
    },
    "ip" : "54.76.10.24",
    "lastActionAt" : "2020-03-18T17:54:00.000Z"
  }, {
    "loginAt" : "2020-03-18T17:50:00.000Z",
    "user" : {
      "id" : 1000000005,
      "login" : "topmanager",
      "firstName" : "Иван",
      "familyName" : "Иванов",
      "patronymicName" : null,
      "departmentName" : "Центральный офис",
      "userGroupName" : "Топ-менеджмент",
      "fired" : false
    },
    "ip" : "54.76.10.24",
    "lastActionAt" : "2020-03-18T17:51:00.000Z"
  }, {
    "loginAt" : "2020-03-18T17:48:00.000Z",
    "user" : {
      "id" : 1000000005,
      "login" : "topmanager",
      "firstName" : "Иван",
      "familyName" : "Иванов",
      "patronymicName" : null,
      "departmentName" : "Центральный офис",
      "userGroupName" : "Топ-менеджмент",
      "fired" : false
    },
    "ip" : "54.76.10.24",
    "lastActionAt" : "2020-03-18T17:54:00.000Z"
  } ],
  "pageable" : {
    "pageNumber" : 0,
    "pageSize" : 3,
    "sort" : {
      "empty" : false,
      "sorted" : true,
      "unsorted" : false
    },
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "last" : false,
  "totalElements" : 122,
  "totalPages" : 41,
  "first" : true,
  "size" : 3,
  "number" : 0,
  "sort" : {
    "empty" : false,
    "sorted" : true,
    "unsorted" : false
  },
  "numberOfElements" : 3,
  "empty" : false
}
Table 4. response description
Path Type Description

content[].

Array

an array of journal records

content[].loginAt

String

user login date

content[].user

Object

information about user

content[].user.login

String

user’s login

content[].user.firstName

String

user’s first name

content[].user.familyName

String

user’s family name

content[].user.patronymicName

String

user’s patronymic name

content[].user.userGroupName

String

user group name

content[].user.departmentName

String

department name

content[].ip

String

user ip address

content[].lastActionAt

String

user last action date

statistics

request
GET /api/v2/access-control/statistics?startOn=2018-08-06&finishOn=2021-08-06&userIds=1000000022&departmentId=1000000003&userGroupId=1000000006&ip=63.35.193.150 HTTP/1.1
Table 5. request description
Parameter Description

startOn

filter’s start date

finishOn

filter’s finish date

userGroupId

user group id

departmentId

department id

userIds

List of user id (comma separated → userIds=1000000022, 1000000004).

ip

user ip address

pageable

Pageable description

response
HTTP/1.1 200 OK

{
  "content" : [ {
    "user" : {
      "id" : null,
      "login" : "client",
      "firstName" : "Тимофей",
      "familyName" : "Кадын",
      "patronymicName" : "Юрьевич",
      "departmentName" : null,
      "userGroupName" : "Продавцы",
      "fired" : null
    },
    "daysLoggedIn" : 1,
    "workTimeHours" : 1,
    "workTimeMinutes" : 23
  } ],
  "pageable" : {
    "pageNumber" : 0,
    "pageSize" : 10,
    "sort" : {
      "empty" : true,
      "sorted" : false,
      "unsorted" : true
    },
    "offset" : 0,
    "paged" : true,
    "unpaged" : false
  },
  "last" : true,
  "totalElements" : 1,
  "totalPages" : 1,
  "first" : true,
  "size" : 10,
  "number" : 0,
  "sort" : {
    "empty" : true,
    "sorted" : false,
    "unsorted" : true
  },
  "numberOfElements" : 1,
  "empty" : false
}
Table 6. response description
Path Type Description

content[].

Array

an array of user access statistics

content[].user

Object

information about user

content[].user.login

String

user’s login

content[].user.firstName

String

user’s first name

content[].user.familyName

String

user’s family name

content[].user.patronymicName

String

user’s patronymic name

content[].user.userGroupName

String

user group name

content[].daysLoggedIn

Number

the number of days the user logged in

content[].numberLoggedIn

Number

the number of times the user logged in

content[].workTimeHours

Number

time worked by the user in hours (considered if an hour has passed between logged in and the last action)

content[].workTimeMinutes

Number

time worked by the user in minutes (considered if an hour has passed between logged in and the last action)