Range

Function

This API is used to get parameter range for AI > Setup > Human & Vehicle Detection page.

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

Parameter Description

Table 1

ParameterRangeTypeDescription
channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”
The number of channels depends on the capability of the device.
string arrayEach array bit represents a channel with a string.
DVR/NVR need.
IPC only uses CH1
page_type“ChannelConfig”,
“AlarmConfig”
stringData used to distinguish between the channel configuration page and the alarm configuration page

Sample:

POST /API/AI/Setup/PVD/Range HTTP/1.1
{
    "version": "1.0",
    "data": {"page_type": "ChannelConfig"}
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
channel_infoJSON objectSingle Channel Information JSON show as follow Table x
page_type“ChannelConfig”,
“AarmConfig”
stringThe data used to distinguish between the channel configuration page and the alarm configuration page is only needed when setting
channel_maxintMaximum number of channels

Table x

ParameterRangeTypeDescription
CH1Json ObjectJSON show as followTable 3
...Json Object
IP_CH1Json Object
...Json Object
WIFI_CH1Json Object
...Json Object

Table 3

ParameterRangeTypeDescription
status"Offline","Online",
“Nonsupport”
stringChannel online status, only for digital channels.
Note:This field does not exist when the channel is online
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 capability of the device.
arrayAlarm output channel
Each array bit represents aalarm output channel with a string.
Camera:
Local->1:open,NULL:close
latch_time"10","20","40",
"60"
stringAlarm output time
record_enableture,falseboolRecording channel switch
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, falseboolOutgoing mail switch
ftp_picture_uploadtrue, falseboolSend mail switch Channel Capture FTP Upload switch (dedicated to NVR)
ftp_video_uploadtrue, falseboolChannel video FTP upload switch (NVR special)
picture_to_cloudtrue, falseboolImage upload switch (NVR only)
video_to_cloudtrue, falseboolVideo Cloud Upload Switch (NVR special)
full_screenboolFullScreen Switch (NVR only)
buzzer"0","10","20","40",
"60"
stringBuzzer time (NVR only)
show_messagetrue, falseboolDisplay information switch
switchtrue, falseboolswitch,false: close
true: open
sensitivity0-100intDetection sensitivity (IPC Smart 2)
sensitivity"Low","Medium","High"stringDetection sensitivity (IPC Smart Generation)
snap_mode"Default"
"RealTimeMode"
"IntervalMode"
stringScreenshot mode,
IntervalMode JSON show as followTable 4
min_pixel64-1080intMinimum pixel value
max_pixel320-1080intMaximum pixel value
detection_type"Off"
"Pedestrian"
"Vehicle"
"Pedestrian &Vehicle"
stringDetection type, Humanoid and car shape (normal detection type)
detection_type“Pedestrian”
"Motor Vehicle"
"Non-motorized Vehicle"
arrayDetection type, humanoid, motor vehicle, non-motor vehicle (machine non-human)
iva_lines0 not draw lines
1 draw lines
intPreview and play back whether lines will appear
rule_infoObjectInformation JSON show as followTable 5
schedule_list0-8json array(Consumer NVR interconnection IPC POE package) defense planning table data,show as followTable 9
mutual_exclusion"Intrusion"
"Region Entrance"
"Region Exiting"
"LCD"
json arrayThe set of mutually exclusive functions currently enabled,Note: If there is a mutual exclusion function that is already enabled, it is included in the Get. If it is not enabled or there is no mutual exclusion, it is not necessary to pass this field
schedule_enablebool计划表模式
ptz_operation_supportbool(球机使用)支持ptz操作
detection_modeStaticMode,MotionModestring检测模式
sceneIndoor,Outdoorstring场景
light_linkagebool白光联动告警
tracking_linkbool追踪联动开关(球机使用)
enforcerlight_linkagebool红蓝灯联动告警
siren_linkagebool警戒声联动告警
http_listeningboolhttp事件推送
scheduleObject计划表显示如表Table 10
default_timeout1-120000int会话超时(range使用)

Table 4

ParameterRangeTypeDescription
snap_num"1"
"2"
"3"
"Unlimited"
stringScreenshot count
snap_frequencyintScreenshot interval, unit s/pic

Table 5

ParameterRangeTypeDescription
rule_number1ObjectRule number 1,Information JSON show as followTable 6

Table 6

ParameterRangeTypeDescription
detection_range"FullScreen"
"Customize"
stringdetection range
rule_switchtrue, falsebool/* One byte per channel represents up to 4 rules, 0- off, 1- Use */ (IPC Smart Generation only)
rule_type"Normal"string/* One byte per channel for up to 4 rules, 0- off, 1- Use / (IPC Smart Generation Only) / One byte per channel for up to 4 - Rule type, 0- Regular mode, 1- Guest Mode/Other mode */ (IPC Smart Generation only)
rule_rectObjectrectangle,Information JSON show as followTable 7
point_num[min:max]arrayNumber 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
cloud_video_is_used0~MAX_PARA_CHN_NUMarrayId of the channel where the cloud video upload function is enabled
max_cloud_video_upload_numMAX_CLOUD_VIDEO_RECORD_NUMintThe maximum number of channels supported for cloud video uploading

Table 9

ParameterRangeTypeDescription
enabletrue, falseboolWhether the current schedule takes effect
start_time0 – 1439(23*60+59)intSchedule start time (minutes relative to 00:00)
end_time0 – 1439(23*60+59)intSchedule end time (minutes relative to 00:00)
weekday"Sunday"
"Monday"
"Tuesday"
"Wednesday"
"Thursday"
"Friday"
"Saturday"
arrayIndicates the day of a week when the current schedule takes effect. You can select multiple days

Table 10

ParameterRangeTypeDescription
schedule_type"SendEmail"
"FtpPicUpload"
"CloudPicUpload"
"Record"
"AlarmOut"
"FtpVdUpload"
"CloudVdUpload"
"FloodLight"
"Siren"
"EnforcerLight"
stringSchedule type
weekObejctWeekly information is shown in the Table 11

Table 11

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

Tips:

The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

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",
                        "mode": "r",
                        "min": 1,
                        "max": 100,
                        "default_value": 60
                    },
                    "snap_mode": {
                        "type": "string",
                        "items": [
                            "Default",
                            "RealTimeMode",
                            "IntervalMode"
                        ]
                    },
                    "snap_num": {
                        "type": "string",
                        "items": [
                            "1",
                            "2",
                            "3",
                            "Unlimited"
                        ]
                    },
                    "snap_frequency": {
                        "type": "int32",
                        "mode": "r",
                        "min": 1,
                        "max": 255,
                        "default_value": 2
                    },
                    "max_pixel": {
                        "type": "int32",
                        "mode": "r",
                        "min": 320,
                        "max": 1080,
                        "default_value": 320
                    },
                    "min_pixel": {
                        "type": "int32",
                        "mode": "r",
                        "min": 64,
                        "max": 1080,
                        "default_value": 64
                    },
                    "detection_mode": {
                        "type": "string",
                        "items": [
                            "StaticMode",
                            "MotionMode"
                        ]
                    },
                    "detection_type": {
                        "type": "array",
                        "min_size": 0,
                        "max_size": 3,
                        "items": {
                            "type": "string",
                            "items": [
                                "Pedestrian",
                                "Motor Vehicle",
                                "Non-motorized Vehicle"
                            ]
                        }
                    },
                    "rule_info": {
                        "type": "object",
                        "items": {"rule_number1": {
                            "type": "object",
                            "items": {
                                "detection_range": {
                                    "description": "Only rule_rect has this variable.",
                                    "type": "string",
                                    "mode": "r",
                                    "items": [
                                        "FullScreen",
                                        "Customize"
                                    ]
                                },
                                "rule_rect": {
                                    "type": "object",
                                    "items": {
                                        "x1": {
                                            "type": "int32",
                                            "min": 0,
                                            "max": 704
                                        },
                                        "y1": {
                                            "type": "int32",
                                            "min": 0,
                                            "max": 576
                                        },
                                        "x2": {
                                            "type": "int32",
                                            "min": 0,
                                            "max": 704
                                        },
                                        "y2": {
                                            "type": "int32",
                                            "min": 0,
                                            "max": 576
                                        },
                                        "x3": {
                                            "type": "int32",
                                            "min": 0,
                                            "max": 704
                                        },
                                        "y3": {
                                            "type": "int32",
                                            "min": 0,
                                            "max": 576
                                        },
                                        "x4": {
                                            "type": "int32",
                                            "min": 0,
                                            "max": 704
                                        },
                                        "y4": {
                                            "type": "int32",
                                            "min": 0,
                                            "max": 576
                                        }
                                    }
                                }
                            }
                        }}
                    }
                }
            }}
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.