Посетители API 1.7.0
Методы API для работы с разделом «Посетители».
Базовый путь: https://{IP_контроллера}/api/v1.
Версия описания API: 1.7.0.
Примеры используют placeholder-значения для паролей, token, UUID, адресов и секретов. Перед выполнением запроса замените их на значения вашего контроллера.
Методы раздела
GET /visitors
Раздел: Посетители.
Возвращает постраничный список посетителей
Назначение | URL запроса |
Возвращает постраничный список посетителей | https://{IP_контроллера}/api/v1/visitors?page=1&page_size=2 |
Параметры запроса:
Наименование, * - обязательный | Описание |
page* integer (query) | страница выводимого списка |
page_size* integer (query) | количество карточек на одной странице |
Варианты ответа:
Code 200 (Successfully returned visitors page) - удачное выполнение запроса
Название, * - обязательный | Тип | Формат | Назначение |
surname* | string | minLength: 1 | Фамилия |
name* | string | minLength: 1 | Имя |
second_name | string | Отчество | |
access_profiles | 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}$ | Уникальный идентификатор профиля доступа |
from | integer | Начало действия профиля доступа | |
to | integer | Конец действия профиля доступа | |
}] | |||
company | string | Компания | |
car_number | string | pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$ | Номер автомобиля |
phone | string | Номер телефона посетителя | |
string | Адрес электронной почты посетителя | ||
comment | string | Комментарий или примечание по посетителю | |
first_access | integer | Первый проход посетителя | |
last_access | integer | Последний проход посетителя | |
identifier_format | string | Тип идентификатора Варианты: Array [ qr, barcode, card] | |
status | string | Array [ WAITING - ожидается, ACTIVE:INNER - Активен: На территории, ACTIVE:OUTER - Активен: Вышел, BANNED - Заблокирован, NOT-COME - Не пришел, ARCHIVE - Архив, VIOLATION - Нарушение ] | Статус посетителя |
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}$ | Уникальный идентификатор посетителя |
code | string | pattern: (^[1-9]\d*$)|(^$) | Код идентификатора |
access_profile | ring | Устаревшее! Профиль доступа (сохранено для обратной совместимости с более ранними версиями API) | |
Пример:
[{
"uuid": "28ac6cc0-7d6d-11ee-b413-a9e44dbf7b01",
"second_name": "Петрович",
"surname": "Петров ",
"access_profiles": [{
"uuid": "1b8bd441-7d6d-11ee-b413-a9e44dbf7b01",
"from": 1699361828407,
"to": "UNLIMITED"
}],
"name": "Петр",
"phone": "89888526599",
"code": "608026",
"identifier_format": "qr",
"status": "WAITING"
}]
Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Returns visitor 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 visitors page",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"surname",
"name",
"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"
},
"company": {
"type": "string"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"comment": {
"type": "string"
},
"first_access": {
"type": "integer",
"description": "First visitor access ms"
},
"last_access": {
"type": "integer",
"description": "Last visitor access ms"
},
"identifier_format": {
"type": "string",
"enum": [
"",
"qr",
"barcode",
"card"
]
},
"status": {
"type": "string",
"enum": [
"",
"WAITING",
"ACTIVE:INNER",
"ACTIVE:OUTER",
"BANNED",
"NOT-COME",
"ARCHIVE",
"VIOLATION"
]
},
"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"
},
"code": {
"type": "string",
"pattern": "(^[1-9]\\d*$)|(^$)",
"description": "identifier code"
},
"access_profile": {
"type": "string",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
}
}
}
}
}
}
},
"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/visitors?page=1&page_size=1" \
-H "Authorization: Bearer <token>"
Пример ответа
[
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"company": "string",
"car_number": "string",
"phone": "string",
"email": "string",
"comment": "string",
"first_access": 1,
"last_access": 1,
"identifier_format": "",
"status": "",
"uuid": "string",
"code": "string",
"access_profile": "string"
}
]
POST /visitors
Раздел: Посетители.
Добавляет нового посетителя в систему
Назначение | URL запроса |
Добавляет нового посетителя в систему | https://{IP_контроллера}/api/v1/visitors |
Параметры запроса:
Название | Тип | Описание | |
visitor* | object (body) | Тело запроса | |
BODY | |||
Название * - обязательный | Тип | Формат | Назначение |
surname* | string | minLength: 1 | Фамилия |
name* | string | minLength: 1 | Имя |
second_name | string | Отчество | |
access_profiles | 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}$ | Уникальный идентификатор профиля доступа |
from | integer | Начало действия профиля доступа | |
to | integer | Конец действия профиля доступа | |
}] | |||
company | string | Компания | |
car_number | string | pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$ | Номер автомобиля |
phone | string | Номер телефона посетителя | |
string | Адрес электронной почты посетителя | ||
comment | string | Комментарий или примечание по посетителю | |
first_access | integer | Первый проход посетителя | |
last_access | integer | Последний проход посетителя | |
identifier_format | string | Тип идентификатора Варианты: Array [ qr, barcode, card] | |
status | string | ВариантыWAITING - ожидается, ACTIVE:INNER - Активен: На территории, ACTIVE:OUTER - Активен: Вышел, BANNED - Заблокирован, NOT-COME - Не пришел, ARCHIVE - Архив, VIOLATION - Нарушение | Статус посетителя |
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}$ | Уникальный идентификатор посетителя |
code | string | pattern: (^[1-9]\d*$)|(^$) | Код идентификатора |
access_profile | ring | Устаревшее! Профиль доступа (сохранено для обратной совместимости с более ранними версиями API) | |
Пример:
URL запроса: POST
https://{IP_контроллера}/api/v1/visitors
Body
{
"uuid": "28ac6cc0-7d6d-11ee-b413-a9e44dbf7b01",
"second_name": "Петрович",
"surname": "Петров ",
"access_profiles": [
{
"uuid": "1b8bd441-7d6d-11ee-b413-a9e44dbf7b01",
"from": 1699361828407,
"to": "UNLIMITED"
}
],
"name": "Петр",
"phone": "89888526599",
"code": "608026",
"identifier_format": "qr",
"status": "WAITING"
}
Варианты ответа:
Code 201 (Successfully) - удачное выполнение запроса
{
"success": true,
"message": "string"
}
Code 400 (Invalid parameters) - запрос не выполнен, неверно указаны имена полей или их значения в теле запроса ошибка
Code 409 (User with specified uuid already exists) - запрос не выполнен, посетитель с таким uuid уже добавлен
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Add new visitor",
"requestBody": {
"description": "New visitor data in visitors database",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"surname",
"name",
"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"
},
"company": {
"type": "string"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"comment": {
"type": "string"
},
"first_access": {
"type": "integer",
"description": "First visitor access ms"
},
"last_access": {
"type": "integer",
"description": "Last visitor access ms"
},
"identifier_format": {
"type": "string",
"enum": [
"",
"qr",
"barcode",
"card"
]
},
"status": {
"type": "string",
"enum": [
"",
"WAITING",
"ACTIVE:INNER",
"ACTIVE:OUTER",
"BANNED",
"NOT-COME",
"ARCHIVE",
"VIOLATION"
]
},
"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"
},
"code": {
"type": "string",
"pattern": "(^[1-9]\\d*$)|(^$)",
"description": "identifier code"
},
"access_profile": {
"type": "string",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
}
}
}
}
}
},
"responses": {
"201": {
"description": "Successfully added new visitor",
"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/visitors" \
-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
}
],
"company": "string",
"car_number": "string",
"phone": "string",
"email": "string",
"comment": "string",
"first_access": 1,
"last_access": 1,
"identifier_format": "",
"status": "",
"uuid": "string",
"code": "string",
"access_profile": "string"
}'
Пример тела запроса
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"company": "string",
"car_number": "string",
"phone": "string",
"email": "string",
"comment": "string",
"first_access": 1,
"last_access": 1,
"identifier_format": "",
"status": "",
"uuid": "string",
"code": "string",
"access_profile": "string"
}
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}
GET /visitors/count
Раздел: Посетители.
Возвращает количество посетителей в статусе
Назначение | URL запроса |
Возвращает количество посетителей в статусе | https://{IP_контроллера}/api/v1/visitors/count?status=ACTIVE%3AINNER |
Параметры запроса:
Наименование, * - обязательный | Описание |
status* string (query) | статус посетителя, доступные значения : ACTIVE:INNER (активен: на територии), WAITING (ожидается) |
Варианты ответа:
Code 200 (Successfully got visitors count) - удачное выполнение запроса
Название, * - обязательный | Тип | Формат | Назначение |
count* | integer | minLength: 0 | количество посетителей в выбранном статусе |
Пример:
{
"count": 10
}
Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Returns visitors count",
"parameters": [
{
"in": "query",
"name": "status",
"required": false,
"schema": {
"type": "string",
"enum": [
"ACTIVE:INNER",
"WAITING"
]
}
}
],
"responses": {
"200": {
"description": "Successfully got staff count",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"count"
],
"properties": {
"count": {
"type": "integer",
"minimum": 0
}
}
}
}
}
},
"400": {
"description": "Bad request",
"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/visitors/count" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"count": 1
}
GET /visitors/count_planned
Раздел: Посетители.
Возвращает количество посетителей, которые имеют статус «ожидается», их профили доступа (минимум один действительный), а также идентификаторы, которые действуют до параметра «end».
Назначение | URL запроса |
Возвращает количество посетителей, которые имеют статус «ожидается», их профили доступа (минимум один действительный), а также идентификаторы, которые действуют до параметра «end». | https://{IP контроллера}/api/v1/visitors/count_planned?end={ timestamp } |
Параметры запроса:
Наименование, * - обязательный | Описание |
end* number (query) | Обязательный параметр. UNIX временная метка в миллисекундах окончания срока действия идентификатора |
Варианты ответа:
Code 200 (Successfully got planned visitors count) - удачное выполнение запроса
Название, * - обязательный | Тип | Формат | Назначение |
success* | boolean | Успешность выполнения запроса | |
count* | integer | minimum: 0 | Количество |
Пример:
{
"success": true,
"count": 4
}
Code 400 (Bad request) - запрос не выполнен, неверно указаны параметры запроса
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"summary": "Returns planned visitors",
"description": "Returns count of visitors that have waiting status, and their access profiles (at least one valid profile per visitor) and identifiers are valid until 'end' parameter",
"parameters": [
{
"in": "query",
"name": "end",
"required": true,
"description": "end of count timestamp",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "Successfully got planned visitors count",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"count"
],
"properties": {
"success": {
"type": "boolean",
"enum": [
true
]
},
"count": {
"type": "integer",
"example": 4,
"minimum": 0
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success",
"message"
],
"properties": {
"success": {
"type": "boolean",
"enum": [
false
]
},
"message": {
"type": "string",
"enum": [
"Query parameter 'end' must represents valid timestamp"
]
}
}
}
}
}
},
"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/visitors/count_planned?end=1" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"success": true,
"count": 4
}
GET /visitors/full_names
Раздел: Посетители.
Возвращает ФИО всех посетителей.
Параметры и ответы по OpenAPI
{
"description": "Returns all visitors full names",
"responses": {
"200": {
"description": "Successfully got visitors full names",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"uuid"
],
"properties": {
"name": {
"type": "string"
},
"uuid": {
"type": "string",
"format": "uuid"
}
}
}
}
}
}
},
"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/visitors/full_names" \
-H "Authorization: Bearer <token>"
Пример ответа
[
{
"name": "string",
"uuid": "00000000-0000-4000-8000-000000000000"
}
]
GET /visitors/multisearch
Раздел: Посетители.
Возвращает отсортированный по полю список с примененным поиском по ФИО и фильтрами
Назначение | URL запроса |
Возвращает отсортированный по полю список с примененным поиском по ФИО и фильтрами | https://{IP_контроллера}/api/v1/visitors/multisearch?surname=Bdfyj&page_size=19&direction=ASC&column_name=first_access |
Параметры запроса:
Наименование, * - обязательный | Описание |
page_size* integer (query) | количество карточек на одной странице |
surname string (query) | значение поиска по фамилии |
name string (query) | значение поиска по имени |
c ursor integer (query) | номер записи |
filte r (query) | фильтры для п оиска |
direction s tring (query) | напра вление сортировки (возрастание/убывание) |
column_name string (query) | имя поля сортировки |
Вариан ты ответа:
Code 200 (Successfull y returned list of vis itor) - удачное выполнение запроса
Н азвание, * - обяза тельный | Тип | Формат |
Назначение |
v isitors | название вывода списка | ||
[ | |||
surname* | string | minLength: 1 | Фамилия |
name* | string | minLength: 1 | Имя |
second_name | string | Отчество | |
access_profiles | 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}$ | Уникальный идентификатор профиля доступа |
from | integer | Начало действия профиля доступа | |
to | integer | Конец действия профиля доступа | |
}] | |||
company | string | Компания | |
car_number | string | pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$ | Номер автомобиля |
phone | string | Номер телефона посетителя | |
string | Адрес электронной почты посетителя | ||
comment | string | Комментарий или примечание по посетителю | |
first_access | integer | Первый проход посетителя | |
last_access | integer | Последний проход посетителя | |
identifier_format | string | Тип идентификатора Варианты: Array [ qr, barcode, card] | |
status | string | Array [ WAITING - ожидается, ACTIVE:INNER - Активен: На территории, ACTIVE:OUTER - Активен: Вышел, BANNED - Заблокирован, NOT-COME - Не пришел, ARCHIVE - Архив, VIOLATION - Нарушение ] | Статус посетителя |
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}$ | Уникальный идентификатор посетителя |
code | string | pattern: (^[1-9]\d*$)|(^$) | Код идентификатора |
access_profile | ring | Устаревшее! Профиль доступа (сохранено для обратной совместимости с более ранними версиями API) | |
] | |||
count | integer | минимальное: 0 | количество найденных посетителей по параметрам запроса, |
cursor* | integer | номер записи | |
Пример:
{
"count": 1,
"cursor": 1,
"visitors":[{
"uuid": "28ac6cc0-7d6d-11ee-b413-a9e44dbf7b01",
"second_name": "Петрович",
"surname": "Петров ",
"access_profiles":[{
"uuid": "1b8bd441-7d6d-11ee-b413-a9e44dbf7b01",
"from": 1699361828407,
"to": "UNLIMITED"
}],
"name": "Петр",
"phone": "89888526599",
"code": "608026",
"identifier_format": "qr",
"status": "WAITING"
}]
}
Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Return a filtered and sorted list of visitors",
"parameters": [
{
"in": "query",
"name": "surname",
"description": "Visitor surname search parameter",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "name",
"description": "Visitor 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"
}
},
{
"in": "query",
"name": "column_name",
"description": "Sorted column",
"required": false,
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "searchString",
"description": "Visitor search parameter",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully returned list of visitor",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"visitors",
"cursor"
],
"properties": {
"visitor": {
"type": "array",
"items": {
"type": "object",
"required": [
"surname",
"name",
"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"
},
"company": {
"type": "string"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"comment": {
"type": "string"
},
"first_access": {
"type": "integer",
"description": "First visitor access ms"
},
"last_access": {
"type": "integer",
"description": "Last visitor access ms"
},
"identifier_format": {
"type": "string",
"enum": [
"",
"qr",
"barcode",
"card"
]
},
"status": {
"type": "string",
"enum": [
"",
"WAITING",
"ACTIVE:INNER",
"ACTIVE:OUTER",
"BANNED",
"NOT-COME",
"ARCHIVE",
"VIOLATION"
]
},
"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"
},
"code": {
"type": "string",
"pattern": "(^[1-9]\\d*$)|(^$)",
"description": "identifier code"
},
"access_profile": {
"type": "string",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
}
}
}
},
"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/visitors/multisearch?page_size=1" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"visitor": [
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"company": "string",
"car_number": "string",
"phone": "string",
"email": "string",
"comment": "string",
"first_access": 1,
"last_access": 1,
"identifier_format": "",
"status": "",
"uuid": "string",
"code": "string",
"access_profile": "string"
}
],
"count": 1,
"cursor": 1
}
GET /visitors/sort
Раздел: Посетители.
Возвращает отсортированный по полю список посетителей
Назначение | URL запроса |
Возвращает отсортированный по полю список посетителей | https://{IP_контроллера}/api/v1/visitors/sort?direction=ASC&page=1&page_size=19&column_name=first_access |
Параметры запроса:
Наименование, * - обязательный | Описание |
page* integer (query) | страница выводимого списка |
page_size* integer (query) | количество карточек на одной странице |
column_name* string (query) | имя поля сортировки |
direction* string (query) | направление сортировки (возрастание/убывание) |
Варианты ответа:
Code 200 (Successfully returned visitor page) - удачное выполнение запроса
Название, * - обязательный | Тип | Формат | Назначение |
surname* | string | minLength: 1 | Фамилия |
name* | string | minLength: 1 | Имя |
second_name | string | Отчество | |
access_profiles | 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}$ | Уникальный идентификатор профиля доступа |
from | integer | Начало действия профиля доступа | |
to | integer | Конец действия профиля доступа | |
}] | |||
company | string | Компания | |
car_number | string | pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$ | Номер автомобиля |
phone | string | Номер телефона посетителя | |
string | Адрес электронной почты посетителя | ||
comment | string | Комментарий или примечание по посетителю | |
first_access | integer | Первый проход посетителя | |
last_access | integer | Последний проход посетителя | |
identifier_format | string | Тип идентификатора Варианты: Array [ qr, barcode, card] | |
status | string | Array [ WAITING - ожидается, ACTIVE:INNER - Активен: На территории, ACTIVE:OUTER - Активен: Вышел, BANNED - Заблокирован, NOT-COME - Не пришел, ARCHIVE - Архив, VIOLATION - Нарушение ] | Статус посетителя |
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}$ | Уникальный идентификатор посетителя |
code | string | pattern: (^[1-9]\d*$)|(^$) | Код идентификатора |
access_profile | ring | Устаревшее! Профиль доступа (сохранено для обратной совместимости с более ранними версиями API) | |
Пример:
[{
"uuid": "28ac6cc0-7d6d-11ee-b413-a9e44dbf7b01",
"second_name": "Петрович",
"surname": "Петров ",
"access_profiles": [{
"uuid": "1b8bd441-7d6d-11ee-b413-a9e44dbf7b01",
"from": 1699361828407,
"to": "UNLIMITED"
}],
"name": "Петр",
"phone": "89888526599",
"code": "608026",
"identifier_format": "qr",
"status": "WAITING"
}]
Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Returns sorted by column_name visitor page",
"parameters": [
{
"in": "query",
"name": "page",
"description": "Identifiers page id to load",
"required": true,
"schema": {
"type": "integer",
"minimum": 1
}
},
{
"in": "query",
"name": "column_name",
"description": "Sortable column",
"required": true,
"schema": {
"type": "string"
}
},
{
"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"
]
}
}
],
"responses": {
"200": {
"description": "Successfully returned visitor page",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"surname",
"name",
"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"
},
"company": {
"type": "string"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"comment": {
"type": "string"
},
"first_access": {
"type": "integer",
"description": "First visitor access ms"
},
"last_access": {
"type": "integer",
"description": "Last visitor access ms"
},
"identifier_format": {
"type": "string",
"enum": [
"",
"qr",
"barcode",
"card"
]
},
"status": {
"type": "string",
"enum": [
"",
"WAITING",
"ACTIVE:INNER",
"ACTIVE:OUTER",
"BANNED",
"NOT-COME",
"ARCHIVE",
"VIOLATION"
]
},
"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"
},
"code": {
"type": "string",
"pattern": "(^[1-9]\\d*$)|(^$)",
"description": "identifier code"
},
"access_profile": {
"type": "string",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
}
}
}
}
}
}
},
"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/visitors/sort?page=1&column_name=<column_name>&page_size=1&direction=ASC" \
-H "Authorization: Bearer <token>"
Пример ответа
[
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"company": "string",
"car_number": "string",
"phone": "string",
"email": "string",
"comment": "string",
"first_access": 1,
"last_access": 1,
"identifier_format": "",
"status": "",
"uuid": "string",
"code": "string",
"access_profile": "string"
}
]
GET /visitors/{uuid}
Раздел: Посетители.
Возвращает параметры конкретного посетителя по uuid
Назначение | URL запроса |
Возвращает параметры конкретного посетителя по uuid | https://{IP_контроллера}/api/v1/visitors/c75d0b43-272f-4a86-aa5f-38e094761250 |
Параметры запроса:
Наименование, * - обязательный | Описание |
uuid* string (path) | уникальный идентификатор посетителя |
Варианты ответа:
Code 200 (Successfully returned visitor by uuid) - удачное выполнение запроса
Название, * - обязательный | Тип | Формат | Назначение |
surname* | string | minLength: 1 | Фамилия |
name* | string | minLength: 1 | Имя |
second_name | string | Отчество | |
access_profiles | 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}$ | Уникальный идентификатор профиля доступа |
from | integer | Начало действия профиля доступа | |
to | integer | Конец действия профиля доступа | |
}] | |||
company | string | Компания | |
car_number | string | pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$ | Номер автомобиля |
phone | string | Номер телефона посетителя | |
string | Адрес электронной почты посетителя | ||
comment | string | Комментарий или примечание по посетителю | |
first_access | integer | Первый проход посетителя | |
last_access | integer | Последний проход посетителя | |
identifier_format | string | Тип идентификатора Варианты: Array [ qr, barcode, card] | |
status | string | ВариантыWAITING - ожидается, ACTIVE:INNER - Активен: На территории, ACTIVE:OUTER - Активен: Вышел, BANNED - Заблокирован, NOT-COME - Не пришел, ARCHIVE - Архив, VIOLATION - Нарушение | Статус посетителя |
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}$ | Уникальный идентификатор посетителя |
code | string | pattern: (^[1-9]\d*$)|(^$) | Код идентификатора |
access_profile | ring | Устаревшее! Профиль доступа (сохранено для обратной совместимости с более ранними версиями API) | |
Пример:
{
"uuid": "28ac6cc0-7d6d-11ee-b413-a9e44dbf7b01",
"second_name": "Петрович",
"surname": "Петров ",
"access_profiles": [{
"uuid": "1b8bd441-7d6d-11ee-b413-a9e44dbf7b01",
"from": 1699361828407,
"to": "UNLIMITED"
}],
"name": "Петр",
"phone": "89888526599",
"code": "608026",
"identifier_format": "qr",
"status": "WAITING"
}
Code 400 (Invalid UUID) - запрос не выполнен, неверно указан uuid
Code 404 ( Specified visitor was no found) - запрос не выполнен, пользователь не найден
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Returns visitor by uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully returned visitor by uuid",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"surname",
"name",
"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"
},
"company": {
"type": "string"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"comment": {
"type": "string"
},
"first_access": {
"type": "integer",
"description": "First visitor access ms"
},
"last_access": {
"type": "integer",
"description": "Last visitor access ms"
},
"identifier_format": {
"type": "string",
"enum": [
"",
"qr",
"barcode",
"card"
]
},
"status": {
"type": "string",
"enum": [
"",
"WAITING",
"ACTIVE:INNER",
"ACTIVE:OUTER",
"BANNED",
"NOT-COME",
"ARCHIVE",
"VIOLATION"
]
},
"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"
},
"code": {
"type": "string",
"pattern": "(^[1-9]\\d*$)|(^$)",
"description": "identifier code"
},
"access_profile": {
"type": "string",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
}
}
}
}
}
},
"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 visitor was no 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/visitors/{uuid}" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"company": "string",
"car_number": "string",
"phone": "string",
"email": "string",
"comment": "string",
"first_access": 1,
"last_access": 1,
"identifier_format": "",
"status": "",
"uuid": "string",
"code": "string",
"access_profile": "string"
}
PUT /visitors/{uuid}
Раздел: Посетители.
Редактирует посетителя добавленного в систему
Назначение | URL запроса |
Редактирует посетителя добавленного в систему | https://{IP_контроллера}/api/v1/visitors/28ac6cc0-7d6d-11ee-b413-a9e44dbf7b01 |
Параметры запроса:
Название | Тип | Описание | |
visitor* | object (body) | Тело запроса | |
BODY | |||
Название * - обязательный | Тип | Формат | Назначение |
surname* | string | minLength: 1 | Фамилия |
name* | string | minLength: 1 | Имя |
second_name | string | Отчество | |
access_profiles | 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}$ | Уникальный идентификатор профиля доступа |
from | integer | Начало действия профиля доступа | |
to | integer | Конец действия профиля доступа | |
}] | |||
company | string | Компания | |
car_number | string | pattern: ^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$ | Номер автомобиля |
phone | string | Номер телефона посетителя | |
string | Адрес электронной почты посетителя | ||
comment | string | Комментарий или примечание по посетителю | |
first_access | integer | Первый проход посетителя | |
last_access | integer | Последний проход посетителя | |
identifier_format | string | Тип идентификатора Варианты: Array [ qr, barcode, card] | |
status | string | ВариантыWAITING - ожидается, ACTIVE:INNER - Активен: На территории, ACTIVE:OUTER - Активен: Вышел, BANNED - Заблокирован, NOT-COME - Не пришел, ARCHIVE - Архив, VIOLATION - Нарушение | Статус посетителя |
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}$ | Уникальный идентификатор посетителя |
code | string | pattern: (^[1-9]\d*$)|(^$) | Код идентификатора |
access_profile | ring | Устаревшее! Профиль доступа (сохранено для обратной совместимости с более ранними версиями API) | |
Пример:
URL запроса: PUT
https://{IP_контроллера}/api/v1/visitors/28ac6cc0-7d6d-11ee-b413-a9e44dbf7b01
Body
{
"identifier_format": "qr",
"uuid": "28ac6cc0-7d6d-11ee-b413-a9e44dbf7b01",
"name": "Петр",
"phone": "89888526599",
"status": "WAITING",
"surname": "Петров ",
"second_name": "Петрович",
"image_hash": "",
"banned": false,
"code": "608026",
"access_profiles": [
{
"uuid": "1b8bd441-7d6d-11ee-b413-a9e44dbf7b01",
"from": 1699361828407,
"to": "UNLIMITED"
}
],
"connect": "Телефон"
}
Варианты ответа:
Code 200 (Successfully updated property) - удачное выполнение запроса, данные посетителя обновлены
Code 400 (Bad request) - запрос не выполнен, неверно указаны имена полей или их значения в теле запроса ошибка
Code 404 (Specified visitor does not exist) - запрос не выполнен, пользователь указанный в {uuid} не найден
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Edit visitor data",
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"surname",
"name",
"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"
},
"company": {
"type": "string"
},
"car_number": {
"type": "string",
"pattern": "^[0-9A-Za-zАВЕКМНОРСТУХавекмнорстух]{3,9}$"
},
"phone": {
"type": "string"
},
"email": {
"type": "string"
},
"comment": {
"type": "string"
},
"first_access": {
"type": "integer",
"description": "First visitor access ms"
},
"last_access": {
"type": "integer",
"description": "Last visitor access ms"
},
"identifier_format": {
"type": "string",
"enum": [
"",
"qr",
"barcode",
"card"
]
},
"status": {
"type": "string",
"enum": [
"",
"WAITING",
"ACTIVE:INNER",
"ACTIVE:OUTER",
"BANNED",
"NOT-COME",
"ARCHIVE",
"VIOLATION"
]
},
"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"
},
"code": {
"type": "string",
"pattern": "(^[1-9]\\d*$)|(^$)",
"description": "identifier code"
},
"access_profile": {
"type": "string",
"description": "User's access profile (DEPRECATED)",
"deprecated": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully edited visitor",
"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 visitor 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/visitors/{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
}
],
"company": "string",
"car_number": "string",
"phone": "string",
"email": "string",
"comment": "string",
"first_access": 1,
"last_access": 1,
"identifier_format": "",
"status": "",
"uuid": "string",
"code": "string",
"access_profile": "string"
}'
Пример тела запроса
{
"surname": "string",
"name": "string",
"second_name": "string",
"access_profiles": [
{
"uuid": "string",
"from": 1,
"to": 1
}
],
"company": "string",
"car_number": "string",
"phone": "string",
"email": "string",
"comment": "string",
"first_access": 1,
"last_access": 1,
"identifier_format": "",
"status": "",
"uuid": "string",
"code": "string",
"access_profile": "string"
}
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}
DELETE /visitors/{uuid}
Раздел: Посетители.
Удаляет посетителя по идентификатору
Назначение | URL запроса |
Удаляет посетителя по идентификатору | https://{IP контроллера}/api/v1/visitors/28ac6cc0-7d6d-11ee-b413-a9e44dbf7b01 |
Параметры запроса:
Наименование * - обязательный | Описание |
uuid* string (path) | уникальный идентификатор посетителя |
Варианты ответа:
Code 200 (Successfully deleted visitor) - удачное выполнение запроса посетитель успешно удален
Code 400 (Bad request parameters) - запрос не выполнен, неверно указаны параметры запроса
Code 404 (Specified employee does not exist) - запрос не выполнен, посетитель с указанным {uuid} не существует
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Delete specified visitor",
"parameters": [
{
"name": "uuid",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully deleted visitor",
"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 visitor 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/visitors/{uuid}" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}
GET /visitors_properties
Раздел: Посетители.
Возвращает список полей посетителей с их параметрами
Назначение | URL запроса |
Возвращает список полей посетителей с их параметрами | https://{IP_контроллера}/api/v1/visitors_properties |
Параметры запроса:
отсутcтвуют
Варианты ответа:
Code 200 (Successfully returned registered visitors properties) - удачное выполнение запроса
Название, * - обязательный | Тип | Формат | Назначение |
name* | string | minLength: 1 pattern: ^(?!(?:uuid|surname|name))[\s\S]+ | имя поля |
display_name* | string | minLength: 1 | имя поля отображаемое в интерфейсе |
type* | string | Вариантыstring - текст, integer - целое число, directory_entry - справочник | тип поля |
required* | boolean | обязательность поля | |
value_directory | string | имя справочника для типа directory_entry | |
show_in_search* | boolean | показывать в результатах поиска | |
default | boolean | стандартное поле | |
parser | string | назначение поля |
Пример:
[
{
"name": "surname",
"type": "string",
"display_name": "Фамилия",
"required": true,
"default": true,
"show_in_search": true,
"parser": "string"
},
{
"name": "name",
"type": "string",
"display_name": "Имя",
"required": true,
"default": true,
"show_in_search": true,
"parser": "string"
},
{
"name": "second_name",
"type": "string",
"display_name": "Отчество",
"required": false,
"default": true,
"show_in_search": true,
"parser": "string"
},
{
"name": "access_profiles",
"type": "array",
"display_name": "Профиль доступа",
"required": false,
"default": true,
"show_in_search": false,
"parser": "custom"
},
{
"name": "company",
"type": "string",
"display_name": "Компания",
"required": false,
"default": true,
"show_in_search": false,
"parser": "string"
},
{
"name": "car_number",
"type": "string",
"display_name": "Номер автомобиля",
"required": false,
"default": true,
"show_in_search": false,
"parser": "car_number"
},
{
"name": "phone",
"type": "string",
"display_name": "Телефон",
"required": false,
"default": true,
"show_in_search": false,
"parser": "phone"
},
{
"name": "email",
"type": "string",
"display_name": "Почта",
"required": false,
"default": true,
"show_in_search": false,
"parser": "email"
},
{
"name": "comment",
"type": "string",
"display_name": "Комментарий",
"required": false,
"default": true,
"show_in_search": false,
"parser": "text_area"
}
]
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Returns all registered visitors properties",
"responses": {
"200": {
"description": "Successfully returned registered visitors properties",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"description": "Visitor property",
"required": [
"name",
"display_name",
"type",
"required",
"show_in_search"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^(?!(?:uuid|surname|name))[\\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/visitors_properties" \
-H "Authorization: Bearer <token>"
Пример ответа
[
{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}
]
POST /visitors_properties
Раздел: Посетители.
Добавляет новое поле посетителя в систему
Назначение | URL запроса |
Добавляет новое поле посетителя в систему | https://{IP_контроллера}/api/v1/visitors_properties |
Параметры запроса:
Название | Тип | Описание | |
properties* | array[object] (body) | тело запроса | |
BODY | |||
Название * - обязательный | Тип | Формат | Назначение |
name* | string | minLength: 1 pattern: ^(?!(?:uuid|surname|name))[\s\S]+ | имя поля |
display_name* | string | minLength: 1 | имя поля отображаемое в интерфейсе |
type* | string | Вариантыstring - текст, integer - целое число, directory_entry - справочник | тип поля |
required* | boolean | обязательность поля | |
value_directory | string | имя справочника для типа directory_entry | |
show_in_search* | boolean | показывать в результатах поиска | |
default | boolean | стандартное поле | |
parser | string | назначение поля | |
Пример:
URL запроса: POST
https://{IP_контроллера}/api/v1/visitors_properties
Body
[{
"name": "connect",
"display_name": "Предпочитаемый способ связи",
"type": "directory_entry",
"required": true,
"default": false,
"show_in_search": true,
"value_directory": "Тип связи"
}]
Варианты ответа:
Code 201 (Successfully added new visitors property) - удачное выполнение запроса, новые поля персонала добавлены
{
"success": true,
"message": "string"
}
Code 400 (Invalid parameters) - запрос не выполнен, неверно указаны имена полей или их значения в теле запроса ошибка
Code 409 (User with specified uuid already exists) - запрос не выполнен, поле с таким uuid уже добавлено
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Register new visitors properties",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"description": "Visitor property",
"required": [
"name",
"display_name",
"type",
"required",
"show_in_search"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^(?!(?:uuid|surname|name))[\\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 visitors property"
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X POST "https://{IP_контроллера}/api/v1/visitors_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 /visitors_properties/{name}
Раздел: Посетители.
Возвращает параметры поля посетителя по его имени
Назначение | URL запроса |
Возвращает параметры поля посетителя по его имени | https://{IP_контроллера}/api/v1/visitors_properties/surname |
Параметры запроса:
Наименование, * - обязательный | Описание |
name* string (path) | имя поля посетителя |
Варианты ответа:
Code 200 (Successfully received property) - удачное выполнение запроса
Название, * - обязательный | Тип | Формат | Назначение |
name* | string | minLength: 1 pattern: ^(?!(?:uuid|surname|name))[\s\S]+ | имя поля |
display_name* | string | minLength: 1 | имя поля отображаемое в интерфейсе |
type* | string | Вариантыstring - текст, integer - целое число, directory_entry - справочник | тип поля |
required* | boolean | обязательность поля | |
value_directory | string | имя справочника для типа directory_entry | |
show_in_search* | boolean | показывать в результатах поиска | |
default | boolean | стандартное поле | |
parser | string | назначение поля |
Пример:
{
"name": "company",
"type": "string",
"display_name": "Компания",
"required": false,
"default": true,
"show_in_search": false,
"parser": "string"
}
Code 404 (Specified property does not exist) - запрос не выполнен, поле не найдено
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Get visitors 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": "Visitor property",
"required": [
"name",
"display_name",
"type",
"required",
"show_in_search"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^(?!(?:uuid|surname|name))[\\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/visitors_properties/{name}" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"name": "string",
"display_name": "string",
"type": "string",
"required": true,
"value_directory": "string",
"show_in_search": true
}
PUT /visitors_properties/{name}
Раздел: Посетители.
Редактирует параметры поля посетителя добавленного в систему
Назначение | URL запроса |
Редактирует параметры поля посетителя добавленного в систему | https://{IP_контроллера}/api/v1/visitors/connect |
Параметры запроса:
Название | Тип | Описание | |
properties* | array[object] (body) | тело запроса | |
BODY | |||
Название * - обязательный | Тип | Формат | Назначение |
name* | string | minLength: 1 pattern: ^(?!(?:uuid|surname|name))[\s\S]+ | имя поля |
display_name* | string | minLength: 1 | имя поля отображаемое в интерфейсе |
type* | string | Вариантыstring - текст, integer - целое число, directory_entry - справочник | тип поля |
required* | boolean | обязательность поля | |
value_directory | string | имя справочника для типа directory_entry | |
show_in_search* | boolean | показывать в результатах поиска | |
default | boolean | стандартное поле | |
parser | string | назначение поля | |
Пример:
URL запроса: PUT
https://{IP_контроллера}/api/v1/visitors/connect
Body
{
"name": "connect",
"display_name": "Предпочитаемый способ связи",
"type": "directory_entry",
"required": false,
"default": false,
"show_in_search": true,
"value_directory": "Тип связи"
}
Варианты ответа:
Code 200 (Successfully updated property) - удачное выполнение запроса, данные поля посетителей обновлены
Code 400 (Bad parameters) - запрос не выполнен, неверно указаны параметры запроса
Code 404 (Specified property does not exist) - запрос не выполнен, указанное свойство не найдено
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Update visitors property data",
"parameters": [
{
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"description": "Visitor property",
"required": [
"name",
"display_name",
"type",
"required",
"show_in_search"
],
"properties": {
"name": {
"type": "string",
"minLength": 1,
"pattern": "^(?!(?:uuid|surname|name))[\\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/visitors_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 /visitors_properties/{name}
Раздел: Посетители.
Удаляет поле посетителя по имени
Назначение | URL запроса |
Удаляет поле посетителя по имени | https://{IP контроллера}/api/v1/visitors/connect |
Параметры запроса:
Наименование, * - обязательный | Описание |
name* string (path) | имя поля посетителя |
Варианты ответа:
Code 200 (Successfully deleted visitor) - удачное выполнение запроса поле успешно удалено
Code 400 (Specified property is default property and can't be deleted) - запрос не выполнен, указанное свойство является стандартным и не может быть удалено
Code 404 (Specified employee does not exist) - запрос не выполнен, по с указанным именем не существует
Code 500 (Unexpected server error) - запрос не выполнен получено сообщение об ошибке
Параметры и ответы по OpenAPI
{
"description": "Delete visitors 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/visitors_properties/{name}" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}