Get

Function

This API is used to get parameter for Event > event check page.

Request Message

Event_push

POST: Request message see table 1
GET: Request message see table 20

Event_check

Table 1

ParameterRangeTypeDescription
reader_idunsigned intOptional, when not input, the board checks all alarm information and outputs readerID
sequenceunsigned intOptional, when not input, the board checks all alarm information and outputs readerID
lap_numberunsigned intOptional, when not input, the board checks all alarm information and outputs readerID
plus_eventchk"eventAiPushPic"stringMust bring, subscription required
ext_dataJson arraySubscription method needs to be taken, carry the type of client needs to subscribe, see table 1.1
subscribe_idunsigned intCurrent reader index
data_posunsigned intIndex of current reader read events

table 1.1

ParameterRangeTypeDescription
subscribe_typeJson ArraySubscription Type For the type of subscription required by the client, see table 1.2
unsubscribe_typeJson ArrayUnsubscribed types Do not include certain types in already subscribed types, see table 1.2
snap_resolution"640x480"
"1280x720"
"no_snapshot"
stringOptional event carry picture resolution,no_snapshot: Without chart

table 1.2

ParameterRangeTypeDescription
event"all"
"motion"
"io"
"videoloss"
"videohide"
"int"
"sound_dectet"
Json ArrayOrdinary event type
aipushpic"all"Json arrayIntelligent tweet type

Sample:

POST /API/Event/Check
HTTP/1.1
{
    version": "1.0",
    "data": {
        "plus_eventchk": "eventAiPushPic",
        "ext_data": {
                        "subscribe_type": [{"event": ["all"]}]
                        },
        "reader_id": 1,
        "sequence": 9595,
        "lap_number": null
    }
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
reader_idintOptional, when the request has no readerID, create a readerID and return it.
sequenceintCurrent latest sequence position
lap_numberunsigned intThe number of laps the current sequence position belongs to
subscribe_record_signboolOptional, the default is to subscribe to the recording flag .If the field passes true or does not pass this field, it means to subscribe to the recording flag, and if the field passes false, it means not to subscribe to the recording flag
subscribe_intelligenceboolOptional, subscribe to smart alarm events by default.If the field passes true or does not pass this field, it means subscription, and if the field passes false, it means not to subscribe to the smart alarm event
alarm_listJson arraySingle alarm show as table
log_collectJson ObjectOptional. When the log collection NVR mode is enabled, you can push log messages table 23
heat_alarm"HeatAlarm"stringOptional, when there is no alarm_list, output heartbeat alarm message
videoloss_statusboolDynamically display the video loss logo
alarm_snap_dataJson arrayFor the image data carried by the event (event push is not supported by udp), see table 15
ai_snap_pictureJson objectIntelligent map data, see table 16
ccCountJson arrayCc count statistics, see table 17
hmlistjson arrayHeat map statistics, see table 18
device_namestringdevicename
dev_net_infoJson arrayDevice information, see table 19
system_alarmJson arrayDevice alarm see table 3(optional)
channel_alarmJson arraySingle channel alarm see table 21(optional)
timestring"MM/DD/YYYYhh:mm:ss"

Table 3

ParameterRangeTypeDescription
device_nameMax_length:31stringEquipment name (optional)
hddjsonSee Table 4 (optional)

Table 4

ParameterRangeTypeDescription
hdd_alarm_type"Ok","Error"stringHard disk alarm type
hdd_alarm_info"Full"
"Bad"
"Unformat"
"Readonly"
"Warning"
"NoDisk"
stringHard disk error warning information

Table 5

ParameterRangeTypeDescription
channelstring
motion_alarmbool(optional)
record_flagjsonVideo logo (optional) See Table 6
camera_connect_statusjson(optional)Table 7
io_alarmbool(optional)
pir_alarmbool(optional)
channel_namestring(optional)
Floodlight_AudioAlarmjson(optional)Table 8
ptz_alarmjson(optional) Table 9
videolossbool(optional)
int_alarmJson Object(optional)Table 10
alarm_stateJson array(optional)Table 10
motion_smart_alarmJson ObjectTable 13
alarm_out_stateJson Array(NVR/DVR) See Table 14
wireless_ipc_typeint(wireless dedicated)Wireless IPC power supply type, battery 1, long-term power supply 2
remote_pair_stateMax_length:20string(wireless dedicated)Report the result of remote matching
Pair success:paired successfully
Pair fail:Pairing failed
Timeout:time out
Pair is not supported:pairing not supported
take_alarm_snapunsigned intCarry the id corresponding to the picture
chn_aliasstringFor channel

Table 6

ParameterRangeTypeDescription
m"R""G"stringMotion Alarm
"R":Alarm recording status "G":Alarm without recording state
i"R""G"stringIO Alarm
"R":Alarm recording status "G":Alarm without recording state
p"R""G"stringPIR Alarm
"R":Alarm recording status "G":Alarm without recording state
s"R""G"stringIntelligent Alarm
"R":Alarm recording status "G":Alarm without recording state
r"SR""MR"stringRecording
"SR":Alarm recording status,"MR":On-board manual recording status
h"R"stringSDcardAlarm
"R":Hard disk alarm
c"R""G"stringVideoTampering
"R":Alarm recording status "G":Alarm without recording state

Table 7

Parameter Range Type Description
connect_status "NotConfigured"
"Online"
"Offline"
"Sleep"
"NotPaired"
string Channel connection status
ability "Fisheye"
"Binoculars"
"Ptz"
"NewPtz"(NVR/DVR Need not)
"HkPtz"
"Iris"
"Mainstream"
"Substream"
"Mobilestream"
"FloodLight"
"AudioAlarm"
"AlarmOutNum"
"TalkHalf"
"TalkFull"
"Color"
"RedBlueLight"
"NotAutoReconnect"
"Pir"
"Cover"
string array
protocol Max length: 15byte string IPC access protocol
input_num Alarm input
output_num Alarm Output
intelligent_ability "CrossCount"
"HeatMap"
"SOD"
"LCD"
"PVD"
"FD"
"PID"
"CrowdDensity"
"LPD"
"RSD"
"QD"
"AttributeDetect"
"Intrusion"
"RegionEntrance"
"RegionExiting"
"FireDetection"
"TempMeas"

Table 8

ParameterRangeTypeDescription
floodlight_switchtrue falseboolWhite light real-time switch,false: close true: open
flood_light_value1 - 100intBrightness of white light
floodlight_value_range1 - 100ObjectWhite light brightness range
audioAlarm_switchtrue falseboolHorn real-time switch false: close true: open
audioAlarm_value1 - 10intSpeaker volume
audioAlarm_value_range1 - 10ObjectSpeaker volume range

Table 9

ParameterRangeTypeDescription
cur_zoom_valueintCurrent position of zoom (temporarily unused)
zoom_step0 - 2int0:1 step 1:5 Step 2:20 Step (temporarily unused)
cur_focus_valueintFocus Current location (temporarily unused)
focus_step0 - 2int0:1 Step 1:5 Step 2:20 Step (temporarily unused)
auto_focus_stateint0:Focus ends,1:Focusing (temporarily unused)
shift_rangeint(temporarily unused)
ptz_cruise_stateboolPreset point cruise state
ptz_line_scan_stateboolLine scan cruise state

Table 10

ParameterRangeTypeDescription
alarm_valtrue|falsebool
int_subtypevideo_tampersod
lcd
pid
pd
fd
sound
avd
pd_vd
cc
cd
qd
lpd
rsd
ad
intrusion
region_entrance
region_exiting
fireDetect
measure
string"video_tamper":Video tampering alarm
"sod":SOD object lost legacy
"lcd":LCD cable alarm
"pid":PID perimeter alarm
"pd":PD human body
"fd":FD face
"sound":Sound alarm
"avd":avd alarm
"pd_vd":pd_vd alarm
"cc":cc alarm
"cd":Crowd Density Detection
"qd":Queue length detection
"lpd":license plate detection
"rsd":Abnormal sound detection
"ad":Face attribute
"fireDetect":flame detection
"measure":temperature measurement

Table 11

Error CodeDescription
readerID_invalid
position_invalid

Table 12

ParameterRangeTypeDescription
channel1 - 127intIntercom channel number
talkback_closetrue|falseboolWhether to close the intercom
error_code"localuser_operating_cannot_talkback"
"localuser_close_talkback"
stringIntercom off reason
localuser_operating_cannot_talkback:The user is in the setting interface
localuser_close_talkback:User turns off intercom

Table 13

ParameterRangeTypeDescription
MDtimestring"MM/DD/YYYYhh:mm:ss"
MDStatestring array

Table 14

ParameterRangeTypeDescription
Local->1boolLocal->1 channel alarm switch
…………
Local->xboolLocal->x channel alarm switch
IP_CH1->1boolIP_CH1->1 channel alarm switch
…………
IP_CHx->xboolIP_CHx->x channel alarm switch

Table 15

ParameterRangeTypeDescription
chnnelstringdevicename
chn_aliasstringeventpush carry
img_idintThe id that the picture carries
img_encodestringPicture coding format
img_formatstringpicture format
img_datastringPicture data

Table 16

ParameterRangeTypeDescription
Chnintdevicename
strChnstringdevicename
Chn_aliasstringcarry
StartTimeunsigned intPicture coding format
EndTimeunsigned intPicture end time
SnapIdintPicture id
TypeintImage type
ImageAllInfobase64智能推图除图片外的全部信息
ObjectImagebase64Alarm graph
backGroundbase64background-image

Table 17

ParameterRangeTypeDescription
channelstringdevicename
chn_alaisstringeventpush carry
cc_typeinttype
cc_objNumintcc alarm count
cc_versionintversion
ccin_numintcc entry quantity
ccout_numintcc outgoing quantity
cc_in_sum_numintcc enters total number
cc_out_sun_numintcc out total quantity

Table 18

ParameterRangeTypeDescription
channelstringdevicename
chn_alaisstringeventpush carry
hm_typeinttype
map_numintnumber of alarm
hm_versionintversion number
hm_widthintThermogram width
hm_heightintHeat map height
map_lensintlength
hm_datatypeinttype of data
hm_objNumintThermogram quantity
hm_imgstringHeat map image data

Table 19

ParameterRangeTypeDescription
phystringthe Ethernet card
ipstringIP address
macstringmac address
ChnnelNamestringThe name of the page setting

eventpush is pushed by GET

URL

GET {user defined in Event > Http_listening}?EventType=xx&EventTime=xx&EventAction=xx&MACAddress=xx
table 20

Table 20

ParameterRangeTypeDescription
EventType"VideoMotion"
"VideoBlind"
"SoundDetect"
"SOD"
"LCD "
"PID "
"PD_VD"
"FD"
"CC"
"AD"
"CD"
"QD"
"LPD"
"RSD"
stringIPC alarm type
EventTimestringAlarm trigger time
EventAction"start"
"stop"
stringAlarm status of IPC
MACAddressstringMAC address of IPC ,like D094662C1A8D

Table 21

ParameterRangeTypeDescription
channelstringdevicename
motion_reportjson objectFor the motion alarm parameters, see table 22

Table 22

ParameterRangeTypeDescription
alarm_stateboolReport the motion alarm status to the remote. (Optional) true: start false: end
alarm_typesmdstringAlarm type

Table 23

ParameterRangeTypeDescription
dir_namestringName of the log storage directory
file_namestringLog file name

Sample1:
user defined url: /API/AlarmEvent/EventPush

GET /API/AlarmEvent/EventPush?EventType=VideoMotion&EventTime=2022-5-26 11:5:0&EventAction=start&MACAddress=5C-F2-07-49-0F-24 HTTP/1.1
Host: 172.16.8.63:123
Accept: */*
Content-Type: application/json;charset=UTF-8

Sample2:

POST /API/Event/Check?2020-10-17%2014:21:33 HTTP/1.1
Content-Type: application/json; charset=UTF-8
Accept: application/json, text/javascript, */*; q=0.01
X-csrftoken: 14559384d58d55d9d80bf4baf048684f366c77905d665d99ba1bde2cdcf81b08
Content-Length: 2438
Cookie: session=cc3ec99c6f1295489c86f8842e1dd719c194c637af5b965a23932c41188a3acc
{
version": "1.0",
    "data": {
        "plus_eventchk": "eventAiPushPic",
        "ext_data": {"subscribe_type": [{"event": ["all"]}]},
        "reader_id": 1,
        "sequence": 9595,
        "lap_number": null
    }
}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2976
{
    "result": "success",
    "data": {
        "alarm_list": [{
            "time": "2023-08-25T08:38:58Z+08:00",
            "system_alarm": [{
                "device_name": "RS-CH281M8ND-DF-WA2812PW",
                "hdd": {
                    "hdd_alarm_type": "Error",
                    "hdd_alarm_info": "NoDisk"
                }
            }],
            "channel_alarm": [{
                "channel": "CH1",
                "record_flag": {"h": "R"}
            }]
        }],
        "log_collect": {
             "dir_name":"2023_07_04",
             "file_name": "20230704_211532_ch1.log.tar.gz"
         },
        "reader_id": 1,
        "sequence": 9596
    }
}

Error Code

See Response Messages Body and Common error_code for more information.