Get

Function

This API is used to get AI > Setup > Region Exiting configuration parameters.

Request Message

Parameter Description

Table 1

ParameterRangeTypeDescription
channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”
The number of channels depends on the capabilities of the device.
String arrayEach array bit represents a channel with a string.
DVR/NVR need;
IPC only use CH1
page_type“ChannelConfig”,
“AlarmConfig”
stringThe data used to distinguish whether it is a channel configuration page or an alarm configuration page

Sample:

POST /API/AI/Setup/RegionExiting/Get HTTP/1.1
{
    "version": "1.0",
    "data": {
        "channel": [
            "CH1"
        ],
        "page_type": "ChannelConfig"
    }
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
channel_infoJSON objectChannel Information JSON show as follow Table 3
page_type“ChannelConfig”,
“AarmConfig”
stringIt is used to distinguish whether it is the data of the channel configuration page or the alarm configuration page, it is only required when Set
channel_maxintMaximum number of channels

Table 3

ParameterRangeTypeDescription
CH1Json ObjectJSON show as follow Table 4
Json Object
IP_CH1Json Object
Json Object
WIFI_CH1Json Object
Json Object

Table 4

ParameterRangeTypeDescription
status"Offline","Online",
“Nonsupport”
stringChannel online status, only for digital channels.
Note: When the channel is online, there is no such field
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, null value: close
latch_time"10","20","40","60"stringAlarm output time
record_enabletrue, falseboolRecording channel switching
record_channel“CH1”…”CH1x”
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
arrayAlarm output channel
Channel alarm linkage switch.
post_recording"30","60","120","300"stringVideo delay time
send_emailtrue, falseboolSend Email switch
ftp_picture_uploadtrue, falseboolChannel capture FTP upload switch (for NVR only)
ftp_video_uploadtrue, falseboolChannel recording FTP upload switch (for NVR only)
picture_to_cloudtrue, falseboolPicture upload switch (for NVR only)
video_to_cloudtrue, falseboolVideo cloud upload switch (for NVR only)
full_screenboolFullScreen switch (for NVR only)
buzzer"0","10","20","40","60"stringBuzzer sounding time (for NVR only)
show_messageboolShow Message switch (for NVR only)
switchtrue, falseboolPID enable switch, false: close
true: open
detection_type"Motion"
"Pedestrian"
"Vehicle"
"Pedestrian &Vehicle"
stringDetection type, human shape and vehicle shape (normal detection type)
detection_type“Pedestrian”
"Motor Vehicle"
"Non-motorized Vehicle"
arrayDetection type, human figure, motor vehicle, non-motor vehicle (machine is not human type)
sensitivity1-100intDetection sensitivity
target_validity1-4intTarget validity
min_pixel64-1080intMinimum pixel value
max_pixel320-1080intMaximum pixel value
rule_infoJSON objectSingle-channel information JSON is as follows Table 5
point_num[min:max]arrayThe number of points drawn in the area, minimum 3 points (min), maximum 8 points (max)

Table 5

ParameterRangeTypeDescription
rule_number1ObjectRule number 1, the information JSON is displayed as follows Table 6
rule_number2ObjectRule number 2, the information JSON is displayed as follows Table 6
rule_number3ObjectRule number 3, the information JSON is displayed as follows Table 6
rule_number4ObjectRule number 4, the information JSON is displayed as follows Table 6

Table 6

ParameterRangeTypeDescription
rule_switchboolrule switch
rule_rectObjectRectangle, the information JSON is as follows Table 7
point_num[min:max]arrayThe number of points drawn in the area, minimum 3 points (min), maximum 8 points (max)

Table 7

ParameterRangeTypeDescription
x10-704shortx1 coordinate point
y10-576shorty1 coordinate point
x20-704shortx2 coordinate point
y20-576shorty2 coordinate point
x30-704shortx3 coordinate point
y30-576shorty3 coordinate point
x40-704shortx4 coordinate point
y40-576shorty4 coordinate point
x50-704shortx5 coordinate point
y50-576shorty5 coordinate point
x60-704shortx6 coordinate point
y60-576shorty6 coordinate point
x70-704shortx7 coordinate point
y70-576shorty7 coordinate point
x80-704shortx8 coordinate point
y80-576shorty8 coordinate point

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "channel_info": {
            "CH1": {
                "status": "Online",
                "switch": false,
                "sensitivity": 50,
                "iva_lines": true,
                "detection_type": [],
                "target_validity": 3,
                "max_pixel": 640,
                "min_pixel": 64,
                "rule_info": {
                    "rule_number1": {
                        "rule_switch": false,
                        "point_num": [
                            3,
                            8
                        ],
                        "rule_rect": {
                            "x1": 0,
                            "y1": 0,
                            "x2": 0,
                            "y2": 0,
                            "x3": 0,
                            "y3": 0,
                            "x4": 0,
                            "y4": 0,
                            "x5": 0,
                            "y5": 0,
                            "x6": 0,
                            "y6": 0,
                            "x7": 0,
                            "y7": 0,
                            "x8": 0,
                            "y8": 0
                        }
                    },
                    "rule_number2": {
                        "rule_switch": false,
                        "point_num": [
                            3,
                            8
                        ],
                        "rule_rect": {
                            "x1": 0,
                            "y1": 0,
                            "x2": 0,
                            "y2": 0,
                            "x3": 0,
                            "y3": 0,
                            "x4": 0,
                            "y4": 0,
                            "x5": 0,
                            "y5": 0,
                            "x6": 0,
                            "y6": 0,
                            "x7": 0,
                            "y7": 0,
                            "x8": 0,
                            "y8": 0
                        }
                    },
                    "rule_number3": {
                        "rule_switch": false,
                        "point_num": [
                            3,
                            8
                        ],
                        "rule_rect": {
                            "x1": 0,
                            "y1": 0,
                            "x2": 0,
                            "y2": 0,
                            "x3": 0,
                            "y3": 0,
                            "x4": 0,
                            "y4": 0,
                            "x5": 0,
                            "y5": 0,
                            "x6": 0,
                            "y6": 0,
                            "x7": 0,
                            "y7": 0,
                            "x8": 0,
                            "y8": 0
                        }
                    },
                    "rule_number4": {
                        "rule_switch": false,
                        "point_num": [
                            3,
                            8
                        ],
                        "rule_rect": {
                            "x1": 0,
                            "y1": 0,
                            "x2": 0,
                            "y2": 0,
                            "x3": 0,
                            "y3": 0,
                            "x4": 0,
                            "y4": 0,
                            "x5": 0,
                            "y5": 0,
                            "x6": 0,
                            "y6": 0,
                            "x7": 0,
                            "y7": 0,
                            "x8": 0,
                            "y8": 0
                        }
                    }
                }
            }
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.