Skip to main content
Skip table of contents

Обновление домофона Спутник

PATCH/api/admin/v1/intercoms/{intercom}

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

json

JSON
{
    "title": "title",
    "department": 2,
    "camera_id": 6180,
    "collecting_keys": true,
    "group_id": 217498,
    "switch": "metakom",
    "door_open_time_general": 500,
    "department_type": "main",
    "department_name": "department_name",
    "address": "г. Город, ул. Улица 1",
    "is_crossbar_switchers_enabled": true,
    "sip_credentials": {
        "server": "televoip-core.is74.ru",
        "port": 7777,
        "login": "0813c0000082",
        "password": "5eh2270j4fb0d"
    },
    "sip_options": {
        "dtmf": [
            {
                "id": 1,
                "value": "/"
            }
        ]
    },
    "flat_from": 10,
    "flat_to": 15,
    "flat_offset": "1",
    "connection_type": "matrix_switching",
    "commutators_count": 1,
    "matrix": [
        {
            "id": 1,
            "auto": false,
            "capacity": 20,
            "flat_from": 1,
            "items": [
                [
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10
                ],
                [
                    11,
                    12,
                    13,
                    14,
                    15,
                    16,
                    17,
                    18,
                    19,
                    20
                ]
            ]
        }
    ]
}

intercomoptional

int

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

titlerequired

string

Название домофона

departmentrequired

integer

Подъезд

camera_idrequired

integer

Id камеры, которая относится к домофону

collecting_keysrequired

boolean

Сбор ключей

group_idrequired

integer

Id группы, в которой находится домофон

switchrequired

string

Тип коммутатора. Все типы находятся в Основные конфигурации

door_open_time_generalrequired

integer

Время, которое дверь будет открыта после её открытия пользователем (указывается в секундах)

department_typerequired

string

Тип входа

department_namerequired

string

Название входа

addressrequired

string

Адрес

is_crossbar_switchers_enabledrequired

bool

Включена ли координатно-матричная линия (при её включении доступна настройки матрицы квартир)

sip_credentials.*.serverrequired

string

Адрес SIP сервера (ip)

sip_credentials.*.loginrequired

string

Логин пользователя

sip_credentials.*.passwordrequired

string

Пароль пользователя

sip_credentials.*.portrequired

string

Порт SIP сервера

flat_fromrequired

integer

Квартиры с

flat_torequired

integer

Квартиры по

flat_offsetrequired

integer

Смещение квартир

sip_optionsrequired

integer

Дополнительные настройки SIP сервера.

sip_options.*.dtmfrequired

array

Массив DTMF кодов для открытия двери для каждого из реле

sip_options.*.dtmf.*.idrequired

integer

Id реле

sip_options.*.dtmf.*.valuerequired

string

DTMF код открытия двери

connection_typerequired

string

Схема подключения домофона, в Основные конфигурации под ключом intercom_connection_types

commutators_countrequired

integer

Количество коммутаторов на домофоне

matrixrequired

array

Матрица квартир домофона, количество элементов в матрице равно количеству коммутаторов, при изменении одного из полей необходимо присылать целый объект

matrix.*.idrequired

integer

Id комутатора. Для домофона Спутник может быть только 1

matrix.*.autorequired

boolean

Заполняется ли матрица автоматически:

1. Если false – Необходимо сделать запрос на см. Получение матрицы и отдать пользователю для заполнения, и только после этого с этой матрицей обновить домофон

2. Если true – Матрица будет заполнена автоматически и отобразится после обновления домофона

matrix.*.capacityrequired

integer

Количество квартир в рамках 1 коммутатора. Значение должно быть между flat_from и flat_to

matrix.*.flat_fromrequired

integer

Номер первой квартиры в матрице

matrix.*.is_last_item_firstrequired

boolean

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

Response

200

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

JSON
{
    "id": 14,
    "title": "interconnection",
    "is_online": true,
    "group_id": 4,
    "camera_id": 1,
    "flat_from": 1,
    "flat_to": 100,
    "flat_offset": null,
    "department": 2,
    "department_name": "main enter",
    "department_type": "main",
    "department_type_pretty": "Вход",
    "uuid": "5cf7e12b-a91b-4569-bf0c-bbe05718da3c",
    "address": "addres",
    "group": {
        "id": 4,
        "name": "Домофоны",
        "full_pretty": "Домофоны",
        "is_house": 1,
        "cameras_count": 0,
        "parent_id": 3,
        "csa_id": null,
        "intercoms_count": 1
    },
    "camera": {
        "id": 1,
        "group_id": 2,
        "status": "inactive",
        "type": "media_server_v2",
        "start_at": "",
        "created_at": "2022-12-06 20:20:50",
        "name": "Камера 1",
        "streams": [
            {
                "id": 2,
                "type": "low",
                "camera_id": 1,
                "status": "active",
                "url": "rtsp://admin:456redko@192.168.204.21:554/Streaming/Channels/102",
                "bitrate": 0,
                "resolution": "0x0",
                "output_rate": 0,
                "ip": "192.168.204.13",
                "uuid": "a4967207-eb49-4275-b73e-91e771675ac0",
                "sound": "tracks-v1",
                "streams_count": 0,
                "server": {
                    "id": 1,
                    "type": "media_server_v2",
                    "schema": "https",
                    "internal_domain": "host-name-1.vms.local",
                    "external_domain": "host-name-1.vms.local",
                    "domain": "host-name-1.vms.local",
                    "internal": "8080",
                    "external": "8443",
                    "rtsp": "5554",
                    "traffic_in": 74045,
                    "traffic_out": 0,
                    "status": true,
                    "is_enabled": true,
                    "has_cache": false,
                    "proxy": "host-name-1.vms.local",
                    "created_at": "2022-12-06 20:20:50",
                    "updated_at": "2022-12-16 10:25:53",
                    "group_type":"all",
                    "can_delete": false,
                    "streams_limit": 100,
                    "bitrate_limit": 1000000,
                    "extra": {
                        "io": {
                            "read_rate": 0,
                            "read_bytes": 0,
                            "write_rate": 0,
                            "write_bytes": 0
                        },
                        "cpu": {
                            "total": 10,
                            "usage": 13,
                            "stime_sec": 15212,
                            "utime_sec": 15212
                        },
                        "mem": {
                            "rss": 3244748800,
                            "share": 9314304,
                            "usage": 5843918848
                        },
                        "net": {
                            "in_bitrate": 75822232,
                            "out_bitrate": 0
                        },
                        "drives": {
                            "/": {
                                "fs": "ext4",
                                "mount": "/",
                                "inode_free": 1463157,
                                "inode_total": 1589248,
                                "capacity_free": 11702407168,
                                "capacity_total": 25445027840
                            },
                            "none": {
                                "fs": "swap",
                                "mount": "none",
                                "inode_free": 0,
                                "inode_total": 0,
                                "capacity_free": 0,
                                "capacity_total": 0
                            },
                            "/boot": {
                                "fs": "ext4",
                                "mount": "/boot",
                                "inode_free": 97988,
                                "inode_total": 98304,
                                "capacity_free": 1332723712,
                                "capacity_total": 1547051008
                            },
                            "/storage": {
                                "fs": "ext4",
                                "mount": "/storage",
                                "inode_free": 32765326,
                                "inode_total": 32768000,
                                "capacity_free": 448026333184,
                                "capacity_total": 527295578112
                            }
                        },
                        "server": {
                            "ip4": "192.168.200.15",
                            "name": "MS-21.03.3-lts-rc-3",
                            "build": "caeb03b",
                            "uptime": 247945,
                            "startat": 1670595943,
                            "version": "21.03.3",
                            "hostname": "host-name-1.vms.local",
                            "revision": "lts-rc-3",
                            "timestamp": "20221129093237"
                        },
                        "cluster": {
                            "id": "100",
                            "node": "3",
                            "enable": "true",
                            "hostname": "host-name-1.vms.local"
                        },
                        "license": {
                            "type": "enterprise",
                            "issued": 4102444799
                        },
                        "streams": {
                            "total": 371,
                            "active": 105,
                            "clients": 0
                        },
                        "storages": {
                            "/storage": {
                                "fs": "",
                                "err": 0,
                                "name": "default",
                                "mount": "/storage",
                                "inode_free": 32765326,
                                "inode_total": 32768000,
                                "capacity_free": 448026333184,
                                "capacity_total": 527295578112
                            },
                            "/storage2": {
                                "fs": "",
                                "err": -2,
                                "name": "secondary",
                                "mount": "/storage2",
                                "inode_free": 0,
                                "inode_total": 0,
                                "capacity_free": 0,
                                "capacity_total": 0
                            }
                        }
                    },
                    "is_editable": true
                },
                "sub_servers": [
                    {
                        "id": 2,
                        "type": "media_server_v2",
                        "schema": "https",
                        "internal_domain": "host-name-2.vms.local",
                        "external_domain": "host-name-2.vms.local",
                        "domain": "host-name-2.vms.local",
                        "internal": "8080",
                        "external": "8443",
                        "rtsp": "5554",
                        "traffic_in": 11568,
                        "traffic_out": 22496,
                        "status": true,
                        "is_enabled": true,
                        "has_cache": false,
                        "proxy": "host-name-2.vms.local",
                        "created_at": "2022-12-06 20:20:50",
                        "updated_at": "2022-12-16 10:25:53",
                        "group_type":"all",
                        "can_delete": false,
                        "streams_limit": 100,
                        "bitrate_limit": 1000000,
                        "extra": {
                            "io": {
                                "read_rate": 0,
                                "read_bytes": 0,
                                "write_rate": 0,
                                "write_bytes": 0
                            },
                            "cpu": {
                                "total": 5,
                                "usage": 4,
                                "stime_sec": 5985,
                                "utime_sec": 5985
                            },
                            "mem": {
                                "rss": 7734063104,
                                "share": 5169152,
                                "usage": 11912642560
                            },
                            "net": {
                                "in_bitrate": 11845448,
                                "out_bitrate": 23035504
                            },
                            "drives": {
                                "/": {
                                    "fs": "ext4",
                                    "mount": "/",
                                    "inode_free": 1462977,
                                    "inode_total": 1589248,
                                    "capacity_free": 10998165504,
                                    "capacity_total": 25445027840
                                },
                                "none": {
                                    "fs": "swap",
                                    "mount": "none",
                                    "inode_free": 0,
                                    "inode_total": 0,
                                    "capacity_free": 0,
                                    "capacity_total": 0
                                },
                                "/boot": {
                                    "fs": "ext4",
                                    "mount": "/boot",
                                    "inode_free": 97988,
                                    "inode_total": 98304,
                                    "capacity_free": 1332719616,
                                    "capacity_total": 1547051008
                                },
                                "/storage": {
                                    "fs": "ext4",
                                    "mount": "/storage",
                                    "inode_free": 32735783,
                                    "inode_total": 32768000,
                                    "capacity_free": 16777216,
                                    "capacity_total": 527295578112
                                }
                            },
                            "server": {
                                "ip4": "192.168.200.16",
                                "name": "MS-21.03.3-lts-rc-3",
                                "build": "caeb03b",
                                "uptime": 247945,
                                "startat": 1670595943,
                                "version": "21.03.3",
                                "hostname": "host-name-2.vms.local",
                                "revision": "lts-rc-3",
                                "timestamp": "20221129093237"
                            },
                            "cluster": {
                                "id": "100",
                                "node": "4",
                                "enable": "true",
                                "hostname": "host-name-2.vms.local"
                            },
                            "license": {
                                "type": "enterprise",
                                "issued": 4102444799
                            },
                            "streams": {
                                "total": 374,
                                "active": 5,
                                "clients": 75
                            },
                            "storages": {
                                "/storage": {
                                    "fs": "",
                                    "err": 0,
                                    "name": "default",
                                    "mount": "/storage",
                                    "inode_free": 32735783,
                                    "inode_total": 32768000,
                                    "capacity_free": 16777216,
                                    "capacity_total": 527295578112
                                },
                                "/storage2": {
                                    "fs": "",
                                    "err": -2,
                                    "name": "secondary",
                                    "mount": "/storage2",
                                    "inode_free": 0,
                                    "inode_total": 0,
                                    "capacity_free": 0,
                                    "capacity_total": 0
                                }
                            }
                        },
                        "is_editable": true
                    }
                ],
                "transfer_servers": [],
                "transfer_sub_servers": [],
                "created_at": "2022-12-06 20:20:50",
                "updated_at": "2022-12-12 15:42:13",
                "is_preview_from_server": true,
                "is_archive_from_server": null,
                "is_enabled": true,
                "is_can_transfer": true,
                "source": "manual",
                "is_sound_enabled": false,
                "reconnect_attempt": 234,
                "reconnect_total": 234,
                "reconnect_time": "2022-12-12 14:53:55",
                "disconnections_count": 0,
                "is_actual": true,
                "condition": "incorrect",
                "stopped_at": "2022-12-06 20:20:51"
            }
        ],
        "can_edit": true,
        "origin": null,
        "group_type": "public",
        "shared_from": null,
        "ip": "192.168.204.13",
        "lat": null,
        "lng": null,
        "azimuth": null,
        "is_sensitive": 0,
        "is_public": 0,
        "archive_ranges": [],
        "archive_recording_timetable": null,
        "motion_detaction_timetable": [],
        "onvif_configuration": null,
        "streams_rtsp": null,
        "is_ip_reserved": false,
        "count_issues": 0,
        "source": "manual",
        "archive_storage_days": null,
        "is_archive_recording": false,
        "archive_recording_type": "fulltime",
        "is_increased_reconnect": 0,
        "is_sound_enabled": true,
        "is_bridge": false,
        "can_change_archive_timetable": true,
        "is_auto_create_streams": false,
        "is_provisioning_enable": false,
        "is_can_manage_streams": true,
        "streams_source": "manual",
        "is_can_manage_archive_storage_days": true,
        "is_editable": true,
        "status_changed_at": "",
        "is_intercom": true,
        "deleted_at": ""
    },
    "collecting_keys": true,
    "door_open_time_general": 10,
    "sip_credentials": {
        "server": "webrtc-gw1.vms.local",
        "port": 5080,
        "login": "xxxxxxxxxxx",
        "is_sip_password_installed": true
    },
    "sip_options": {
        "talk_duration": 180,
        "ring_duration": 61,
        "dtmf": [
            {
                "id": 1,
                "value": "*"
            },
            {
                "id": 2,
                "value": "#"
            }
        ]
    },
    "is_crossbar_switchers_enabled": true,
    "is_can_manage_matrix": true,
    "matrix": [
        {
            "id": 1,
            "capacity": 20,
            "items": [
                [
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10
                ],
                [
                    11,
                    12,
                    13,
                    14,
                    15,
                    16,
                    17,
                    18,
                    19,
                    20
                ]
            ],
            "auto": false,
            "is_last_item_first": false,
            "flat_from": 1
        }
    ],
    "created_at": "2023-01-05 10:42:12",
    "updated_at": "2023-01-05 16:35:02",
    "mac": "08:13:c0:00:00:82",
    "vendor": "interconnection",
    "vendor_pretty": "Интерсвязь",
    "status": "installed",
    "status_pretty": "Установлен",
    "switch": "metakom",
    "switch_pretty": "Метаком",
    "schema": "http",
    "ip": "192.168.18.207",
    "port": 8080,
    "login": "root",
    "password": "123456",
    "commutators_count": 1,
    "connection_type": "matrix_switching",
    "connection_type_pretty": "Матрично-коммутационный",
    "key_count": null
}
401

Токен авторизации не передан или не валидный, см. Получение токена

boolean

is_can_manage_matrix

Можно ли редактировать матрицу квартир, сейчас можно редактировать матрицу только для домофонов Интерсвязь

Пример

JSON
curl -k --location --request PATCH 'https://vms.local/api/admin/v1/intercoms/{intercom}' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id' \
--header 'Content-Type: application/json \
--data-raw '{
    "title": "title",
    "department": 2,
    "camera_id": 6180,
    "collecting_keys": true,
    "group_id": 217498,
    "switch": "metakom",
    "door_open_time_general": 500,
    "department_type": "main",
    "department_name": "department_name",
    "address": "г. Город, ул. Улица 1",
    "is_crossbar_switchers_enabled": true,
    "sip_credentials": {
        "server": "televoip-core.is74.ru",
        "port": 7777,
        "login": "0813c0000082",
        "password": "5eh2270j4fb0d"
    },
    "sip_options": {
        "dtmf": [
            {
                "id": 1,
                "value": "/"
            }
        ]
    },
    "flat_from": 10,
    "flat_to": 15,
    "flat_offset": "1",
    "connection_type": "matrix_switching",
    "commutators_count": 1,
    "matrix": [
        {
            "id": 1,
            "auto": false,
            "capacity": 20,
            "flat_from": 1,
            "items": [
                [
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7,
                    8,
                    9,
                    10
                ],
                [
                    11,
                    12,
                    13,
                    14,
                    15,
                    16,
                    17,
                    18,
                    19,
                    20
                ]
            ]
        }
    ]
}'
JavaScript errors detected

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

If this problem persists, please contact our support.