IPC External SDK API Documentation
IPC External SDK API Documentation
[Module List]
Error
Description
Code
0 Normal acceptance
101 Not logged in or session disabled
102 No permission
103 Session timeout
202 Interface call failure
203 ws too many connected users
204 Upgrade package error
The logged-in user does not have enough privileges to perform modification
210
operations
Error
Description
Code
211 Login user password is wrong, can't do the modification
220 Password security problems verification error
225 New password setting can’t be empty
230 Key verification error
302 ws End of push
303 Parsing audio and video recording file errors
0x40010001 Face module, module not initialized
0x40010002 Face module, parameter error
0x40010003 Face module, memory allocation failure
0x40010010 Face module, face gallery file does not exist
0x40010011 Face module, face gallery file is corrupted
0x40010012 Face module, database does not exist
0x40010013 Face module, file open failure
0x40010014 Face module, file open failure
0x40010015 Face module, face database data error
0x40010016 Face module, picture error
Face module, the person information error or the face picture exceeds the
0x40010017
maximum.
0x40010018 Face module, face picture duplicated
0x40010019 Face module, face gallery name duplicated
0x4001001A Face module, wrong image format
0x4001001B Face module, face gallery personnel information is full
0x4001001C Face module, Eigenvalues are being extracted, operation is prohibited
Face module, database operation failed, please operate again, this error
0x4001001D
generally has more than one link together to operate the database
0x4001001E Face module, no face detected
Corresponding
Type Type Description
enumeration values
PICTURE_CAPTURE_NULL Invalid image types 0
PICTURE_CAPTURE_MANUAL Manual capture 0x01
PICTURE_CAPTURE_MOTION Motion detection capture 0x02
PICTURE_CAPTURE_ALARM Alarm input capture 0x04
Motion detection or alarm input
PICTURE_CAPTURE_MOTION_OR_ALARM 0x08
trigger capture
Motion detection and alarm input
PICTURE_CAPTURE_MOTION_AND_ALARM 0x10
trigger simultaneously capture
PICTURE_CAPTURE_FACE Face Detection Capture 0x20
PICTURE_CAPTURE_INTRUSION Regional intrusion capture 0x40
PICTURE_CAPTURE_CROSS_BORDER Cross-border capture 0x80
PICTURE_CAPTURE_SCENE_CHANGE Scene change capture 0x100
PICTURE_CAPTURE_GOODS_LEGACY Goods legacy detection capture 0x200
PICTURE_CAPTURE_GOODS_TAKE Goods take detection capture 0x400
PICTURE_FACE_COMPARE Face comparison capture 0x800
PICTURE_CAPTURE_PEOPLE_STAY People wandering capture 0x1000
PICTURE_CAPTURE_PEOPLE_GATHERING People gathering capture 0x2000
PICTURE_CAPTURE_SMOKE Smoke sensor alarm capture 0x4000
PICTURE_CAPTURE_INFRARE Human infrared capture 0x8000
... ... ...
PICTURE_CAPTURE_ALL Query all types of images 0xFFFFFFFF
*The data type of the enumeration value is hexadecimal. If it is
sent in decimal, it needs to be converted.
Corresponding enumeration
Type Type Description
values
RECORD_TYPE_NORMAL Timed 0x01
RECORD_TYPE_MOTION Motion detection recording 0x02
RECORD_TYPE_ALARM Alarm capture 0x04
RECORD_TYPE_M_AND_A Motion detection and alarm recording 0x08
Search all smart types of recording
RECORD_TYPE_SMART_EVENT 0x80000000
videos
... ... ...
RECORD_TYPE_ALL Search all types of videos 0xFFFFFFFF
Corresponding enumeration
Type Type Description
values
PTZ_CONTROL_CMD_STOP Stop 0
PTZ_CONTROL_CMD_UP Up 10
PTZ_CONTROL_CMD_DOWN Down 11
PTZ_CONTROL_CMD_LEFT Left 12
PTZ_CONTROL_CMD_RIGHT Right 13
PTZ_CONTROL_CMD_LEFTUP Left up 14
PTZ_CONTROL_CMD_LEFTDOWN Left down 15
PTZ_CONTROL_CMD_RIGHTUP Right up 16
PTZ_CONTROL_CMD_RIGHTDOWN Right down 17
PTZ_CONTROL_CMD_ADDZOOM Zoom + 20
PTZ_CONTROL_CMD_DECZOOM Zoom - 21
PTZ_CONTROL_CMD_ADDFOCUS Focus + 22
PTZ_CONTROL_CMD_DECFOCUS Focus - 23
PTZ_CONTROL_CMD_ADDAPERTURE Aperture + 24
PTZ_CONTROL_CMD_DECAPERTURE Aperture - 25
PTZ_CONTROL_CMD_ZOOM_STOP Zoom stop 26
PTZ_CONTROL_CMD_FOCUS_STOP Focus stop 27
PTZ_CONTROL_CMD_ONEKEYFOCUS One key focus 31
PTZ_CONTROL_CMD_INITLENS Initializing the lens 32
PTZ_CONTROL_CMD_LENS_CORRECITON Lens Correction 33
Continuous horizontal
PTZ_CONTROL_CMD_AUTOPAN 34
rotation
Turn on automatic 3D
PTZ_CONTROL_CMD_AUTO_POSITION3D_START 35
positioning
Turn off automatic 3D
PTZ_CONTROL_CMD_AUTO_POSITION3D_STOP 36
positioning
PTZ_CONTROL_CMD_MANUAL_POSITION3D Manual 3D positioning 37
PTZ_CONTROL_CMD_MOVEPOINT Move to preset point 40
PTZ_CONTROL_CMD_CRUISE_START Start cruising 41
PTZ_CONTROL_CMD_PRESET_SET Set preset points 44
PTZ_CONTROL_CMD_PRESET_DEL Delete preset points 45
PTZ_CONTROL_CMD_CRUISE_STOP Stop Cruising 46
Return header:
HTTP/1.1 200 OK
Date: Fri, 05 Mar 2021 02:40:45 GMT
Server: webserver
Content-Length: 392
Connection: keep-alive
Keep-Alive: timeout=10, max=99
Content-Type: application/json
Api-Version: v1.2.0
Name Type
String string
Integer int
Floating point float
Object object (JSON object)
Arrays array
Boolean bool:true,false
Null value null
Request Format:
{
"action": "...",
"data": { ... }
}
Return Format:
{
"code": 0,
"msg":null,
"data": { ... }
}
Field Description
Parameter Example
Type Description
Name values
Module operation items, "get":get; "set":set, this item is a
action string "set"
mandatory item
error code,0: request success,1: request parameter content
code int 0 error,2: the corresponding return parameter content was not
found
Add description of error code information for future
msg string null
expansion
Add version number control, and the version number is placed in the H
TTP protocol header in the following format:
Master version number: When you make incompatible API changes,
Minor version number: When you make a backward-compatible functionala
ddition,
The Revision number: When you do a backward compatible bug fix.
Example: Api-Version: v1.2.0
Other
- The data body is assembled by using the json format, and both
set and get need to contain the following operational fields,
which have the following field format:
Parameter Example
Type Description
Name values
Module operation items, "get": get; "set": set, this item
action String “set"
is mandatory
7、Interface example
7.1、device session
7.1.1、Login process
Request method:
POST
step:
/api/session/login
Send example
{
"action": "set",
"data": {
"username": "admin",
"loginEncryptionType":"sha256-1",
"password": "422EnnrG2puKTxVWm0gzCQ==",
"sessionID":"e25ffee55bf17016f1c8f6047eb4ccda",
"datetime":"2021-03-05T17:50:02"
}
}
Return example:
{
"code": 0,
"data": {
"cookie":"sessionID=a854e2311ab87eb06c16ffd06fd3ebf7"
}
}
Parameter description
Parameter name type example value description
username string username
loginEncryptionType string "sha256-1" login encryption type
encryption password 32 bit,
password string "422EnnrG2puKTxVWm0gzCQ=="
hexadecimal,64 characters
code int return error code of interface call
text information of recording
cookie string "093e73287b7ba6d7a873bcad2db"
client status, 32 characters
sessionID string "093e73287b7ba6d7a873bcad2db" conversation ID,32 characters
Date Time, format:YYYY-MM-
datetime string "2021-03-05T17:50:02"
DDThh:mm:ss
Encrypted character:username+LICENSE_KEY+DateBase64+password,encryp
tion using sha256 encryption algorithm, return encrypted ciphertext.
7.1.2、Logout login
brief description:
device logout
Reuquest method:
POST
Request URL:
/api/session/logout
Send example:
{
"action": "set",
"data": {
"cookie":"sessionID=a854e2311ab87eb06c16ffd06fd3ebf7"
}
}
Return example:
{
"code": 0,
"msg":null
"data": null
}
parameter description:
parameter
type exampel value description
name
code int 0 return error code
action string "set" set operation method
cookie which was received
cookie string "sessionID=a854e2311ab87eb06c16ffd06fd3ebf7"
in login
brief description:
Request method:
POST
Request URL:
/api/session/heart-beat
parameter descryption:
Request URL:
/api/system/platform-capabilities
Request Method:
POST
{
"action": "get",
"data": {
}
}
{
"code": 0,
"data": {
"enableProductType": 0,
}
}
Example
Parameter Name Type Description
values
0:common ipc products 1:module ipc products 2:common ipc
enableProductType int
new naming rules
Short description:
Request URL:
/api/system/capabilities
Request Method:
POST
{
"action": "get",
"data": {
"type": 0
}
}
{
"code": 0,
"data": {
"enableDefog": 1,
"enableRotateAngle": 1,
"enableBackLight": 1,
"enableExposure": 1,
"enableH265": 1,
"enableWdr": 0,
"enableSLInhibition": 1,
"enableLdc": 1,
"enableWaterMark": 1,
"enableMirrorAndFlip": 0,
"enableWhiteBalance": 0,
"enableVideoAdjust": 0,
"enableOsdEx": 0,
"enableSmartir": 1,
"enableIsoMode": 0,
"enableHdr": 0,
"enablePtz": 2,
"enablePtzConfig": 0,
"enableWdr3to1Show": 1
"enableElectronicAntiShake": 0,
"enableFocus": 1,
"deviceType": 231,
"enablePasswdEncrypt": 1,
"enableFactorySetting": 1,
"enableNtpAutoCorrection": 1,
"enableAbHs": 1,
"enableRtspEncrypt": 1,
"enableIpv6": 1,
"enablePort": 1,
"enableGb28181": 0,
"enableBitdogPort": 1,
"enableWifi": 0,
"enableWifiNetworkManagement": 0,
"enablePppoe": 1,
"enableSnmp": 1,
"enableAudio": 1,
"enableAudioOut": 0,
"enableTalk": 0,
"enableAacHide": 1,
"enableSmartVideoRestart": 0,
"enableFish": 0,
"enableSmartVideoDisplay": 1,
"enableSdCard": 1,
"enableRec": 2,
"enableIpeye": 1,
"enableLimitRecFrameRate": 0,
"enableJpegCaptureHide": 1,
"enableRecDevTypeHide": 1,
"enableIo": 0,
"enableIoInput": 1,
"enablePrivacyMask": 0,
"enabelRoi": 1,
"enableRoiFrameRateEnable": 1,
"enableVideoTamper": 0,
"enableFace": 0,
"enableRegionalIntrusionDetectionus": 0,
"enableCrossBorderDetection": 0,
"enableSceneChangeDetection": 0,
"enableItemLegacyDetection": 0,
"enableItemPickingDetection": 0,
"enablePeopleStayDetection": 0,
"enablePeopleGatheringDetection": 0,
"enableSmartMotionDetection": 0,
"enableSmartPicture": 0,
"enableSmartModeHide": 1,
"enableMdRecStreamType": 0,
"enableNoUpload": 1,
}
}
{
"action": "get",
"data": {
"type": 1
}
}
{
"code": 0,
"data": {
"image": {
"enableDefog": 1,
"enableRotateAngle": 1,
"enableBackLight": 1,
"enableExposure": 1,
"enableH265": 1,
"enableWdr": 0,
"enableSLInhibition": 1,
"enableLdc": 1,
"enableWaterMark": 1,
"enableMirrorAndFlip": 0,
"enableWhiteBalance": 0,
"enableVideoAdjust": 0,
"enableOsdEx": 0,
"enableSmartir": 1,
"enableIsoMode": 0,
"enableHdr": 0,
"enablePtz": 2,
"enablePtzConfig": 0
"enableRotateOrLdc": 0
}
}
}
Parameter Example
Type Description
Name values
Request capability set type 0: All types of parameters 1: Image
configuration parameters 2: System configuration parameters 3:
type int Network configuration parameters 4: Audio and video configuration
parameters 5: Storage configuration parameters 6: Event
configuration parameters 7: smart event configuration parameters
Example
Parameter Name Type Description
values
Example
Parameter Name Type Description
values
enableDefog int Defog enable 1:enable 0:disable
enableRotateAngle int Initialize corridor mode 1:enable 0:disable
Initialize backlight 0:Remove backlight amount
enableBackLight int
1:Show backlight amount 2:Remove backlight
enableIsoMode int Initialize iISO mode 1:enable 0:disable
Initialize white balance (original variable:
enableWhiteBalance int ucGreenGain) 0:remove green gain 1:show green gain
2:remove white balance
Initialize exposure 0:Close exposure 1:Open exposure
enableExposure int
(with auto gain) 3:Open exposure (without auto gain)
enableHdr int Initialize hdr 1:enable 0:disable
Initialize h265+/h264+ 0:turn off smart+, turn off I
enableH265 int
frame interval 1:turn on smart + 2:turn off smart+
enableOsdEx int Initialize osd extensions Smart Platform
enableWdr int Remove wide dynamic function 0:Show 1:Don't show
enableLdc int Distortion correction 0:disable 1:enable
enableSLInhibition int New add HLC function 0:disable 1:enable
Initialize ptz 0:off 1:rotate+zoom 2:zoom 3:zoom
enablePtz int
4:preset point+cruise
enablePtzConfig int Initialize network PTZ 1:enable 0:disable
Initialize video adjustment (original variable:
enableVideoAdjust int 2DDNR) 0:Remove digital 2DNR 1:Show digital 2DNR
2:Remove video adjustment
Initialize Smartir 0: Displays IRCUT.1 : Displays
day/night switch, enables light mode. 2: No IRCUT,
no Smartir.3 : Displays day/night switch, displays
enableSmartir int fill light mode.4 : Show day/night mode, show
day/night switch.5 : Display day-night switch, hide
light mode, hide light brightness. 6: basically
added maintain full color
enableWaterMark int Watermark 0:disable 1:enable
enableMirrorAndFlip int Remove mirror function 0:Show 1:Don't show
enableElectronicAntiShake int Initialize electronic anti-shake 1:enable 0:disable
enableWdr3to1Show int Show three frames in one option 1:hide 0:show
enableFocus int Initialize focus mode 1:enable 0:disable
Distortion correction and corridor mutually
enableRotateOrLdc int exclusive 0:not mutually exclusive 1:mutually
exclusive
Example
Parameter Name Type Description
values
deviceType int Device type Fill in ARG_PLATFORM_TYPE
enablePasswdEncrypt int Initialize key retrieval password 0:disable 1:enable
Example
Parameter Name Type Description
values
Restore factory settings with new full recovery
enableFactorySetting int
option 0:disable 1:enable
enableNtpAutoCorrection int Initialize ucNtpAutoCorrection 0:disable 1:enable
Initialize the online upgrade device type
enableAbHs int 0:Ambarella 1:Hisilicon 2:zoom 3:Fullhan 4:RK
5:MSTAR 6:GK
Initialize onvif/rtsp encryption authentication
enableRtspEncrypt int
1:enable 0:disable
enableApp int Initialize app 0:bivision 1:ivs365
Example
Parameter Name Type Description
values
enableIpv6 int IPV6 support 1:enable 0:disable
enableGb28181 int Initialize GB28181 1:enable 0:disable
Initialize BitdogPort 1:enable 0:disable
enableBitdogPort int
2:ALIIOT
HIKVISION XM port 0:Show HIKVISION + XM port
enablePort int
1:HIKVISION + XM 2:Show HIKVISION port
enableWifi int Initialize WIFI 1:enable 0:disable
enableWifiNetworkManagement int WIFI network management list 0:disable 1:enable
enablePppoe int Initialize Pppoe 1:enable 0:disable
enableFtp int Initialize Ftp 1:enable 0:disable
enableSmtp int Initialize Smtp 1:enable 0:disable
enableDdns int Initialize Ddns 1:enable 0:disable
enableSnmp int SNMP enable 0:disable 1:enable
Example
Parameter Name Type Description
values
enableAudio int Audio 1:enable 0:disable
enableTalk int Initialize intercom 1:enable 0:disable
Initialize AudioOut 0:input mic output no 1:input
mic/line output external/internal 2:input
enableAudioOut int
line(initial 0) output external(initial 0) 3:input
mic/line output no 4:hide audio input, audio output
Configure the video interface to display the switch
enableSmartVideoRestart int
resolution restart 0:disable 1:enable
enableAacHide int Hide AAC audio option 1:hide 0:show
enableFish int Initialize fish eye 1:enable 0:disable
Configure the video interface display type currently
enableSmartVideoDisplay int
0 : Normal IPC video display interface 1 : Smart IPC
Example
Parameter Name Type Description
values
video display interface
enableRoi int ROI 1:enable 0:disable
enableRoiFrameRateEnable int Graying ROI frame rate setting 1:enable 0:disable
enableDigitalZoom int DigitalZoom 1:enable 0:disable
enableAudioAlarm int Voice alarm 1:enable 0:disable
Example
Parameter Name Type Description
values
Initialize sd card (used with ucREC) 1:enable
enableSdCard int
0:disable
Initialize recording (used with ucSDCard) 1:enable
enableRec int
0:disable
enableIpeye int Initialize IPEYE 1:enable 0:disable
enableLimitRecFrameRate int Web recording frame rate limit 0:disable 1:enable
JPEG capture options 0:Show all options 1:Hide
image format, resolution, start event capture,
enableJpegCaptureHide int
capture number, show capture interval 2:Hide all
capture options
enableRecDevTypeHide int Remove storage device type 1:Show 0:Do not show
enableNoUpload int Upload not supported
enableCloudStorage int Cloud storage, 0:disable 1:enable
enableSnapshotPicRecording int Capture video 0:disable 1:enable
Example
Parameter Name Type Description
values
Initialize alarm input 0:disable 1:alarm input +
enableIo int
alarm output 2:alarm input
enableVideoTamper int Initialize masking alarm 1:enable 0:disable
enablePrivacyMask int Remove privacy masking 0:Show 1:Don't show
Alarm recording and motion detection + alarm
enableIoInput int
recording 1:enable 0:disable
enableMdRecStreamType int Initialize ucMDVideoStreamType
Example
Parameter Name Type Description
values
Initial face recognition 0:None 1:
enableFace int
Capture 2: Comparison 3: Thermal imaging
enableRegionalIntrusionDetectionus int Area intrusion detection 1:enable
Example
Parameter Name Type Description
values
0:disable
Cross border detection 1:enable
enableCrossBorderDetection int
0:disable
Scene change detection 1:enable
enableSceneChangeDetection int
0:disable
enableItemLegacyDetection int Item legacy detection 1:enable 0:disable
Item picking detection 1:enable
enableItemPickingDetection int
0:disable
enablePeopleStayDetection int People stay detection 1:enable 0:disable
People Wandering detection 1:enable
enablePeopleGatheringDetection int
0:disable
Configure the humanoid warning function
enableSmartMotionDetection int
0:disable 1:enable
Configure picture function 0:disable
enableSmartPicture int
1:enable
Smart detection mode 1:Display 0:No
enableSmartModeHide int
display
enableSmartEventDisplay int Smart event 0:disable 1:enable
Smart resource allocation 0:disable
enableSmartResource int
1:enable
Brief description:
Request URL:
/api/system/device-info
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"devType": 0,
"platformType": 182,
"devName": "IPC",
"devId": "8888888888888",
"manufacturers": "",
"softwareVersion": "0.1.12.6",
"firmwareVersion": "3516CV500_IMX307_X10T1A1M0C0P1_W_20.1.12.6",
"platform": "16CV500",
"devSensor": "307"
}
}
{
"action": "set",
"data": {
"devName": "IPC"
}
}
{
"code": 0,
"data": {}
}
Parameter Description:
Brief description:
Request URL:
/api/system/system-time
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"year": 2020,
"month": 4,
"day": 16,
"hour": 4,
"minute": 18,
"second": 38,
"model": 0,
"timeZone": 24,
"nvrModify": 0,
"ntpServerAddr": "time.windows.com",
"ntpAutomatic": 0,
"ntpInterval": 0
}
}
{
"action": "set",
"data": {
"year": 2020,
"month": 4,
"day": 16,
"hour": 4,
"minute": 18,
"second": 38,
"model": 0,
"timeZone": 24,
"nvrModify": 0,
"ntpServerAddr": "time.windows.com",
"ntpAutomatic": 0,
"ntpInterval": 0
}
}
Parameter description:
Parameter
Type Example values Description
Name
year int Year
month int Month
day int Day
hour int Hour
minute int minute
second int second
Time mode, 0 manual setting, 1
model int synchronization with PC, 2 NTP
service
Time zone, (-12.0)~(12.0) Default
timeZone int
is East 8
(ipc only) whether to allow nvr to
nvrModify int
modify ipc time, 0 no 1 yes
ntpAutomatic bool NTP auto time switch, 0 off 1 on
ntpInterval int NTP Automatic time interval
ntpServerAddr string "time.windows.com" NTP server address
code int Return error code
Brief description:
Request URL:
/api/system/auto-maintain
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"enable": 1
"type": 2,
"week": 3,
"day": 3,
"hour": 3,
"minute": 3,
"second": 3,
}
}
{
"action": "set",
"data": {
"enable": 1
"type": 2,
"week": 3,
"day": 3,
"hour": 3,
"minute": 3,
"second": 3,
}
}
{
"code": 0,
"data": {}
}
Parameter description:
Short description:
Request URL:
/api/system/summer-time
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"enable": 1,
"start": {
"month": 3,
"weekNumber": 1,
"week": 0,
"hour": 2,
"day": 0
},
"end": {
"month": 9,
"weekNumber": 5,
"week": 0,
"hour": 2,
"day": 0
},
"offsetTime": 30,
"dstType": 1
}
}
{
"action": "set",
"data": {
"enable": 1,
"start": {
"month": 3,
"weekNumber": 1,
"week": 0,
"hour": 2,
"day": 0
},
"end": {
"month": 9,
"weekNumber": 5,
"week": 0,
"hour": 2,
"day": 0
},
"offsetTime": 30,
"dstType": 1
}
}
{
"code": 0,
"data": {}
}
Parameter Description:
Brief description:
Request URL:
/api/system/reboot
Request Method:
POST
Sending example
{
"action": "set",
"data": null
}
Return Example
{
"code": 0,
"data": {}
}
Parameter Name Type Example values Description
code int Return Code
Brief description:
Request URL:
/api/system/default
Request Method:
POST
Sending example
{
"action": "set",
"data": {
"type": 0
}
}
Return Example
{
"code": 0,
"data": {}
}
Brief description:
Request URL:
/api/system/export-params
Request Method:
POST
Sending example
{
"action": "get",
"data": null
}
Return Example
{
"code": 0,
"data": {
"url": "/filedir/3516DV200_IMX335_B1T1A1M0C0P1_W_20.1.2.3.zip",
"filename": "3516DV200_IMX335_B1T1A1M0C0P1_W_20.1.2.3.zip"
}
}
/filedir/3516DV200_IMX335_B1T1A1M0C0P1_W_20.1.2.3.zip
Request Method:
GET
Brief description:
Log Management
Request URL:
/api/system/log-manager
Request Method:
POST
{
"action": "get",
"data": {
"startTime": "1586995200",
"endTime": "1587081599",
}
}
{
"code": 0,
"data": {
"logList": [
{
"idx": 1,
"time": "1587010286",
"type": 1,
"message": "Clear system log"
},
{
"idx": 2,
"time": "1587010173",
"type": 1,
"message": "Clear system log"
}
]
}
}
Return:
{
"code": 0,
"data": {}
}
Parameter description:
Brief description:
Request URL:
/api/network/interfaces
Request Method:
POST
{
"action": "get",
"data": null
}
{
"action": "set",
"data": {
"enableDhcp": false,
"enableAllNetConnect": false,
"enableIpAddrTest": 0,
"ip": "192.168.1.168",
"netMask": "255.255.255,0",
"gateway": "192.168.1.1",
"dns1": "192.168.1.1",
"dns2": "192.168.1.1",
"ipv6Mode": 0,
"maxTransUnit": 0,
"ipv6": "",
"subNetMaskV6": 0,
"gatewayV6": "",
"multicast": "",
"mac": "11:22:33:44:55:66"
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Brief description:
Request URL:
/api/network/port
Request Method:
POST
{
"action": "get",
"data": {
"type": 255
}
}
{
"code":0,
"data":[
{
"type":1,
"enable":true,
"property":{"rtspProtocol ":{"port":554,"encrypt":0}}
},
{
"type":2,
"enable":true,
"property":{"hkProtocol ":{"port":0,"enable":true}}
},
{
"type":8,
"enable":true,
"property":{"onvifProtocol ":{"authentication":1,"port":8
999,"enable":true}}
},
{
"type":16,
"enable":true,
"property":{"httpProtocol ":{"port":80}}
},
{
"type":64,
"enable":true,
"property":{"httpsProtocol ":{"port":443}}
},
{
"type":32,
"enable":true,
"property":{
"xmProtocol":{"port":0,"enable":true}}
},
{
"type":72,
"enable":true,
"property":{"bitdogProtocol ":{"port":6000,"encrypt":0}}
}
]
}
{
"action":"set",
"data":[
{
"type":1,
"enable":true,
"property":{"rtspProtocol ":{"port":554,"encrypt":0}}
},
{
"type":2,
"enable":true,
"property":{"hkProtocol ":{"port":8000,"enable":true}}
},
{
"type":8,
"enable":true,
"property":{"onvifProtocol ":{"authentication":1,"port":8
999,"enable":true}
}
},
{
"type":16,
"enable":true,
"property":{"httpProtocol ":{"port":80}}
},
{
"type":64,
"enable":true,
"property":{"httpsProtocol ":{"port":443}}
},
{
"type":32,
"enable":true,
"property":{"xmProtocol":{"port":34576,"enable":true}
}
},
{
"argType":72,
"enable":true,
"property":{"bitdogProtocol ":{"port":6000,"encrypt":0}}
}
]
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter
Type Example values Description
Name
Enabled or not false off true
enable bool
enabled
Protocol type: Fill in
type int
ARG_AGREEMENT_TYPE
rtspProtocol object {"port": 554,"encrypt": 0 } rtsp protocol
{"authentication": 1,"port":
onvifProtocol object onvif Protocol
8999,"enable": true}
httpProtocol object {"port": 80} http protocol
hkProtocol object {"port": 0,"enable": false} hk agreement
xmProtocol object {"port": 0,"enable": false} xm protocol
port int Protocol Port
Bitdog Ssl encryption 1:enable
encrypt int
0:disable
Whether to open ID authentication: 0
authentication int
off 1 on
7.3.3、DDNS parameters configuration attribute
Brief description:
Request URL:
/api/network/ddns
Request Method:
POST
{
"action": "get",
"data": {
"loginName": "admin",
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "afe13ds34cdjk08c"
}
}
{
"code": 0,
"data": {
"enable": false,
"serverType": 0,
"status": 0,
"serverIp": "",
"serverPort": 0,
"domain": "",
"defaultDomain": "",
"username": "422EnnrG2puKTxVWm0gzCQ==",
"alias": "",
"alivePeriod": 0,
"serviceType": 0
}
}
{
"action": "set",
"data": {
"enable": false,
"serverType": 0,
"status": 0,
"serverIp": "",
"serverPort": 0,
"domain": "",
"defaultDomain": "",
"username": "422EnnrG2puKTxVWm0gzCQ==",
"password": "422EnnrG2puKTxVWm0gzCQ==",
"alias": "",
"keepAlive": 0,
"serviceType": 0,
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter
Type Example values Description
Name
loginName string admin Login User Name
enable bool Whether to enable,false close ,true enable
Server Type 0-Peanut Shell, 1-NOIP, 2-Dyn, 8-Planet
serverType int
Dynamic DNS, 9-Planet Easy DDNS
serverIp string Server ip
serverPort int Server port
domain string Dynamic Domain
defaultDomain string Default Domain Name
User name, encryption, for AES128 encryption type,
username string
encrypted data for base64 encoding
Password, encryption, for AES128 encryption type,
password string
encrypted data for base64 encoding
alias string Alias
keepAlive int Keep alive time
serviceType int Service Type: 0 - Normal User 1 - Administrator
encryptionType string "aes128-1" Encryption type.
status int 0 Login status 0: Successful 1: Login in progress
iv string "abcde1234567890" Offset ,16in characters, for AES encryption type
datetime string "abcde1234567890" Date time. Format: "YYYY-MM-DDThh:mm:ss"
Encryption instructions
The transmission of sensitive information such as user name and password is encrypted by
ase128 CBC algorithm, encryption padding zeropadding, encryption key and offset iv. The
Encryption instructions
encryption key is generated by the client and the server by their own calculation of the
agreed keyType, and is not passed. The offset iv and time are passed to the server in the
parameters when the content is requested.
Brief description:
Request URL:
/api/network/ftp
Request Method:
POST
{
"action": "get",
"data": {
"loginName": "admin",
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
}
}
{
"code": 0,
"data": {
"enable": 1,
"serverIp": "192.168.1.1",
"serverPort": 21,
"username": "422EnnrG2puKTxVWm0gzCQ==",
"enableAnonymous": 0,
"path": "Default_Folder",
"enableAutoCover": 0,
"attfileFormat": 1,
"firstDir": 0,
"secondDir": 0
}
}
{
"code": 0,
"data": {}
}
{
"code": 0,
"data": {
"ftpTestStatus": 1
}
}
Parameter Description
Brief description:
Request URL:
/api/network/smtp
Request Method:
POST
{
"action": "get",
"data": {
"loginName": "admin",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890",
"encryptionType": "aes128-1"
}
}
{
"code": 0,
"data": {
"enable": false,
"attfileformat": 0,
"alarmDuration": 0,
"serverPort": 25,
"anonymity": false,
"smtpEncryptionType": 0,
"time": 100,
"accessory": 100,
"accessoryType": 100,
"username": "[email protected]",
"server": "SMTP.domain.com",
"sender": "[email protected]",
"receiver1": "[email protected]",
"receiver2": "[email protected]",
"receiver3": "[email protected]",
"theme": "IP Camera: Motion Detected"
}
}
{
"action": "set",
"data": {
"enable": true,
"sender": "[email protected]",
"server": "SMTP.domain.com",
"serverPort": 25,
"attfileformat": 0,
"alarmDuration": 0,
"smtpEncryptionType": 0,
"username": "[email protected]",
"password": "009EnnrG2puKTxVWm0gzCQ==",
"receiver1": "[email protected]",
"receiver2": "[email protected]",
"receiver3": "[email protected]",
"anonymity": false,
"time": 100,
"accessory": 100,
"accessoryType": 100,
"theme": "IP Camera: Motion Detected",
"enableSmtpTest": 1,
"loginName": "admin",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890",
"securityType": "aes128-1"
}
}
Set the parameters to return:
{
"code": 0,
"data": {
"smtpTestStatus": 0
}
}
Parameter Description
Brief description:
Request URL:
/api/network/p2p
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"enable": true,
"serialNumber": "8888888888888",
"iosAppAddr": "https://itunes.apple.com/app/id1419463554",
"androidAppAddr": "https://play.google.com/store/apps/details?id=
com.gzch.lsplat.bitdog",
}
}
{
"action": "set",
"data": {
"enable": true
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter
Type Example values Description
Name
Whether to
enable bool
enable freeip
serialNumber string "8888888888888" Serial number
Apple app
iosAppAddr string "https://itunes.apple.com/app/id1419463554"
address
"https://play.google.com/store/apps/details?id=com.gz Android app
androidAppAddr string
ch.lsplat.bitdog" address
Brief description:
Request URL:
/api/network/p2p-status
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"status": 0,
}
}
Parameter Description
Brief description:
Request URL:
/api/network/pppoe
Request Method:
POST
{
"ation": "get",
"data": {
"loginName": "admin",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890",
"encryptionType ": "aes128-1"
}
}
{
"code": 0,
"data": {
"enable": true,
"username": "422EnnrG2puKTxVWm0gzCQ==",
"ip": "0.0.0.0"
}
}
{
"ation": "set",
"data": {
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890",
"enable": true,
"username": "422EnnrG2puKTxVWm0gzCQ==",
"password": "422EnnrG2puKTxVWm0gzCQ=="
}
}
{
"code": 0,
"data": null
}
Parameter description:
Parameter
Type Example values Description
Name
enable bool Enabled, false off, true on
User name, need to encrypt, for AES128
username string "422EnnrG2puKTxVWm0gzCQ==" encryption type, encrypted data for
base64 encoding
Password, need to encrypt, for AES128
password string "422EnnrG2puKTxVWm0gzCQ==" encryption type, encrypted data for
base64 encoding
encryptionType string "aes128-1" Encryption type.
Offset ,16in characters, for AES
iv string "abcde1234567890"
encryption type
Date time. Format: "YYYY-MM-
datetime string
DDThh:mm:ss"
enable bool Enabled, false off, true on
ip string "0.0.0.0" Device Dynamic IP
code int Return error code
Encryption instructions
The transmission of sensitive information such as user name and password is encrypted by
ase128 CBC algorithm, encryption padding zeropadding, encryption key and offset iv. The
encryption key is generated by the client and the server by their own calculation of the
agreed keyType, and is not passed. The offset iv and time are passed to the server in the
parameters when the content is requested.
Brief description:
/api/network/gb28181
Request Method:
POST
{
"action": "get",
"data": {
"loginName": "admin",
"encryptionType ": "aes128-1",
"dateTime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
}
}
{
"code": 0,
"data": {
"enable": true,
"version": 1,
"sipServerId": "34020000002000000001",
"serverDomainName": "3402000000",
"sipServerIp": "192.168.1.1",
"sipServerPort": 5060,
"sipLocalPort": 5060,
"deviceId": "34020000001320000001",
"deviceCheckId": "34020000001320000001",
"devicePwd": "admin123456",
"civiilCode": "34020000001320000001",
"resignerState": 0,
"steamType": 1,
"transportProtocol": 0,
"registerExpiry": 3600,
"keepAliveCycleTime": 60,
"resignerCycleTime": 60,
"maxKeepAliveTimes": 3,
"sipAlarmChannelId": "34020000001320000001",
"sipVideoChannelId": "34020000001320000001",
"sipAudioOutChannelId": "34020000001320000001",
}
}
{
"action": "set",
"data": {
"loginName": "admin",
"encryptionType": "aes128-1",
"dateTime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
"enable": true,
"version": 1,
"sipServerId": "34020000002000000001",
"serverDomainName": "3402000000",
"sipServerIp": "192.168.1.1",
"sipServerPort": 5060,
"sipLocalPort": 5060,
"deviceId": "34020000001320000001",
"deviceCheckId": "34020000001320000001",
"devicePwd": "admin123456",
"civiilCode": "34020000001320000001",
"cStatus": 0,
"steamType": 1,
"transportProtocol": 0,
"registerExpiry": 3600,
"keepAliveCycleTime": 60,
"registerCycleTime": 60,
"maxKeepAliveTimes": 3,
"sipAlarmChannelId": "34020000001320000001",
"sipVideoChannelId": "34020000001320000001",
"sipAudioOutChannelId": "34020000001320000001",
}
}
{
"code": 0,
"data": {}
}
Remarks
For more return error codes, please see the error code
descriptions on the home page.
Encryption instructions
The transmission of sensitive information such as user name and password is encrypted by
ase128 CBC algorithm, encryption padding zeropadding, encryption key and offset iv. The
encryption key is generated by the client and the server by their own calculation of the
agreed keyType, and is not passed. The offset iv and time are passed to the server in the
parameters when the content is requested.
Brief description:
Request URL:
/api/network/wifi
Request Method:
POST
{
"action":"get",
"data":null
}
{
"code":0,
"data":{
"wifiInfo":[,
{
"ssid":"03WiFi",
"channel": 0,
"password": "",
"ssidSafeKey": "",
"ssidType": 0,
"ssidSafeType": 0,
"strength": 40,
"isScane": 0,
"passwordType": 1,
"connectStatus": 0,
"enableDhcp": 0,
"ip": "",
"netMask": "",
"gateway": "",
"dns1": "",
"dns2": "",
"mac": ""
},
{
"ssid":"TP-LINK_48E708",
"channel": 0,
"password": "",
"ssidSafeKey": "",
"ssidType": 0,
"ssidSafeType": 0,
"strength": 40,
"isScane": 0,
"passwordType": 1,
"connectStatus": 0,
"enableDhcp": 0,
"ip": "",
"netMask": "",
"gateway": "",
"dns1": "",
"dns2": "",
"mac": ""
},
]
}
}
{
"action":"set",
"data":{
"connectStatus": 1,
"ssid": "MERCURY_CBDD60-123",
"password": "123456789",
"passwordType": 1,
"enableDhcp": 1,
"ip": "192.168.1.102",
"netMask": "255.255.255.0",
"gateway": "192.168.1.1",
"dns1": "211.136.192.6",
"dns2": "",
"channel": 0,
"netCardNum": 0,
"ssidSafeKey": "",
"ssidType": 0,
"ssidSafeType": 0,
"strength": 100,
"isScane": 0,
"mac": "",
"opertateType": 2
"loginName": "admin",
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter
Type Example values Description
Name
loginName string admin Login User Name
wifiInfo array Information on connectable WiFi
Connection status, 0:Not connected,
connectStatus int
1:Connected
ssid string "MERCURY_CBDD60-123" wifi name
Encryption password, for AES128 encryption
password string "123456789" type, encrypted data for base64 encoding,
length range 8-15 bytes
Password type, 0:no password, 1:with
passwordType int
password
enableDhcp int DHCP enable, 0:off, 1:enable
ip string "192.168.1.102" IP Address
netMask string "255.255.255.0" subnet mask
gateway string "192.168.1.1" Gateway
dns1 string "211.136.192.6" dns server 1
dns2 string dns server 2
Parameter
Type Example values Description
Name
channel int Channel number
ssidSafeKey string Security Network Types
ssidType int Encryption Type
ssidSafeType int Security Type
strength int 100 0-100 100 strongest
isScane int 0 Scan to get,1 manually added
Mac server address: fill in the string
mac string
e.g. "A1:B2:C3:D4:E5:F6"
0(add)、1(del)、2
WiFi operation type, fill in
opertateType int (connect)、3
HS_WIFI_OPERATE_TYPE
(disconnect)
Encryption type. Get at the encryption
encryptionType string “aes128-1”
capability set
Offset ,16 characters, for AES encryption
iv string “abcde1234567890”
type
datetime string Date time. Format: "YYYY-MM-DDThh:mm:ss"
Encryption instructions
Brief description:
Request URL:
api/network/snmp
Request Method:
POST
{
"code": 0,
"data": {
"enable": false,
"enableType": 1,
"serverPort": 161,
"readCommunity": "public",
"writeCommunity": "private",
"trapHostIP": "",
"trapHostPort": 162,
"trapName": "public",
"roUser": {
"username":"public",
"secLevel": 1,
"authType": 1,
"privType": 1,
}
}
}
{
"action": "set",
"data": {
"enable": false,
"enableType": 1,
"serverPort": 161,
"readCommunity": "public",
"writeCommunity": "private",
"trapHostIP": "",
"trapHostPort": 162,
"trapName": "public",
"roUser": {
"username":"public",
"secLevel": 1,
"authType": 1,
"privType": 1,
"authpass": "12345678",
"privpass": "12345678"
},
"loginName": "admin",
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
}
}
Parameters:
Parameter
Type Example values Description
Name
enable bool false 0- Disable SNMP, 1- Indicates SNMP is enabled
1- indicates enable snmpV1, 2- indicates enable
enableType int 1
snmpV2, 3- indicates enable snmpV3
snmp message receiving port, default 161, port
serverPort int 161
range 1-65535
Read community, up to 31 bytes, letter, number and
readCommunity string ”public”
underline only, default "public"
Write community, up to 31 bytes, letter, number
writeCommunity string ”private”
and underline only, default "private"
trapHostIP string IP only supports IPV4
trap host port, port range 1-65535, default value
trapHostPort int
162
trap host name, maximum length 31 bytes, letter,
trapName string
number and underline only
roUser object Read-only users
User name, maximum length 31 bytes, read and write
username string “admin”
security name cannot be the same
Security level: 1- not verified, 2- Not authorized
secLevel int 1 verification, 3- authorized verification,the code
is written dead as 3
authType int 1 Authentication type: 0- MD5, 1- SHA, 2- None
privType int 1 Encryption type: 0 - DES, 1 - AES, 2 - None
Authentication password, for AES128 encryption
authpass string "12345678" type, encrypted data for base64 encoding, length
range 8-15 bytes
Encryption password, for AES128 encryption type,
privpass string "12345678" encrypted data for base64 encoding, length range
8-15 bytes
Encryption type. Get at the encryption capability
encryptionType string “aes128-1”
set
iv string “abcde1234567890” Offset ,16in characters, for AES encryption type
datetime string Date time. Format: "YYYY-MM-DDThh:mm:ss"
Encryption instructions
Brief description:
*Request URL:
/api/network/wifiAPInfo
Request Method:
POST
{
"action":"get",
"data": NULL
}
{
"code": 0,
"data": {
"enableAP": 1,
"enableDhcp": 1,
"enableAuthentication": 1,
"authenticationMethod": 2,
"wirelessNetworkMode": 0,
"wirelessWorkChannel": 0,
"IPRange": 100,
"devIP": "192.168.1.100",
"devSubNetMask": "255.255.255.0",
"devGateway": "192.168.1.1",
"firstIP": "192.168.1.101",
"dhcpDns": "192.168.1.1"
"dhcpGateway": "192.168.1.1"
"APSsid": "Wifi-free"
"APPassword": ""
}
}
Setting example Setting parameter request:
{
"code": 0,
"data": {
"enableAP": 1,
"enableDhcp": 1,
"enableAuthentication": 1,
"authenticationMethod": 2,
"wirelessNetworkMode": 0,
"wirelessWorkChannel": 0,
"IPRange": 100,
"devIP": "192.168.1.100",
"devSubNetMask": "255.255.255.0",
"devGateway": "192.168.1.1",
"firstIP": "192.168.1.101",
"dhcpDns": "192.168.1.1",
"dhcpGateway": "192.168.1.1",
"APSsid": "Wifi-free",
"APPassword": "12345678",
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
}
}
{
"code": 0,
"data": {}
}
Parameters:
Encryption instructions
Brief description:
Request URL:
/api/video/video-encode-scope
Request Method:
POST
Sending example
{
"action": "get",
"data": null
}
Return Example
{
"code": 0,
"data": [
[
{
"encodeScope": 7,
"h264Attr": {
"resolutionCnt": 6,
"encodeType": 0,
"resolutionList": [
{"encodeType":0,"width":2592, "height":1944,"suitableFram
eRate":20, "suitableBitRate":6144,"maxFrameRate":20},
{"encodeType":0,"width":2560, "height":1920,suitableFrame
Rate":20, "suitableBitRate":6144,"maxFrameRate":20},
{"encodeType":0,"width":2592, "height":1536,"suitableFram
eRate":25, "suitableBitRate":6144,"maxFrameRate":25},
{"encodeType":0,"width":2560, "height":1440,"suitableFram
eRate":25, "suitableBitRate":6144,"maxFrameRate":25},
{"encodeType":0,"width":1920, "height":1080,"suitableFram
eRate":25, "suitableBitRate":4096,"maxFrameRate":25},
{"encodeType":0,"width":1280, "height":720,"suitableFrame
Rate":25, "suitableBitRate":2048,"maxFrameRate":25},
]
},
"h265Attr": {
"resolutionCnt": "6",
"encodingType": "0",
"resolutionList": [
{"encodeType":0,"width":2592, "height":1944,"suitableFram
eRate":20, "suitableBitRate":6144,"maxFrameRate":20},
{"encodeType":0,"width":2560, "height":1920,suitableFrame
Rate":20, "suitableBitRate":6144,"maxFrameRate":20},
{"encodeType":0,"width":2592, "height":1536,"suitableFram
eRate":25, "suitableBitRate":6144,"maxFrameRate":25},
{"encodeType":0,"width":2560, "height":1440,"suitableFram
eRate":25, "suitableBitRate":6144,"maxFrameRate":25},
{"encodeType":0,"width":1920, "height":1080,"suitableFram
eRate":25, "suitableBitRate":4096,"maxFrameRate":25},
{"encodeType":0,"width":1280, "height":720,"suitableFrame
Rate":25, "suitableBitRate":2048,"maxFrameRate":25},
]
},
"mjpegAttr": {
"resolutionCnt": 1,
"encodeType": 0,
"resolutionList": [
{"encodingType":0,"width":1920, "height":1080,"suitableFr
ameRate":15, "suitableBitRate":10240,"maxFrameRate":15},
]
}
},
{
"encodeScope": 7,
"encodeBiterateMin":64
"encodeBiterateMax":12000
"h264Attr": {
"resolutionCnt": 1,
"encodeType": 0,
"resolutionList": [
{"encodingType":0,"width":720, "height":576,"suitableFram
eRate":20, "suitableBitRate":1024,"maxFrameRate":20},
]
},
"h265Attr": {
"resolutionCnt": 1,
"encodeType": 0,
"resolutionList": [
{"encodingType":0,"width":720, "height":576,"suitableFram
eRate":20, "suitableBitRate":512,"maxFrameRate":20},
]
},
"mjpegAttr": {
"resolutionCnt": 1,
"encodeType": 0,
"resolutionList": [
{"encodingType":0,"width":720, "height":576,"suitableFram
eRate":15, "suitableBitRate":2560,"maxFrameRate":15},
]
}
},
{
"encodeScope": 7,
"h264Attr": {
"resolutionCnt": 1,
"encodeType": 0,
"resolutionList": [
{"encodingType":0,"width":352, "height":288,"suitableFram
eRate":15, "suitableBitRate":512,"maxFrameRate":15},
]
},
"h265Attr": {
"resolutionCnt": 1,
"encodeType": 0,
"resolutionList": [
{"encodingType":0,"width":352, "height":288,"suitableFram
eRate":15, "suitableBitRate":128,"maxFrameRate":20},
]
},
"mjpegAttr": {
"resolutionCnt": 1,
"encodeType": 0,
"resolutionList": [
{"encodingType":0,"width":352, "height":288,"suitableFram
eRate":15, "suitableBitRate":1024,"maxFrameRate":15},
]
}
}
]
]
}
Example
Parameter Name Type Description
values
Video encoding supported type, fill in
encodeScope int
ARG_ENCODING_SCOPE_TYPE
Example
Parameter Name Type Description
values
resolutionCnt int Number of resolution
Video encoding Fill in the video part of
encodeType int
(ARG_ENCODING_TYPE)
width int 1920 width
height int 1080 Height
suitableFrameRate int Optimal frame rate
suitableBitRate int 1024 Optimal Bit Rat
maxFrameRate int Maximum frame rate
encodeBiterateMin int Bit rate range minimum.
encodeBiterateMax int Bit rate range maximum
Brief description:
Request URL:
/api/video/video-encode
Request Method:
POST
Acquisition Example:
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"streamEncode": [{
"encodeType": 1,
"quality": 0,
"streamType": 0,
"profile": 1,
"width": 2560,
"height": 1440,
"frameRate": 25,
"bitRate": 2048,
"keyFrameInterval": 75,
"bitrateType": 0,
"videoType": 1,
"enableSmartEnc": 1,
"isSupport": 0
},
{
"encodeType": 1,
"quality": 0,
"streamType": 0,
"profile": 1,
"width": 1280,
"height": 720,
"frameRate": 25,
"bitRate": 512,
"keyFrameInterval": 75,
"bitrateType": 0,
"videoType": 1,
"enableSmartEnc": 1,
"isSupport": 0
},
{
"encodeType": 1,
"quality": 0,
"streamType": 0,
"profile": 1,
"width": 1280,
"height": 720,
"frameRate": 25,
"bitRate": 1024,
"keyFrameInterval": 75,
"bitrateType": 0,
"videoType": 1,
"enableSmartEnc": 1,
"isSupport": 0
}]
}
}
Example of setting:
{
"action": "set",
"data": {
"streamEncode": [{
"encodeType": 1,
"quality": 0,
"streamType": 0,
"profile": 1,
"width": 2560,
"height": 1440,
"frameRate": 25,
"bitRate": 2048,
"keyFrameInterval": 75,
"bitrateType": 0,
"videoType": 1,
"enableSmartEnc": 1,
"isSupport": 0
},
{
"encodeType": 1,
"quality": 0,
"streamType": 0,
"profile": 1,
"width": 1280,
"height": 720,
"frameRate": 25,
"bitRate": 512,
"keyFrameInterval": 75,
"bitrateType": 0,
"videoType": 1,
"enableSmartEnc": 1,
"isSupport": 0
},
{
"encodeType": 1,
"quality": 0,
"streamType": 0,
"profile": 1,
"width": 1280,
"height": 720,
"frameRate": 25,
"bitRate": 1024,
"keyFrameInterval": 75,
"bitrateType": 0,
"videoType": 1,
"enableSmartEnc": 1,
"isSupport": 0
}]
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Example
Parameter Name Type Description
values
Video encoding Fill in the video part of
encodeType int
(ARG_ENCODING_TYPE)
Image quality 0 - lowest 1 - lower 2 - low 3 - medium 4 -
quality int
higher 5 - highest
streamType int Stream type: 0:main stream,1:sub stream 2:third stream
profile int Coding complexity 0-low 1-medium 3-high
width int 720 Width
Example
Parameter Name Type Description
values
height int 576 Height
frameRate int 15 Frame Rate
bitRate int 256 Bit rate in k byte (Uppercase B)
keyFrameInterval int 15 I-frame interval
bitrateType int Bit rate type 0:fixed bit rate, 1:variable bit rate
videoType int Video Type: 0:Video Stream 1:Composite Stream
enableSmartEnc bool Smart+ encoding enable: false off true:enable
isSupport int Encoding stream support: 0 :Support 1 :Not support
Brief description:
Request URL:
/api/video/audio
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"enable": true,
"outputVolume": 50,
"inputVolume": 50,
"inputModel": 0,
"outputModel": 0
}
}
{
"action": "set",
"data": {
"enable": false,
"inputModel": 0,
"outputModel": 0,
"inputVolume": 50,
"outputVolume": 50
}
}
{
"code": 0,
"data": {}
}
Parameter description:
Brief description:
Request URL:
/api/video/audio-encode
Request Method:
POST
{
"action": "get",
"data": null
}
{
"action":"set",
"data":[
{
"property":{
"encodeType":16,
"sampleRate":0,
"bitWidth":0,
"soundMode":0
}
}
]
}
{
"code": 0,
"data": {}
}
Parameter description:
Parameter Example
Type Description
Name values
code int Return error code
Encoding format: Fill in the audio part of
encodeType int
(ARG_ENCODING_TYPE)
sampleRate int Sampling rate
bitWidth int Sampling width
soundMode int Mode: 0 mono(momo) 1 stereo(steror)
Brief description:
Watermark configuration attribute
Request URL:
/api/video/watermark
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": [
{
"channel": 0,
"enable": true,
"markText": ""
},
{
"channel": 1,
"enable": true,
"markText": ""
},
{
"channel": 2,
"enable": true,
"markText": ""
},
{
"channel": 3,
"enable": true,
"markText": ""
}
]
}
{
"action": "set",
"data": [
{
"channel": 0,
"enable": false,
"markText": ""
},
{
"channel": 1,
"enable": false,
"markText": ""
},
{
"channel": 2,
"enable": false,
"markText": ""
},
{
"channel": 3,
"enable": false,
"markText": ""
}
]
}
{
"code": 0,
"data": {}
}
Parameter Description
Brief description:
Request URL:
/api/video/audio-alarm
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"enable": true,
"audioLanguage": 0
"selAudioType": 0,
"playDelayTime": 5
}
}
{
"action": "set",
"data": {
"enable": false,
"audioLanguage": 0
"playListenTest": 0,
"selAudioType": 0,
"playDelayTime": 5,
"audioFileLength":0
"audioFileData":
}
}
{
"code": 0,
"data": {}
}
Parameter Description:
Example
Parameter Name Type Description
values
enable bool true Enabled, false: off true: enabled
audioLanguage int 0 Sound language 0: Chinese 1: English
Sound testing 0: Non-listening testing 1: listening
playListenTest int 0
testing
Sound Type (0: Private Area 1: Alert Area 2: monitoring
selAudioType int 0 Area 3: Welcome 4: Deep Water Warning 5: Dangerous Area 6:
Valuables 7: Highland Warning 8: Custom)
playDelayTime int 5 Delay time 5,10,20 30 (sec)
audioFileLength int 5 Sound file length (in bytes)
audioFileData string Sound file data base64 encoding
Example
Parameter Name Type Description
values
code int Return error code
Brief description:
Request URL:
/api/image/image
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"streamType": 1,
"brightness": 128,
"contrast": 128,
"saturation": 128,
"hue": 128,
"enableGainCtrl": 1,
"gainCtrl": 128,
"gainRCtrl": 128,
"gainGCtrl": 128,
"gainBCtrl": 128,
"whiteBalance": 0,
"enableBackLight": 0,
"backLightStrength": 0,
"exposureCtrl": 0,
"enableWideDynamic": 0,
"wideDynamicLevel": 0,
"enableFlickerCtrl": 0,
"flickerCtrlModel": 0,
"dnrModel": 0,
"dnr2DStrength": 32,
"dnr3DStrength": 32,
"enableDefog": 0,
"defogStrength": 0,
"enableStrongLightInh": 0,
"strongLightInhibitionStreangth": 0,
"darkAreaAscension": 0,
"enableHdr": 0,
"sceneMode": 0,
"enableElectronicAntiShake": 0,
"enableLdc": 1,
"ldcStrength": 171
}
}
{
"action": "set",
"data": {
"brightness": 128,
"contrast": 128,
"saturation": 128,
"hue": 128,
"exposureCtrl": 1,
"enableGainCtrl": 112,
"gainCtrl": 112,
"enableBackLight": 0,
"backLightStrength": 0,
"enableStrongLightInh": 0,
"strongLightInhibitionStreangth": 0,
"darkAreaAscension": 0,
"whiteBalance": 0,
"gainRCtrl": 128,
"gainGCtrl": 128,
"gainBCtrl": 128,
"dnrModel": 0,
"dnr2DStrength": 32,
"dnr3DStrength": 32,
"flickerCtrlModel": 0,
"enableHdr": 0,
"enableElectronicAntiShake": 0,
"enableDefog": 0,
"defogStrength": 0,
"enableLdc": 1,
"ldcStrength": 171,
"channel": 0,
"enableFlickerCtrl": 0,
"sceneMode": 0,
"streamType": 1,
"enableWideDynamic": 0,
"wideDynamicLevel": 0
}
}
{
"code": 0,
"data": {}
}
Brief description:
Request URL:
/api/image/osd
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"mirrorMode": 0,
"electronicShutter": 0,
"enableIrLed": 0,
"ircutMode": 0,
"ircutSwitchTime": 3,
"ircutSensitivity": 0,
"visiable": 0,
"postion": 0,
"dateVisiable": 1,
"dateFormat": 2,
"nameVisiable": 0,
"text": "",
"rotateAngle": 0
}
}
{
"action": "set",
"data": {
"dateVisiable": 1,
"nameVisiable": 0,
"weekVisiable": 0,
"weekLanguageFormat": 0,
"dateFormat": 2,
"postion": 0,
"text": "",
"mirrorMode": 0,
"rotateAngle": 0,
"electronicShutter": 0,
"enableIrLed": 0,
"ircutMode": 0,
"ircutSwitchTime": 3,
"ircutSensitivity": 0,
"visiable": 0
}
}
{
"code": 0,
"data": {}
}
Parameter description:
Brief description:
Fill light parameters configuration attribute
Request URL:
/api/image/fill-light
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"dayNightMode": 0,
"fillMode": 0,
“keepFullColor": 0
"nightVal": 3,
"openDelay": 3,
"dawnTime": 390,
"darkTime": 1080,
"lightMode": 0,
"lightVal": 100,
"realTimeVal": 11,
"dayVal": 21,
"closeDelay": 3
}
}
{
"action": "set",
"data": {
"dayNightMode": 0,
"fillMode": 0,
"keepFullColor": 0
"nightVal": 3,
"openDelay": 3,
"dawnTime": 390,
"darkTime": 1080,
"lightMode": 0,
"lightVal": 100,
"realTimeVal": 11,
"dayVal": 21,
"closeDelay": 3
}
}
{
"code": 0,
"data": {}
}
Return Example
Parameter description:
Parameter Example
Type Description
Name values
fillMode int Fill light mode 0:Auto 1:Daytime 2:Night 3:Timing
Day and night mode 0:smart infrared 1:smart alert 2:White
dayNightMode int
light full color
keepFullColor bool Keep full color false: off, true: on
nightVal int Sensitivity: Range (0-7)
openDelay int Filtration time:(3-10)
closeDelay int Turn off light delay (sec)
realTimeVal int Real-time brightness (2 times/sec) Refresh
dayVal int Daylight Brightness
lightMode int Light mode 1:Auto 0:Manual
lightVal int Light brightness: range (0-100)
dawnTime int Dawn time (min)
darkTime int Darkness Time (min)
Brief description:
Request URL:
/api/image/zoom-focus
Request Method:
POST
{
"code": 0,
"data": {
"step": 4,
"apertureMode": 0,
"apertureVal": 0,
"focusModel": 0,
"enableDayNightFilter": 0
}
}
{
"action": "set",
"data": {
"step": 4,
"apertureMode": 0,
"apertureVal": 0,
"focusModel": 0,
"enableDayNightFilter": 0
}
}
{
"code": 0,
"data": {}
}
Parameter description:
Brief description:
Request URL:
/api/image/ptz-config
Request Method:
POST
{
"action":"get",
"data":null
}
{
"code":0,
"data":{
"serial":{
"protocol":0,
"addr":1,
"addrMin":0,
"addrMax":255,
"databit":8,
"databitList": [6,7,8],
"stopbit":1,
"stopbitList": [1,2],
"checkType":0,
"checkTypeList": [0,1,2],
"baudrate":2400
"baudrateList":[110,300,600,1200,2400,4800,9600,19200,384
00,57600,115200,230400,460800,921600],
}
}
}
{
"action":"set",
"data":{
"serial":{
"protocol":1,
"addr":1,
"baudrate":9600,
"databit":8,
"stopbit":1,
"checkType":0,
}
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter
Type Example values Descripti
Name
protocol int protocol
Protocol
protocolList array [0,1] Protocol
Type Rang
addr int 1 Address
Address b
addrMin 0 0
minimum
Address b
addrMax 0 255
maximum
baudrate int 2400 Bitrate
Bitrate
baudrateList array [110,300,600,1200,2400,4800,9600,19200,38400,57600,115200,230400,460800,921600] parameter
range
databit int 8 Data bits
databitList array [6,7,8] Data bits
stopbit int 1 Stop bit
stopbitList array [1,2] Stop bit
checkType int Check Typ
checkTypeList array [0,1,2] check Typ
7.5.6、PTZ control
Brief description:
PTZ Control
Request URL:
/api/image/ptz-ctrl
Request Method:
POST
{
"action": "get",
"data":null
}
{
"code":0,
"data":{
"auto3DStatus":0,
"presetNum":255,
"presetMin":1,
"presetMax":255,
"presetList":[
{
"presetIdx":0,
"presetName":"preset1",
"enablePreset":0,
"readOnly":0,
},
{
"presetIdx":0,
"presetName":"preset1",
"enablePreset":0,
"readOnly":0,
},
........
{
"presetIdx":0,
"presetName":"preset1",
"enablePreset":0,
"readOnly":0,
}
]
}
}
{
"code": 0,
"data": {}
}
Parameter description:
Parameter
Type Example values Description
Name
Operation type: View General Enumeration List - Cloud
optType int
Control Enumeration Values
speed int PTZ control speed, range (1-10)
PTZ preset point parameter, only preset point setting,
preset object recall, delete command displayed in this parameter,
others named as this field is empty
auto3DStatus int Auto 3D Status, 0 Off, 1 On
presetNum int Number of preset points
presetMin int Preset Point Min.
presetMax int Preset point maximum
List of preset
presetList array []
points
presetIdx int PTZ preset point index number, range (1-255)
enablePreset int PTZ enabled and disabled,0 for disabled,1 for enabled
readOnly int Whether PTZ is read-only,0 is modifiable, 1 is read-only
Parameter
Type Example values Description
Name
preset point
presetName string Preset point names, maximum supports 20 bytes
PTZ cruise route parameter, only enable cruise route,
cruise object stop cruise route, set cruise route command displayed in
this parameter, others named as this field is empty
cruiseIdx int PTZ Cruise Index number
3D positioning parameter, only enable 3D positioning,
position3D object close 3D positioning displayed in this parameter, others
named as this field is empty
x-coordinate of the upper left, relative to the display
x1 int area (upper left is (0,0), increasing to the left and
down)
y-coordinate of the upper left, relative to the display
y1 int area (top-left is (0,0), increasing to the left and
down)
x-coordinate of the lower right, relative to the display
x2 int area (upper left is (0,0), increasing to the left and
down)
y-coordinate of the lower right , relative to the
y2 int display area (upper left is (0,0), increasing to the
left and down)
width int Display area width
height int Display area high
Brief description:
PTZ Cruise
Request URL:
/api/image/ptz-cruise
Request Method:
POST
{
"action": "get",
"data": {
"cruiseIdx": 4,
}
}
{
"code":0,
"msg":null,
"data":{
"enableCruise":0,
"cruiseMin":0,
"cruiseMax":8,
"cruisePresetMin":0,
"cruisePresetMax":32,
"cruisePresetNum":32,
"cruisePresetList":[
{
"presetIdx":0,
"speed":0,
"presetDweelTime":0,
},
{
"presetIdx":1,
"speed":0,
"presetDweelTime":0,
},
........
{
"presetIdx":31,
"speed":0,
"presetDweelTime":0,
}
]
}
}
{
"action": "set",
"data":{
"channel": 0,
"cruiseIdx":0,
"enableCruise":0,
"cruisePresetList":[
{
"presetIdx":0,
"speed":0,
"presetDweelTime":0,
},
{
"presetIdx":1,
"speed":0,
"presetDweelTime":0,
},
........
{
"presetIdx":31,
"speed":0,
"presetDweelTime":0,
}
]
}
}
}
{
"code": 0,
"data": {}
}
Parameter description:
Brief description:
Request URL:
/api/storage/regular-record-property
Get Example:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"videoRecord": {
"enable": 1,
"storageType": 0,
"videoStreamType": 0,
"audioStreamType": 0,
"validWeek": 0,
"duration": 0
},
"weekScop": {
"scopeModel": 0,
"dayScope": [
{
"socpeMode": 3,
"hourScope": [
[],[],[],[],[],[]
]
},
{
"socpeMode": 3,
"hourScope": [
[],[],[],[],[],[]
]
},
{
"socpeMode": 3,
"hourScope": [
[],[],[],[],[],[]
]
},
{
"socpeMode": 3,
"hourScope": [
[],[],[],[],[],[]
]
},
{
"socpeMode": 3,
"hourScope": [
[],[],[],[],[],[]
]
},
{
"socpeMode": 3,
"hourScope": [
[],[],[],[],[],[]
]
},
{
"socpeMode": 3,
"hourScope": [
[],[],[],[],[],[]
]
}
]
}
}
}
{
"ation": "set",
"data": {
"videoRecord": {
"enable": 1,
"videoStreamType": 1,
"audioStreamType": 0,
"validWeek": 0,
"duration": 0
},
"weekScop": {
"scopeModel": 3,
"dayScope": [
[
[],[],[],[],[],[]
],
[
[],[],[],[],[],[]
],
[
[],[],[],[],[],[]
],
[
[],[],[],[],[],[]
],
[
[],[],[],[],[],[]
],
[
[],[],[],[],[],[]
],
[
[],[],[],[],[],[]
]
]
}
}
}
Set the parameters to return:
{
"code": 0,
"data": {}
}
Parameter Description
Brief description:
Request URL:
/api/storage/storage-property
Request Method:
POST
{
"ation": "get",
"data": {
"storageType": 4,
"id": 255
}
}
{
"code": 0,
"data": {
"storageType": 2,
"packingModel": 0,
"lackSpaceModel": 1,
"preRecordTime": 1,
"recordDelay": 1,
"videoStoragePercentage": 81,
"packingValue": {
"packingTime": 60
}
}
}
{
"ation": "set",
"data": {
"lackSpaceModel": 1,
"preRecordTime": 1,
"recordDelay": 1,
"videoStoragePercentage": 90
}
}
{
"code": 0,
"data": {}
}
Parameter description:
示
类
参数名 例 说明
型
值
code int Return error code
storageType int Storage mode: Fill HS_STORAGE_TYPE_E
packingModel int Packing mode 0 by time 1 by size 2 none
lackSpaceModel int Recording mode, 0 no override 1 loop override
preRecordTime int Pre-record time: Fill HS_STORAGE_PRERECORDTIME_TYPE_E
recordDelay int Recording delay: Fill HS_STORAGE_RECORDDELAY_TYPE_E
packingTime int Packing time 0-255 unit minutes
示
类
参数名 例 说明
型
值
(New added for 2021-01) Video recording percentage, e.g. 90
videoStoragePercentage int indicates 90% for video recording and 10% for capturing, [0,
100]
Brief description:
Request URL:
/api/storage/snapshot
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"quality": 0,
"eventCapture": {"enable": true,"pictureCodecType": 3,"pictureRes
olution": 1,"captureInterval": 10,"captureNumber": 1,},
"timerCapture": {"enable": true,"captureIntervalSec": 0},
"weekScop": {
"scopeModel": 0,
"dayScope":[
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]]
]
}
}
}
{
"action": "set",
"data": {
"quality": 0,
"eventCapture": {"enable": true,"pictureCodecType": 3,"pictureRes
olution": 1,"captureInterval": 10,"captureNumber": 1},
"timerCapture": {"enable": true,"captureIntervalSec": 10},
"weekScop": {
"scopeModel": 0,
"dayScope":[
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]],
[[0, 1440, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0,
0], [0, 0, 0]]
]
}
}
}
{
"code": 0,
"data": {}
}
Parameter Description:
Example
Parameter Name Type Description
values
eventCapture object Event Trigger
enable bool Event Trigger Enable Switch
pictureCodecType int Image format Fixed 3 corresponds to MJPEG
Image resolution Fill 1~3 Corresponding to
pictureResolution int
1080p, 720p, D1 Default 1080p
captureInterval int Capture time interval, fill in 1~5
Example
Parameter Name Type Description
values
corresponding to 10s, 30s, 1min, 5min, 10min
default 1
captureNumber int Number of captures, (0-120) Default 1
(New added for 2021-01) Image quality
(ARG_SNAPSHOT_IMAGE_QUALITY), 0/1/2
quality int corresponds to high/medium/low, if the
device does not support setting image
quality, then this field is not sent
(New added for 2021-01) Event interval (in
eventCapture.captureIntervalSec int seconds), replaces capture Interval
enumeration
(New added for 2021-01) Enable timed capture
timerCapture.enable bool
function
(New added for 2021-01) Timed capture
timerCapture.captureIntervalSec int
interval (seconds)
(New added for 2021-01) Weekly scheduling,
same as recording scheduling, total 7 days,
weekScope object
there are 6 periods a day, including 7 a day
Scope
dayScope array array,7 hour Scope
socpeMode int HS_TIME_SCOPE_MODE, fixed to 3
Daily scheduling array containing 6 periods,
each with a start time (minutes), an end
hourScope array
time (minutes), and a type (timed, motion
detection, etc.)
code int Return error code
Brief description:
Request URL:
/api/storage/storage-info
Request Method:
POST
{
"action": "get",
"data": {
"storageType": 1,
"id": 255
}
}
{
"code": 0,
"data": {
"storageType": 1,
"status": 1,
"percent": 0,
"capacity ": 0,
"free": 0,
"id": 0,
"videoTotalSpace":4096,
"videoFreeSpace":1023,
"snapshotTotalSpace":512,
"snapshotFreeSpace":34
}
}
{
"action": "set",
"data": {
"storageType": 1
}
}
{
"code": 0,
"data": {}
}
Parameter Description:
Example
Parameter Name Type Description
values
storageType int Storage mode: Fill ARG_STORAGE_TYPE
optType int Operation type: Fill in STORAGE_OPTION_TYPE
Status 0 available 1 not available 2 formatting in
status int
progress 3 not formatted 4 read/write exception
percent int Formatting progress 0-100
capacity int Total capacity: Unit megabyte (M)
free int Available space: in megabytes (M)
id int id: Fill in STORAGE_ID_TYPE
videoTotalSpace int Total video capacity (MB)
Example
Parameter Name Type Description
values
videoFreeSpace int Video space remaining (MB)
snapshotTotalSpace int Total capture capacity (MB)
snapshotFreeSpace int Remaining space for capture(MB)
Brief description:
Request URL:
/api/storage/storage-option
Request Method:
POST
{
"action": "set",
"data": {
"storageType": 1,
"id": 0,
"optType": 0
}
}
"code": 0,
"data": {}
Parameter Description
Brief description:
Cloud Parameters Configuration attribute
Request URL:
/api/storage/cloud
Request Method:
POST
{
"action": "get",
"data": {
"bindType": 17
}
}
{
"code": 0,
"data": {
"bindType": 0,
"website": "",
"verificationCode": ""
}
}
{
"action": "set",
"data": {
"bindType": 0,
"website": "",
"verificationCode": ""
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Brief descriptionJ:
Request URL:
/api/storage/cloud-status
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"bindType": 0,
"bindStatus": 0,
"username": "",
"totalSize": "",
"usedSize": ""
}
}
Parameter Description
Brief description:
Request URL:
/api/storage/ipeye
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"enable": false,
"url": "http://172.18.193.180:8282"
}
}
{
"action": "set",
"data": {
"enable": false,
"url": "http://172.18.193.180:8282"
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter
Type Example values Description
Name
enable bool Enabled status false:off true:on
"http://172.18.193.180:8282 IPEYE client-side back stage management
url string
" address
Brief description:
Request URL:
/api/event/motion
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code": 0,
"data": {
"enable": true,
"sensitivity": 5,
"recStreamType": 2,
"region": {
"delimitType": 33,
"area": [
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0
]
}
}
}
{
"action": "set",
"data": {
"enable": true,
"recStreamType": 2,
"sensitivity": 5,
"region": {
"delimitType": 33,
"area": [
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0
]
},
}
}
{
"code": 0,
"data": {}
}
Parameter Description:
Parameter
Type Example values Description
Name
code int Return to error code
Enable, true:enable motion detection,false:disable motion
enable bool
detection
sensitivity int Sensitivity(0,10), 0 lowest ,10 highest
recStreamType int Recording stream type 0 main stream 1 sub stream 2 triple stream
delimitType int Region delimit method
Up to 32*32
block
selection
area,(unsigned
long)The 0th
bit of
block[0] is 1,
area array [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
indicating
that the first
block on the
left of the
first row from
top to bottom
is selected
Brief description:
Alarm arming time parameter interface
Request URL:
/api/event/alarm-schedule
Request Method:
POST
{
"action": "get",
"data": {
"alarmType": 1
}
}
{
"code": 0,
"data": {
"enable": true,
"alarmType": 1,
"alarmLinkScope": 23,
"personFilterStatus": 1,
"ioStatus": 0,
"schedule": [
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0]]
],
"trigger": {
"enableAlarmSmtp": "0",
"enableAlarmFtp": "0",
"enableAlarmCloud": "0",
"enableAlarmRecord": "0",
"enableAlarmIo": "0",
"enableAlarmFlash": "0",
"enableAlarmSound": "0",
"enableAlarmFlashAll": "0"
}
}
}
}
{
"code": 0,
"data": {}
}
Example
Parameter Name Type Description
values
enable bool IO alarm enable: fill in false: off, true: on
alarmType int Alarm type: Fill in HS_ALARM_TYPE_E
alarmLinkScope int Alarm linkage type, fill in HS_ALARM_LINK_TYPE_E
Alarm time, seven days, eight time periods per day, in
schedule int [0,1440]
S, ["start time", "end time"], e.g. [0,1440]
trigger array Alarm processing, fill in HS_ALARM_PROCESS
IO alarm type: Fill 0, 1 corresponding to normally
ioStatus int
open, normally closed
Humanoid filter enable: Fill 1, 0 corresponds to on,
personFilterStatus int
off
code int Return error code
Request URL:
/api/event/video-cover
Request Method:
POST
{
"action": "get",
"data": NULL
}
{
"code": 0,
"data": {
"enable": 1,
"alarmLinkScope": 3,
"sensitivity": 0,
"area": [
{"x1": 0,"y1": 0,"x2": 0,"y2": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0}
],
"schedule": [
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]]
],
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"action": "set",
"data": {
"enable": 1,
"alarmLinkScope": 3,
"sensitivity": 0,
"area": [
{"x1": 0,"y1": 0,"x2": 0,"y2": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0}
],
"schedule": [
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]]
],
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter Example
Type Description
Name values
enable bool Area intrusion detection enable 0:off 1:on
alarmLinkScope int Alarm linkage type
sensitivity int 4 Group sensitivity sub Sensitivity [0, 100]
time int 4 Group Time Threshold sub Time [0, 10]
area array 4 groups of 10,000 points ratio area x1 y1 x2 y2
Schedule: 8 periods per day for 7 days unit in S, ["start
schedule array
time", "end time"], e.g. [0,1440]
Remarks
For more return error codes, please see the error code
description on the home page
Short description:
Request URL:
/api/event/alarm-out
Request Method:
POST
{
"action": "get",
"data": NULL
}
{
"code": 0,
"data": {
"delayTime": 2,
"enableManualAlarm": 0,
"schedule": [
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]]
]
}
}
{
"action": "set",
"data": {
"delayTime": 2,
"enableManualAlarm": 0,
"schedule": [
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]],
[[0, 1440],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0, 0],[0,
0]]
]
}
}
{
"code": 0,
"data": {}
}
Parameter description:
Example
Parameter Name Type Description
values
Delay time: Fill 1~7, corresponding to 5s, 10s, 30s,
delayTime int
1min, 2min, 5min, 10min Default 2
Example
Parameter Name Type Description
values
enableManualAlarm int Manual alarm enable, fill in 0 or 1
Alarm time, seven days, eight periods per day, unit in
schedule array [0,1440]
S, ["start time", "end time"], e.g. [0,1440]
code int Return error code
Brief description:
Request URL:
/api/event/exception
Request Method:
POST
{
"action": "get",
"data": {
"abnormalType": 1
}
}
{
"code": 0,
"data": {
"abnormalType": 1,
"alarmLinkScope": 16,
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"code": 0,
"data": {}
}
Parameter description:
Brief description:
Request URL:
/api/event/alarm-scope
Request Method:
POST
{
"action": "get",
"data": null
}
Return Example
{
"code": 0,
"data": {
"alarmTypeScope": 1,
"enableStreamRecord": 1,
"streamRecordStorageScope": 25,
"enableSnapshoot": 1,
"snapshootScope": 56,
"enableMessage": 1,
"messageScope": 16
}
}
Example
Parameter Name Type Description
values
alarmTypeScope int Supported alarm types: ARG_ALARM_TYPE Read-only
Whether to support record: 0 not supported 1
enableStreamRecord int
supported
Supported storage types for video recordings:
streamRecordStorageScope int
ARG_STORAGE_TYPE Read-only
Whether to support capture: 0 not supported 1
enableSnapshoot int
supported 持
Supported storage types for capture:
snapshootScope int
ARG_STORAGE_TYPE Read-only
Whether to support message: 0 not supported 1
enableMessage int
supported
Supported storage types for message:
messageScope int
ARG_STORAGE_TYPE Read-only
Brief description:
/api/event/roi
Request Method:
POST
{
"action": "get",
"data": null
}
{
"code":0,
"data":{
"enable":0,
"bgFrameRate":30,
"region":[
{
"qpType":1,
"qpVal":0,
"enable":0,
"area":{
"x1":0,
"y1":0,
"x2":0,
"y2":0
}
},
{
"qpType":1,
"qpVal":0,
"enable":0,
"area":{
"x1":0,
"y1":0,
"x2":0,
"y2":0
}
},
{
"qpType":1,
"qpVal":0,
"enable":0,
"area":{
"x1":0,
"y1":0,
"x2":0,
"y2":0
}
}
]
}
}
{
"action":"set",
"data":{
"bgFrameRate":30,
"region":[
{
"qpType":1,
"qpVal":0,
"area":{
"x1":13,
"y1":16,
"x2":30,
"y2":38
}
},
{
"qpType":1,
"qpVal":0,
"area":{
"x1":50,
"y1":17,
"x2":78,
"y2":33
}
},
{
"qpType":1,
"qpVal":0,
"area":{
"x1":22,
"y1":50,
"x2":81,
"y2":81
}
}
]
}
}
Parameter description:
Parameter
Type Example values Description
Name
enable bool false disable ROI, true enable ROI
Background frame rate: 0 disable background frame
bgFrameRate int rate, 1-255 values are the background frame rate. and
enable the background frame rate
qpType int QP type: Fill ROI_QP_TYPE
QP value: [-51,51] in relative mode [0,51] in
qpVal int
absolute mode
Parameter
Type Example values Description
Name
{"x1": 0,"y1":
area object 0,"x2": 0,"y2": Percentage area
0}
Upper left x
x1 int
coordinate
Upper left y-
y1 int
coordinate
Lower right x
x2 int
coordinate
Lower right y-
y2 int
coordinate
code int Return error code
Brief description:
Request URL:
/api/event/face-detect
Request Method:
POST
{
"action": "get",
"data": NULL
}
{
"code": 0,
"data": {
"enable": 1,
"startPointX1": 1,
"startPointY1": 1,
"endPointX2": 10000,
"endPointY2": 10000,
"enableRegionDetect": 1,
"alarmLinkScope": 8,
"captureMode": 0,
"enableFaceAlarm": 0,
"minFaceSizes": 30,
"enableFaceTrackingBox": 1,
"enableOsdRegion": 0,
"faceScore": 60,
"modelVersion": "Lg5_HCR99_V1.0",
"sensitivity": 0,
"blurThreshold": 5,
"faceScope": 3,
"smartType": 1,
"schedule": [
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ],[ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ]
],
"trigger": {
"enableAlarmSmtp": "0",
"enableAlarmFtp": "0",
"enableAlarmCloud": "0",
"enableAlarmRecord": "0",
"enableAlarmIo": "0",
"enableAlarmFlash": "0",
"enableAlarmSound": "0",
"enableAlarmFlashAll": "0"
}
"alarmTriggerMode": 0
}
}
{
"action": "set",
"data": {
"enable": 1,
"startPointX1": 1,
"startPointY1": 1,
"endPointX2": 10000,
"endPointY2": 10000,
"enableRegionDetect": 1,
"alarmLinkScope": 8,
"captureMode": 0,
"enableFaceAlarm": 0,
"minFaceSizes": 30,
"enableFaceTrackingBox": 1,
"enableOsdRegion": 0,
"faceScore": 60,
"alarmTriggerMode": 0,
"modelVersion": "Lg5_HCR99_V1.0",
"sensitivity": 0,
"blurThreshold": 5,
"faceScope": 3,
"smartType": 1,
"schedule": [
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ],[ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ],
[ [ 0, 1440 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ],
[ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ]
],
"trigger": {
"enableAlarmSmtp": "0",
"enableAlarmFtp": "0",
"enableAlarmCloud": "0",
"enableAlarmRecord": "0",
"enableAlarmIo": "0",
"enableAlarmFlash": "0",
"enableAlarmSound": "0",
"enableAlarmFlashAll": "0"
}
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Example
Parameter Name Type Description
values
enable bool Face recognition function enable 0:off 1:on
Start upper left coordinate point ten thousand
startPointX1 int
points ratio X coordinate
Start upper left coordinate point ten thousand
startPointY1 int
points ratio Y coordinate
End lower right coordinate point ten thousand points
endPointX2 int
ratio X coordinate
endPointY2 int End lower right coordinate point ten thousand points
Example
Parameter Name Type Description
values
ratio Y coordinate
enableRegionDetect bool Area identification switch 0:off 1:on
Alarm linkage type, face linkage currently only
alarmLinkScope int
supports IO alarm
Trigger mode: 0:off; 1:white list; 2:blacklist,
alarmTriggerMode int
associated with process
captureMode int Capture mode
enableFaceAlarm bool Face alarm switch 0:off 1:on
minFaceSizes int Minimum pixels for face recognition [30, 300]
enableFaceTrackingBox bool Face tracking box display enable 0:off 1:on
enableOsdRegion bool enable osd overlay 0:off 1:on
faceScore int Face comparison recognition threshold [0, 100]
modelVersion string Model version number string
sensitivity int Sensitivity Retention
blurThreshold int Capture Blur Threshold
faceScope int smart event support type Reserved
smart event type 0:Face recognition 1:Face
smartType int recognition + Smart event 2;Face recognition + Smart
event Reserved
Schedule: 8 periods per day in 7 days, unit in S,
schedule array
["start time", "end time"], e.g. [0,1440]
Remarks
For more return error codes, please see the error code
description on the home page
Brief description:
Request URL:
/api/event/intrusion
Request Method:
POST
{
"code": 0,
"data": {
"enable": true,
"alarmLinkScope": 3,
"sensitivity": [
{"subSensitivity": 50},
{"subSensitivity": 50},
{"subSensitivity": 50},
{"subSensitivity": 50}
],
"time": [
{"subTime": 50},
{"subTime": 50},
{"subTime": 50},
{"subTime": 50}
],
"area": [
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4": 0,
"y4": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4": 0,
"y4": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4": 0,
"y4": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4": 0,
"y4": 0}
],
"schedule": [
[[0,1440],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
],
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter Example
Type Description
Name values
enable bool Area intrusion detection enable 0:off 1:on
alarmLinkScope int Alarm linkage type
sensitivity int 4 Group sensitivity sub Sensitivity [0, 100]
time int 4 Group Time Threshold sub Time [0, 10]
4 Group ten thousand points ratio area x1 y1 x2 y2 x3 y3
area array
x4 y4
Schedule:8 periods per day in 7 days, unit in S, ["start
schedule array
time", "end time"], e.g. [0,1440]
Remarks
For more return error codes, please see the error code
description on the home page
Brief description:
Request URL:
/api/event/line-crossing
Request Method:
POST
{
"action": "get",
"data": NULL
}
{
"code": 0,
"data": {
"enable": true,
"alarmLinkScope": 3,
"sensitivity": [
{"subSensitivity": 50},{"subSensitivity": 50},
{"subSensitivity": 50},{"subSensitivity": 50}
],
"direction": [
{"subDirection": 50},{"subDirection": 50},
{"subDirection": 50},{"subDirection": 50}
],
"area": [
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
],
"schedule": [
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
],
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"action": "set",
"data": {
"enable": true,
"alarmLinkScope": 3,
"sensitivity": [
{"subSensitivity": 50},{"subSensitivity": 50},
{"subSensitivity": 50},{"subSensitivity": 50}
],
"direction": [
{"subDirection": 50},{"subDirection": 50},
{"subDirection": 50},{"subDirection": 50}
],
"area": [
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
],
"schedule": [
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
],
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter Example
Type Description
Name values
enable bool Line crossing detection enable 0:off 1:on
alarmLinkScope int Alarm linkage type
sensitivity array 4 Group sensitivity sub Sensibility [0, 100]
direction array 4 Group Direction sub Direction 0:A<->B 1:A->B 2:B->A
4 group ten thousand points ratio area startPointx1
area array
startPointy1 endPointx1 endPointy1
schedule array Schedule:8 periods per day in 7 days, unit in S, ["start
Parameter Example
Type Description
Name values
time", "end time"], e.g. [0,1440]
Remarks
For more return error codes, please see the error code
description on the home page
Brief description:
Request URL:
/api/event/loitering
equest Method:
POST
{
"action": "get",
"data": NULL
}
{
"code": 0,
"data": {
"enable": true,
"alarmLinkScope": 3,
"sensitivity": [
{"subSensitivity": 50},{"subSensitivity": 50},
{"subSensitivity": 50},{"subSensitivity": 50}
],
"direction": [
{"subDirection": 50},{"subDirection": 50},
{"subDirection": 50},{"subDirection": 50}
],
"area": [
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
],
"schedule": [
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
],
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"action": "set",
"data": {
"enable": true,
"alarmLinkScope": 3,
"sensitivity": [
{"subSensitivity": 50},{"subSensitivity": 50},
{"subSensitivity": 50},{"subSensitivity": 50}
],
"direction": [
{"subDirection": 50},{"subDirection": 50},
{"subDirection": 50},{"subDirection": 50}
],
"area": [
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
{"startPointx1": 0,"startPointy1": 0,"endPointx2": 0,"
endPointy2": 0},
],
"schedule": [
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
],
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter Example
Type Description
Name values
enable bool Wandering detection enable 0:off 1:on
alarmLinkScope int Alarm linkage type
sensitivity array 4 Group sensitivity sub Sensitivity [0, 100]
time array 4 Group Time Threshold sub Time [0, 10]
4 Group ten thousand points ratio area x1 y1 x2 y2 x3 y3
area array
x4 y4
Schedule: 8 periods per day in 7 days, unit in S, ["start
schedule array
time", "end time"], e.g. [0,1440]
Remarks
For more return error codes, please see the error code
description on the home page
7.8.5、People gathering detection configuration
Brief description:
Request URL:
/api/event/people-gathering
Request Method:
POST
{
"action": "get",
"data": NULL
}
{
"code": 0,
"data": {
"enable": true,
"alarmLinkScope": 3,
"sensitivity": [
{"subSensitivity": 50},{"subSensitivity": 50},
{"subSensitivity": 50},{"subSensitivity": 50}
],
"time": [
{"subTime": 50},{"subTime": 50},
{"subTime": 50},{"subTime": 50}
],
"area": [
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4":
0,"y4": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4":
0,"y4": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4":
0,"y4": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4":
0,"y4": 0},
],
"schedule": [
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
],
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"action": "set",
"data": {
"enable": true,
"alarmLinkScope": 3,
"sensitivity": [
{"subSensitivity": 50},{"subSensitivity": 50},
{"subSensitivity": 50},{"subSensitivity": 50}
],
"time": [
{"subTime": 50},{"subTime": 50},
{"subTime": 50},{"subTime": 50}
],
"area": [
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4":
0,"y4": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4":
0,"y4": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4":
0,"y4": 0},
{"x1": 0,"y1": 0,"x2": 0,"y2": 0,"x3": 0,"y3": 0,"x4":
0,"y4": 0},
],
"schedule": [
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
[[0,1440],[0,0],[0,0],[0,0],
[0,0],[0,0],[0,0],[0,0]],
],
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}
{
"code": 0,
"data": {}
}
Parameter Description
Parameter Example
Type Description
Name values
enable bool People gathering detection enable 0:off 1:on
alarmLinkScope int Alarm linkage type
persionNum array Number of 4 groups of people 0-100
schedule:8 periods per day in 7 days, unit in S, ["start
schedule array
time", "end time"], e.g. [0,1440]
4 Group ten thousand points ratio area x1 y1 x2 y2 x3 y3
area array
x4 y4
Remarks
For more return error codes, please see the error code
description on the home page
Short description:
Request URL:
/api/event/smart-mode
Request Method:
POST
{
"action": "get",
"data": NULL
}
{
"code": "0",
"data": {
"smartMode": 1,
"face2FtpEn": 1,
"audioAlarmEn":1
},
}
{
"action": "set",
"data": {
"smartMode": 1,
"face2FtpEn": 1,
"audioAlarmEn":1
},
}
{
"code": 0,
"data": {}
}
Parameter Description:
Parameter Example
Type Description
Name values
smart detection mode 0:off, 1:face, 2 humanoid, 3 humanoid
smartMode int
+ face + car model
face2FtpEn int Upload face to ftp 0:off, 1:on
1: Turn on the audio alarm output 0: Turn off the audio
audioAlarmEn int
alarm output
Remarks
For more return error codes, please see the error code
description on the home page