Skip to main content
Skip table of contents

Построение матрицы

Матрица

Построение матрицы. Размер элементов в матрице может отличаться в зависимости от типа коммутатора (switch)

JSON
{
    "switch": "metakom",
    "capacity": 20,
    "is_last_item_first": true,
    "flat_from": 1
}

POST /api/admin/v1/intercoms/{intercom}/common-matrix

Параметры метода

int intercom, Уникальный идентификатор домофона


string switch, Тип коммутатора. Все типы находятся в


integer capacity, Количество квартир в рамках 1 коммутатора, в {see:VMS Admin/Настройки/Основные конфигурации} под ключом intercom_flat_capacity


boolean is_last_item_first, Является ли последний элемент матрицы первым


200 OK

Успешный ответ

JSON
{
    "capacity": 20,
    "items": [
        [
            20,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9
        ],
        [
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19
        ]
    ]
}

401 Unauthorized

Токен авторизации не передан или не валидный

422 Unprocessable Entity

Возвращает JSON объект с ошибкой. VMS Admin/Общая информация панели администратора/Валидация администратора

JSON
{
    "message": "Тут не будет информативного сообщения",
    "errors": {
        "any_key": [
            "Тут будет описана причина ошибки"
        ]
    }
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/intercoms/{intercom}/common-matrix' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "intercom": 0,
    "switch": "string",
    "capacity": "integer",
    "is_last_item_first": "boolean",
    "matrix.": "void",
    "matrix": {
        "": "integer"
    }
}'
PHP
PHP
$data = array (
  'intercom' => 0,
  'switch' => 'string',
  'capacity' => 'integer',
  'is_last_item_first' => 'boolean',
  'matrix.' => 'void',
  'matrix' => 
  array (
    '' => 'integer',
  ),
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/intercoms/{intercom}/common-matrix', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.