R3 API 1.7.0
Методы API для работы с разделом «R3».
Базовый путь: https://{IP_контроллера}/api/v1.
Версия описания API: 1.7.0.
Примеры используют placeholder-значения для паролей, token, UUID, адресов и секретов. Перед выполнением запроса замените их на значения вашего контроллера.
Методы раздела
GET /r3/config
Раздел: R3.
Возвращает нативную конфигурацию R3.
Параметры и ответы по OpenAPI
{
"description": "Get R3 native configuration",
"responses": {
"200": {
"description": "Successfully received R3 native configuration",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"controller",
"configuration"
],
"properties": {
"controller": {
"type": "string",
"description": "Controller serial"
},
"configuration": {
"type": "object",
"required": [
"devices",
"sec_zones"
],
"properties": {
"devices": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"deviceType"
],
"properties": {
"address": {
"type": "integer",
"minimum": 0
},
"deviceType": {
"type": "integer"
},
"description": {
"type": "string"
}
}
}
},
"sec_zones": {
"type": "array",
"items": {
"type": "object",
"required": [
"devices",
"address",
"description"
],
"properties": {
"devices": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"zone"
],
"properties": {
"address": {
"type": "integer",
"minimum": 0
},
"zone": {
"type": "integer"
}
}
}
},
"address": {
"type": "integer",
"minimum": 0
},
"description": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"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/r3/config" \
-H "Authorization: Bearer <token>"
Пример ответа
[
{
"controller": "string",
"configuration": {
"devices": [
{
"address": 1,
"deviceType": 1,
"description": "string"
}
],
"sec_zones": [
{
"devices": [
{
"address": 1,
"zone": 1
}
],
"address": 1,
"description": "string"
}
]
}
}
]
PUT /r3/config
Раздел: R3.
Устанавливает нативную конфигурацию R3.
Параметры и ответы по OpenAPI
{
"description": "Set R3 native configuration",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"controller",
"configuration"
],
"properties": {
"controller": {
"type": "string",
"description": "Controller serial"
},
"configuration": {
"type": "object",
"required": [
"devices",
"sec_zones"
],
"properties": {
"devices": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"deviceType"
],
"properties": {
"address": {
"type": "integer",
"minimum": 0
},
"deviceType": {
"type": "integer"
},
"description": {
"type": "string"
}
}
}
},
"sec_zones": {
"type": "array",
"items": {
"type": "object",
"required": [
"devices",
"address",
"description"
],
"properties": {
"devices": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"zone"
],
"properties": {
"address": {
"type": "integer",
"minimum": 0
},
"zone": {
"type": "integer"
}
}
}
},
"address": {
"type": "integer",
"minimum": 0
},
"description": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully set new R3 configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "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/r3/config" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '[
{
"controller": "string",
"configuration": {
"devices": [
{
"address": 1,
"deviceType": 1,
"description": "string"
}
],
"sec_zones": [
{
"devices": [
{
"address": 1,
"zone": 1
}
],
"address": 1,
"description": "string"
}
]
}
}
]'
Пример тела запроса
[
{
"controller": "string",
"configuration": {
"devices": [
{
"address": 1,
"deviceType": 1,
"description": "string"
}
],
"sec_zones": [
{
"devices": [
{
"address": 1,
"zone": 1
}
],
"address": 1,
"description": "string"
}
]
}
}
]
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}
GET /r3/integration
Раздел: R3.
Возвращает конфигурацию интеграции R3.
Параметры и ответы по OpenAPI
{
"description": "Get R3 integration configuration",
"responses": {
"200": {
"description": "Successfully received R3 integration configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"state",
"connections"
],
"properties": {
"state": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"connections": {
"type": "array",
"items": {
"type": "object",
"required": [
"controller",
"ms1_address",
"ms1_baud_rate",
"zones"
],
"properties": {
"controller": {
"type": "string",
"description": "Serial of controller connected to R3"
},
"ms1_address": {
"type": "string",
"description": "Address of MS-1 module on RS485 buss"
},
"ms1_baud_rate": {
"type": "integer",
"enum": [
9600,
19200,
38400,
57600,
115200
]
},
"zones": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"access_points"
],
"properties": {
"id": {
"type": "number",
"minimum": 1,
"description": "Security zone in R3"
},
"access_points": {
"type": "array",
"items": {
"type": "string",
"description": "Access points in security zone"
}
}
}
}
}
}
}
}
}
}
}
}
},
"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/r3/integration" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"state": "ACTIVE",
"connections": [
{
"controller": "string",
"ms1_address": "string",
"ms1_baud_rate": 9600,
"zones": [
{
"id": 1.0,
"access_points": [
"string"
]
}
]
}
]
}
PUT /r3/integration
Раздел: R3.
Устанавливает конфигурацию интеграции R3.
Параметры и ответы по OpenAPI
{
"description": "Set R3 integration configuration",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"state",
"connections"
],
"properties": {
"state": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"connections": {
"type": "array",
"items": {
"type": "object",
"required": [
"controller",
"ms1_address",
"ms1_baud_rate",
"zones"
],
"properties": {
"controller": {
"type": "string",
"description": "Serial of controller connected to R3"
},
"ms1_address": {
"type": "string",
"description": "Address of MS-1 module on RS485 buss"
},
"ms1_baud_rate": {
"type": "integer",
"enum": [
9600,
19200,
38400,
57600,
115200
]
},
"zones": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"access_points"
],
"properties": {
"id": {
"type": "number",
"minimum": 1,
"description": "Security zone in R3"
},
"access_points": {
"type": "array",
"items": {
"type": "string",
"description": "Access points in security zone"
}
}
}
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully set new R3 configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "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/r3/integration" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"state": "ACTIVE",
"connections": [
{
"controller": "string",
"ms1_address": "string",
"ms1_baud_rate": 9600,
"zones": [
{
"id": 1.0,
"access_points": [
"string"
]
}
]
}
]
}'
Пример тела запроса
{
"state": "ACTIVE",
"connections": [
{
"controller": "string",
"ms1_address": "string",
"ms1_baud_rate": 9600,
"zones": [
{
"id": 1.0,
"access_points": [
"string"
]
}
]
}
]
}
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}
GET /security_integration/r3/config
Раздел: R3.
Возвращает нативную конфигурацию R3.
Параметры и ответы по OpenAPI
{
"description": "Get R3 native configuration",
"responses": {
"200": {
"description": "Successfully received R3 native configuration",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"controller",
"configuration"
],
"properties": {
"controller": {
"type": "string",
"description": "Controller serial"
},
"configuration": {
"type": "object",
"required": [
"devices",
"sec_zones"
],
"properties": {
"devices": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"deviceType"
],
"properties": {
"address": {
"type": "integer",
"minimum": 0
},
"deviceType": {
"type": "integer"
},
"description": {
"type": "string"
}
}
}
},
"sec_zones": {
"type": "array",
"items": {
"type": "object",
"required": [
"devices",
"address",
"description"
],
"properties": {
"devices": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"zone"
],
"properties": {
"address": {
"type": "integer",
"minimum": 0
},
"zone": {
"type": "integer"
}
}
}
},
"address": {
"type": "integer",
"minimum": 0
},
"description": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"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/security_integration/r3/config" \
-H "Authorization: Bearer <token>"
Пример ответа
[
{
"controller": "string",
"configuration": {
"devices": [
{
"address": 1,
"deviceType": 1,
"description": "string"
}
],
"sec_zones": [
{
"devices": [
{
"address": 1,
"zone": 1
}
],
"address": 1,
"description": "string"
}
]
}
}
]
PUT /security_integration/r3/config
Раздел: R3.
Устанавливает нативную конфигурацию R3.
Параметры и ответы по OpenAPI
{
"description": "Set R3 native configuration",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"controller",
"configuration"
],
"properties": {
"controller": {
"type": "string",
"description": "Controller serial"
},
"configuration": {
"type": "object",
"required": [
"devices",
"sec_zones"
],
"properties": {
"devices": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"deviceType"
],
"properties": {
"address": {
"type": "integer",
"minimum": 0
},
"deviceType": {
"type": "integer"
},
"description": {
"type": "string"
}
}
}
},
"sec_zones": {
"type": "array",
"items": {
"type": "object",
"required": [
"devices",
"address",
"description"
],
"properties": {
"devices": {
"type": "array",
"items": {
"type": "object",
"required": [
"address",
"zone"
],
"properties": {
"address": {
"type": "integer",
"minimum": 0
},
"zone": {
"type": "integer"
}
}
}
},
"address": {
"type": "integer",
"minimum": 0
},
"description": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully set new R3 configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "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/security_integration/r3/config" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '[
{
"controller": "string",
"configuration": {
"devices": [
{
"address": 1,
"deviceType": 1,
"description": "string"
}
],
"sec_zones": [
{
"devices": [
{
"address": 1,
"zone": 1
}
],
"address": 1,
"description": "string"
}
]
}
}
]'
Пример тела запроса
[
{
"controller": "string",
"configuration": {
"devices": [
{
"address": 1,
"deviceType": 1,
"description": "string"
}
],
"sec_zones": [
{
"devices": [
{
"address": 1,
"zone": 1
}
],
"address": 1,
"description": "string"
}
]
}
}
]
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}
GET /security_integration/r3/integration
Раздел: R3.
Возвращает конфигурацию интеграции R3.
Параметры и ответы по OpenAPI
{
"description": "Get R3 integration configuration",
"responses": {
"200": {
"description": "Successfully received R3 integration configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"state",
"connections"
],
"properties": {
"state": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"connections": {
"type": "array",
"items": {
"type": "object",
"required": [
"controller",
"ms1_address",
"ms1_baud_rate",
"zones"
],
"properties": {
"controller": {
"type": "string",
"description": "Serial of controller connected to R3"
},
"ms1_address": {
"type": "string",
"description": "Address of MS-1 module on RS485 buss"
},
"ms1_baud_rate": {
"type": "integer",
"enum": [
9600,
19200,
38400,
57600,
115200
]
},
"zones": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"access_points"
],
"properties": {
"id": {
"type": "number",
"minimum": 1,
"description": "Security zone in R3"
},
"access_points": {
"type": "array",
"items": {
"type": "string",
"description": "Access points in security zone"
}
}
}
}
}
}
}
}
}
}
}
}
},
"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/security_integration/r3/integration" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"state": "ACTIVE",
"connections": [
{
"controller": "string",
"ms1_address": "string",
"ms1_baud_rate": 9600,
"zones": [
{
"id": 1.0,
"access_points": [
"string"
]
}
]
}
]
}
PUT /security_integration/r3/integration
Раздел: R3.
Устанавливает конфигурацию интеграции R3.
Параметры и ответы по OpenAPI
{
"description": "Set R3 integration configuration",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"state",
"connections"
],
"properties": {
"state": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"connections": {
"type": "array",
"items": {
"type": "object",
"required": [
"controller",
"ms1_address",
"ms1_baud_rate",
"zones"
],
"properties": {
"controller": {
"type": "string",
"description": "Serial of controller connected to R3"
},
"ms1_address": {
"type": "string",
"description": "Address of MS-1 module on RS485 buss"
},
"ms1_baud_rate": {
"type": "integer",
"enum": [
9600,
19200,
38400,
57600,
115200
]
},
"zones": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"access_points"
],
"properties": {
"id": {
"type": "number",
"minimum": 1,
"description": "Security zone in R3"
},
"access_points": {
"type": "array",
"items": {
"type": "string",
"description": "Access points in security zone"
}
}
}
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successfully set new R3 configuration",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request parameters",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "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/security_integration/r3/integration" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"state": "ACTIVE",
"connections": [
{
"controller": "string",
"ms1_address": "string",
"ms1_baud_rate": 9600,
"zones": [
{
"id": 1.0,
"access_points": [
"string"
]
}
]
}
]
}'
Пример тела запроса
{
"state": "ACTIVE",
"connections": [
{
"controller": "string",
"ms1_address": "string",
"ms1_baud_rate": 9600,
"zones": [
{
"id": 1.0,
"access_points": [
"string"
]
}
]
}
]
}
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}