Update an Intersvyaz intercom
Intersvyaz
{
"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 Street 1",
"sip_credentials": {
"server": "televoip-core.is74.ru",
"login": "0813c0000082",
"password": "5eh2270j4fb0d",
"port": 7777
},
"is_crossbar_switchers_enabled": true,
"commutators_count": 2,
"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
]
]
},
{
"id": 2,
"auto": true,
"capacity": 20,
"flat_from": 21,
"is_last_item_first": true
}
],
"sip_options": {
"talk_duration": 180,
"ring_duration": 61,
"dtmf": [
{
"id": 1,
"value": "/"
},
{
"id": 2,
"value": "/"
}
]
},
"connection_type": "matrix_switching",
"is_restricted_live": false,
"is_restricted_archive": true
}
PATCH /api/admin/v1/intercoms/{intercom} |
Параметры метода
int
intercom, Unique identifier of the intercom
string
title, Intercom name
integer
department, Entrance
integer
camera_id, Id of the camera that belongs to the intercom
boolean
collecting_keys, Collecting keys
integer
group_id, Id of the group in which the intercom is located
string
switch, Switch type.
integer
door_open_time_general, Time that the door will be open after the user opens it (indicated in seconds)
string
department_type, The input type
string
department_name, Name of the entrance
string
address, Address
string
sip_credentials, SIP server settings; if you change one of the fields, you must send all the others as well
object string
string
sip_credentials.
REQUIRED
, .port SIP server port
string
sip_credentials.
REQUIRED
, .port SIP server port
string
sip_credentials.
REQUIRED
, .port SIP server port
string
sip_credentials.
REQUIRED
, .port SIP server port
bool
is_crossbar_switchers_enabled, Is the coordinate matrix line enabled (if it is enabled, the apartment matrix settings are available)
integer
commutators_count, Number of switches on the intercom (maximum 2 switches)
bool
is_open_door_key, Enable/Disable opening the intercom with a key.
bool
is_open_door_code, Enable/Disable opening of the intercom with a time code.
bool
is_open_door_app, Enable/disable opening of the intercom by the application.
bool
is_open_door_face, Enable/Disable opening of the intercom by face recognition.
array
matrix, Matrix of intercom apartments, the number of elements in the matrix is equal to the number of switches, if one of the fields is changed, all the others must be sent as well
object array
boolean
matrix.
REQUIRED
, .is_last_item_first Whether the last element of the matrix is the first
boolean
matrix.
REQUIRED
, .is_last_item_first Whether the last element of the matrix is the first
boolean
matrix.
REQUIRED
, .is_last_item_first Whether the last element of the matrix is the first
boolean
matrix.
REQUIRED
, .is_last_item_first Whether the last element of the matrix is the first
boolean
matrix.
REQUIRED
, .is_last_item_first Whether the last element of the matrix is the first
integer
sip_options, Additional SIP server settings; if you change one of the fields, you must also send all the others
object integer
string
sip_options.
REQUIRED
, .dtmf.*.value DTMF door opening code
string
sip_options.
REQUIRED
, .dtmf.*.value DTMF door opening code
string
sip_options.
REQUIRED
, .dtmf.*.value DTMF door opening code
string
sip_options.
REQUIRED
, .dtmf.*.value DTMF door opening code
string
sip_options.
REQUIRED
, .dtmf.*.value DTMF door opening code
integer
flat_from, Apartments with
integer
flat_to, Apartments by
string
connection_type, Intercom connection diagram, under the intercom_connection_types key
boolean
is_restricted_live, Restricting viewing of the live stream on the intercom camera
boolean
is_restricted_archive, Restricting viewing archive of stream recording on the intercom camera
array
timetable, Configuring the opening of the intercom door according to a schedule
object array
array
timetable.days
, Setting up the opening of the intercom door according to a schedule
string
timetable.days.
REQUIRED
, .to Intercom door closing time
string
timetable.days.
REQUIRED
, .to Intercom door closing time
string
timetable.days.
REQUIRED
, .to Intercom door closing time
array
timetable.intervals
, Intercom door opening schedule by time intervals
string
timetable.intervals.
REQUIRED
, .to Date and time of closing the intercom door
string
timetable.intervals.
REQUIRED
, .to Date and time of closing the intercom door
200 |
Successful response
JSON
|
401 |
Authorization token not sent or not valid |
cURL
curl -k --request POST \
--url 'https://your-domain/api/admin/v1/intercoms/{intercom}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"intercom": 0,
"title": "string",
"department": "integer",
"camera_id": "integer",
"collecting_keys": "boolean",
"group_id": "integer",
"switch": "string",
"door_open_time_general": "integer",
"department_type": "string",
"department_name": "string",
"address": "string",
"sip_credentials": {
"": "string"
},
"sip_credentials.": "void",
"is_crossbar_switchers_enabled": true,
"commutators_count": "integer",
"is_open_door_key": true,
"is_open_door_code": true,
"is_open_door_app": true,
"is_open_door_face": true,
"matrix": {
"": "boolean"
},
"matrix.": "void",
"sip_options": {
"": "string"
},
"sip_options.": "void",
"flat_from": "integer",
"flat_to": "integer",
"connection_type": "string",
"is_restricted_live": "boolean",
"is_restricted_archive": "boolean",
"timetable": {
"days": {
"": "string"
},
"intervals": {
"": "string"
}
},
"timetable.days": "void",
"timetable.days.": "void",
"timetable.intervals": "void",
"timetable.intervals.": "void"
}'
PHP
$data = array (
'intercom' => 0,
'title' => 'string',
'department' => 'integer',
'camera_id' => 'integer',
'collecting_keys' => 'boolean',
'group_id' => 'integer',
'switch' => 'string',
'door_open_time_general' => 'integer',
'department_type' => 'string',
'department_name' => 'string',
'address' => 'string',
'sip_credentials' =>
array (
'' => 'string',
),
'sip_credentials.' => 'void',
'is_crossbar_switchers_enabled' => true,
'commutators_count' => 'integer',
'is_open_door_key' => true,
'is_open_door_code' => true,
'is_open_door_app' => true,
'is_open_door_face' => true,
'matrix' =>
array (
'' => 'boolean',
),
'matrix.' => 'void',
'sip_options' =>
array (
'' => 'string',
),
'sip_options.' => 'void',
'flat_from' => 'integer',
'flat_to' => 'integer',
'connection_type' => 'string',
'is_restricted_live' => 'boolean',
'is_restricted_archive' => 'boolean',
'timetable' =>
array (
'days' =>
array (
'' => 'string',
),
'intervals' =>
array (
'' => 'string',
),
),
'timetable.days' => 'void',
'timetable.days.' => 'void',
'timetable.intervals' => 'void',
'timetable.intervals.' => 'void',
);
$context = stream_context_create([
'ssl'=>['verify_peer' => false],
'http' => [
'method' => 'PATCH',
'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}', false, $context);