Range

Function

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

Note:

The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

Request Message

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/Range 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)
schedule_enableboolSchedule mode
ptz_operation_supportbool(Ball machine use)Supports the ptz operation
iva_lines0 Do not draw a line
1 Draw a line
intPreview and play back whether lines will appear
light_linkageboolWhite light linkage alarm
tracking_linkboolTracking linkage switch(Ball machine use)
enforcerlight_linkageboolRed and blue indicator linkage alarm
siren_linkageboolAlarm sound linkage alarm
http_listeningboolhttp event push
scheduleObjectThe schedule is displayed as followsTable 8
default_timeout1-120000intSession timeout (range usage)

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

Table 8

ParameterRangeTypeDescription
schedule_type"SendEmail"
"FtpPicUpload"
"CloudPicUpload"
"Record"
"AlarmOut"
"FtpVdUpload"
"CloudVdUpload"
"FloodLight"
"Siren"
"EnforcerLight"
stringSchedule type
weekObejctWeekly information such as Table 9

Table 9

ParameterRangeTypeDescription
day"Sun"
"Mon"
"Tue"
"Wed"
"Thu"
"Fri"
"Sat"
stringday
timeinttime

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "channel_max": 1,
        "channel_info": {
            "type": "object",
            "items": {
                "CH1": {
                    "type": "object",
                    "items": {
                        "status": {
                            "description": "Only offline channel has this variable.",
                            "type": "string",
                            "mode": "r",
                            "items": [
                                "Offline",
                                "Online",
                                "Nonsupport"
                            ]
                        },
                        "switch": {
                            "type": "bool"
                        },
                        "sensitivity": {
                            "type": "int32",
                            "min": 1,
                            "max": 100
                        },
                        "iva_lines": {
                            "type": "bool"
                        },
                        "detection_type": {
                            "type": "array",
                            "min_size": 0,
                            "max_size": 3,
                            "items": {
                                "type": "string",
                                "items": [
                                    "Pedestrian",
                                    "Motor Vehicle",
                                    "Non-motorized Vehicle"
                                ]
                            }
                        },
                        "target_validity": {
                            "type": "int32",
                            "items": [
                                1,
                                2,
                                3,
                                4
                            ]
                        },
                        "max_pixel": {
                            "type": "int32",
                            "min": 320,
                            "max": 1080
                        },
                        "min_pixel": {
                            "type": "int32",
                            "min": 64,
                            "max": 1080
                        },
                        "rule_info": {
                            "type": "object",
                            "items": {
                                "rule_number1": {
                                    "type": "object",
                                    "items": {
                                        "rule_switch": {
                                            "type": "bool"
                                        },
                                        "point_num": {
                                            "type": "array",
                                            "size": 2,
                                            "items": []
                                        },
                                        "rule_rect": {
                                            "type": "object",
                                            "items": {
                                                "x1": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x2": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x3": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x4": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x5": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x6": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x7": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x8": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "y1": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y2": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y3": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y4": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y5": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y6": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y7": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y8": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                }
                                            }
                                        }
                                    }
                                },
                                "rule_number2": {
                                    "type": "object",
                                    "items": {
                                        "rule_switch": {
                                            "type": "bool"
                                        },
                                        "point_num": {
                                            "type": "array",
                                            "size": 2,
                                            "items": []
                                        },
                                        "rule_rect": {
                                            "type": "object",
                                            "items": {
                                                "x1": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x2": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x3": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x4": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x5": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x6": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x7": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x8": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "y1": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y2": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y3": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y4": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y5": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y6": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y7": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y8": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                }
                                            }
                                        }
                                    }
                                },
                                "rule_number3": {
                                    "type": "object",
                                    "items": {
                                        "rule_switch": {
                                            "type": "bool"
                                        },
                                        "point_num": {
                                            "type": "array",
                                            "size": 2,
                                            "items": []
                                        },
                                        "rule_rect": {
                                            "type": "object",
                                            "items": {
                                                "x1": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x2": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x3": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x4": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x5": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x6": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x7": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x8": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "y1": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y2": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y3": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y4": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y5": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y6": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y7": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y8": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                }
                                            }
                                        }
                                    }
                                },
                                "rule_number4": {
                                    "type": "object",
                                    "items": {
                                        "rule_switch": {
                                            "type": "bool"
                                        },
                                        "point_num": {
                                            "type": "array",
                                            "size": 2,
                                            "items": []
                                        },
                                        "rule_rect": {
                                            "type": "object",
                                            "items": {
                                                "x1": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x2": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x3": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x4": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x5": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x6": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x7": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "x8": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 704
                                                },
                                                "y1": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y2": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y3": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y4": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y5": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y6": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y7": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                },
                                                "y8": {
                                                    "type": "int32",
                                                    "min": 0,
                                                    "max": 576
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.