Модули СКУД API 1.7.0
Методы API для работы с разделом «Модули СКУД».
Базовый путь: https://{IP_контроллера}/api/v1.
Версия описания API: 1.7.0.
Примеры используют placeholder-значения для паролей, token, UUID, адресов и секретов. Перед выполнением запроса замените их на значения вашего контроллера.
Методы раздела
| Метод | Путь |
|---|---|
GET | /skd_modules |
POST | /skd_modules |
DELETE | /skd_modules/{id} |
GET /skd_modules
Раздел: Модули СКУД.
Возвращает список модулей СКУД.
Параметры и ответы по OpenAPI
{
"description": "Returns list of SKD Modules",
"responses": {
"200": {
"description": "Successfully returned all installed SKD Modules",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"access_point_type",
"version"
],
"properties": {
"name": {
"type": "string",
"minLength": 3
},
"access_point_type": {
"type": "string",
"enum": [
"SINGLE",
"DOUBLE",
"TURNSTILE",
"TURNSTILE_WITH_CARD_BOX",
"BARRIER",
"MANTRAP"
]
},
"version": {
"type": "string",
"minLength": 1
},
"additional_parameters": {
"type": "array",
"format": "string",
"items": {
"type": "string"
},
"description": "Additional parameters for access point"
},
"access_points_in_use": {
"type": "string",
"description": "Access points in use"
},
"module_description": {
"type": "string",
"description": "Module description"
}
}
}
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X GET "https://{IP_контроллера}/api/v1/skd_modules" \
-H "Authorization: Bearer <token>"
Пример ответа
[
{
"name": "string",
"access_point_type": "SINGLE",
"version": "string",
"additional_parameters": [
"string"
],
"access_points_in_use": "string",
"module_description": "string"
}
]
POST /skd_modules
Раздел: Модули СКУД.
Загружает новый модуль СКУД.
Параметры и ответы по OpenAPI
{
"summary": "Upload new SDK Module",
"description": "Upload new SDK Module",
"requestBody": {
"description": "JSON containing the new SDK Module",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"module": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successful operation"
},
"400": {
"description": "Invalid JSON file"
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X POST "https://{IP_контроллера}/api/v1/skd_modules" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"module": {
"name": "string"
}
}'
Пример тела запроса
{
"module": {
"name": "string"
}
}
DELETE /skd_modules/{id}
Раздел: Модули СКУД.
Удаляет модуль СКУД.
Параметры и ответы по OpenAPI
{
"summary": "Delete Skd Module",
"description": "Delete Skd Module",
"parameters": [
{
"in": "path",
"name": "id",
"description": "Module ID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful operation"
},
"400": {
"description": "Bad request"
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X DELETE "https://{IP_контроллера}/api/v1/skd_modules/{id}" \
-H "Authorization: Bearer <token>"