Перейти к основному содержимому

Сотрудники API 1.7.0

Методы API для работы с разделом «Сотрудники».

Базовый путь: https://{IP_контроллера}/api/v1. Версия описания API: 1.7.0.

Примеры используют placeholder-значения для паролей, token, UUID, адресов и секретов. Перед выполнением запроса замените их на значения вашего контроллера.

Методы раздела

МетодПуть
GET/staff
POST/staff
PUT/staff/ban/{uuid}
GET/staff/banned
POST/staff/biometry
GET/staff/biometry/status
GET/staff/count
GET/staff/full_names
GET/staff/multisearch
GET/staff/search
GET/staff/sort
PUT/staff/unban/{uuid}
GET/staff/{uuid}
PUT/staff/{uuid}
DELETE/staff/{uuid}
DELETE/staff/{uuid}/biometry
DELETE/staff/{uuid}/biometry/{biometry_model}
DELETE/staff/{uuid}/biometry_card
POST/staff/{uuid}/biometry_card/{card_code}
GET/staff/{uuid}/convolution
POST/staff/{uuid}/convolution
GET/staff/{uuid}/last_access
GET/staff_properties
POST/staff_properties
GET/staff_properties/{name}
PUT/staff_properties/{name}
DELETE/staff_properties/{name}

GET /staff

Раздел: Сотрудники.

Возвращает постраничный список сотрудников

Источник в Teamly

Назначение

URL запроса

Возвращает постраничный список сотрудников

https://{IP_контроллера}/api/v1/staff?page=1&page_size=2

Параметры запроса:

Наименование, * - обязательный

Описание

page* integer (query)

page_size* integer (query)

Страница выводимого списка

Максимальное количество карточек на странице

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

surname*

string

minLength: 1

Фамилия

name*

string

minLength: 1

Имя

second_name

string

Отчество

access_profiles

string

[{uuid string / Уникальный идентификатор профиля доступа from integer /Начало действия профиля доступа to integer/Конец действия профиля доступа}]

Список профилей доступа сотрудника

access_point

string

pattern:/^$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID личной точки доступа

access_user

string

Пользователь для входа в систему

pin

string

maxLength: 8

ПИН-код сотрудника

car_number

string

pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$

Номер автомобиля

biometry

string

{ card_code string/pattern: ^[1-9]\d*$ Номер карты, к которой привязана биометрия models /Модель биометрического считывателя для которого добавлены биометрические данные в систему [string] }

Биометрия сотрудника

comment

string

Комментарий или примечание по сотруднику

dolzhnost

string

Должность

E-mail

string

Электронная почта

tab_nomer

integer

Табельный номер

bio_provider_person_id

string

Связка внутреннего идентификатора сотрудника с его биометрическим шаблоном у провайдера биометрии

bio_provider

string

Провайдер биометрии

uuid*

string

pattern:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$

UUID сотрудника

cards

string

pattern: ^[1-9]\d*$

Список карт сотрудника

access_profile

string

Устаревшее Профиль доступа (сохранено для обратной совместимости с более старыми версиями API)

banned

boolean

true-заблокирован, false-действующий

Статус пользователя

Пример:

[
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 0,
"to": 0
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 0,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"banned": true
}
]

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Returns staff page",
"parameters": [
{
"in": "query",
"name": "page",
"description": "Cards page id to load",
"required": true,
"schema": {
"type": "integer",
"minimum": 1
}
},
{
"in": "query",
"name": "page_size",
"description": "Maximum number of cards in page",
"required": true,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 150
}
}
],
"responses": {
"200": {
"description": "Successfully returned staff page",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"surname",
"name",
"dolzhnost",
"uuid"
],
"properties": {
"surname": {
"type": "string"
},
"name": {
"type": "string"
},
"second_name": {
"type": "string"
},
"access_profiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
}
}
},
"description": "User's access profiles list"
},
"access_point": {
"type": "string",
"description": "Personal access point"
},
"access_user": {
"type": "string"
},
"pin": {
"type": "string",
"maxLength": 8,
"description": "Personal pin code"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"biometry": {
"properties": {
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$",
"description": "Staff biometry card code"
},
"models": {
"type": "array",
"items": {
"type": "string"
},
"description": "Models of biometry readers for which employee has bio data saved in system"
}
},
"description": "Describes staff biometry data"
},
"comment": {
"type": "string"
},
"dolzhnost": {
"type": "string"
},
"E-mail": {
"type": "string"
},
"tab_nomer": {
"type": "integer"
},
"bio_provider_person_id": {
"type": "string"
},
"bio_provider": {
"type": "string"
},
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User UUID"
},
"cards": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d*$"
},
"description": "Employee cards codes list"
},
"access_profile": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
},
"banned": {
"type": "boolean",
"description": "User banned for accessing any access point or not"
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff?page=1&page_size=1" \
-H "Authorization: Bearer <token>"

Пример ответа

[
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}
]

POST /staff

Раздел: Сотрудники.

Добавляет нового сотрудника в систему

Источник в Teamly

Назначение

URL запроса

Добавляет нового сотрудника в систему

https://{IP_контроллера}/api/v1/staff/

Параметры запроса:

BODY

Название

* - обязательный

Тип

Формат

Назначение

surname*

string

Фамилия

name*

string

Имя

second_name

string

Отчество

access_profiles

[{

uuid string / Уникальный идентификатор профиля доступа

from integer /Начало действия профиля доступа

to integer /Конец действия профиля доступа

}]

Список профилей доступа сотрудника

access_point

string

pattern:/^$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID личной точки доступа

access_user

string

Пользователь для входа в систему

рin

string

maxLength: 8

ПИН-код сотрудника

car_number

string

pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$

Номер автомобиля сотрудника

biometry

string

card_code string/pattern: ^[1-9]\d*$ Номер карты, к которой привязана биометрия

models /Модель биометрического считывателя для которого добавлены биометрические данные в систему [string]

Описывает настроенную биометрию для сотрудника

comment

string

Комментарий или примечание по сотруднику

uuid*

string

pattern:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$

UUID сотрудника

cards

string

pattern: ^[1-9]\d*$

Список карт сотрудника

access_profile

string

Устаревшее Профиль доступа (сохранено для обратной совместимости с более старыми версиями API)

banned

boolean

Статус пользователя – заблокирован, действующий

Пример:

URL запроса: POST
https://{IP_контроллера}/api/v1/staff/

Body

{
"surname": "Николаев",
"name": "Николай",
"second_name": "Николаевич",
"access_profiles": [
{
"uuid": "6d022a78-92ae-11ec-b909-0242ac120002",
"from": 0,
"to": 0
}
],
"access_point": "6d022a78-92ae-11ec-b909-0242ac120002",
"pin": "30900",
"car_number": "A354YY178",
"comment": "string",
"uuid": "string",
"cards": ["23456"],
"banned": false
}

Варианты ответа:

Code 201 (Successfully) - удачное выполнение запроса

{
"success": false,
"message": "string",
"data": {}
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 409 (User with specified uuid already exists) - запрос не выполнен, пользователь с таким uuid уже добавлен

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Add new employee to staff",
"requestBody": {
"required": true,
"description": "New employee data in staff database",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"surname",
"name",
"dolzhnost",
"uuid"
],
"properties": {
"surname": {
"type": "string"
},
"name": {
"type": "string"
},
"second_name": {
"type": "string"
},
"access_profiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
}
}
},
"description": "User's access profiles list"
},
"access_point": {
"type": "string",
"description": "Personal access point"
},
"access_user": {
"type": "string"
},
"pin": {
"type": "string",
"maxLength": 8,
"description": "Personal pin code"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"biometry": {
"properties": {
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$",
"description": "Staff biometry card code"
},
"models": {
"type": "array",
"items": {
"type": "string"
},
"description": "Models of biometry readers for which employee has bio data saved in system"
}
},
"description": "Describes staff biometry data"
},
"comment": {
"type": "string"
},
"dolzhnost": {
"type": "string"
},
"E-mail": {
"type": "string"
},
"tab_nomer": {
"type": "integer"
},
"bio_provider_person_id": {
"type": "string"
},
"bio_provider": {
"type": "string"
},
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User UUID"
},
"cards": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d*$"
},
"description": "Employee cards codes list"
},
"access_profile": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
},
"banned": {
"type": "boolean",
"description": "User banned for accessing any access point or not"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Successfully added new employee to staff",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "User with specified uuid already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X POST "https://{IP_контроллера}/api/v1/staff" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}'

Пример тела запроса

{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

PUT /staff/ban/{uuid}

Раздел: Сотрудники.

Блокирует доступ существующего сотрудника по uuid сотрудника

Источник в Teamly

Назначение

URL запроса

Блокирует доступ существующего сотрудника по uuid сотрудника

https://{IP_контроллера}/api/v1/staff/ban/{uuid}

Параметры запроса:

Наименование

Описание

uuid * string (path)

UUID сотрудника

Варианты ответа:

Code 200 (Successfully) - удачное выполнение запроса

{
"success": false,
"message": "string",
"data": {}
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 404 (User with specified uuid was not found) - запрос не выполнен, пользователь указанный в {uuid} не найден

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Edit employee data",
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully edited employee",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified employee does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X PUT "https://{IP_контроллера}/api/v1/staff/ban/{uuid}" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

GET /staff/banned

Раздел: Сотрудники.

Возвращает список всех заблокированных сотрудников

Источник в Teamly

Назначение

URL запроса

Возвращает список всех заблокированных сотрудников

https://{IP контроллера}/api/v1/staff/banned

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

surname*

string

minLength: 1

Фамилия

name*

string

minLength: 1

Имя

second_name

string

Отчество

access_profiles

string

[{uuid string / Уникальный идентификатор профиля доступа from integer /Начало действия профиля доступа to integer/Конец действия профиля доступа}]

Список профилей доступа сотрудника

access_point

string

pattern:/^$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID личной точки доступа

access_user

string

Пользователь для входа в систему

pin

string

maxLength: 8

ПИН-код сотрудника

car_number

string

pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$

Номер автомобиля

biometry

string

{ card_code string/pattern: ^[1-9]\d*$ Номер карты, к которой привязана биометрия models /Модель биометрического считывателя для которого добавлены биометрические данные в систему [string] }

Биометрия сотрудника

comment

string

Комментарий или примечание по сотруднику

dolzhnost

string

Должность

E-mail

string

Электронная почта

tab_nomer

integer

Табельный номер

bio_provider_person_id

string

Связка внутреннего идентификатора сотрудника с его биометрическим шаблоном у провайдера биометрии

bio_provider

string

Провайдер биометрии

uuid*

string

pattern:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$

UUID сотрудника

cards

string

pattern: ^[1-9]\d*$

Список карт сотрудника

access_profile

string

Устаревшее Профиль доступа (сохранено для обратной совместимости с более старыми версиями API)

banned

boolean

true-заблокирован, false-действующий

Статус пользователя

[
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 0,
"to": 0
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 0,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"banned": true
}
]

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Returns staff page",
"responses": {
"200": {
"description": "Successfully returned staff page",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"surname",
"name",
"dolzhnost",
"uuid"
],
"properties": {
"surname": {
"type": "string"
},
"name": {
"type": "string"
},
"second_name": {
"type": "string"
},
"access_profiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
}
}
},
"description": "User's access profiles list"
},
"access_point": {
"type": "string",
"description": "Personal access point"
},
"access_user": {
"type": "string"
},
"pin": {
"type": "string",
"maxLength": 8,
"description": "Personal pin code"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"biometry": {
"properties": {
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$",
"description": "Staff biometry card code"
},
"models": {
"type": "array",
"items": {
"type": "string"
},
"description": "Models of biometry readers for which employee has bio data saved in system"
}
},
"description": "Describes staff biometry data"
},
"comment": {
"type": "string"
},
"dolzhnost": {
"type": "string"
},
"E-mail": {
"type": "string"
},
"tab_nomer": {
"type": "integer"
},
"bio_provider_person_id": {
"type": "string"
},
"bio_provider": {
"type": "string"
},
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User UUID"
},
"cards": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d*$"
},
"description": "Employee cards codes list"
},
"access_profile": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
},
"banned": {
"type": "boolean",
"description": "User banned for accessing any access point or not"
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/banned" \
-H "Authorization: Bearer <token>"

Пример ответа

[
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}
]

POST /staff/biometry

Раздел: Сотрудники.

Добавляет биометрические данные сотруднику.

Параметры и ответы по OpenAPI
{
"description": "Add new biometry to staff",
"requestBody": {
"required": true,
"description": "New biometry data in staff database",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"user_uuid",
"biometry_uuid"
],
"properties": {
"user_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"biometry_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$|virtual_card"
},
"type": {
"type": "string",
"enum": [
"READER",
"SERVICE"
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully added new biometry to staff",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X POST "https://{IP_контроллера}/api/v1/staff/biometry" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"user_uuid": "string",
"biometry_uuid": "string",
"card_code": "string",
"type": "READER"
}'

Пример тела запроса

{
"user_uuid": "string",
"biometry_uuid": "string",
"card_code": "string",
"type": "READER"
}

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

GET /staff/biometry/status

Раздел: Сотрудники.

Возвращает статусы биометрии.

Параметры и ответы по OpenAPI
{
"description": "Returns biometry statuses",
"responses": {
"200": {
"description": "Successfully returned biometry statuses",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"readers_in_use"
],
"properties": {
"readers_in_use": {
"type": "array",
"items": {
"type": "object",
"properties": {
"user_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"biometry_uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$"
}
}
}
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/biometry/status" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"readers_in_use": [
{
"user_uuid": "string",
"biometry_uuid": "string",
"card_code": "string"
}
]
}

GET /staff/count

Раздел: Сотрудники.

Возвращает количество сотрудников подходящих под указанный фильтр

Источник в Teamly

Назначение

URL запроса

Возвращает количество сотрудников подходящих под указанный фильтр

https://{IP_контроллера}/api/v1/staff/count?filter[staff_property_name]=Devision&filter[staff_property_value]=ИТ

Параметры запроса:

Наименование, * - обязательный

Описание

filter (query) фильтры для поиска. Фильтр осуществляется по справочникам, которые добавлены в поля персонала и помечены как “Показывать в результатах поиска”:

filter[staff_property_name]

filter[staff_property_value]

Название поля персонала

Значение поля персонала

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

count*

integer

minLength: 0

Количество сотрудников, подходящих под параметры поиска

{
"count": 0
}

Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Returns staff count",
"parameters": [
{
"in": "query",
"name": "filter",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Filter staff by staff property",
"required": [
"staff_property_name",
"staff_property_value"
],
"properties": {
"staff_property_name": {
"type": "string",
"minLength": 1
},
"staff_property_value": {
"type": "string",
"minLength": 1
}
}
}
}
},
"required": false
}
],
"responses": {
"200": {
"description": "Successfull got staff count",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"count"
],
"properties": {
"count": {
"type": "integer",
"minimum": 0
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/count" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"count": 1
}

GET /staff/full_names

Раздел: Сотрудники.

Возвращает ФИО всех сотрудников.

Параметры и ответы по OpenAPI
{
"description": "Returns all staff full names",
"responses": {
"200": {
"description": "Successfully got staff full names",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"uuid": {
"type": "string"
}
},
"required": [
"name",
"uuid"
]
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/full_names" \
-H "Authorization: Bearer <token>"

Пример ответа

[
{
"name": "string",
"uuid": "string"
}
]

GET /staff/multisearch

Раздел: Сотрудники.

Возвращает отфильтрованный и отсортированный список сотрудников.

Параметры и ответы по OpenAPI
{
"description": "Return a filtered and sorted list of staff",
"parameters": [
{
"in": "query",
"name": "surname",
"description": "Employee surname search parameter",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "name",
"description": "Employee name search parameter",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "page_size",
"description": "Maximum number of search results to be returned",
"required": true,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 150
}
},
{
"in": "query",
"name": "cursor",
"required": false,
"description": "Cursor to proceed search from",
"schema": {
"type": "integer",
"minimum": 0
}
},
{
"in": "query",
"name": "filter",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Filters staff by staff properties",
"additionalProperties": {
"type": "string"
}
}
}
},
"required": false
},
{
"in": "query",
"name": "direction",
"description": "Direction of sorting ASC, DESC or empty string for no sort search",
"required": false,
"schema": {
"type": "string",
"enum": [
"ASC",
"DESC"
],
"nullable": true
}
},
{
"in": "query",
"name": "searchString",
"description": "Employee search parameter",
"required": false,
"schema": {
"type": "string",
"nullable": true
}
}
],
"responses": {
"200": {
"description": "Successfully returned list of staff",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"staff",
"cursor",
"count"
],
"properties": {
"staff": {
"type": "array",
"items": {
"type": "object",
"required": [
"surname",
"name",
"dolzhnost",
"uuid"
],
"properties": {
"surname": {
"type": "string"
},
"name": {
"type": "string"
},
"second_name": {
"type": "string"
},
"access_profiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
}
}
},
"description": "User's access profiles list"
},
"access_point": {
"type": "string",
"description": "Personal access point"
},
"access_user": {
"type": "string"
},
"pin": {
"type": "string",
"maxLength": 8,
"description": "Personal pin code"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"biometry": {
"properties": {
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$",
"description": "Staff biometry card code"
},
"models": {
"type": "array",
"items": {
"type": "string"
},
"description": "Models of biometry readers for which employee has bio data saved in system"
}
},
"description": "Describes staff biometry data"
},
"comment": {
"type": "string"
},
"dolzhnost": {
"type": "string"
},
"E-mail": {
"type": "string"
},
"tab_nomer": {
"type": "integer"
},
"bio_provider_person_id": {
"type": "string"
},
"bio_provider": {
"type": "string"
},
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User UUID"
},
"cards": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d*$"
},
"description": "Employee cards codes list"
},
"access_profile": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
},
"banned": {
"type": "boolean",
"description": "User banned for accessing any access point or not"
}
}
}
},
"count": {
"type": "integer",
"minimum": 0,
"description": "Overall search count"
},
"cursor": {
"type": "integer",
"description": "Cursor to proceed with search from"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/multisearch?page_size=1" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"staff": [
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}
],
"count": 1,
"cursor": 1
}

Раздел: Сотрудники.

Возвращает отфильтрованный список карточек сотрудников

Источник в Teamly

Назначение

URL запроса

Возвращает постраничный список сотрудников

https://{IP_контроллера}/api/v1/staff?page=1&page_size=2

Параметры запроса:

Наименование, * - обязательный

Описание

page* integer (query)
page_size* integer (query)

Страница выводимого списка

Количество карточек на одной странице

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

surname*

string

minLength: 0

Фамилия

name*

string

minLength: 0

Имя

second_name

string

Отчество

access_profiles

string

[{uuid string / Уникальный идентификатор профиля доступа from integer /Начало действия профиля доступа to integer/Конец действия профиля доступа}]

Список профилей доступа сотрудника

access_point

string

pattern:/^$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID личной точки доступа

access_user

string

Пользователь для входа в систему

pin

string

maxLength: 8

ПИН-код сотрудника

car_number

string

pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$

Номер автомобиля

biometry

string

{ card_code string/pattern: ^[1-9]\d*$ Номер карты, к которой привязана биометрия models /Модель биометрического считывателя для которого добавлены биометрические данные в систему [string] }

Биометрия сотрудника

comment

string

Комментарий или примечание по сотруднику

dolzhnost

string

Должность

e-mail

string

Электронная почта

tab_nomer

integer

Табельный номер

bio_provider_person_id

string

Связка внутреннего идентификатора сотрудника с его биометрическим шаблоном у провайдера биометрии

bio_provider

string

Провайдер биометрии

uuid*

string

pattern:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$

UUID сотрудника

cards

string

pattern: ^[1-9]\d*$

Список карт сотрудника

access_profile

string

Устаревшее Профиль доступа (сохранено для обратной совместимости с более старыми версиями API)

banned

boolean

true-заблокирован, false-действующий

Статус пользователя

{
"staff": [
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 0,
"to": 0
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 0,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"banned": true
}
],
"count": 0,
"cursor": 0
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Return a filtered list of staff",
"parameters": [
{
"in": "query",
"name": "surname",
"description": "Employee surname search parameter",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "name",
"description": "Employee name search parameter",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "page_size",
"description": "Maximum number of search results to be returned",
"required": true,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 150
}
},
{
"in": "query",
"name": "cursor",
"description": "Cursor to proceed search from",
"required": false,
"schema": {
"type": "integer",
"minimum": 0
}
},
{
"in": "query",
"name": "filter",
"description": "JSON filter object for staff search",
"required": false,
"schema": {
"type": "object",
"description": "Filter staff by staff property",
"required": [
"staff_property_name",
"staff_property_value"
],
"properties": {
"staff_property_name": {
"type": "string",
"minLength": 1
},
"staff_property_value": {
"type": "string",
"minLength": 1
}
}
}
}
],
"responses": {
"200": {
"description": "Successfully returned list of staff",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"staff",
"cursor",
"count"
],
"properties": {
"staff": {
"type": "array",
"items": {
"type": "object",
"required": [
"surname",
"name",
"dolzhnost",
"uuid"
],
"properties": {
"surname": {
"type": "string"
},
"name": {
"type": "string"
},
"second_name": {
"type": "string"
},
"access_profiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
}
}
},
"description": "User's access profiles list"
},
"access_point": {
"type": "string",
"description": "Personal access point"
},
"access_user": {
"type": "string"
},
"pin": {
"type": "string",
"maxLength": 8,
"description": "Personal pin code"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"biometry": {
"properties": {
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$",
"description": "Staff biometry card code"
},
"models": {
"type": "array",
"items": {
"type": "string"
},
"description": "Models of biometry readers for which employee has bio data saved in system"
}
},
"description": "Describes staff biometry data"
},
"comment": {
"type": "string"
},
"dolzhnost": {
"type": "string"
},
"E-mail": {
"type": "string"
},
"tab_nomer": {
"type": "integer"
},
"bio_provider_person_id": {
"type": "string"
},
"bio_provider": {
"type": "string"
},
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User UUID"
},
"cards": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d*$"
},
"description": "Employee cards codes list"
},
"access_profile": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
},
"banned": {
"type": "boolean",
"description": "User banned for accessing any access point or not"
}
}
}
},
"count": {
"type": "integer",
"minimum": 0,
"description": "Overall search count"
},
"cursor": {
"type": "integer",
"description": "Cursor to proceed with search from"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/search?page_size=1" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"staff": [
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}
],
"count": 1,
"cursor": 1
}

GET /staff/sort

Раздел: Сотрудники.

Возвращает страницу сотрудников, отсортированную по фамилии.

Параметры и ответы по OpenAPI
{
"description": "Returns sorted by surname staff page",
"parameters": [
{
"in": "query",
"name": "page",
"description": "Cards page id to load",
"required": true,
"schema": {
"type": "integer",
"minimum": 1
}
},
{
"in": "query",
"name": "page_size",
"description": "Maximum number of cards in page",
"required": true,
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 150
}
},
{
"in": "query",
"name": "direction",
"description": "Direction of sorting ASC or DESC",
"required": true,
"schema": {
"type": "string",
"enum": [
"ASC",
"DESC"
]
}
},
{
"in": "query",
"name": "column_name",
"description": "Column name for sorting",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully returned staff page",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"surname",
"name",
"dolzhnost",
"uuid"
],
"properties": {
"surname": {
"type": "string"
},
"name": {
"type": "string"
},
"second_name": {
"type": "string"
},
"access_profiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
}
}
},
"description": "User's access profiles list"
},
"access_point": {
"type": "string",
"description": "Personal access point"
},
"access_user": {
"type": "string"
},
"pin": {
"type": "string",
"maxLength": 8,
"description": "Personal pin code"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"biometry": {
"properties": {
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$",
"description": "Staff biometry card code"
},
"models": {
"type": "array",
"items": {
"type": "string"
},
"description": "Models of biometry readers for which employee has bio data saved in system"
}
},
"description": "Describes staff biometry data"
},
"comment": {
"type": "string"
},
"dolzhnost": {
"type": "string"
},
"E-mail": {
"type": "string"
},
"tab_nomer": {
"type": "integer"
},
"bio_provider_person_id": {
"type": "string"
},
"bio_provider": {
"type": "string"
},
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User UUID"
},
"cards": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d*$"
},
"description": "Employee cards codes list"
},
"access_profile": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
},
"banned": {
"type": "boolean",
"description": "User banned for accessing any access point or not"
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/sort?page=1&page_size=1&direction=ASC" \
-H "Authorization: Bearer <token>"

Пример ответа

[
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}
]

PUT /staff/unban/{uuid}

Раздел: Сотрудники.

Разблокирует доступ существующего сотрудника по uuid сотрудника

Источник в Teamly

Назначение

URL запроса

Разблокирует доступ существующего сотрудника по uuid сотрудника

https://{IP_контроллера}/api/v1/staff/unban/{uuid}

Параметры запроса:

Наименование

Описание

uuid * string (path)

UUID сотрудника

Варианты ответа:

Code 200 (Successfully) - удачное выполнение запроса

{
"success": false,
"message": "string",
"data": {}
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 404 (User with specified uuid was not found) - запрос не выполнен, пользователь указанный в {uuid} не найден

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Edit employee data",
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully edited employee",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified employee does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X PUT "https://{IP_контроллера}/api/v1/staff/unban/{uuid}" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

GET /staff/{uuid}

Раздел: Сотрудники.

Возвращает параметры конкретного сотрудника по uuid Сотрудника

Источник в Teamly

Назначение

URL запроса

Возвращает параметры конкретного сотрудника по uuid Сотрудника

https://{IP_контроллера}/api/v1/staff/2e536340-8436-11ec-abed-3b4382508853

Параметры запроса:

Наименование, * - обязательный

Описание

uuid* string ($uuid)

UUID сотрудника

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

surname*

string

minLength: 1

Фамилия

name*

string

minLength: 1

Имя

second_name

string

Отчество

access_profiles

string

[{uuid string / Уникальный идентификатор профиля доступа from integer /Начало действия профиля доступа to integer/Конец действия профиля доступа}]

Список профилей доступа сотрудника

access_point

string

pattern:/^$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID личной точки доступа

access_user

string

Пользователь для входа в систему

pin

string

maxLength: 8

ПИН-код сотрудника

car_number

string

pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$

Номер автомобиля

biometry

string

{ card_code string/pattern: ^[1-9]\d*$ Номер карты, к которой привязана биометрия models /Модель биометрического считывателя для которого добавлены биометрические данные в систему [string] }

Биометрия сотрудника

comment

string

Комментарий или примечание по сотруднику

dolzhnost

string

Должность

E-mail

string

Электронная почта

tab_nomer

integer

Табельный номер

bio_provider_person_id

string

Связка внутреннего идентификатора сотрудника с его биометрическим шаблоном у провайдера биометрии

bio_provider

string

Провайдер биометрии

uuid*

string

pattern:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$

UUID сотрудника

cards

string

pattern: ^[1-9]\d*$

Список карт сотрудника

access_profile

string

Устаревшее Профиль доступа (сохранено для обратной совместимости с более старыми версиями API)

banned

boolean

true-заблокирован, false-действующий

Статус пользователя

Пример:

{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 0,
"to": 0
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 0,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"banned": true
}

Code 400 (Bad request parameters) - запрос не выполнен, указан некорректный uuid в запросе

Code 404 (User with specified uuid was not found) - запрос не выполнен, пользователь указанный в {uuid} не найден

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Returns employee by uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully returned employee by uuid",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"surname",
"name",
"dolzhnost",
"uuid"
],
"properties": {
"surname": {
"type": "string"
},
"name": {
"type": "string"
},
"second_name": {
"type": "string"
},
"access_profiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
}
}
},
"description": "User's access profiles list"
},
"access_point": {
"type": "string",
"description": "Personal access point"
},
"access_user": {
"type": "string"
},
"pin": {
"type": "string",
"maxLength": 8,
"description": "Personal pin code"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"biometry": {
"properties": {
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$",
"description": "Staff biometry card code"
},
"models": {
"type": "array",
"items": {
"type": "string"
},
"description": "Models of biometry readers for which employee has bio data saved in system"
}
},
"description": "Describes staff biometry data"
},
"comment": {
"type": "string"
},
"dolzhnost": {
"type": "string"
},
"E-mail": {
"type": "string"
},
"tab_nomer": {
"type": "integer"
},
"bio_provider_person_id": {
"type": "string"
},
"bio_provider": {
"type": "string"
},
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User UUID"
},
"cards": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d*$"
},
"description": "Employee cards codes list"
},
"access_profile": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
},
"banned": {
"type": "boolean",
"description": "User banned for accessing any access point or not"
}
}
}
}
}
},
"400": {
"description": "Invalid UUID",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified employee was not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/{uuid}" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}

PUT /staff/{uuid}

Раздел: Сотрудники.

Позволяет отредактировать существующего сотрудника по uuid

Источник в Teamly

Назначение

URL запроса

Позволяет отредактировать существующего сотрудника по uuid

https://{IP контроллера}/api/v1/{uuid}

Параметры запроса:

Наименование

Описание

uuid* string (path)

staff* object (body)

UUID редактируемого сотрудника

тело запроса

BODY

Название

* - обязательный

Тип

Формат

Назначение

surname*

string

Фамилия

name*

string

Имя

second_name

string

Отчество

access_profiles

[{

uuid string / Уникальный идентификатор профиля доступа

from integer /Начало действия профиля доступа

to integer /Конец действия профиля доступа

}]

Список профилей доступа сотрудника

access_point

string

pattern:/^$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i

UUID личной точки доступа

access_user

string

Пользователь для входа в систему

рin

string

maxLength: 8

ПИН-код сотрудника

car_number

string

pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$

Номер автомобиля сотрудника

biometry

string

card_code string/pattern: ^[1-9]\d*$ Номер карты, к которой привязана биометрия

models /Модель биометрического считывателя для которого добавлены биометрические данные в систему [string]

Описывает настроенную биометрию для сотрудника

comment

string

Комментарий или примечание по сотруднику

uuid*

string

pattern:^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$

UUID сотрудника

cards

string

pattern: ^[1-9]\d*$

Список карт сотрудника

access_profile

string

Устаревшее Профиль доступа (сохранено для обратной совместимости с более старыми версиями API)

banned

boolean

Статус пользователя – заблокирован, действующий

Пример:

URL запроса: PUT
https://{IP контроллера}/api/v1/staff/6d022a78-92ae-11ec-b909-0242ac120002

Body

{
"surname": "Николаев",
"name": "Николай",
"second_name": "Николаевич",
"access_profiles": [
{
"uuid": "6d022a78-92ae-11ec-b909-0242ac120002",
"from": 0,
"to": 0
}
],
"access_point": "6d022a78-92ae-11ec-b909-0242ac120002",
"pin": "30900",
"car_number": "A354YY178",
"comment": "string",
"uuid": "string",
"cards": ["23456"],
"banned": false
}

Варианты ответа:

Code 200 (Successfully) - удачное выполнение запроса, сотрудник успешно отредактирован

{
"success": false,
"message": "string",
"data": {}
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны имена полей или их значения в теле запроса

Code 404 (Specified employee does not exist) - запрос не выполнен, сотрудник указанный в {uuid} не существует

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Edit employee data",
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"description": "New data for employee",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"surname",
"name",
"dolzhnost",
"uuid"
],
"properties": {
"surname": {
"type": "string"
},
"name": {
"type": "string"
},
"second_name": {
"type": "string"
},
"access_profiles": {
"type": "array",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"from": {
"type": "integer"
},
"to": {
"type": "integer"
}
}
},
"description": "User's access profiles list"
},
"access_point": {
"type": "string",
"description": "Personal access point"
},
"access_user": {
"type": "string"
},
"pin": {
"type": "string",
"maxLength": 8,
"description": "Personal pin code"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"biometry": {
"properties": {
"card_code": {
"type": "string",
"pattern": "^[1-9]\\d*$",
"description": "Staff biometry card code"
},
"models": {
"type": "array",
"items": {
"type": "string"
},
"description": "Models of biometry readers for which employee has bio data saved in system"
}
},
"description": "Describes staff biometry data"
},
"comment": {
"type": "string"
},
"dolzhnost": {
"type": "string"
},
"E-mail": {
"type": "string"
},
"tab_nomer": {
"type": "integer"
},
"bio_provider_person_id": {
"type": "string"
},
"bio_provider": {
"type": "string"
},
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User UUID"
},
"cards": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[1-9]\\d*$"
},
"description": "Employee cards codes list"
},
"access_profile": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
},
"banned": {
"type": "boolean",
"description": "User banned for accessing any access point or not"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully edited employee",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified employee does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X PUT "https://{IP_контроллера}/api/v1/staff/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}'

Пример тела запроса

{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"access_point": "string",
"access_user": "string",
"pin": "string",
"car_number": "string",
"biometry": {
"card_code": "string",
"models": [
"string"
]
},
"comment": "string",
"dolzhnost": "string",
"E-mail": "string",
"tab_nomer": 1,
"bio_provider_person_id": "string",
"bio_provider": "string",
"uuid": "string",
"cards": [
"string"
],
"access_profile": "string",
"banned": true
}

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

DELETE /staff/{uuid}

Раздел: Сотрудники.

Позволяет отредактировать существующего сотрудника по uuid

Источник в Teamly

Назначение

URL запроса

Позволяет удалить существующего сотрудника по uuid

https://{IP контроллера}/api/v1/staff/{uuid}

Параметры запроса:

Наименование

Описание

uuid * string($uuid)

UUID сотрудника

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса, сотрудник успешно удален

{
"success": false,
"message": "string",
"data": {}
}

Code 404 (User with specified uuid was not found) - запрос не выполнен, пользователь указанный в {uuid} не найден

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Delete specified employee",
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully deleted employee",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified employee does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X DELETE "https://{IP_контроллера}/api/v1/staff/{uuid}" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

DELETE /staff/{uuid}/biometry

Раздел: Сотрудники.

Позволяет удалить все биометрические данные сотрудника по uuid

Источник в Teamly

Назначение

URL запроса

Позволяет удалить все биометрические данные сотрудника по uuid

https://{IP контроллера}/api/v1/staff/{uuid}/biometry

Параметры запроса:

Наименование

Описание

uuid * string($uuid)

UUID сотрудника

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса, биометрические данные сотрудникa успешно удалены

{
"success": false,
"message": "string",
"data": {}
}

Code 400 (Bad request parameters) - запрос не выполнен, неправильные параметры запроса

Code 404 (User with specified uuid was not found) - запрос не выполнен, пользователь указанный в {uuid} не найден

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Delete all biometry data from staff",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"example": "123e4567-e89b-12d3-a456-426614174000"
}
}
],
"responses": {
"200": {
"description": "Successfully deleted biometry data",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified employee does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X DELETE "https://{IP_контроллера}/api/v1/staff/{uuid}/biometry" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

DELETE /staff/{uuid}/biometry/{biometry_model}

Раздел: Сотрудники.

Позволяет удалить биометрические данные сотрудника по указанной модели считывателя

Источник в Teamly

Назначение

URL запроса

Позволяет удалить все биометрические данные сотрудника по uuid

https://{IP контроллера}/api/v1/staff/staff/{uuid}/biometry/{biometry_model}

Параметры запроса:

Наименование

Описание

uuid * string($uuid)

biometry_model * string

UUID сотрудника

Модель считывателя биометрии

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса, биометрические данные сотрудникa успешно удалены

{
"success": false,
"message": "string",
"data": {}
}

Code 400 (Bad request parameters) - запрос не выполнен, неправильные параметры запроса

Code 404 (User with specified uuid was not found) - запрос не выполнен, пользователь указанный в {uuid} не найден

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Delete biometry data for specified model from staff",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"example": "123e4567-e89b-12d3-a456-426614174000"
}
},
{
"in": "path",
"name": "biometry_model",
"required": true,
"schema": {
"type": "string",
"enum": [
"BioSmart 5M",
"BioSmart Quasar",
"BioSmart PV-WTC",
"BioSmart WTC2",
"BioSmart 4",
"ZKTeco 3.x",
"Hikvision ISAPI",
"dit"
]
}
}
],
"responses": {
"200": {
"description": "Successfully deleted biometry data for specified models",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified employee does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X DELETE "https://{IP_контроллера}/api/v1/staff/{uuid}/biometry/{biometry_model}" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

DELETE /staff/{uuid}/biometry_card

Раздел: Сотрудники.

Позволяет отвязать биометрическую карту от сотрудника по uuid

Источник в Teamly

Назначение

URL запроса

Позволяет отвязать биометрическую карту от сотрудника по uuid

https://{IP контроллера}/api/v1/staff/{uuid}/biometry_card

Параметры запроса:

Наименование

Описание

uuid * string($uuid)

UUID сотрудника

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса, биометрическая карта сотрудникa успешно удалена

{
"success": false,
"message": "string",
"data": {}
}

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Unset biometry card from user",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully unset biometry card from user",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X DELETE "https://{IP_контроллера}/api/v1/staff/{uuid}/biometry_card" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

POST /staff/{uuid}/biometry_card/{card_code}

Раздел: Сотрудники.

Назначает сотруднику карту для биометрии.

Параметры и ответы по OpenAPI
{
"description": "Set user's biometry card",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"in": "path",
"name": "card_code",
"required": true,
"schema": {
"type": "string",
"pattern": "^[1-9]\\d*$"
}
}
],
"responses": {
"200": {
"description": "Successfully set user's biometry card",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X POST "https://{IP_контроллера}/api/v1/staff/{uuid}/biometry_card/{card_code}" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

GET /staff/{uuid}/convolution

Раздел: Сотрудники.

Возвращает биометрический сверсток пользователя

Источник в Teamly

Назначение

URL запроса

Возвращает биометрический сверсток пользователя

https://{IP_контроллера}/api/v1/staff/{uuid}/convolution

Параметры запроса:

Наименование, * - обязательный

Описание

uuid* string (pash)

UUID сотрудника

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

name*

string

minLength: 1 pattern: ^(?!(?:uuid|cards|access_point|access_profile|terra|car_number|banned|biometry))[\s\S]+

Имя

display_name*

string

minLength: 1

Название поля, отображаемое в карточке сотрудника

type*

string

Array [string, integer, directory_entry]

Тип поля персонала

required*

boolean

Обязательное для заполнения в карточке сотрудника

value_directory

string

Название справочника если для поля персонала использован тип “ directory_entry”

show_in_search*

Boolean

Использование поля в поиске

{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 404 (User with specified uuid was not found) - запрос не выполнен, пользователь указанный в {uuid} не найден

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Получить сверсток биометрии пользователя",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Успешно получен сверсток биометрии",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [
true
],
"example": true
},
"data": {
"type": "object",
"properties": {
"rev_id": {
"type": "string",
"example": "2"
},
"card_code": {
"type": "string",
"example": "57016322"
},
"uuid": {
"type": "string",
"example": "4bc43860-50ec-11f0-90a4-b1e08f14be91"
},
"model": {
"type": "string",
"example": "data"
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Пользователь не найден",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/{uuid}/convolution" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"success": true,
"data": {
"rev_id": "2",
"card_code": "57016322",
"uuid": "4bc43860-50ec-11f0-90a4-b1e08f14be91",
"model": "data"
}
}

POST /staff/{uuid}/convolution

Раздел: Сотрудники.

Добавляет сотруднику биометрический сверсток

Источник в Teamly

Назначение

URL запроса

Добавить сверсток биометрии пользователю

https://{IP_контроллера}/api/v1/staff/{uuid}/convolution

Параметры запроса:

Наименование

Тип

Описание

uuid*

string($uuid)

Тело запроса

BODY

Название

* - обязательный

Тип

Формат

Назначение

user_uuid*

string

example: b5f14fa0-3c7b-11f0-af07-d9c079cb43c4

UUID пользователя системы

model*

string

example: BioSmart 5M

Модель биометрического считывателя для которого добавлены биометрические данные в систему

card_code*

string

Код карты сотрудника

convolution*

string

[{\"data\": \"test\"}]

Уникальный код, определяющий биометрические данные пользователя, метод и модель считывателя

Пример:

URL запроса: POST
https://{IP_контроллера}/api/v1/staff/{uuid}/convolution

Body

{
"user_uuid": "b5f14fa0-3c7b-11f0-af07-d9c079cb43c4",
"model": "BioSmart 5M",
"card_code": "57016322",
"convolution": "string"
}

Варианты ответа:

Code 200 (Successfully) - удачное выполнение запроса, сверсток биометрии был успешно добавлен

{
"success": true,
"card_code": "57016322"
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 404 (User with specified uuid already exists) - запрос не выполнен, пользователь с таким uuid не найден

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Добавить сверсток биометрии пользователю (Если требуется создать виртуальную карту, то необходимо задать \"card_code\": \"virtual_card\")",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"user_uuid",
"model",
"card_code",
"convolution"
],
"properties": {
"user_uuid": {
"type": "string",
"example": "b5f14fa0-3c7b-11f0-af07-d9c079cb43c4"
},
"model": {
"type": "string",
"example": "BioSmart 5M"
},
"card_code": {
"type": "string",
"example": "57016322"
},
"convolution": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Сверсток биометрии был успешно добавлен",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [
true
],
"example": true
},
"card_code": {
"type": "string",
"example": "57016322"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Пользователь не найден",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X POST "https://{IP_контроллера}/api/v1/staff/{uuid}/convolution" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"user_uuid": "b5f14fa0-3c7b-11f0-af07-d9c079cb43c4",
"model": "BioSmart 5M",
"card_code": "57016322",
"convolution": "string"
}'

Пример тела запроса

{
"user_uuid": "b5f14fa0-3c7b-11f0-af07-d9c079cb43c4",
"model": "BioSmart 5M",
"card_code": "57016322",
"convolution": "string"
}

Пример ответа

{
"success": true,
"card_code": "57016322"
}

GET /staff/{uuid}/last_access

Раздел: Сотрудники.

Возвращает последний доступ сотрудника

Источник в Teamly

Назначение

URL запроса

Возвращает последний доступ сотрудника

https://{IP_контроллера}/api/v1/staff/2e536340-8436-11ec-abed-3b4382508853/last_access

Параметры запроса:

Наименование, * - обязательный

Описание

uuid* string

UUID сотрудника

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

terra

string

Точка прохода в формате “Зона:Этаж:Здание”

ts number

timestamp

Временная метка прохода в миллисекундах

access_point_uuid

string

UUID точки прохода сотрудника

{
"terra": "string",
"ts": 0,
"access_point_uuid": "string"
}

Code 400 (Bad request parameters) - запрос не выполнен, указан некорректный uuid в запросе

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Returns staff last access",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully returned staff page",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"terra": {
"type": "string"
},
"ts": {
"type": "number"
},
"access_point_uuid": {
"type": "string"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff/{uuid}/last_access" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"terra": "string",
"ts": 1.0,
"access_point_uuid": "string"
}

GET /staff_properties

Раздел: Сотрудники.

Возвращает список полей сотрудников с их настройками

Источник в Teamly

Назначение

URL запроса

Возвращает список полей сотрудников с их настройками

https://{IP_контроллера}/api/v1/staff_properties

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

name*

string

minLength: 1 pattern: ^(?!(?:uuid|cards|access_point|access_profile|terra|car_number|banned|biometry))[\s\S]+

Имя

display_name*

string

minLength: 1

Название поля, отображаемое в карточке сотрудника

type*

string

Array [string, integer, directory_entry]

Тип поля персонала

required*

boolean

Обязательное для заполнения в карточке сотрудника

value_directory

string

Название справочника если для поля персонала использован тип “ directory_entry”

show_in_search*

Boolean

Использование поля в поиске

[
{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}
]

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Returns all registered staff properties",
"responses": {
"200": {
"description": "Successfully returned registered staff properties",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"description": "Staff property",
"required": [
"name",
"display_name",
"type",
"required",
"show_in_search"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^(?!(?:uuid|cards|access_point|access_profile|terra|car_number|banned|biometry))[\\s\\S]+"
},
"display_name": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"string",
"integer",
"directory_entry"
]
},
"required": {
"type": "boolean"
},
"value_directory": {
"description": "Directory name from which property values are taken. Required when property type is directory_entry",
"type": "string"
},
"show_in_search": {
"description": "Show property in staff search results",
"type": "boolean"
}
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff_properties" \
-H "Authorization: Bearer <token>"

Пример ответа

[
{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}
]

POST /staff_properties

Раздел: Сотрудники.

Добавляет поле персонала

Источник в Teamly

Назначение

URL запроса

Добавляет поле персонала

https://{IP_контроллера}/api/v1/staff_properties/

Параметры запроса:

Наименование

Тип

Описание

properties*

array [object] (body)

Тело запроса

BODY

Название

* - обязательный

Тип

Формат

Назначение

name*

string

minLength: 1

pattern: ^(?!(?:uuid|cards|access_point|access_profile|terra|car_number|banned|biometry))[\s\S]+

Имя

display_name*

string

minLength: 1

Использование поля в поиске

type*

string

Array [string, integer, directory_entry(справочник)]

Тип поля персонала

required*

boolean

Обязательное для заполнения в карточке сотрудника

value_directory

string

Название справочника если для поля персонала использован тип “ directory_entry”

show_in_search*

boolean

Использование поля в поиске

Пример:

URL запроса: POST
https://{IP_контроллера}/api/v1/staff_properties/

Body

[{
"name": "E-mail",
"display_name": "Электронная почта",
"type": "string",
"required": false,
"value_directory": "Электронная почта",
"show_in_search": true
}]

Варианты ответа:

Code 200 (Successfully) - удачное выполнение запроса, новый сотрудник успешно добавлен

Пример из Teamly сохранён дословно, но не является корректным JSON.

{
success* boolean
message string
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Register new staff properties",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"description": "Staff property",
"required": [
"name",
"display_name",
"type",
"required",
"show_in_search"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^(?!(?:uuid|cards|access_point|access_profile|terra|car_number|banned|biometry))[\\s\\S]+"
},
"display_name": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"string",
"integer",
"directory_entry"
]
},
"required": {
"type": "boolean"
},
"value_directory": {
"description": "Directory name from which property values are taken. Required when property type is directory_entry",
"type": "string"
},
"show_in_search": {
"description": "Show property in staff search results",
"type": "boolean"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully added new staff property"
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X POST "https://{IP_контроллера}/api/v1/staff_properties" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '[
{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}
]'

Пример тела запроса

[
{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}
]

GET /staff_properties/{name}

Раздел: Сотрудники.

Возвращает настройки конкретного поля персонала

Источник в Teamly

Назначение

URL запроса

Возвращает настройки конкретного поля персонала

https://{IP_контроллера}/api/v1/staff_properties/Devision

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса

Название, * - обязательный

Тип

Формат

Назначение

name*

string

minLength: 1 pattern: ^(?!(?:uuid|cards|access_point|access_profile|terra|car_number|banned|biometry))[\s\S]+

Имя

display_name*

string

minLength: 1

Использование поля в поиске

type*

string

Array [string, integer, directory_entry]

Тип поля персонала

required*

boolean

Обязательное для заполнения в карточке сотрудника

value_directory

string

Название справочника если для поля персонала использован тип “ directory_entry”

show_in_search*

boolean

Использование поля в поиске

{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}

Code 404 (Specified property does not exist) - запрос не выполнен, указанное поле не существует

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Get staff property by name",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully received property",
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Staff property",
"required": [
"name",
"display_name",
"type",
"required",
"show_in_search"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^(?!(?:uuid|cards|access_point|access_profile|terra|car_number|banned|biometry))[\\s\\S]+"
},
"display_name": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"string",
"integer",
"directory_entry"
]
},
"required": {
"type": "boolean"
},
"value_directory": {
"description": "Directory name from which property values are taken. Required when property type is directory_entry",
"type": "string"
},
"show_in_search": {
"description": "Show property in staff search results",
"type": "boolean"
}
}
}
}
}
},
"404": {
"description": "Specified property does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on a server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X GET "https://{IP_контроллера}/api/v1/staff_properties/{name}" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}

PUT /staff_properties/{name}

Раздел: Сотрудники.

Позволяет отредактировать настройки полей персонала

Источник в Teamly

Назначение

URL запроса

Позволяет отредактировать настройки полей персонала

https://{IP_контроллера}/api/v1/staff_properties/{name}

Параметры запроса:

Наименование

Описание

name* string (path)

property* object (body)

Название поля персонала

тело запроса

BODY

Название

* - обязательный

Тип

Формат

Назначение

name*

string

minLength: 1

pattern: ^(?!(?:uuid|cards|access_point|access_profile|terra|car_number|banned|biometry))[\s\S]+

Имя поля

display_name*

string

minLength: 1

Использование поля в поиске

type*

string

Array [string, integer, directory_entry(справочник)]

Тип поля персонала

required*

boolean

Обязательное для заполнения в карточке сотрудника

value_directory

string

Название справочника если для поля персонала использован тип “ directory_entry”

show_in_search*

boolean

Использование поля в поиске

Пример:

URL запроса: PUT
https://{IP_контроллера}/api/v1/staff_properties/E-mail

Body

{
"name": "E-mail",
"display_name": "E-mail",
"type": "string",
"required": false,
"value_directory": "E-mail",
"show_in_search": true
}

Варианты ответа:

Code 200 (Successfully) - удачное выполнение запроса, поле успешно отредактировано

{
"success": false,
"message": "string",
"data": {}
}

Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны имена полей или их значения в теле запроса

Code 404 (Specified employee does not exist) - запрос не выполнен, поле в запросе не существует не существует

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Update staff property data",
"parameters": [
{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Staff property",
"required": [
"name",
"display_name",
"type",
"required",
"show_in_search"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^(?!(?:uuid|cards|access_point|access_profile|terra|car_number|banned|biometry))[\\s\\S]+"
},
"display_name": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"string",
"integer",
"directory_entry"
]
},
"required": {
"type": "boolean"
},
"value_directory": {
"description": "Directory name from which property values are taken. Required when property type is directory_entry",
"type": "string"
},
"show_in_search": {
"description": "Show property in staff search results",
"type": "boolean"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully updated property",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified property does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on a server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X PUT "https://{IP_контроллера}/api/v1/staff_properties/{name}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}'

Пример тела запроса

{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}

DELETE /staff_properties/{name}

Раздел: Сотрудники.

Позволяет удалить поле персонала по названию

Источник в Teamly

Назначение

URL запроса

Позволяет удалить поле персонала по названию

https://{IP контроллера}/api/v1/staff_properties/{name}

Параметры запроса:

Наименование

Описание

name * string

Наименование поля персонала для удаления

Варианты ответа:

Code 200 (Successfully returned staff page) - удачное выполнение запроса, поле успешно удалено

{
"success": false,
"message": "string",
"data": {}
}

Code 400 (Specified property is default property and can't be deleted) - запрос не выполнен, поле в запросе нельзя удалить

Code 404 (Specified property does not exist) - запрос не выполнен, поле в запросе не существует

Code 500 (Unexpected server error) - запрос не выполнен, получено сообщение об ошибке

Параметры и ответы по OpenAPI
{
"description": "Delete staff property by name",
"parameters": [
{
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully deleted property",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Specified property is default property and can't be deleted",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified property does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on a server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

Сформированы по схеме контроллера; значения полей необходимо заменить.

Пример запроса

curl -k -X DELETE "https://{IP_контроллера}/api/v1/staff_properties/{name}" \
-H "Authorization: Bearer <token>"

Пример ответа

{
"success": false,
"message": "string",
"data": {}
}