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

Биометрия API 1.7.0

Методы API для работы с разделом «Биометрия».

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

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

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

МетодПуть
GET/biometry
POST/biometry
POST/biometry/generate_convolution
GET/biometry/models
GET/biometry/{id}
PUT/biometry/{id}
DELETE/biometry/{id}
GET/biometry_update
POST/biometry_update
POST/biometry_update/dit

GET /biometry

Раздел: Биометрия.

Возвращает биометрические данные

Источник в Teamly

Назначение

URL запроса

Возвращает биометрические данные

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

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

Отсутствуют

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

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

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

Тип

Формат

Назначение

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 биометрического считывателя

serial*

string

Серийный номер биометрического считывателя

name*

Имя биометрического считывателя

model*

string

[ BioSmart 5M, BioSmart Quasar, BioSmart PV-WTC, BioSmart WTC2, BioSmart 4, ZKTeco 3.x, Hikvision ISAPI, dit ]

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

ip*

string

pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

IP-адрес биометрического считывателя

identification_method*

string

[ bio, card_and_bio, card_and_pin_and_bio ]

Метод идентификации

subdevice*

string

Адрес подключенного или дочернего устройства

Пример:

[
{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}
]

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

Параметры и ответы по OpenAPI
{
"description": "got biometry of application",
"responses": {
"200": {
"description": "Successfully got biometry",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"serial",
"name",
"model",
"ip",
"identification_method",
"subdevice"
],
"properties": {
"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}$"
},
"serial": {
"type": "string"
},
"name": {
"type": "string"
},
"model": {
"type": "string",
"enum": [
"BioSmart 5M",
"BioSmart Quasar",
"BioSmart PV-WTC",
"BioSmart WTC2",
"BioSmart 4",
"ZKTeco 3.x",
"Hikvision ISAPI",
"dit"
]
},
"ip": {
"type": "string",
"pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
},
"identification_method": {
"type": "string",
"enum": [
"bio",
"card_and_bio",
"card_and_pin_and_bio"
]
},
"subdevice": {
"type": "string",
"description": "device_uuid : subdev_addr"
}
}
}
}
}
}
},
"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/biometry" \
-H "Authorization: Bearer <token>"

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

[
{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}
]

POST /biometry

Раздел: Биометрия.

Добавляет биометрический считыватель

Источник в Teamly

Назначение

URL запроса

Добавляет биометрический считыватель

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

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

Название

Тип

Описание

biometry*

object(body)

Тело запроса

BODY

Название

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

Тип

Формат

Назначение

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 биометрического считывателя

serial*

string

Серийный номер биометрического считывателя

name*

Имя биометрического считывателя

model*

string

[ BioSmart 5M, BioSmart Quasar, BioSmart PV-WTC, BioSmart WTC2, BioSmart 4, ZKTeco 3.x, Hikvision ISAPI, dit ]

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

ip*

string

pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

IP-адрес биометрического считывателя

identification_method*

string

[ bio, card_and_bio, card_and_pin_and_bio ]

Метод идентификации

subdevice*

string

Адрес подключенного или дочернего устройства

Пример:

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

Body

{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}

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

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

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

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

Параметры и ответы по OpenAPI
{
"description": "post biometry",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"serial",
"name",
"model",
"ip",
"identification_method",
"subdevice"
],
"properties": {
"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}$"
},
"serial": {
"type": "string"
},
"name": {
"type": "string"
},
"model": {
"type": "string",
"enum": [
"BioSmart 5M",
"BioSmart Quasar",
"BioSmart PV-WTC",
"BioSmart WTC2",
"BioSmart 4",
"ZKTeco 3.x",
"Hikvision ISAPI",
"dit"
]
},
"ip": {
"type": "string",
"pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
},
"identification_method": {
"type": "string",
"enum": [
"bio",
"card_and_bio",
"card_and_pin_and_bio"
]
},
"subdevice": {
"type": "string",
"description": "device_uuid : subdev_addr"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully post biometry",
"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/biometry" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}'

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

{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}

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

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

POST /biometry/generate_convolution

Раздел: Биометрия.

Генерация биометрического сверстка (без создания нового пользователя). После отправки запроса необходимо идентифицироваться по биометрии, после чего будет возвращен биометрический сверсток. Если пользователь не совершил никаких действий, то в результате вернется ошибка

Источник в Teamly

Назначение

URL запроса

Генерация биометрического сверстка (без создания нового пользователя). После отправки запроса необходимо идентифицироваться по биометрии, после чего будет возвращен биометрический сверсток. Если пользователь не совершил никаких действий, то в результате вернется ошибка

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

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

Название

Тип

Описание

biometry*

object(body)

Тело запроса

BODY

Название

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

Тип

Формат

Назначение

biometry_uuid*

string

Уникальный идентификатор биометрии

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

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

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

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

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

Code 409 (Device with specified uuid already exists) - запрос не выполнен, устройство с таким uuid занято

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

Параметры и ответы по OpenAPI
{
"description": "Сгенерировать сверсток биометрии",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"biometry_uuid"
],
"properties": {
"biometry_uuid": {
"type": "string"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Успешно получен сверсток биометрии",
"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": "Устройство биометрии не найдено",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"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/biometry/generate_convolution" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"biometry_uuid": "string"
}'

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

{
"biometry_uuid": "string"
}

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

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

GET /biometry/models

Раздел: Биометрия.

Возвращает модели биометрических считывателей

Источник в Teamly

Назначение

URL запроса

Возвращает модели биометрических считывателей

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

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

Отсутствуют

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

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

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

Тип

Формат

Назначение

model*

string

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

description*

string

Описание

Пример:

[
{
"model": "BioSmart 5M",
"description": "Отпечатки пальцев"
}
]

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

Параметры и ответы по OpenAPI
{
"description": "Get biometry models",
"responses": {
"200": {
"description": "Successfully received biometry models",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"model",
"description"
],
"properties": {
"model": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

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

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

[
{
"model": "string",
"description": "string"
}
]

GET /biometry/{id}

Раздел: Биометрия.

Возвращает биометрические данные по id

Источник в Teamly

Назначение

URL запроса

Возвращает биометрические данные по id

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

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

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

Описание

id* string (path)

Уникальный идентификатор биометрического считывателя

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

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

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

Тип

Формат

Назначение

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 биометрического считывателя

serial*

string

Серийный номер биометрического считывателя

name*

Имя биометрического считывателя

model*

string

[ BioSmart 5M, BioSmart Quasar, BioSmart PV-WTC, BioSmart WTC2, BioSmart 4, ZKTeco 3.x, Hikvision ISAPI, dit ]

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

ip*

string

pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

IP-адрес биометрического считывателя

identification_method*

string

[ bio, card_and_bio, card_and_pin_and_bio ]

Метод идентификации

subdevice*

string

Адрес подключенного или дочернего устройства

Пример:

{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}

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

Code 404 (Specified biometry does not exist) - запрос не выполнен, указанная биометрия не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Get biometry by id",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully got biometry by name",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"serial",
"name",
"model",
"ip",
"identification_method",
"subdevice"
],
"properties": {
"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}$"
},
"serial": {
"type": "string"
},
"name": {
"type": "string"
},
"model": {
"type": "string",
"enum": [
"BioSmart 5M",
"BioSmart Quasar",
"BioSmart PV-WTC",
"BioSmart WTC2",
"BioSmart 4",
"ZKTeco 3.x",
"Hikvision ISAPI",
"dit"
]
},
"ip": {
"type": "string",
"pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
},
"identification_method": {
"type": "string",
"enum": [
"bio",
"card_and_bio",
"card_and_pin_and_bio"
]
},
"subdevice": {
"type": "string",
"description": "device_uuid : subdev_addr"
}
}
}
}
}
},
"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 biometry 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 GET "https://{IP_контроллера}/api/v1/biometry/{id}" \
-H "Authorization: Bearer <token>"

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

{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}

PUT /biometry/{id}

Раздел: Биометрия.

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

Источник в Teamly

Назначение

URL запроса

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

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

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

Название

Тип

Описание

id*

string (path)

Уникальный идентификатор

BODY

Название

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

Тип

Формат

Назначение

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 биометрического считывателя

serial*

string

Серийный номер биометрического считывателя

name*

Имя биометрического считывателя

model*

string

[ BioSmart 5M, BioSmart Quasar, BioSmart PV-WTC, BioSmart WTC2, BioSmart 4, ZKTeco 3.x, Hikvision ISAPI, dit ]

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

ip*

string

pattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$

IP-адрес биометрического считывателя

identification_method*

string

[ bio, card_and_bio, card_and_pin_and_bio ]

Метод идентификации

subdevice*

string

Адрес подключенного или дочернего устройства

Пример:

URL запроса: PUT

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

Body

{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}

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

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

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

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

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

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

Параметры и ответы по OpenAPI
{
"description": "Update biometry",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"serial",
"name",
"model",
"ip",
"identification_method",
"subdevice"
],
"properties": {
"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}$"
},
"serial": {
"type": "string"
},
"name": {
"type": "string"
},
"model": {
"type": "string",
"enum": [
"BioSmart 5M",
"BioSmart Quasar",
"BioSmart PV-WTC",
"BioSmart WTC2",
"BioSmart 4",
"ZKTeco 3.x",
"Hikvision ISAPI",
"dit"
]
},
"ip": {
"type": "string",
"pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$"
},
"identification_method": {
"type": "string",
"enum": [
"bio",
"card_and_bio",
"card_and_pin_and_bio"
]
},
"subdevice": {
"type": "string",
"description": "device_uuid : subdev_addr"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully updated biometry with specified name",
"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 biometry 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/biometry/{id}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}'

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

{
"uuid": "string",
"serial": "string",
"name": "string",
"model": "BioSmart 5M",
"ip": "string",
"identification_method": "bio",
"subdevice": "string"
}

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

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

DELETE /biometry/{id}

Раздел: Биометрия.

Удаляет биометрические данные по id

Источник в Teamly

Назначение

URL запроса

Удаляет биометрические данные по id

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

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

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

Описание

id* string (path )

Уникальный идентификатор

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

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

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

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

Code 404 (Biometry with specified id was not found) - запрос не выполнен, биометрия, указанная в {id} не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Delete biometry",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully deleted biometry",
"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": "biometry 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/biometry/{id}" \
-H "Authorization: Bearer <token>"

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

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

GET /biometry_update

Раздел: Биометрия.

Возвращает статус обновления биометрических устройств

Источник в Teamly

Назначение

URL запроса

Возвращает статус обновления биометрических устройств

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

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

Отсутствуют

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

Code 200 (Returned biometry device update status) - удачное выполнение запроса

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

Тип

Формат

Назначение

status*

string

[ STARTED, STOPPED ]

Статус процесса обновления

devices*

[{

Список биометрических устройств

device_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 биометрического устройства

progress*

integer

minimum: 0
maximum: 100

Прогресс процесса обновления в процентах

stage*

string

Этап обновления

status*

string

Статус обновления

}]

Пример:

Пример с исправленным синтаксисом JSON

Добавлена закрывающая фигурная скобка.

{
"status": "STARTED",
"devices": [
{
"device_uuid": "string",
"progress": 100,
"stage": "string",
"status": "string"
}
]
}
Исходный пример Teamly

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

{
"status": "STARTED",
"devices": [
{
"device_uuid": "string",
"progress": 100,
"stage": "string",
"status": "string"
}
]

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

Параметры и ответы по OpenAPI
{
"description": "Get biometry device update status",
"responses": {
"200": {
"description": "Returned biometry device update status",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"status",
"devices"
],
"properties": {
"status": {
"type": "string",
"enum": [
"STARTED",
"STOPPED"
]
},
"devices": {
"type": "array",
"items": {
"type": "object",
"required": [
"device_uuid",
"progress",
"stage",
"status"
],
"properties": {
"device_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}$"
},
"progress": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"stage": {
"type": "string"
},
"status": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

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

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

{
"status": "STARTED",
"devices": [
{
"device_uuid": "string",
"progress": 1,
"stage": "string",
"status": "string"
}
]
}

POST /biometry_update

Раздел: Биометрия.

Запускает обновление прошивки биометрического считывателя

Источник в Teamly

Назначение

URL запроса

Запускает обновление прошивки биометрического считывателя

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

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

Название

Тип

Описание

biometry_update*

object(body)

Описание параметра

BODY

Название

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

Тип

Формат

Назначение

-

string

Комментарий к задаче

Пример:

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

Body

[
"string"
]

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

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

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

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

Code 409 (Biometry update already in progress) - запрос не выполнен, обновление уже запущено

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

Параметры и ответы по OpenAPI
{
"description": "Start biometry device firmware update",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"responses": {
"200": {
"description": "Update successfully started",
"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": "Biometry update already in progress",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/biometry_update" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '[
"string"
]'

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

[
"string"
]

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

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

POST /biometry_update/dit

Раздел: Биометрия.

Запускает загрузку биометрических профилей ДИТ.

Параметры и ответы по OpenAPI
{
"description": "Start DIT biometry profiles upload",
"responses": {
"200": {
"description": "Upload successfully completed",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Biometry update already in progress",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Server error",
"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/biometry_update/dit" \
-H "Authorization: Bearer <token>"

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

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