Skip to main content
Skip table of contents

Intercom upgrade Sputnik

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": "City, Street 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

Unique identifier of the intercom

titlerequired

string

Intercom name

departmentrequired

integer

Entrance

camera_idrequired

integer

Camera ID associated with the intercom

collecting_keysrequired

boolean

Key collection

group_idrequired

integer

Group ID in which the intercom is located

switchrequired

string

Switch type. All types are found in the Main configurations

door_open_time_generalrequired

integer

Time duration for which the door will remain open after being opened by a user (specified in seconds)

department_typerequired

string

Entry type

department_namerequired

string

Entry name

addressrequired

string

Address

is_crossbar_switchers_enabledrequired

bool

Is the coordinate-matrix line enabled? (Enabling it provides access to matrix apartment settings)

sip_credentials.*.serverrequired

string

SIP server address (IP)

sip_credentials.*.loginrequired

string

User login

sip_credentials.*.passwordrequired

string

User password

sip_credentials.*.portrequired

string

SIP server port

flat_fromrequired

integer

Flat from

flat_torequired

integer

Flat to

flat_offsetrequired

integer

Flat offset

sip_optionsrequired

integer

Additional SIP server settings

sip_options.*.dtmfrequired

array

Array of DTMF codes to open the door for each relay

sip_options.*.dtmf.*.idrequired

integer

Relay ID

sip_options.*.dtmf.*.valuerequired

string

DTMF code to open the door

connection_typerequired

string

Intercom connection scheme, in the Main configurations under the key intercom_connection_types

commutators_countrequired

integer

Number of switches on the intercom

matrixrequired

array

Intercom flat matrix, the number of elements in the matrix corresponds to the number of switches. If any field is modified, the entire object should be sent

matrix.*.idrequired

integer

Switch ID. For the Sputnik intercom, there can only be one

matrix.*.autorequired

boolean

Is the matrix automatically populated:

1. If false – Send a request to Getting a matrix and provide it to the user for filling, and only then update the intercom with this matrix

2. If true – The matrix will be automatically populated and displayed after the intercom is updated

matrix.*.capacityrequired

integer

Number of flats within one switch. The value should be between flat_from and flat_to

matrix.*.flat_fromrequired

integer

Number of the first flat in the matrix

matrix.*.is_last_item_firstrequired

boolean

Is the last element of the matrix the first

Response

200

Successful response

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": "Entrance",
    "uuid": "5cf7e12b-a91b-4569-bf0c-bbe05718da3c",
    "address": "addres",
    "group": {
        "id": 4,
        "name": "Intercoms",
        "full_pretty": "Intercoms",
        "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": "Camera 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": "Intersvyaz",
    "status": "installed",
    "status_pretty": "Installed",
    "switch": "metakom",
    "switch_pretty": "Metakom",
    "schema": "http",
    "ip": "192.168.18.207",
    "port": 8080,
    "login": "root",
    "password": "123456",
    "commutators_count": 1,
    "connection_type": "matrix_switching",
    "connection_type_pretty": "Matrix-switching",
    "key_count": null
}
401

Authorization token is not provided or is invalid. Obtaining a token

boolean

is_can_manage_matrix

Is it possible to edit the matrix of apartments, now you can edit the matrix only for intercoms Intersvyaz

Example

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": "City, Street 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.