Get&Push

Function

This API is used to get parameter for Event > Event check & Event push.

Event push

POST

For details, please refer to POST.

GET

For details, please refer to Get.

Event check

Response Message

Parameter Description

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 22
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)
report_alarmJson arraySingle channel alarm see table 20 (optional)
channel_alarmJson arraySingle channel alarm see table 5 (optional)
timestring"MM/DD/YYYYhh:mm:ss"
devInfo_ftp_check_updateJson ObjectNotify the client that no new version is detected.
storage_disk_refreshboolWhether the device is formatting the hard disk, true: HDD is being formatted; false: HDD is not being formatted(cloud dedicated)
nm_hot_standbyJson ObjectSee System > N+M Hot Standby Page > Range
Table 3
ParameterRangeTypeDescription
device_nameMax_length:31stringEquipment name (optional)
hddjsonSee Table 4 (optional)
abnormal_fansboolFan abnormality alarm
wrong_power_number1,2intIdentify a power supply anomaly
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 11
talkback_alarmJson array(optional) table 12
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"
"DsDistance"(cloud dedicated)
"RegionFocus"(cloud dedicated)
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
SnapedObjInfoJson ObjectPush data when PD&VD, PID, LCD intelligent alarm, as shown in the Table 23 below
PlateInfoJson ObjectPush data when LPD intelligent alarm, as shown in the table Table 24 below
FaceInfoJson ObjectThe push data when FD intelligent alarm, as shown in the Table 25 below
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
Table 20
ParameterRangeTypeDescription
channelstringdevicename
motion_reportjson objectFor the motion alarm parameters, see Table 21
Table 21
ParameterRangeTypeDescription
alarm_stateboolReport the motion alarm status to the remote. (Optional) true: start false: end
alarm_typesmdstringAlarm type
Table 22
ParameterRangeTypeDescription
dir_namestringName of the log storage directory
file_namestringLog file name

Table 23

ParameterRangeTypeDescription
Chn0intIPC only uses channel 0
StrChn"CH1"stringchannel name
StartTimelong longstart time, picture with
EndTimelong longend time, picture with
SnapIdintimage id
TypeintImage type see Table 26
ObjectImagestringBase64 encoded image data
BackgroundstringBase64 encoded background image data

Table 24

ParameterRangeTypeDescription
Id1-15charactersstringLicense plate number, unique identification.
GrpIdintgroup ID
SnapIdunsigned intThe Id of the picture when the front-end IPC captures
Type0intTypes of face capture objects
StrChnstringchannel
StartTimeunsigned long longSnapshot start time, such as: 2018-10-25 13:08:36, Unix timestamp (displayed according to UTC time zone uniformly)
EndTimeunsigned long longThe capture end time, such as: 2018-10-25 13:08:46, Unix timestamp (when displayed, it will be displayed uniformly in UTC time zone)
BgImgWidthunsigned intCapture the width of the picture
BgImgHeightunsigned intCapture the height of the picture
Chnintchannel
PlateColor0-5intLicense plate color, the possible values are as follows:
enum AIPlateColor_e {
    APC_Blue = 0,// blue
    APC_Green = 1,// green
    APC_Yellow = 2,// yellow
    APC_Black = 3,// black
    APC_White = 4,// White
    APC_Other = 5,// other colours
    APC_Max
};
CarBrandstringcar brand
CarTypestringcar model
SexintOwner gender: 0-male, 1-female
Owner"Mike"stringowner name
IdCode"415025199203050916"stringidentification number
Job"Software"stringProfession
Phone"12345678902"stringtelephone number
Domicile"Guangdong,Zhuhai,Xiangzhou ..."stringLiving
Remark"Detail of this person ..."stringRemark
ImageAllInfostringLicense plate picture information
PlateImg"base64(imgData)"stringlicense plate image
BgImg"base64(imgData)"stringBackground picture

Table 25

ParameterRangeTypeDescription
IdintFace Id, unique identification (nvr only)
GrpIdintGroup Id (nvr only)
SnapIdunsigned intThe Id of the picture when the front-end IPC captures
MD5stringMD5 value of the face image
Type0intTypes of face capture objects
StartTimeunsigned long longSnapshot start time, such as: 2018-10-25 13:08:36, Unix timestamp (displayed according to UTC time zone uniformly)
EndTimeunsigned long longThe capture end time, such as: 2018-10-25 13:08:46, Unix timestamp (when displayed, it will be displayed uniformly in UTC time zone)
BgImgWidthunsigned intCapture the width of the picture
BgImgHeightunsigned intCapture the height of the picture
ScoreintImage Score (Confidence)
SexintGender: 0-male, 1-female
Ageintage
GenderintFace attribute gender: 0-male, 1-female
Beautyintface score
fAttrAgeintface attribute age
GlassesTypeintGlasses type, 0: no glasses, 1: wear glasses (currently there is no distinction between sunglasses and ordinary glasses, all glasses are defaulted)
ExpressionintExpression type, 0: no expression, 1: smiling, 2: laughing
MouthMaskintWhether to wear a mask, 0: no mask, 1: with a mask
RaceintRace, 0: Yellow, 1: Caucasian, 2: Black, 3: Arab
Chnintchannel
StrChn“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…”
WIFI_CH1x”

The number of channels depends on the capabilities of the device.
stringchannel
SimilarityfloatSimilarity
ModifyCntintThe number of revisions, the upper layer is read-only, and is updated in real time by the device every time the face information is modified (nvr only)
ImageAllInfostringpicture information
Image1"base64(imgData)"stringImported ID photo
Image2"base64(imgData)"stringCapture face pictures
Image3"base64(imgData)"stringA snapshot of the human body
Image4"base64(imgData)"stringCapture background image
Name"Mike"stringName (for nvr only)
Country"China"stringNationality (nvr only)
Nation"Han"stringEthnic (nvr only)
NativePlace"Guangdong,Zhuhai"stringHometown (nvr only)
IdCode"415025199203050916"stringID card (nvr only)
Job"Software"stringwork (nvr only)
Phone"12345678902"stringPhone (nvr only)
Email"abcd@163.com"stringMail (for nvr only)
Domicile"Guangdong,Zhuhai,Xiangzhou ..."stringCurrent residence (nvr only)
Remark"Detail of this person ..."stringEvaluation (for nvr only)
Feature"base64(imgData)"stringeigenvalue
FtVersionintFeature value version, it is meaningful only when comparing feature values with the same version, if return feature value, please return this field

Table 26

Enumerated valueimplication
0Face
1HumanBody
2Vehicle
3PID HumanBody
4PID Vehicle
5LCD HumanBody
6LCD Vehicle
7NonVehicle
8PID NonVehicle
9LCD NonVehicle
10LicensePlate(LPD)
11Intrusion HumanBody
12Intrusion Vehicle
13Intrusion NonVehicle
14RegionEntrance HumanBody
15RegionEntrance Vehicle
16RegionEntrance NonVehicle
17RegionExiting HumanBody
18RegionExiting Vehicle
19RegionExiting NonVehicle

Sample1:

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": "SE-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"
         },
        "storage_disk_refresh": false
        "reader_id": 1,
        "sequence": 9596
    }
}

Error Code

See Response Messages Body and Common error_code for more information.