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

Точки прохода API 1.7.0

Методы API для работы с разделом «Точки прохода».

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

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

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

МетодПуть
GET/access_points
POST/access_points/barrier
PUT/access_points/barrier/{uuid}
POST/access_points/double
PUT/access_points/double/{uuid}
GET/access_points/ext_parameters
GET/access_points/ext_parameters/sections
POST/access_points/lift
PUT/access_points/lift/{uuid}
POST/access_points/mantrap
PUT/access_points/mantrap/{uuid}
GET/access_points/schema/{type}
GET/access_points/self
POST/access_points/single
PUT/access_points/single/{uuid}
POST/access_points/turnstile
PUT/access_points/turnstile/{uuid}
POST/access_points/turnstile_with_card_box
PUT/access_points/turnstile_with_card_box/{uuid}
GET/access_points/{uuid}
DELETE/access_points/{uuid}
DELETE/access_points/{uuid}/alert_state
POST/access_points/{uuid}/state/{state}
GET/access_points_automations
POST/access_points_automations
GET/access_points_automations/{uuid}
PUT/access_points_automations/{uuid}
DELETE/access_points_automations/{uuid}

GET /access_points

Раздел: Точки прохода.

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

Источник в Teamly

Назначение

URL запроса

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

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

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

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

Описание

alert_state string (query)

Возвращает ТП в состоянии “Тревога”

failure_state string (query)

Возвращает ТП с неисправным оборудованием

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

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

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

Тип

Формат

Назначение

uuid*

string

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

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

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип точки прохода

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

Пример:

[
{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 0,
"additionalProp1": {}
}
]

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

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

Параметры и ответы по OpenAPI
{
"description": "Returns all access points in system",
"parameters": [
{
"in": "query",
"name": "alert_state",
"description": "Returns all access points with alert state",
"schema": {
"type": "string"
}
},
{
"in": "query",
"name": "failure_state",
"description": "Returns all access points with any failure devices = failure points",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successfully returned list of access points",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": 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/access_points" \
-H "Authorization: Bearer <token>"

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

[
{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}
]

POST /access_points/barrier

Раздел: Точки прохода.

Добавляет новую точку прохода - Шлагбаум

Источник в Teamly

Назначение

URL запроса

Добавляет новую точку прохода - Шлагбаум

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

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

Название

Тип

Описание

access_point*

object (body)

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 409 (Access point already exists) - запрос не выполнен, ТП с таким uuid уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Add new access point",
"requestBody": {
"description": "Creates new barrier access point",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"201": {
"description": "Access point successfully created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Access point already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

curl -k -X POST "https://{IP_контроллера}/api/v1/access_points/barrier" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

PUT /access_points/barrier/{uuid}

Раздел: Точки прохода.

Редактирует существующую точку прохода - шлагбаум

Источник в Teamly

Назначение

URL запроса

Редактирует существующую точку прохода – шлагбаум по uuid

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

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

Название

Тип

Описание

uuid*

access_point*

string (path)

object (body)

UUID точки прохода

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная ТП не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Modify barrier access point data",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "Access point successfully updated",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid 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 access point 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/access_points/barrier/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

POST /access_points/double

Раздел: Точки прохода.

Добавляет новую точку прохода - Двустороннюю

Источник в Teamly

Назначение

URL запроса

Добавляет новую точку прохода - Двустороннюю

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

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

Название

Тип

Описание

access_point*

object (body)

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 409 (Access point already exists) - запрос не выполнен, ТП с таким uuid уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Add new access point",
"requestBody": {
"description": "Creates new double-side access point",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"201": {
"description": "Access point successfully created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Access point already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

curl -k -X POST "https://{IP_контроллера}/api/v1/access_points/double" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

PUT /access_points/double/{uuid}

Раздел: Точки прохода.

Редактирует существующую точку прохода – двустороннюю по uuid

Источник в Teamly

Назначение

URL запроса

Редактирует существующую точку прохода – двустороннюю по uuid

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

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

Название

Тип

Описание

uuid*

access_point*

string (path)

object (body)

UUID точки прохода

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная ТП не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Modify double-side access point data",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"example": "123e4567-e89b-12d3-a456-426614174000"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "Access point successfully updated",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid 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 access point 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/access_points/double/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

GET /access_points/ext_parameters

Раздел: Точки прохода.

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

Параметры и ответы по OpenAPI
{
"description": "Returns access points extended parameters description",
"responses": {
"200": {
"description": "Successfuly return access points extended parameters description",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"close_timeout",
"remote_close_timeout",
"door_hold_timeout",
"unclosed_sound_indication_timeout",
"extended_open_sensor",
"reader_activation_sound",
"reader_activation_light",
"minimal_privilage_to_cancel_apb",
"out_of_schedule_access_terra",
"host_mode",
"pin_code",
"open_sensor_nc",
"barrier_up_lock_impulse",
"barrier_down_lock_impulse",
"apb_cancel_timeout",
"max_forbidden_attempts",
"disposable_forbidden_on_side_a",
"disposable_forbidden_on_side_b",
"offline_exit",
"offline_exit_from_side_a",
"duress_access_forbidden",
"access_multiplicity",
"access_multiplicity_timeout_sec",
"pin_code_additional_privilege"
],
"properties": {
"close_timeout": {
"type": "integer",
"minimum": 0,
"maximum": 30,
"description": "Access point locks close timeout in seconds"
},
"remote_close_timeout": {
"type": "integer",
"minimum": 0,
"maximum": 30,
"description": "Access point locks close timeout after been opened programmatically in seconds"
},
"door_hold_timeout": {
"type": "integer",
"minimum": 0,
"maximum": 30,
"description": "Access point door hold timeout in seconds"
},
"unclosed_sound_indication_timeout": {
"type": "integer",
"minimum": 0,
"maximum": 1800,
"description": "Timout for sound indication of unclosed door"
},
"reader_activation_sound": {
"type": "boolean",
"description": "Reader activation sound on or off"
},
"reader_activation_light": {
"type": "boolean",
"description": "Reader activation light on or off"
},
"minimal_privilage_to_cancel_apb": {
"type": "integer",
"description": "Minimum card prevelege level to cancel APB check"
},
"out_of_schedule_access_terra": {
"type": "string",
"description": "Territory to which out of schedule access allowed"
},
"host_mode": {
"type": "boolean",
"description": "Turn on/off host mode"
},
"pin_code": {
"type": "string",
"description": "Use access point pin code to verify access"
},
"open_sensor_nc": {
"type": "boolean",
"description": "Open sensor normally closed"
},
"descriptions": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"type",
"value",
"description"
],
"properties": {
"name": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"string",
"integer",
"boolean"
]
},
"description": {
"type": "string"
}
}
}
},
"barrier_up_lock_impulse": {
"type": "boolean",
"description": "Barrier up relay is impulse"
},
"lock_impulse_time_ms": {
"type": "integer",
"minimum": 0,
"description": "Lock impulse length in milliseconds"
},
"apb_cancel_timeout": {
"type": "integer",
"minimum": 1,
"description": "Timeout to ignore zone control rules"
},
"max_forbidden_attempts": {
"type": "integer",
"minimum": 0,
"description": "Maximum number of access forbidden events in a row before door block"
},
"bruteforce_block_timeout_min": {
"type": "integer",
"minimum": 1,
"description": "Timeout of bruteforce prevention block in minutes"
},
"disposable_forbidden_on_side_a": {
"type": "boolean",
"description": "Access with disposable card forbidden on side a"
},
"disposable_forbidden_on_side_b": {
"type": "boolean",
"description": "Access with disposable card forbidden on side b"
},
"offline_exit": {
"type": "boolean",
"description": "Allow offline exit"
},
"offline_exit_from_side_a": {
"type": "boolean",
"description": "Exit side in offline mode is a"
},
"duress_access_forbidden": {
"type": "boolean",
"description": "Do not allow access through access point under duress"
},
"access_multiplicity": {
"type": "integer",
"description": "How many people needed at one time to get access on this access point"
},
"access_multiplicity_timeout_sec": {
"type": "integer",
"description": "Maximum time to wait for next user to accomplish mulitplicity access"
},
"external_access_confirmation": {
"type": "string",
"enum": [
"ALWAYS",
"NEVER",
"ENOUGH_PRIVILEGE",
"NOT_ENOUGH_PRIVILEGE"
],
"description": "Access must be granted by external system"
},
"external_access_confirmation_timeout_sec": {
"type": "integer",
"description": "External system access confirmation timeout in seconds"
},
"low_privilege_access_confirmation": {
"type": "string",
"enum": [
"ALWAYS",
"NEVER",
"ENOUGH_PRIVILEGE",
"NOT_ENOUGH_PRIVILEGE"
],
"description": "Allow passage with confirmation when privilege level"
},
"confirm_access_after_external_timeout": {
"type": "boolean",
"description": "Auto confirm access after external system response timeout expired"
},
"pin_code_additional_privilege": {
"type": "integer",
"description": "Pin code additional privilege level"
}
}
}
}
}
},
"500": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
},
"deprecated": true
}

Примеры по OpenAPI

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

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

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

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

{
"close_timeout": 1,
"remote_close_timeout": 1,
"door_hold_timeout": 1,
"unclosed_sound_indication_timeout": 1,
"reader_activation_sound": true,
"reader_activation_light": true,
"minimal_privilage_to_cancel_apb": 1,
"out_of_schedule_access_terra": "string",
"host_mode": true,
"pin_code": "string",
"open_sensor_nc": true,
"descriptions": [
{
"name": "string",
"type": "string",
"description": "string"
}
],
"barrier_up_lock_impulse": true,
"lock_impulse_time_ms": 1,
"apb_cancel_timeout": 1,
"max_forbidden_attempts": 1,
"bruteforce_block_timeout_min": 1,
"disposable_forbidden_on_side_a": true,
"disposable_forbidden_on_side_b": true,
"offline_exit": true,
"offline_exit_from_side_a": true,
"duress_access_forbidden": true,
"access_multiplicity": 1,
"access_multiplicity_timeout_sec": 1,
"external_access_confirmation": "ALWAYS",
"external_access_confirmation_timeout_sec": 1,
"low_privilege_access_confirmation": "ALWAYS",
"confirm_access_after_external_timeout": true,
"pin_code_additional_privilege": 1
}

GET /access_points/ext_parameters/sections

Раздел: Точки прохода.

Возвращает список категорий дополнительных параметров точек прохода.

Параметры и ответы по OpenAPI
{
"description": "Returns access points extended parameters sections description",
"responses": {
"200": {
"description": "Successfuly return access points extended parameters sections description",
"content": {
"application/json": {
"schema": {
"items": {
"type": "string",
"enum": [
"Время ожидания",
"Считыватели",
"Датчики",
"Доступ"
]
}
}
}
}
},
"500": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
},
"deprecated": true
}

Примеры по OpenAPI

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

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

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

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

"string"

POST /access_points/lift

Раздел: Точки прохода.

Добавляет новую точку прохода - Лифт

Источник в Teamly

Назначение

URL запроса

Добавляет новую точку прохода - Лифт

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

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

Название

Тип

Описание

access_point*

object (body)

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 409 (Access point already exists) - запрос не выполнен, ТП с таким uuid уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Add new single-side access point",
"requestBody": {
"description": "Creates new lift access point",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"201": {
"description": "Access point successfully created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Access point already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

curl -k -X POST "https://{IP_контроллера}/api/v1/access_points/lift" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

PUT /access_points/lift/{uuid}

Раздел: Точки прохода.

Редактирует существующую точку прохода - Лифт

Источник в Teamly

Назначение

URL запроса

Редактирует существующую точку прохода – Лифт по uuid

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

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

Название

Тип

Описание

uuid*

access_point*

string (path)

object (body)

UUID точки прохода

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная ТП не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Modify lift access point data",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "Access point successfully updated",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid 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 access point 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/access_points/lift/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

POST /access_points/mantrap

Раздел: Точки прохода.

Добавляет новую точку прохода - Шлюз

Источник в Teamly

Назначение

URL запроса

Добавляет новую точку прохода - Шлюз

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

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

Название

Тип

Описание

access_point*

object (body)

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 409 (Access point already exists) - запрос не выполнен, ТП с таким uuid уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Add new mantrap access point",
"requestBody": {
"description": "Creates new mantrap access point",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"201": {
"description": "Access point successfully created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Access point already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

curl -k -X POST "https://{IP_контроллера}/api/v1/access_points/mantrap" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

PUT /access_points/mantrap/{uuid}

Раздел: Точки прохода.

Редактирует существующую точку прохода - Шлюз по uuid

Источник в Teamly

Назначение

URL запроса

Редактирует существующую точку прохода – шлюз по uuid

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

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

Название

Тип

Описание

uuid*

access_point*

string (path)

object (body)

UUID точки прохода

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная ТП не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Modify mantrap access point data",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "Access point successfully updated",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid 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 access point 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/access_points/mantrap/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

GET /access_points/schema/{type}

Раздел: Точки прохода.

Возвращает схему по типу ТП

Источник в Teamly

Назначение

URL запроса

Возвращает схемы работы по типу ТП

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

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

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

Описание

type* string (path) (single, double, turnstile, turnstile_with_card_box, lift, mantrap, barrier)

Тип ТП

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

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

Пример:

{
"success": true,
"message": {
"default": {
"id": "default",
"name": "Одностворчатая",
"schema": {
"title": "ТП одностороннная",
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Имя"
},
"type": {
"type": "string",
"enum": [
"double",
"single",
"turnstile",
"turnstile_with_card_box",
"mantrap",
"barrier",
"lift"
],
"enumName": [
"Двусторонняя",
"Односторонняя",
"Турникет",
"Турникет с картоприёмником",
"Шлюз",
"Шлагбаум",
"Лифт"
],
"title": "Тип",
"disabled": true
},
"state": {
"type": "string",
"enum": [
"NORMAL",
"BLOCKED",
"BLOCKED_SIDE_A",
"BLOCKED_SIDE_B",
"UNBLOCKED",
"GUARDED"
],
"enumName": [
"Дежурный",
"Заблокирована",
"Считыватель заблокирован",
"Кнопка заблокирована",
"Разблокирована",
"На охране"
],
"title": "Режим работы"
},
"privilege": {
"type": "number",
"default": 0,
"title": "Уровень привилегий"
},
"terra": {
"type": "string",
"x-widget": "terra",
"title": "Зона:Этаж:Здание:Внешняя"
},
"identification_method": {
"type": "string",
"enum": [
"card",
"card_and_pin",
"card_or_pin",
"multi_factor"
],
"enumName": [
"по идентификатору",
"по идентификатору и пин-коду",
"по идентификатору или пин-коду",
"многофакторная авторизация"
],
"title": "Метод идентификации"
},
"controller": {
"type": "string",
"title": "Контроллер",
"x-widget": "select",
"x-device": "controller"
},
"devices": {
"type": "object",
"title": "Устройствa",
"properties": {
"reader": {
"type": "string",
"x-widget": "select",
"title": "Считыватель",
"x-device-type": "reader"
},
"button": {
"type": "string",
"x-widget": "select",
"title": "Кнопка запроса на выход",
"x-device-type": "input"
},
"lock": {
"type": "string",
"x-widget": "select",
"title": "Реле замка",
"x-device-type": "output"
},
"open_sensor": {
"type": "string",
"x-widget": "select",
"title": "Датчик положения двери",
"x-device-type": "input"
},
"remote_button": {
"type": "string",
"x-widget": "select",
"title": "Кнопка удаленного открытия",
"x-device-type": "input"
}
}
},
"additional_params_list": {
"type": "array",
"x-widget": "additional_params_list",
"items": [
{
"key": "close_timeout",
"type": "number",
"title": "Время закрытия замка двери после локального открытия, сек.",
"default": 5,
"x-block": "Время ожидания"
},
{
"key": "remote_close_timeout",
"type": "number",
"title": "Время закрытия замка двери после удалённого открытия, сек.",
"default": 5,
"x-block": "Время ожидания"
},
{
"key": "door_hold_timeout",
"type": "number",
"title": "Максимальное время удержания двери, сек.",
"default": 5,
"x-block": "Время ожидания"
},
{
"key": "apb_cancel_timeout",
"type": "number",
"title": "Время действия ограничений зонального контроля, мин.",
"default": 30,
"x-block": "Время ожидания"
},
{
"key": "on_guard_set_by_code_timeout_sec",
"type": "number",
"title": "Задержка при постановке на охрану через код на считывателе, сек.",
"default": 0,
"x-block": "Время ожидания"
},
{
"key": "access_multiplicity_timeout_sec",
"type": "number",
"title": "Максимальное время ожидания множественного прохода, сек.",
"default": 3,
"x-block": "Время ожидания"
},
{
"key": "external_access_confirmation_timeout_sec",
"type": "number",
"title": "Максимальное время ожидания подтверждения прохода внешней системой, сек.",
"default": 3,
"x-block": "Время ожидания"
},
{
"key": "access_with_card_confirmation_timeout",
"type": "number",
"title": "Максимальное время ожидания подтверждения прохода картой, сек.",
"default": 3,
"x-block": "Время ожидания"
},
{
"key": "bruteforce_block_timeout_min",
"type": "number",
"title": "Время блокировки двери после превышения лимита неудачных попыток доступа, мин.",
"default": 2,
"x-block": "Время ожидания"
},
{
"key": "reader_activation_sound",
"type": "boolean",
"title": "Звуковая индикация срабатывания считывателя",
"default": true,
"x-block": "Считыватели"
},
{
"key": "reader_activation_light",
"type": "boolean",
"title": "Световая индикация срабатывания считывателя",
"default": true,
"x-block": "Считыватели"
},
{
"key": "pin_code",
"type": "string",
"title": "Пин-код точки прохода",
"default": "",
"x-block": "Считыватели"
},
{
"key": "open_sensor_nc",
"type": "boolean",
"title": "Датчик прохода/проезда/положения двери нормально замкнутый",
"default": true,
"x-block": "Датчики"
},
{
"key": "max_forbidden_attempts",
"type": "number",
"title": "Количество неудачных попыток входа подряд до блокировки (0 - не ограничено)",
"default": 0,
"x-block": "Доступ"
},
{
"key": "offline_exit",
"type": "boolean",
"title": "Разрешить аварийный выход при потере связи",
"default": true,
"x-block": "Доступ"
},
{
"key": "duress_access_forbidden",
"type": "boolean",
"title": "Проход под принуждением запрещён",
"default": false,
"x-block": "Доступ"
},
{
"key": "access_multiplicity",
"type": "number",
"title": "Кол-во человек необходимое для прохода",
"default": 1,
"x-block": "Доступ"
},
{
"key": "external_access_confirmation",
"type": "string",
"enum": [
"NEVER",
"ALWAYS",
"ENOUGH_PRIVILEGE",
"NOT_ENOUGH_PRIVILEGE"
],
"enumName": [
"Нет",
"Всегда",
"При достаточном уровне привилегий",
"При недостаточном уровне привилегий"
],
"title": "Подтверждение прохода внешней системой",
"default": "NEVER",
"x-block": "Доступ"
},
{
"key": "confirm_access_after_external_timeout",
"type": "boolean",
"title": "Разрешать доступ после истечения времени ожидания внешнего подтверждения",
"default": false,
"x-block": "Доступ"
},
{
"key": "pin_code_additional_privilege",
"type": "number",
"title": "Величина добавочного уровня привилегий пин-кода",
"default": 0,
"x-block": "Доступ"
},
{
"key": "on_guard_automation_point",
"type": "boolean",
"title": "Точка прохода используется для автопостановки на охрану личной точки сотрудника",
"default": false,
"x-block": "Доступ"
},
{
"key": "access_with_card_confirmation",
"type": "string",
"enum": [
"NEVER",
"ALWAYS",
"ENOUGH_PRIVILEGE",
"NOT_ENOUGH_PRIVILEGE"
],
"enumName": [
"Нет",
"Всегда",
"При достаточном уровне привилегий",
"При недостаточном уровне привилегий"
],
"title": "Проход с подтверждением картой",
"default": "NEVER",
"x-block": "Доступ"
},
{
"key": "block_during_external_confirmation",
"type": "boolean",
"title": "Блокировать ТП при ожидании подтверждения внешней системой",
"default": false,
"x-block": "Доступ"
}
]
},
"additional_params": {
"title": "Дополнительные параметры",
"type": "object",
"properties": {}
}
},
"required": []
}
},
"double": {
"id": "default",
"name": "Двустворчатая",
"schema": {
"title": "ТП одностороннная",
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Имя"
},
"type": {
"type": "string",
"enum": [
"double",
"single",
"turnstile",
"turnstile_with_card_box",
"mantrap",
"barrier",
"lift"
],
"enumName": [
"Двусторонняя",
"Односторонняя",
"Турникет",
"Турникет с картоприёмником",
"Шлюз",
"Шлагбаум",
"Лифт"
],
"title": "Тип",
"disabled": true
},
"state": {
"type": "string",
"enum": [
"NORMAL",
"BLOCKED",
"BLOCKED_SIDE_A",
"BLOCKED_SIDE_B",
"UNBLOCKED",
"GUARDED"
],
"enumName": [
"Дежурный",
"Заблокирована",
"Считыватель заблокирован",
"Кнопка заблокирована",
"Разблокирована",
"На охране"
],
"title": "Режим работы"
},
"privilege": {
"type": "number",
"default": 0,
"title": "Уровень привилегий"
},
"terra": {
"type": "string",
"x-widget": "terra",
"title": "Зона:Этаж:Здание:Внешняя"
},
"identification_method": {
"type": "string",
"enum": [
"card",
"card_and_pin",
"card_or_pin",
"multi_factor"
],
"enumName": [
"по идентификатору",
"по идентификатору и пин-коду",
"по идентификатору или пин-коду",
"многофакторная авторизация"
],
"title": "Метод идентификации"
},
"controller": {
"type": "string",
"title": "Контроллер",
"x-widget": "select",
"x-device": "controller"
},
"devices": {
"type": "object",
"title": "Устройствa",
"properties": {
"reader": {
"type": "string",
"x-widget": "select",
"title": "Считыватель",
"x-device-type": "reader"
},
"button": {
"type": "string",
"x-widget": "select",
"title": "Кнопка запроса на выход",
"x-device-type": "input"
},
"lock": {
"type": "string",
"x-widget": "select",
"title": "Реле замка 1",
"x-device-type": "output"
},
"lock2": {
"type": "string",
"x-widget": "select",
"title": "Реле замка 2",
"x-device-type": "output"
},
"open_sensor": {
"type": "string",
"x-widget": "select",
"title": "Датчик положения двери 1",
"x-device-type": "input"
},
"open_sensor2": {
"type": "string",
"x-widget": "select",
"title": "Датчик положения двери 2",
"x-device-type": "input"
},
"remote_button": {
"type": "string",
"x-widget": "select",
"title": "Кнопка удаленного открытия",
"x-device-type": "input"
}
}
},
"additional_params_list": {
"type": "array",
"x-widget": "additional_params_list",
"items": [
{
"key": "close_timeout",
"type": "number",
"title": "Время закрытия замка двери после локального открытия, сек.",
"default": 5,
"x-block": "Время ожидания"
},
{
"key": "remote_close_timeout",
"type": "number",
"title": "Время закрытия замка двери после удалённого открытия, сек.",
"default": 5,
"x-block": "Время ожидания"
},
{
"key": "door_hold_timeout",
"type": "number",
"title": "Максимальное время удержания двери, сек.",
"default": 5,
"x-block": "Время ожидания"
},
{
"key": "apb_cancel_timeout",
"type": "number",
"title": "Время действия ограничений зонального контроля, мин.",
"default": 30,
"x-block": "Время ожидания"
},
{
"key": "on_guard_set_by_code_timeout_sec",
"type": "number",
"title": "Задержка при постановке на охрану через код на считывателе, сек.",
"default": 0,
"x-block": "Время ожидания"
},
{
"key": "access_multiplicity_timeout_sec",
"type": "number",
"title": "Максимальное время ожидания множественного прохода, сек.",
"default": 3,
"x-block": "Время ожидания"
},
{
"key": "external_access_confirmation_timeout_sec",
"type": "number",
"title": "Максимальное время ожидания подтверждения прохода внешней системой, сек.",
"default": 3,
"x-block": "Время ожидания"
},
{
"key": "access_with_card_confirmation_timeout",
"type": "number",
"title": "Максимальное время ожидания подтверждения прохода картой, сек.",
"default": 3,
"x-block": "Время ожидания"
},
{
"key": "bruteforce_block_timeout_min",
"type": "number",
"title": "Время блокировки двери после превышения лимита неудачных попыток доступа, мин.",
"default": 2,
"x-block": "Время ожидания"
},
{
"key": "reader_activation_sound",
"type": "boolean",
"title": "Звуковая индикация срабатывания считывателя",
"default": true,
"x-block": "Считыватели"
},
{
"key": "reader_activation_light",
"type": "boolean",
"title": "Световая индикация срабатывания считывателя",
"default": true,
"x-block": "Считыватели"
},
{
"key": "pin_code",
"type": "string",
"title": "Пин-код точки прохода",
"default": "",
"x-block": "Считыватели"
},
{
"key": "open_sensor_nc",
"type": "boolean",
"title": "Датчик прохода/проезда/положения двери нормально замкнутый",
"default": true,
"x-block": "Датчики"
},
{
"key": "max_forbidden_attempts",
"type": "number",
"title": "Количество неудачных попыток входа подряд до блокировки (0 - не ограничено)",
"default": 0,
"x-block": "Доступ"
},
{
"key": "offline_exit",
"type": "boolean",
"title": "Разрешить аварийный выход при потере связи",
"default": true,
"x-block": "Доступ"
},
{
"key": "duress_access_forbidden",
"type": "boolean",
"title": "Проход под принуждением запрещён",
"default": false,
"x-block": "Доступ"
},
{
"key": "access_multiplicity",
"type": "number",
"title": "Кол-во человек необходимое для прохода",
"default": 1,
"x-block": "Доступ"
},
{
"key": "external_access_confirmation",
"type": "string",
"enum": [
"NEVER",
"ALWAYS",
"ENOUGH_PRIVILEGE",
"NOT_ENOUGH_PRIVILEGE"
],
"enumName": [
"Нет",
"Всегда",
"При достаточном уровне привилегий",
"При недостаточном уровне привилегий"
],
"title": "Подтверждение прохода внешней системой",
"default": "NEVER",
"x-block": "Доступ"
},
{
"key": "confirm_access_after_external_timeout",
"type": "boolean",
"title": "Разрешать доступ после истечения времени ожидания внешнего подтверждения",
"default": false,
"x-block": "Доступ"
},
{
"key": "pin_code_additional_privilege",
"type": "number",
"title": "Величина добавочного уровня привилегий пин-кода",
"default": 0,
"x-block": "Доступ"
},
{
"key": "on_guard_automation_point",
"type": "boolean",
"title": "Точка прохода используется для автопостановки на охрану личной точки сотрудника",
"default": false,
"x-block": "Доступ"
},
{
"key": "access_with_card_confirmation",
"type": "string",
"enum": [
"NEVER",
"ALWAYS",
"ENOUGH_PRIVILEGE",
"NOT_ENOUGH_PRIVILEGE"
],
"enumName": [
"Нет",
"Всегда",
"При достаточном уровне привилегий",
"При недостаточном уровне привилегий"
],
"title": "Проход с подтверждением картой",
"default": "NEVER",
"x-block": "Доступ"
},
{
"key": "block_during_external_confirmation",
"type": "boolean",
"title": "Блокировать ТП при ожидании подтверждения внешней системой",
"default": false,
"x-block": "Доступ"
},
{
"key": "activate_lock_when_access_allowed",
"type": "boolean",
"title": "Реле замка 1 активировать при разрешенном проходе (створка двери)",
"default": true,
"x-block": "Доступ"
},
{
"key": "activate_lock2_when_access_allowed",
"type": "boolean",
"title": "Реле замка 2 активировать при разрешенном проходе (створка двери)",
"default": true,
"x-block": "Доступ"
}
]
},
"additional_params": {
"title": "Дополнительные параметры",
"type": "object",
"properties": {}
}
},
"required": []
}
}
}
}

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

Параметры и ответы по OpenAPI
{
"summary": "Get schema for access point type",
"description": "Retrieve the schema for the given access point type.",
"parameters": [
{
"in": "path",
"name": "type",
"description": "The type of the access point.",
"required": true,
"schema": {
"type": "string",
"enum": [
"single",
"double",
"turnstile",
"turnstile_with_card_box",
"lift",
"mantrap",
"barrier"
]
}
}
],
"responses": {
"200": {
"description": "Successful response. Returns the schema for the given access point type.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"message": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "An error occurred. The reason is in the response body.",
"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/access_points/schema/{type}" \
-H "Authorization: Bearer <token>"

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

{
"success": true,
"message": {}
}

GET /access_points/self

Раздел: Точки прохода.

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

Параметры и ответы по OpenAPI
{
"description": "Возвращает список точек доступа вэб турникета контроллера на который отправлен запрос.",
"responses": {
"200": {
"description": "Список точек доступа успешно возвращён",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
}
},
"400": {
"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"
}
}
}
}
}
}
},
"deprecated": true
}

Примеры по OpenAPI

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

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

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

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

[
{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}
]

POST /access_points/single

Раздел: Точки прохода.

Добавляет новую точку прохода - Одностороннюю

Источник в Teamly

Назначение

URL запроса

Добавляет новую точку прохода - Одностороннюю

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

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

Название

Тип

Описание

access_point*

object (body)

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 409 (Access point already exists) - запрос не выполнен, ТП с таким uuid уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Add new single-side access point",
"requestBody": {
"description": "Creates new single-side access point",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"201": {
"description": "Access point successfully created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Access point already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

curl -k -X POST "https://{IP_контроллера}/api/v1/access_points/single" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

PUT /access_points/single/{uuid}

Раздел: Точки прохода.

Редактирует существующую точку прохода – одностороннюю по uuid

Источник в Teamly

Назначение

URL запроса

Редактирует существующую точку прохода – одностороннюю по uuid

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

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

Название

Тип

Описание

uuid*

access_point*

string (path)

object (body)

UUID точки прохода

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная ТП не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Modify single-side access point data",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "Access point successfully updated",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid 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 access point 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/access_points/single/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

POST /access_points/turnstile

Раздел: Точки прохода.

Добавляет новую точку прохода - Турникет

Источник в Teamly

Назначение

URL запроса

Добавляет новую точку прохода - Турникет

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

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

Название

Тип

Описание

access_point*

object (body)

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 409 (Access point already exists) - запрос не выполнен, ТП с таким uuid уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Add new turnstile access point",
"requestBody": {
"description": "Creates new turnstile access point",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"201": {
"description": "Access point successfully created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Access point already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

curl -k -X POST "https://{IP_контроллера}/api/v1/access_points/turnstile" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

PUT /access_points/turnstile/{uuid}

Раздел: Точки прохода.

Редактирует существующую точку прохода – турникет по uuid

Источник в Teamly

Назначение

URL запроса

Редактирует существующую точку прохода – одностороннюю по uuid

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

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

Название

Тип

Описание

uuid*

access_point*

string (path)

object (body)

UUID точки прохода

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная ТП не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Modify turnstile access point data",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "Access point successfully updated",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid 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 access point 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/access_points/turnstile/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

POST /access_points/turnstile_with_card_box

Раздел: Точки прохода.

Добавляет новую точку прохода - Турникет с картоприемником

Источник в Teamly

Назначение

URL запроса

Добавляет новую точку прохода - Турникет с картоприемником

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

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

Название

Тип

Описание

access_point*

object (body)

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 409 (Access point already exists) - запрос не выполнен, ТП с таким uuid уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Add new turnstile with card box access point",
"requestBody": {
"description": "Creates new turnstile access point",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"201": {
"description": "Access point successfully created",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Access point already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

curl -k -X POST "https://{IP_контроллера}/api/v1/access_points/turnstile_with_card_box" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

PUT /access_points/turnstile_with_card_box/{uuid}

Раздел: Точки прохода.

Редактирует существующую точку прохода - турникет с картоприемником

Источник в Teamly

Назначение

URL запроса

Редактирует существующую точку прохода – турникет с картоприемником по uuid

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

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

Название

Тип

Описание

uuid*

access_point*

string (path)

object (body)

UUID точки прохода

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип ТП

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная ТП не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Modify turnstile with card box access point data",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"responses": {
"200": {
"description": "Access point successfully updated",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid 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 access point 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/access_points/turnstile_with_card_box/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}'

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

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

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

GET /access_points/{uuid}

Раздел: Точки прохода.

Возвращает параметры конкретной точки прохода по uuid

Источник в Teamly

Назначение

URL запроса

Возвращает параметры конкретной точки прохода по uuid

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

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

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

Описание

uuid* string (path)

UUID точки прохода

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

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

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

Тип

Формат

Назначение

uuid*

string

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

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

type*

string

[single - односторонняя, double - двусторонняя, turnstile - турникет, turnstile_with_card_box – турникет с картоприемником, barrier – шлагбаум, mantrap - шлюз]

Тип точки прохода

name*

string

minLength: 1

Название ТП

privilege*

integer

minimum: 0

Уровень привилегий

Пример:

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 0,
"additionalProp1": {}
}

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная точка прохода не существует

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

Параметры и ответы по OpenAPI
{
"description": "Get specified access point",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully got access point with specified uuid",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"type",
"name",
"state",
"privilege"
],
"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}$"
},
"type": {
"type": "string"
},
"name": {
"type": "string",
"minLength": 1
},
"privilege": {
"type": "integer",
"minimum": 0
},
"state": {
"type": "string",
"description": "Состояние меняется отдельным методом /access_points/{uuid}/state/{state}",
"deprecated": true
}
},
"additionalProperties": true
}
}
}
},
"404": {
"description": "Specified access point 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/access_points/{uuid}" \
-H "Authorization: Bearer <token>"

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

{
"uuid": "string",
"type": "string",
"name": "string",
"privilege": 1,
"state": "string"
}

DELETE /access_points/{uuid}

Раздел: Точки прохода.

Удаляет существующую точку прохода

Источник в Teamly

Назначение

URL запроса

Удаляет существующую точку прохода

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

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

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

Описание

uuid* string (path)

UUID точки прохода

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

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

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

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная ТП не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Delete access point",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Access point has been successfully deleted",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified access point 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/access_points/{uuid}" \
-H "Authorization: Bearer <token>"

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

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

DELETE /access_points/{uuid}/alert_state

Раздел: Точки прохода.

Сбрасывает тревожное состояние точки прохода

Источник в Teamly

Назначение

URL запроса

Сбрасывает тревожное состояние точки прохода

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

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

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

Описание

uuid* string (path)

UUID точки прохода

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

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

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

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

Code 404 (Specified access point does not exist) - запрос не выполнен, указанная ТП не найдена

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

Параметры и ответы по OpenAPI
{
"description": "Сбросить тревожное состояние точки прохода",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"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": "Точка прохода не находится в тревожном состоянии",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Точка прохода не найдена",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Ошибка сервера",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

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

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

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

POST /access_points/{uuid}/state/{state}

Раздел: Точки прохода.

Передает точке прохода режим работы

Источник в Teamly

Назначение

URL запроса

Передает точке прохода режим работы

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

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

Название

Тип

Описание

uuid*

state*

string (path)

string (path)

[NORMAL - Дежурный,

BLOCKED - Заблокирована

BLOCKED_SIDE_A - Заблокирована со стороны А

BLOCKED_SIDE_B - Заблокирована со стороны В

UNBLOCKED - Разблокирован

GUARDED - На охране]

UUID точки прохода

Режим работы точки прохода

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

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

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

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

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

Параметры и ответы по OpenAPI
{
"description": "Set access point state",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"example": "123e4567-e89b-12d3-a456-426614174000"
}
},
{
"in": "path",
"name": "state",
"schema": {
"type": "string",
"enum": [
"NORMAL",
"BLOCKED",
"BLOCKED_SIDE_A",
"BLOCKED_SIDE_B",
"UNBLOCKED",
"UNBLOCKED_SIDE_A",
"UNBLOCKED_SIDE_B",
"GUARDED"
]
},
"required": true
}
],
"responses": {
"200": {
"description": "Successfully set access point state",
"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"
}
}
}
}
}
},
"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/access_points/{uuid}/state/{state}" \
-H "Authorization: Bearer <token>"

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

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

GET /access_points_automations

Раздел: Точки прохода.

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

Источник в Teamly

Назначение

URL запроса

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

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

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

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

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

Тип

Формат

Назначение

uuid*

string

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

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

name*

string

minLength: 1

Название ТП

access_points*

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 точек прохода

sensor

string

Датчик срабатывания в формате: “uuid:адрес”

code

integer

minimum: 10, maximum: 99

Код активации

sensor_type

string

[NC – нормально замкнутый, NO – нормально разомкнутый]

Тип датчика

sensor_line_control

boolean

true – Включен, false - Выключен

Контроль линии

access_points_state*

string

[NORMAL - Дежурный, BLOCKED - Заблокирована, BLOCKED_SIDE_A – Заблокирована сторона А, BLOCKED_SIDE_B – Заблокирована сторона В, UNBLOCKED - Разблокирована, GUARDED – На охране]

Сменить режим работы

return_to_initial_state

boolean

true – По датчику/таймеру false - Нет

Возвращать в исходный режим

state_return_timeout_sec

integer

minimum: 5

Таймаут возврата в исходный режим в секундах

Пример:

{
"uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"access_points": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"sensor": "string",
"code": 99,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}

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

Параметры и ответы по OpenAPI
{
"description": "Get all access points automations",
"responses": {
"200": {
"description": "Successfully received all automations",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"access_points",
"access_points_state"
],
"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}$",
"format": "uuid"
},
"name": {
"type": "string"
},
"access_points": {
"type": "array",
"items": {
"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}$",
"format": "uuid"
}
},
"sensor": {
"description": "Sensor to trigger automation",
"type": "string"
},
"code": {
"type": "integer",
"minimum": 10,
"maximum": 99
},
"sensor_type": {
"type": "string",
"enum": [
"NC",
"NO"
]
},
"sensor_line_control": {
"type": "boolean",
"description": "Check sensor to work properly"
},
"access_points_state": {
"type": "string",
"enum": [
"NORMAL",
"BLOCKED",
"BLOCKED_SIDE_A",
"BLOCKED_SIDE_B",
"UNBLOCKED_SIDE_A",
"UNBLOCKED_SIDE_B",
"UNBLOCKED",
"GUARDED"
],
"description": "State to which access points will be set on automation being triggered"
},
"return_to_initial_state": {
"type": "boolean",
"description": "Return access points to initial by sensor back to normal or by timeout (if specified)"
},
"state_return_timeout_sec": {
"type": "integer",
"minimum": 5,
"description": "Timeout after which to return access points back to initial state"
}
}
}
}
}
},
"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 GET "https://{IP_контроллера}/api/v1/access_points_automations" \
-H "Authorization: Bearer <token>"

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

{
"uuid": "00000000-0000-4000-8000-000000000000",
"name": "string",
"access_points": [
"00000000-0000-4000-8000-000000000000"
],
"sensor": "string",
"code": 10,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}

POST /access_points_automations

Раздел: Точки прохода.

Добавляет автоматизацию для точки прохода

Источник в Teamly

Назначение

URL запроса

Добавляет автоматизацию для точки прохода

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

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

Название

Тип

Описание

access_points_automation*

object (body)

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

name*

string

minLength: 1

Название ТП

access_points*

string

minLength: 1

Список UUID точек прохода

sensor

string

[uuid:адрес]

Датчик срабатывания

code

integer

minimum: 10, maximum: 99

Код активации

sensor_type

string

[NC – нормально замкнутый, NO – нормально разомкнутый]

Тип датчика

sensor_line_control

boolean

true – Включен, false - Выключен

Контроль линии

access_points_state*

string

[NORMAL - Дежурный, BLOCKED - Заблокирована, BLOCKED_SIDE_A – Заблокирована сторона А, BLOCKED_SIDE_B – Заблокирована сторона В, UNBLOCKED - Разблокирована, GUARDED – На охране]

Сменить режим работы на

return_to_initial_state

boolean

true – По датчику/таймеру false - Нет

Возвращать в исходный режим

state_return_timeout_sec

integer

minimum: 5

Таймаут возврата в исходный режим в секундах

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

Code 409 (Access point already exists) - запрос не выполнен, ТП с таким uuid уже добавлена

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

Параметры и ответы по OpenAPI
{
"description": "Create new access points automations",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"access_points",
"access_points_state"
],
"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}$",
"format": "uuid"
},
"name": {
"type": "string"
},
"access_points": {
"type": "array",
"items": {
"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}$",
"format": "uuid"
}
},
"sensor": {
"description": "Sensor to trigger automation",
"type": "string"
},
"code": {
"type": "integer",
"minimum": 10,
"maximum": 99
},
"sensor_type": {
"type": "string",
"enum": [
"NC",
"NO"
]
},
"sensor_line_control": {
"type": "boolean",
"description": "Check sensor to work properly"
},
"access_points_state": {
"type": "string",
"enum": [
"NORMAL",
"BLOCKED",
"BLOCKED_SIDE_A",
"BLOCKED_SIDE_B",
"UNBLOCKED_SIDE_A",
"UNBLOCKED_SIDE_B",
"UNBLOCKED",
"GUARDED"
],
"description": "State to which access points will be set on automation being triggered"
},
"return_to_initial_state": {
"type": "boolean",
"description": "Return access points to initial by sensor back to normal or by timeout (if specified)"
},
"state_return_timeout_sec": {
"type": "integer",
"minimum": 5,
"description": "Timeout after which to return access points back to initial state"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Successfully created new automation",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Bad parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "Automation with specified UUID already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "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/access_points_automations" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "00000000-0000-4000-8000-000000000000",
"name": "string",
"access_points": [
"00000000-0000-4000-8000-000000000000"
],
"sensor": "string",
"code": 10,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}'

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

{
"uuid": "00000000-0000-4000-8000-000000000000",
"name": "string",
"access_points": [
"00000000-0000-4000-8000-000000000000"
],
"sensor": "string",
"code": 10,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}

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

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

GET /access_points_automations/{uuid}

Раздел: Точки прохода.

Возвращает список настроек конкретной автоматизации точки прохода по uuid

Источник в Teamly

Назначение

URL запроса

Возвращает список настроек конкретной автоматизации точки прохода по uuid

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

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

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

Описание

uuid* string (path)

UUID автоматизации точки прохода

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

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

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

Тип

Формат

Назначение

uuid*

string

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

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

name*

string

minLength: 1

Название ТП

access_points*

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 точек прохода

sensor

string

Датчик срабатывания в формате: “uuid:адрес”

code

integer

minimum: 10, maximum: 99

Код активации

sensor_type

string

[NC – нормально замкнутый, NO – нормально разомкнутый]

Тип датчика

sensor_line_control

boolean

true – Включен, false - Выключен

Контроль линии

access_points_state*

string

[NORMAL - Дежурный, BLOCKED - Заблокирована, BLOCKED_SIDE_A – Заблокирована сторона А, BLOCKED_SIDE_B – Заблокирована сторона В, UNBLOCKED - Разблокирована, GUARDED – На охране]

Сменить режим работы

return_to_initial_state

boolean

true – По датчику/таймеру false - Нет

Возвращать в исходный режим

state_return_timeout_sec

integer

minimum: 5

Таймаут возврата в исходный режим в секундах

Пример:

{
"uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"access_points": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"sensor": "string",
"code": 99,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}

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

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

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

Параметры и ответы по OpenAPI
{
"description": "Get access points automation points automation by UUID",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"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}$",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully received automation",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"access_points",
"access_points_state"
],
"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}$",
"format": "uuid"
},
"name": {
"type": "string"
},
"access_points": {
"type": "array",
"items": {
"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}$",
"format": "uuid"
}
},
"sensor": {
"description": "Sensor to trigger automation",
"type": "string"
},
"code": {
"type": "integer",
"minimum": 10,
"maximum": 99
},
"sensor_type": {
"type": "string",
"enum": [
"NC",
"NO"
]
},
"sensor_line_control": {
"type": "boolean",
"description": "Check sensor to work properly"
},
"access_points_state": {
"type": "string",
"enum": [
"NORMAL",
"BLOCKED",
"BLOCKED_SIDE_A",
"BLOCKED_SIDE_B",
"UNBLOCKED_SIDE_A",
"UNBLOCKED_SIDE_B",
"UNBLOCKED",
"GUARDED"
],
"description": "State to which access points will be set on automation being triggered"
},
"return_to_initial_state": {
"type": "boolean",
"description": "Return access points to initial by sensor back to normal or by timeout (if specified)"
},
"state_return_timeout_sec": {
"type": "integer",
"minimum": 5,
"description": "Timeout after which to return access points back to initial state"
}
}
}
}
}
},
"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 automation 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": "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 GET "https://{IP_контроллера}/api/v1/access_points_automations/{uuid}" \
-H "Authorization: Bearer <token>"

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

{
"uuid": "00000000-0000-4000-8000-000000000000",
"name": "string",
"access_points": [
"00000000-0000-4000-8000-000000000000"
],
"sensor": "string",
"code": 10,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}

PUT /access_points_automations/{uuid}

Раздел: Точки прохода.

Редактирует существующую автоматизацию точки прохода

Источник в Teamly

Назначение

URL запроса

Редактирует существующую автоматизацию точки прохода

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

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

Название

Тип

Описание

uuid*

access_points_automation*

string (path)

object (body)

UUID автоматизации точки прохода

Тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

UUID ТП

name*

string

minLength: 1

Название ТП

access_points*

string

minLength: 1

Список UUID точек прохода

sensor

string

[uuid:адрес]

Датчик срабатывания

code

integer

minimum: 10, maximum: 99

Код активации

sensor_type

string

[NC – нормально замкнутый, NO – нормально разомкнутый]

Тип датчика

sensor_line_control

boolean

true – Включен, false - Выключен

Контроль линии

access_points_state*

string

[NORMAL - Дежурный, BLOCKED - Заблокирована, BLOCKED_SIDE_A – Заблокирована сторона А, BLOCKED_SIDE_B – Заблокирована сторона В, UNBLOCKED - Разблокирована, GUARDED – На охране]

Сменить режим работы на

return_to_initial_state

boolean

true – По датчику/таймеру false - Нет

Возвращать в исходный режим

state_return_timeout_sec

integer

minimum: 5

Таймаут возврата в исходный режим в секундах

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

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

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

Code 207 (Can`t update state) - запрос не выполнен, не удается обновить состояние ТП

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

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

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

Параметры и ответы по OpenAPI
{
"description": "Update specified access points automation data",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"access_points",
"access_points_state"
],
"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}$",
"format": "uuid"
},
"name": {
"type": "string"
},
"access_points": {
"type": "array",
"items": {
"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}$",
"format": "uuid"
}
},
"sensor": {
"description": "Sensor to trigger automation",
"type": "string"
},
"code": {
"type": "integer",
"minimum": 10,
"maximum": 99
},
"sensor_type": {
"type": "string",
"enum": [
"NC",
"NO"
]
},
"sensor_line_control": {
"type": "boolean",
"description": "Check sensor to work properly"
},
"access_points_state": {
"type": "string",
"enum": [
"NORMAL",
"BLOCKED",
"BLOCKED_SIDE_A",
"BLOCKED_SIDE_B",
"UNBLOCKED_SIDE_A",
"UNBLOCKED_SIDE_B",
"UNBLOCKED",
"GUARDED"
],
"description": "State to which access points will be set on automation being triggered"
},
"return_to_initial_state": {
"type": "boolean",
"description": "Return access points to initial by sensor back to normal or by timeout (if specified)"
},
"state_return_timeout_sec": {
"type": "integer",
"minimum": 5,
"description": "Timeout after which to return access points back to initial state"
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successfully updated automation data",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"access_points",
"access_points_state"
],
"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}$",
"format": "uuid"
},
"name": {
"type": "string"
},
"access_points": {
"type": "array",
"items": {
"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}$",
"format": "uuid"
}
},
"sensor": {
"description": "Sensor to trigger automation",
"type": "string"
},
"code": {
"type": "integer",
"minimum": 10,
"maximum": 99
},
"sensor_type": {
"type": "string",
"enum": [
"NC",
"NO"
]
},
"sensor_line_control": {
"type": "boolean",
"description": "Check sensor to work properly"
},
"access_points_state": {
"type": "string",
"enum": [
"NORMAL",
"BLOCKED",
"BLOCKED_SIDE_A",
"BLOCKED_SIDE_B",
"UNBLOCKED_SIDE_A",
"UNBLOCKED_SIDE_B",
"UNBLOCKED",
"GUARDED"
],
"description": "State to which access points will be set on automation being triggered"
},
"return_to_initial_state": {
"type": "boolean",
"description": "Return access points to initial by sensor back to normal or by timeout (if specified)"
},
"state_return_timeout_sec": {
"type": "integer",
"minimum": 5,
"description": "Timeout after which to return access points back to initial state"
}
}
}
}
}
},
"207": {
"description": "Can`t update state",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
}
}
}
}
}
}
}
},
"400": {
"description": "Invalid parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified automation 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": "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 PUT "https://{IP_контроллера}/api/v1/access_points_automations/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "00000000-0000-4000-8000-000000000000",
"name": "string",
"access_points": [
"00000000-0000-4000-8000-000000000000"
],
"sensor": "string",
"code": 10,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}'

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

{
"uuid": "00000000-0000-4000-8000-000000000000",
"name": "string",
"access_points": [
"00000000-0000-4000-8000-000000000000"
],
"sensor": "string",
"code": 10,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}

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

{
"uuid": "00000000-0000-4000-8000-000000000000",
"name": "string",
"access_points": [
"00000000-0000-4000-8000-000000000000"
],
"sensor": "string",
"code": 10,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}

DELETE /access_points_automations/{uuid}

Раздел: Точки прохода.

Удаляет существующую автоматизацию точки прохода

Источник в Teamly

Назначение

URL запроса

Удаляет существующую автоматизацию точки прохода

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

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

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

Описание

uuid* string (path)

UUID точки прохода

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

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

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

Code 400 (Invalid UUID) - запрос не выполнен, неверно указанный UUID не найден

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

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

Параметры и ответы по OpenAPI
{
"description": "Delete specified access points automation",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Successfully deleted specified automation",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"access_points",
"access_points_state"
],
"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}$",
"format": "uuid"
},
"name": {
"type": "string"
},
"access_points": {
"type": "array",
"items": {
"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}$",
"format": "uuid"
}
},
"sensor": {
"description": "Sensor to trigger automation",
"type": "string"
},
"code": {
"type": "integer",
"minimum": 10,
"maximum": 99
},
"sensor_type": {
"type": "string",
"enum": [
"NC",
"NO"
]
},
"sensor_line_control": {
"type": "boolean",
"description": "Check sensor to work properly"
},
"access_points_state": {
"type": "string",
"enum": [
"NORMAL",
"BLOCKED",
"BLOCKED_SIDE_A",
"BLOCKED_SIDE_B",
"UNBLOCKED_SIDE_A",
"UNBLOCKED_SIDE_B",
"UNBLOCKED",
"GUARDED"
],
"description": "State to which access points will be set on automation being triggered"
},
"return_to_initial_state": {
"type": "boolean",
"description": "Return access points to initial by sensor back to normal or by timeout (if specified)"
},
"state_return_timeout_sec": {
"type": "integer",
"minimum": 5,
"description": "Timeout after which to return access points back to initial state"
}
}
}
}
}
},
"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 automation 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": "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 DELETE "https://{IP_контроллера}/api/v1/access_points_automations/{uuid}" \
-H "Authorization: Bearer <token>"

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

{
"uuid": "00000000-0000-4000-8000-000000000000",
"name": "string",
"access_points": [
"00000000-0000-4000-8000-000000000000"
],
"sensor": "string",
"code": 10,
"sensor_type": "NC",
"sensor_line_control": true,
"access_points_state": "NORMAL",
"return_to_initial_state": true,
"state_return_timeout_sec": 5
}