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

Профили доступа API 1.7.0

Методы API для работы с разделом «Профили доступа».

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

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

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

МетодПуть
GET/access_profiles
POST/access_profiles
GET/access_profiles/{uuid}
PUT/access_profiles/{uuid}
DELETE/access_profiles/{uuid}

GET /access_profiles

Раздел: Профили доступа.

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

Источник в Teamly

Назначение

URL запроса

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

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

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

Отсутствуют

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

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

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

Тип

Формат

Назначение

uuid*

string

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

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

name*

string

minLength: 1

access_points* [{

uuid*

string

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

schedule_uuid*

string

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

расписание доступа

sides {

string

Варианты

"" (пустая строка) - круглосуточный доступ

"diff" - разные стороны

UUID - уникальный идентификатор расписание

расписание для точек прохода по сторонам

side_a_terra

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}$

уникальный идентификатор расписания доступа для стороны А

side_b_terra

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}$

уникальный идентификатор расписания доступа для стороны B

}

floors {< * >}

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”:”х:у”

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

х - номер этажа

у - контроль доступа на этаж, настраиваемый на точке прохода, 1 - включен, 0 - выключен

расписание доступа для этажей

}]

Пример:

[{
"uuid": "662d6401-4471-11f1-9f8e-53d4d6bb592f",
"name": "Все точки",
"access_points": [{
"uuid": "3e4c9860-4de6-11f1-b374-057c15e55d12",
"schedule_uuid": "diff",
"sides": {
"side_a_terra": "0b7402b1-503f-11f1-9e4a-975446c45c79",
"side_b_terra": ""
}
}]
},
{
"uuid": "90878bc1-503f-11f1-9e4a-975446c45c79",
"name": "222",
"access_points": [{
"uuid": "41178c20-503f-11f1-9e4a-975446c45c79",
"schedule_uuid": "0b7402b1-503f-11f1-9e4a-975446c45c79",
"floors": {
"49ac0cd0-503f-11f1-9e4a-975446c45c79": "1:1",
"48b94860-503f-11f1-9e4a-975446c45c79": "0:0"
}
}]
}]

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

Параметры и ответы по OpenAPI
{
"description": "Returns all access profiles",
"parameters": [],
"responses": {
"200": {
"description": "Successfully got all access profiles",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"name",
"access_points"
],
"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}$"
},
"name": {
"type": "string",
"minLength": 1
},
"access_points": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"schedule_uuid"
],
"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}$"
},
"schedule_uuid": {
"type": "string",
"pattern": "^(|[Dd][Ii][Ff]{2}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
"description": "- \"\" (пустая строка) - круглосуточный доступ\n- \"diff\" - разные стороны\n- UUID - расписание\n"
},
"floors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"sides": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string",
"enum": [
""
],
"description": "Пустая строка для круглосуточного доступа"
},
{
"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}$"
}
]
},
"example": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
}
}
}
}
}
}
}
}
},
"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_profiles" \
-H "Authorization: Bearer <token>"

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

[
{
"uuid": "string",
"name": "string",
"access_points": [
{
"uuid": "string",
"schedule_uuid": "string",
"floors": {},
"sides": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
]
}
]

POST /access_profiles

Раздел: Профили доступа.

Добавляет новый профиль доступа

Источник в Teamly

Назначение

URL запроса

Добавляет новый профиль доступа

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

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

Название

Тип

Описание

access_profile*

object (body)

тело запроса - обязательный параметр

BODY

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

Тип

Формат

Назначение

uuid*

string

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

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

name*

string

minLength: 1

access_points* [{

uuid*

string

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

schedule_uuid*

string

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

расписание доступа

sides {

string

Варианты

"" (пустая строка) - круглосуточный доступ

"diff" - разные стороны

UUID - уникальный идентификатор расписание

расписание для точек прохода по сторонам

side_a_terra

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}$

уникальный идентификатор расписания доступа для стороны А

side_b_terra

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}$

уникальный идентификатор расписания доступа для стороны B

}

floors {< * >}

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”:”х:у”

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

х - номер этажа

у - контроль доступа на этаж, настраиваемый на точке прохода, 1 - включен, 0 - выключен

расписание доступа для этажей

}]

Пример:

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

Body для точки прохода со сторонами

{
"uuid": "662d6401-4471-11f1-9f8e-53d4d6bb592f",
"name": "Все точки",
"access_points": [{
"uuid": "3e4c9860-4de6-11f1-b374-057c15e55d12",
"schedule_uuid": "diff",
"sides": {
"side_a_terra": "0b7402b1-503f-11f1-9e4a-975446c45c79",
"side_b_terra": ""
}
}]
}

Body для точки прохода с этажам

{
"uuid": "90878bc1-503f-11f1-9e4a-975446c45c79",
"name": "222",
"access_points": [{
"uuid": "41178c20-503f-11f1-9e4a-975446c45c79",
"schedule_uuid": "0b7402b1-503f-11f1-9e4a-975446c45c79",
"floors": {
"49ac0cd0-503f-11f1-9e4a-975446c45c79": "1:1",
"48b94860-503f-11f1-9e4a-975446c45c79": "0:0"
}
}]
}

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

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

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

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

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

Параметры и ответы по OpenAPI
{
"description": "Add new access profile",
"requestBody": {
"description": "New access profile properties",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"access_points"
],
"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}$"
},
"name": {
"type": "string",
"minLength": 1
},
"access_points": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"schedule_uuid"
],
"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}$"
},
"schedule_uuid": {
"type": "string",
"pattern": "^(|[Dd][Ii][Ff]{2}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
"description": "- \"\" (пустая строка) - круглосуточный доступ\n- \"diff\" - разные стороны\n- UUID - расписание\n"
},
"floors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"sides": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string",
"enum": [
""
],
"description": "Пустая строка для круглосуточного доступа"
},
{
"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}$"
}
]
},
"example": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
}
}
}
}
}
}
}
},
"responses": {
"201": {
"description": "Successfully created new access profile"
},
"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 profile 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_profiles" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"name": "string",
"access_points": [
{
"uuid": "string",
"schedule_uuid": "string",
"floors": {},
"sides": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
]
}'

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

{
"uuid": "string",
"name": "string",
"access_points": [
{
"uuid": "string",
"schedule_uuid": "string",
"floors": {},
"sides": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
]
}

GET /access_profiles/{uuid}

Раздел: Профили доступа.

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

Источник в Teamly

Назначение

URL запроса

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

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

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

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

Описание

uuid* string (path)

uuid профиля доступа - обязательный параметр

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

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

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

Тип

Формат

Назначение

uuid*

string

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

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

name*

string

minLength: 1

access_points* [{

uuid*

string

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

schedule_uuid*

string

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

расписание доступа

sides {

string

Варианты

"" (пустая строка) - круглосуточный доступ

"diff" - разные стороны

UUID - уникальный идентификатор расписание

расписание для точек прохода по сторонам

side_a_terra

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}$

уникальный идентификатор расписания доступа для стороны А

side_b_terra

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}$

уникальный идентификатор расписания доступа для стороны B

}

floors {< * >}

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”:”х:у”

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

х - номер этажа

у - контроль доступа на этаж, настраиваемый на точке прохода, 1 - включен, 0 - выключен

расписание доступа для этажей

}]

Пример:

{
"uuid": "662d6401-4471-11f1-9f8e-53d4d6bb592f",
"name": "Все точки",
"access_points": [{
"uuid": "3e4c9860-4de6-11f1-b374-057c15e55d12",
"schedule_uuid": "diff",
"sides": {
"side_a_terra": "0b7402b1-503f-11f1-9e4a-975446c45c79",
"side_b_terra": ""
}
}]
}

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

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

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

Параметры и ответы по OpenAPI
{
"description": "Get specified access profile",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Got specified access profile",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"access_points"
],
"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}$"
},
"name": {
"type": "string",
"minLength": 1
},
"access_points": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"schedule_uuid"
],
"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}$"
},
"schedule_uuid": {
"type": "string",
"pattern": "^(|[Dd][Ii][Ff]{2}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
"description": "- \"\" (пустая строка) - круглосуточный доступ\n- \"diff\" - разные стороны\n- UUID - расписание\n"
},
"floors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"sides": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string",
"enum": [
""
],
"description": "Пустая строка для круглосуточного доступа"
},
{
"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}$"
}
]
},
"example": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
}
}
}
}
}
}
}
},
"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 access profile was not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}

Примеры по OpenAPI

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

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

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

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

{
"uuid": "string",
"name": "string",
"access_points": [
{
"uuid": "string",
"schedule_uuid": "string",
"floors": {},
"sides": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
]
}

PUT /access_profiles/{uuid}

Раздел: Профили доступа.

Редактирует существующий профиль доступа

Источник в Teamly

Назначение

URL запроса

Редактирует существующий профиль доступа

https://{IP_контроллера}/api/v1/access_profile/999794e4-79df-4ab0-9fa2-6bcae3affcf1

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

Название

Тип

Описание

uuid*

string

uuid профиля доступа

access_profile*

object (body)

тело запроса

BODY

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

Тип

Формат

Назначение

uuid*

string

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

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

name*

string

minLength: 1

access_points* [{

uuid*

string

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

schedule_uuid*

string

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

расписание доступа

sides {

string

Варианты

"" (пустая строка) - круглосуточный доступ

"diff" - разные стороны

UUID - уникальный идентификатор расписание

расписание для точек прохода по сторонам

side_a_terra

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}$

уникальный идентификатор расписания доступа для стороны А

side_b_terra

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}$

уникальный идентификатор расписания доступа для стороны B

}

floors {< * >}

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”:”х:у”

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

х - номер этажа

у - контроль доступа на этаж, настраиваемый на точке прохода, 1 - включен, 0 - выключен

расписание доступа для этажей

}]

Пример:

URL запроса: PUT

https://{IP_контроллера}/api/v1/access_profile/999794e4-79df-4ab0-9fa2-6bcae3affcf1

Body для точки прохода со сторонами

{
"uuid": "662d6401-4471-11f1-9f8e-53d4d6bb592f",
"name": "Все точки",
"access_points": [{
"uuid": "3e4c9860-4de6-11f1-b374-057c15e55d12",
"schedule_uuid": "diff",
"sides": {
"side_a_terra": "0b7402b1-503f-11f1-9e4a-975446c45c79",
"side_b_terra": ""
}
}]
}

Body для точки прохода с этажам

{
"uuid": "90878bc1-503f-11f1-9e4a-975446c45c79",
"name": "222",
"access_points": [{
"uuid": "41178c20-503f-11f1-9e4a-975446c45c79",
"schedule_uuid": "0b7402b1-503f-11f1-9e4a-975446c45c79",
"floors": {
"49ac0cd0-503f-11f1-9e4a-975446c45c79": "1:1",
"48b94860-503f-11f1-9e4a-975446c45c79": "0:0"
}
}]
}

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

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

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

Code 404 (Specified access profile does not exist) - запрос не выполнен, профиль доступа с указанным uuid не существует

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

Параметры и ответы по OpenAPI
{
"description": "Modify access profile",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"access_points"
],
"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}$"
},
"name": {
"type": "string",
"minLength": 1
},
"access_points": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"schedule_uuid"
],
"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}$"
},
"schedule_uuid": {
"type": "string",
"pattern": "^(|[Dd][Ii][Ff]{2}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$",
"description": "- \"\" (пустая строка) - круглосуточный доступ\n- \"diff\" - разные стороны\n- UUID - расписание\n"
},
"floors": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"sides": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string",
"enum": [
""
],
"description": "Пустая строка для круглосуточного доступа"
},
{
"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}$"
}
]
},
"example": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Access profile successfully modified",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"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 access profile 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_profiles/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"name": "string",
"access_points": [
{
"uuid": "string",
"schedule_uuid": "string",
"floors": {},
"sides": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
]
}'

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

{
"uuid": "string",
"name": "string",
"access_points": [
{
"uuid": "string",
"schedule_uuid": "string",
"floors": {},
"sides": {
"side_a_terra": "",
"side_b_terra": "d16cb3d0-efb0-11f0-9785-31d5a85912ab"
}
}
]
}

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

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

DELETE /access_profiles/{uuid}

Раздел: Профили доступа.

Удаляет существующий профиль доступа

Источник в Teamly

Назначение

URL запроса

Удаляет существующий профиль доступа

https://{IP_контроллера}/api/v1/access_profile/999794e4-79df-4ab0-9fa2-6bcae3affcf1

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

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

Описание

uuid* string (path)

uuid профиля доступа

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

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

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

Code 404 (Specified access profile does not exist) - запрос не выполнен, профиль доступа с указанным uuid не существует

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

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

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

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