Set

Function

This API is used to set AI > Cross Counting Scenario > Config configuration parameters.

Request Message

Parameter Description

Table 1

ParameterRangeTypeDescription
adSwitchboolAdvertising mode control switch
ad_displayModeboolKeep aspect ratio switch
ad_seqTimeintAd image polling time
channel_infoJSON objectChannel Information JSON show as follow Table 2
group_infoJSON objectGroup Information JSON show as follow Table 3

Table 2

ParameterRangeTypeDescription
channel_switchboolControl whether to open the CC scene application function
channel_groupintThe group number to which the channel belongs, and -1 if not in the group
channel_capacityintCapacity
chn_set_enableboolWhether the channel can be set or not is associated with the second-generation CC function
chn_buzzer"0","10","20","40","60"stringBuzzer sounding time
chn_alarm_out“Local->1”…
”Local->x”
“IP_CH1->1”…
“IP_CH1->2”…
” IP_CHx->1”
” IP_CHx->2”
The number of channels depends on the capabilities of the device.
arrayAlarm output channel
Each array bit represents aalarm output channel with a string.
Camera:
Local->1: open, empty value: close
chn_latch_time"10","20","40","60"stringAlarm output delay time

Table 3

ParameterRangeTypeDescription
group_switchboolControl whether to open the CC scene application function
group_capacityintCapacity
start_time8stringStarting time
end_time8stringEnd Time
alarm_type"Unuse","Person","Vehicle"stringalarm type:
1:Person,2:Vehicle
grp_buzzer"0","10","20","40","60"stringBuzzer sounding time
grp_alarm_out“Local->1”…
”Local->x”
“IP_CH1->1”…
“IP_CH1->2”…
” IP_CHx->1”
” IP_CHx->2”
The number of channels depends on the capabilities of the device.
arrayAlarm output channel
Each array bit represents aalarm output channel with a string.
Camera:
Local->1: open, empty value: close
grp_latch_time"10","20","40","60"stringAlarm output delay time

Sample:

POST /API/AI/Scenario/CC/Config/Set HTTP/1.1
{
    "version": "1.0",
    "data": {
        "adSwitch": false,
        "ad_displayMode": false,
        "ad_seqTime": 1,
        "channel_info": {
            "CH1": {
                "channel_switch": false,
                "channel_group": -1,
                "channel_capacity": 11,
                "chn_set_enable": false,
                "chn_buzzer": "0",
                "chn_alarm_out": [],
                "chn_latch_time": "20"
            },
            "CH8": {
                "channel_switch": false,
                "channel_group": 4,
                "channel_capacity": 33,
                "chn_set_enable": false,
                "chn_buzzer": "0",
                "chn_alarm_out": [],
                "chn_latch_time": "10"
            }
        },
        "group_info": {
            "Group1": {
                "group_switch": false,
                "group_capacity": 30,
                "start_time": "00:00:00",
                "end_time": "23:59:59",
                "alarm_type": "Person",
                "grp_buzzer": "0",
                "grp_alarm_out": [],
                "grp_latch_time": "10"
            },
            "Group8": {
                "group_switch": false,
                "group_capacity": 10,
                "start_time": "00:00:00",
                "end_time": "23:59:29",
                "alarm_type": "Person",
                "grp_buzzer": "0",
                "grp_alarm_out": [],
                "grp_latch_time": "10"
            }
        }
    }
}

Response Message

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {}
}

Error Code

See Response Messages Body and Common error_code for more information.