0% found this document useful (0 votes)
22 views123 pages

IPC External SDK API Documentation

The document provides detailed information about the IPC External SDK API, including modification records, global error codes, data formats, and parameter configuration interfaces. It outlines various modules, error codes, and enumeration values related to cloud storage, video storage, and recording types. Additionally, it describes the login process, including request and response formats, and the encryption method for user credentials.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views123 pages

IPC External SDK API Documentation

The document provides detailed information about the IPC External SDK API, including modification records, global error codes, data formats, and parameter configuration interfaces. It outlines various modules, error codes, and enumeration values related to cloud storage, video storage, and recording types. Additionally, it describes the login process, including request and response formats, and the encryption method for user credentials.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 123

1、Preface

IPC External SDK API


Documentation
2、Modification records
-Feb 2021

Date Modified by Interfaces involved Modified content


Feb 26th lms First Addition First Addition

3、Global error codes


[Error Code Description]

 0x40000000 The first 32 bit is 0 for int and unsigned int


compatibility, the first 32 bit is not used, 1 from 31 bit
indicates error. The first four bits are the module name and
the last four bits are the error code.

[Module List]

Module Code Module Description


0x4000 General Module, baisc Module
0x4001 Face Module

[Error Code Description]

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

4、General Enumeration List


 Cloud Storage Type Enumeration Values

Type Type Description Corresponding enumeration values


CLOUD_BRAND_BAIDU Baidu 16
CLOUD_BRAND_GOOGLE Google 17
CLOUD_BRAND_DROPBOX dropbox 18

 Video Storage Enumeration Values

Type Type Description Corresponding enumeration values


STORAGE_TYPE_SDCARE hd card 0x01
Type Type Description Corresponding enumeration values
STORAGE_TYPE_USBDISK usb 0x02
STORAGE_TYPE_HARDDISK Hard Disk 0x04
STORAGE_TYPE_FTP ftp 0x08
STORAGE_TYPE_SMTP smtp 0x10
STORAGE_TYPE_CLOUD Cloud 0x20
STORAGE_TYPE_ALL All 0xff

 Recording time storage enumeration

Type Type Description Corresponding enumeration values


TIME_SCOPE_MODE_NULL No time period 0
TIME_SCOPE_MODE_ALL Full day time period 1
TIME_SCOPE_MODE_SAME By the first time period 2
TIME_SCOPE_MODE_DIFF By each specific time period 3

 Image type enumeration values

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.

 Recording time enumeration value

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

*The data type of the enumeration value is hexadecimal. If it is


sent in decimal, it needs to be converted.

 Pre-recorded time type enumeration values

Type Type Description Corresponding enumeration values


STORAGE_PRERECORDTIME_NULL No pre-recording 0
STORAGE_PRERECORDTIME_5S 1
STORAGE_PRERECORDTIME_10s 2
STORAGE_PRERECORDTIME_15s 3
STORAGE_PRERECORDTIME_20s 4
STORAGE_PRERECORDTIME_25s 5
STORAGE_PRERECORDTIME_30s 6
STORAGE_PRERECORDTIME_AUTO 7

 Recording delay type enumeration value

Type Type Description Corresponding enumeration values


STORAGE_RECORDDELAY_NULL None 0
STORAGE_RECORDDELAY_5S 1
STORAGE_RECORDDELAY_10S 2
STORAGE_RECORDDELAY_30S 3
STORAGE_RECORDDELAY_60S 4
STORAGE_RECORDDELAY_120S 5
STORAGE_RECORDDELAY_300S 6
STORAGE_RECORDDELAY_600S 7
 Cloud control enumeration values

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

5、Data format description


Data format The external SDK data transfer adopts the format of
data header + data content The data header is in the HTTP
encapsulation format Data content is in the JSON format Data
header encapsulation format Request header:

POST /api/login-capabilities HTTP/1.1


Accept: */*
Host: 172.18.195.188
Content-Type: application/json; charset=UTF-8
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 0
Api-Version: v1.2.0

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

Data content format

Using json data format:{ key: data }


For example:{
"action": "set",
"data": NULL
}

Data type description:

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": { ... }
}

Parameter formatting conventions

For switch type parameters, use bool type uniformly


For parameters that allow multi-channel selection, the string type is
used uniformly, and channels are calculated in binary by bit offset
For parameters with long values such as timestamps, the string type i
s used uniformly

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

Protocol version number

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

API protocols use all lowercase, middle-strike distinction, and names


are nouns: example: http://192.168.1.168/api/param-config/motion

6、The description of the


parameter configuration interface
parameters configuration is API protocol, the default first-level
path is api, the second-level interface directory is the module
category, and the third-level interface directory is the specific
functional module to be operated.
- The list of corresponding module categories in the secondary
directory is as follows:

Catalog Name Description


system System Configuration Module
network Network Configuration Module
video Audio and video encoding configuration module
image Image Configuration Module
storage Storage Configuration Module
event Event Configuration Module
face Face Configuration Module

- The list of corresponding modules in the three-level directory


is as follows:

Catalog Name Description


motion Motion detection function module

Example: When operating a motion detection configuration, api is


the first-level directory field, event is the second-level
directory field, and motion is the third-level directory field,
the URL is [api/event/motion]

- 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

Special instructions for sliders or drop-down boxes that need to


be limited in scope: For parameters that need to be given a range
by the server, you need to add the xxMin and xxMax fields to
specify the setting range For parameters that need to be given the
drop-down content by the server, you need to add the xxList field
to specify the drop-down content, the format is array.

 When setting parameters, you can send all the parameter


settings or just a single one

7、Interface example
7.1、device session
7.1.1、Login process

Request method:

 POST

step:

 The client sends the plaintext user name, encrypted password


and sessionid to the server.
 If the password is correct, the server adds a set cookie in
the HTTP header and sends it to the client
 The client records its own cookie information
 The client needs to bring its own cookie information when
making a request next time
 The server parses the cookie information to obtain the
relevant information of the last access of the client
 Response client

Login Request URL:

 /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

encryption process sha256 encryption algorithm

1)first round encryption

Date base64 encryption, date format:YYYY-MM-DDThh:mm:ss get DateBa


se64 character string

2)second round encryption

Encrypted character:username+LICENSE_KEY+DateBase64+password,encryp
tion using sha256 encryption algorithm, return encrypted ciphertext.

tip:authority LICENSE_KEY,it is necessary to separate apply for


every client connecting.

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

7.1.3、session heartbeat mechanism

brief description:

 The client actively sends heartbeat packets to the server,


with a heartbeat interval of 30s

Request method:

 POST

Request URL:

 /api/session/heart-beat

Heartbeat parameter return: { "code": 0 }

parameter descryption:

parameter name type example value description


code int 0 return error code

7.2、System parameters configuration


7.2.1、platform capability set attributes
Short description:

 Get a list of platform capability support

Request URL:

 /api/system/platform-capabilities

Request Method:

 POST

Get Example Get Parameter Request:

{
"action": "get",
"data": {
}
}

Get parameter return:

{
"code": 0,
"data": {
"enableProductType": 0,
}
}

Get parameter description:

Example
Parameter Name Type Description
values
0:common ipc products 1:module ipc products 2:common ipc
enableProductType int
new naming rules

Note: This interface does not require to login device

7.2.2、device capability set attributes

Short description:

 Get a list of device capability support

Request URL:

 /api/system/capabilities

Request Method:
 POST

Get example: Get parameter request: type is 0

{
"action": "get",
"data": {
"type": 0
}
}

Get parameters returned: capability set parameters as first class


objects

{
"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,
}
}

Get parameter request: type is not 0

{
"action": "get",
"data": {
"type": 1
}
}

Get parameters returned: capability set parameters as secondary


objects

{
"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
}
}
}

Request parameter description:

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

Note: When type is 0, the capability set parameter is the first-


level object; when type is not 0, the capability set parameter is
the second-level object, and the object names of various
configuration parameters are as follows.

- The list of corresponding module categories in the secondary


directory is as follows:

Catalog Name Description


system System Configuration Module
network Network Configuration Module
video Audio and video encoding configuration module
image Image Configuration Module
storage Storage Configuration Module
event Event Configuration Module
face Face Configuration Module

Return parameter description:

 Image 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

 System configuration parameters:

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

 Network configuration parameters:

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

 Audio and video configuration parameters:

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

 Storage configuration parameters:

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

 Event configuration parameters:

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

 Smart event configuration parameters:

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

7.2.3、Device information attribute

Brief description:

 Interface to obtain device information parameters

Request URL:

 /api/system/device-info

Request Method:

 POST

Get example Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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"
}
}

Post example setting up a parameter request:

{
"action": "set",
"data": {
"devName": "IPC"
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter Description:

Parameter Name Type Example values Description


devType int Device Type
platformType int Platform type Fill in ARG_PLATFORM_TYPE
devName string Device name
devId string Device ID
manufacturers string Manufacturer
platform string Platform Type
devSensor string Sensor Type
firmwareVersion string Firmware Version

7.2.4、System time parameters configuration attribute

Brief description:

 System time parameter configuration attribute

Request URL:
 /api/system/system-time

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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
}
}

Setting Example: Set the parameter request:

{
"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
}
}

Set the parameters to return:


{
"code": 0,
"data": {}
}

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

7.2.5、Automatic maintenance parameters configuration


attribute

Brief description:

 Automatic maintenance of parameter configuration attribute

Request URL:

 /api/system/auto-maintain

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"code": 0,
"data": {
"enable": 1
"type": 2,
"week": 3,
"day": 3,
"hour": 3,
"minute": 3,
"second": 3,
}
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"enable": 1
"type": 2,
"week": 3,
"day": 3,
"hour": 3,
"minute": 3,
"second": 3,
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter description:

Parameter Name Type Example values Description


enable bool Whether to turn on timed restart, false off, true on
type int Restart mode, 0 daily, 1 weekly, 2 monthly
day int Restart time, unit days
hour int Restart time, unit hours
minute int Restart time, unit minutes
second int Restart time, in seconds
week int 0-6 Sunday to Saturday, respectively
code int Return error code
7.2.6、Daylight saving time parameters configuration
properties

Short description:

 Get the daylight saving time parameter configuration attribute

Request URL:

 /api/system/summer-time

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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
}
}

Setting Example: Set the parameter request:

{
"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
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter Description:

Parameter Name Type Example values Description


enable bool Daylight saving time switch, true:on false:off
dstType int Daylight Saving Time mode, 0 dates 1 week
month int Month
day int Day
hour int Hour
week int Week
weekNumber int Week Serial Number
offsetTime int Offset time, default is one hour

7.2.7、Reboot device attribute

Brief description:

 Reboot device attribute

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

7.2.8、Restore the default value attribute

Brief description:

 Restore default attribute

Request URL:

 /api/system/default

Request Method:

 POST

Sending example

{
"action": "set",
"data": {
"type": 0
}
}

Return Example

{
"code": 0,
"data": {}
}

Description of sending parameters


Parameter Example
Type Description
Name values
Restore device parameters type (0: simple recovery 1: full
type int
recovery to factory settings)
code int Return error code

7.2.9、Export parameters save path

Brief description:

 Save path for exported parameters

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"
}
}

Get the parameter file *Request URL:**

 /filedir/3516DV200_IMX335_B1T1A1M0C0P1_W_20.1.2.3.zip

Request Method:

 GET

Get parameter file returns:

Get parameter description:


Parameter Name Type Example values Description
url string "/filedir/3516DV200_IMX335_B1T1A1M0C0P1_W_20.1.2.3.zip" Paths
filename string "3516DV200_IMX335_B1T1A1M0C0P1_W_20.1.2.3.zip" File name

7.2.10、Log management parameters configuration attribute

Brief description:

 Log Management

Request URL:

 /api/system/log-manager

Request Method:

 POST

Request example: Log search request:

{
"action": "get",
"data": {
"startTime": "1586995200",
"endTime": "1587081599",
}
}

Log search returns:

{
"code": 0,
"data": {
"logList": [
{
"idx": 1,
"time": "1587010286",
"type": 1,
"message": "Clear system log"
},
{
"idx": 2,
"time": "1587010173",
"type": 1,
"message": "Clear system log"
}
]
}
}

Delete log request:


{
"action": "delete",
"data": {}
}

Return:

{
"code": 0,
"data": {}
}

Parameter description:

Parameter Name Type Example values Description


startTime string Start time
endTime string Ending time
idx int Index
time string 1970 to present Seconds
message string Event Description
type int Type

7.3、Network parameters configuration


7.3.1、TCP/IP parameters configuration attribute

Brief description:

 TCP/IP parameters configuration attribute

Request URL:

 /api/network/interfaces

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": null
}

Get parameter return:


{
"code": 0,
"data": {
"enableDhcp": false,
"enableAllNetConnect": false,
"ipAddrStatus": 0,
"ip": "172.18.193.180",
"netMask": "255.255.248.0",
"gateway": "172.18.192.1",
"dns1": "172.18.192.1",
"dns2": "172.18.192.2",
"ipv6Mode": 0,
"maxTransUnit": 0,
"ipv6": "",
"subNetMaskV6": 0,
"gatewayV6": "",
"multicast": "",
"mac": "B2:4E:B1:3D:42:C6"
}
}

Setting Example: Set the parameter request:

{
"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"
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter Description

Parameter Name Type Example values Description


enableDhcp bool enable dhcp, false off ,true on
Parameter Name Type Example values Description
enableAllNetConnect bool enable all-net connect, false off ,true on
enableIpAddrTest int Enable IP address test, 0:off 1:on
ipAddrStatus int IP address status,0:available 1:not available
ip string IPV4 address
netMask string IPV4 Subnet Mask
gateway string IPV4 Gateway
dns1 string dns server 1
dns2 string dns server 2
ipv6Mode int IPV6 mode:fill in ARG_IPV6MODE_TYPE
maxTransUnit int MTU
ipv6 string IPV6 address
subNetMaskV6 int IPV6 Subnet Mask
gatewayV6 string IPV6 Gateway
multicast string Multicast Address
mac string Mac Server Address

7.3.2、Protocol port configuration attribute

Brief description:

 Protocol port configuration attribute

Request URL:

 /api/network/port

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": {
"type": 255
}
}

Get parameter return:

{
"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}}
}
]
}

Setting Example: Set the parameter request:

{
"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}}
}
]
}

Set the parameters to return:

{
"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:

 DDNS parameter configuration attribute, you need to get the


encryption capability set first, and then get the parameters.

Request URL:

 /api/network/ddns

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": {
"loginName": "admin",
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "afe13ds34cdjk08c"
}
}

Get parameter return:

{
"code": 0,
"data": {
"enable": false,
"serverType": 0,
"status": 0,
"serverIp": "",
"serverPort": 0,
"domain": "",
"defaultDomain": "",
"username": "422EnnrG2puKTxVWm0gzCQ==",
"alias": "",
"alivePeriod": 0,
"serviceType": 0
}
}

Setting Example: Set the parameter request:

{
"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"
}
}

Set the parameters to return:

{
"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.

7.3.4、FTP parameters configuration attribute

Brief description:

 FTP parameter configuration attribute, you need to get the


encryption capability set first, and then get the parameters.

Request URL:

 /api/network/ftp

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": {
"loginName": "admin",
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
}
}

Get parameter return:

{
"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
}
}

Setting Example: Set the parameter request:


{
"action": "set",
"data": {
"enable": 1,
"serverIp": "192.168.1.1",
"serverPort": 21,
"username": "422EnnrG2puKTxVWm0gzCQ==",
"enableAnonymous": 0,
"password": "422EnnrG2puKTxVWm0gzCQ==",
"path": "Default_Folder",
"enableAutoCover": 0,
"attfileFormat": 1,
"enableFtpTest": 0,
"firstDir": 0,
"secondDir": 0,
"securityType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
}
}

Set parameter return (ftpTestEnable = 0):

{
"code": 0,
"data": {}
}

Set parameter return (ftpTestEnable = 1):

{
"code": 0,
"data": {
"ftpTestStatus": 1
}
}

Parameter Description

Parameter Name Type Example values Description


loginName string admin Login User Name
Whether to turn on false not required, true
enable bool
enable
Upload attachment format, 0:Message 1:JPEG
attfileFormat int
2:AVI
enableAnonymous int Anonymous 0:Not enabled 1:Enabled
serverIp string "192.168.1.1" Server Address
serverPort int 21 Port
User name, need to encrypt the
username string "admin" transmission, for AES128 encryption type,
encrypted data for base64 encoding
password string "admin" Password, need to encrypt the transmission,
Parameter Name Type Example values Description
for AES128 encryption type, encrypted data
for base64 encoding
path string "Default_Folder" Paths
enableAutoCover int Auto cover 0:Not enabled 1:Enabled
enableFtpTest int FTP test 0:Not enabled 1:Enabled
ftpTestStatus int FTP test status 0:successful 1:unsuccessful
FTP first level directory 0:IP address
firstDir int 1:OSD 2:Custom (using data from parameter
path)
secondDir int FTP secondary directory 0:Chinese 1:English
Encryption type. Get at the encryption
encryptionType string "aes128-1"
capability set
Offset ,16in characters, for AES encryption
iv string "abcde1234567890"
type
Date time. Format:
datetime string
"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 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.

7.3.5、Smtp parameters configuration attribute

Brief description:

 Smtp parameter configuration attribute, you need to get the


encryption capability set first, and then get the parameters.

Request URL:

 /api/network/smtp

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": {
"loginName": "admin",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890",
"encryptionType": "aes128-1"
}
}

Get parameter return:

{
"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"
}
}

Setting Example: Set the parameter request:

{
"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

Parameter Name Type Example values Description


Whether to enable false not
enable bool
required, true enable
Upload attachment format, 0:Message
attfileformat int
1:JPEG 2:AVI
Alarm upload interval,0:10 seconds
1:30 seconds 2:1 minute 3:5 minutes
alarmDuration int
4:10 minutes 5:always valid 6:1
second
serverPort int SMTP port
Anonymous 0 Anonymous ,1 not
anonymity bool
anonymous
Email encryption type 0 no
smtpEncryptionType int
encryption,1 SSL
time int Sending time
Whether to add accessories, 0 add,
accessory int
1 don't add
accessoryType int accessory Type
username string "[email protected]" User Name
Password, for AES128 encryption
password string "12345678" type, encrypted data for base64
encoding
server string "SMTP.domain.com" Server Address
sender string "[email protected]" Send Address
receiver1 string "459EnnrG2puKTxVWm0gzCQ==" Receiving Address 1
receiver2 string Receiving Address 2
receiver3 string Receiving Address 3
theme string "IP Camera: Motion Detected" theme
Mailbox test 0:No enable 1:Enable
receiving Address 1 2:Enable
enableSmtpTest int 1
receiving Address 2 3:Enable
receiving Address 3
Mailbox test success or failure 0:
smtpTestStatus int
test success 1: test failure
encryptionType string "aes128-1" Encryption type
Offset ,16in characters, for AES
iv string "abcde1234567890"
encryption type
Parameter Name Type Example values Description
Date and time, format: "YYYY-
datetime string
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 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.

7.3.6、P2P parameters configuration attribute

Brief description:

 P2P parameters configuration attribute

Request URL:

 /api/network/p2p

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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",
}
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"enable": true
}
}

Set the parameters to return:

{
"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

7.3.7、P2P status parameters configuration attribute

Brief description:

 P2P status parameters configuration attribute

Request URL:

 /api/network/p2p-status

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"code": 0,
"data": {
"status": 0,
}
}

Parameter Description

Parameter Name Type Example values Description


status int p2p status: 0 offline 1 online

7.3.8、PPPOE parameters configuration attribute

Brief description:

 PPPOE configuration parameters interface, you need to get


the encryption capability set first, and then get the
parameters.

Request URL:

 /api/network/pppoe

Request Method:

 POST

Get example: Get parameter request:

{
"ation": "get",
"data": {
"loginName": "admin",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890",
"encryptionType ": "aes128-1"
}
}

Get parameter return:

{
"code": 0,
"data": {
"enable": true,
"username": "422EnnrG2puKTxVWm0gzCQ==",
"ip": "0.0.0.0"
}
}

Setting Example: Set the parameter request:

{
"ation": "set",
"data": {
"encryptionType": "aes128-1",
"datetime": "2021-03-06T10:47:05",
"iv": "abcde1234567890",
"enable": true,
"username": "422EnnrG2puKTxVWm0gzCQ==",
"password": "422EnnrG2puKTxVWm0gzCQ=="
}
}

Set the parameters to return:

{
"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.

7.3.9、GB28181 parameters configuration attribute

Brief description:

 GB28181 parameter interface, you need to get the encryption


capability set first, and then get the parameters.
Request URL:

 /api/network/gb28181

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": {
"loginName": "admin",
"encryptionType ": "aes128-1",
"dateTime": "2021-03-06T10:47:05",
"iv": "abcde1234567890"
}
}

Get parameter return:

{
"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",
}
}

Setting Example: Set the parameter request:

{
"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",

}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Return parameter description

Parameter Name Type Example values Description


enable bool GB28181 function enable false:off true:on
version int Protocol Version 0:GB/T28181-2016
serverId string "34020000002000000001" SIP Server ID
serverDomainName string "3402000000" SIP server domain
serverIp string "192.168.1.1" SIP server ip address
serverPort int 5060 SIP server port
sipLocalPort int 5060 Local SIP port
deviceId string "34020000001320000001" SIP user (device) name
deviceCheckId string "34020000001320000001" SIP user (device) ID authentication
SIP user password, encryption, for AES128
devicePwd string "admin123456" encryption type, encrypted data for
base64 encoding
civiilCode string "34020000001320000001" Administrative district code
registerStatus int Registration status 0:offline 1:Online
Parameter Name Type Example values Description
28181Code stream index 0:main stream
steamType int
1:sub stream 2:third stream
transportProtocol int Transport Protocol 0:TCP 1:UDP
registerExpiry int 3600 Registration expiry 3600 seconds
keepAliveCycleTime int 60 Keep alive cycle 60 seconds
registerCycleTime int 60 Registration interval 60 seconds
maxKeepAliveTimes int Max keep alive 3
sipAlarmChannelId string "34020000001320000001" Alarm input code ID
sipVideoChannelId string "34020000001320000001" Video channel code ID
sipAudioOutChannelId string "34020000001320000001" Voice output channel code ID
encryptionType string "aes128-1" Encryption type.
Offset ,16in characters, for AES
iv string "abcde1234567890"
encryption type
Date and time, format: "YYYY-MM-
dateTime string "abcde1234567890"
DDThh:mm:ss"

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.

7.3.10、WIFI parameters configuration attribute

Brief description:

 WIFI parameters configuration attribute

Request URL:

 /api/network/wifi

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action":"get",
"data":null
}

Get parameter return:

{
"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": ""
},
]
}
}

Setting Example: Set the parameter request:

{
"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"
}

Set the parameters to return:

{
"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

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 key Type, and is not passed. The offset iv and time are
passed to the server in the parameters when the content is
requested.

7.3.11、Snmp parameters configuration attribute

Brief description:

 Snmp parameter configuration attribute, you need to get the


encryption capability set first, and then get the parameters

Request URL:

 api/network/snmp

Request Method:

 POST

Get Example Get Parameter Request:


{
"action":"get",
"data": null
}

Get parameter return:

{
"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,
}
}
}

Setting example Setting parameter request:

{
"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"
}
}

Set parameters to return


{
"code": 0,
"data": {}
}

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

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 key Type, and is not passed. The offset iv and time are
passed to the server in the parameters when the content is
requested.

7.3.12、Wifi Hotspot parameters configuration attribute

Brief description:

 Wifi hotspot parameters configuration attribute, you need to


get the encryption capability set first, and then get the
parameters

*Request URL:

 /api/network/wifiAPInfo

Request Method:

 POST

Get Example Get Parameter Request:

{
"action":"get",
"data": NULL
}

Get parameter return:

{
"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"
}
}

Set parameters to return

{
"code": 0,
"data": {}
}

Parameters:

Parameter Name Type Example values Description


loginName string admin Login User Name
enableAP int 1 0- Turn off wifi AP, 1- Turn on wifi AP
enableDhcp int 1 0- Turn off Dhcp, 1- Turn on Dhcp
0- Turn off authentication, 1- Turn on
enableAuthentication int 1
authentication
wifi hotspot authentication method,2: WEP 8:
authenticationMethod int 2
WPA 32: WPA2 default 2
wirelessNetworkMode int 0 wifi network standard, default 0, 802.11b
wifi operating band, default 0, band range
wirelessWorkChannel int 0
0-14
wifi hotspot assign address range, default
IPRange int 100
100
devIP string IP Address
devSubNetMask string Mask
devGateway string Gateway
Parameter Name Type Example values Description
firstIP string Start Address
dhcpDns string Specific DNS
dhcpGateway string Specific Gateway
APSsid string wifi Hotspot SSID
Encrypted password, for AES128 encryption
APPassword string type, encrypted data for base64 encoding,
length range 8-15 bytes
encryptionType string "aes128-1" Encryption type.
Offset ,16 characters, for AES encryption
iv string “abcde1234567890”
type
datetime string 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 key is
generated by the client and the server by their own calculation of
the agreed key Type, and is not passed. The offset iv and time are
passed to the server in the parameters when the content is
requested.

7.4、Audio and video parameters configuration


7.4.1、Code range attribute configuration

Brief description:

 Code range attribute configuration

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},
]
}
}
]
]
}

Return parameter description

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

7.4.2、Video encoding parameters configuration attribute

Brief description:

 Video encoding parameters configuration attribute

Request URL:

 /api/video/video-encode

Request Method:

 POST

Acquisition Example:

Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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:

Set the parameter request:

{
"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
}]
}
}

Set the parameters to return:

{
"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

7.4.3、Audio parameters configuration attribute

Brief description:

 Audio parameter configuration attribute interface

Request URL:

 /api/video/audio

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"code": 0,
"data": {
"enable": true,
"outputVolume": 50,
"inputVolume": 50,
"inputModel": 0,
"outputModel": 0
}
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"enable": false,
"inputModel": 0,
"outputModel": 0,
"inputVolume": 50,
"outputVolume": 50
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter description:

Parameter Name Type Example values Description


enable bool true Enablde, false: off true: enabled
outputVolume int 50 Output volume 0-100 100 max
inputVolume int 50 Input volume 0-100 100 max
inputModel int Input mode 0mic input 1 active input (Line)
outputModel int Output mode 0:built-in 1:external
code int Return error code

7.4.4、Audio encoding parameters configuration attribute

Brief description:

 Audio encoding parameters configuration attribute interface

Request URL:

 /api/video/audio-encode

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:


{
"code":0
"data":[
{
"property":{
"encodeType":16,
"sampleRate":0,
"bitWidth":0,
"soundMode":0
}
}
],
}

Setting Example: Set the parameter request:

{
"action":"set",
"data":[
{
"property":{
"encodeType":16,
"sampleRate":0,
"bitWidth":0,
"soundMode":0
}
}
]
}

Set the parameters to return:

{
"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)

7.4.5、Watermark configuration attribute

Brief description:
 Watermark configuration attribute

Request URL:

 /api/video/watermark

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"code": 0,
"data": [
{
"channel": 0,
"enable": true,
"markText": ""
},
{
"channel": 1,
"enable": true,
"markText": ""
},
{
"channel": 2,
"enable": true,
"markText": ""
},
{
"channel": 3,
"enable": true,
"markText": ""
}
]
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": [
{
"channel": 0,
"enable": false,
"markText": ""
},
{
"channel": 1,
"enable": false,
"markText": ""
},
{
"channel": 2,
"enable": false,
"markText": ""
},
{
"channel": 3,
"enable": false,
"markText": ""
}
]
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter Description

Parameter Name Type Example values Description


channel int Channel number
enable bool Enabled false off true on
markText string Marker Text

7.4.6、Audio alarm configuration interface

Brief description:

 Audio alarm configuration interface

Request URL:

 /api/video/audio-alarm

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"code": 0,
"data": {
"enable": true,
"audioLanguage": 0
"selAudioType": 0,
"playDelayTime": 5
}
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"enable": false,
"audioLanguage": 0
"playListenTest": 0,
"selAudioType": 0,
"playDelayTime": 5,
"audioFileLength":0
"audioFileData":
}
}

Set the parameters to return:

{
"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

7.5、Image parameters configuration


7.5.1、Image parameters configuration attribute

Brief description:

 Image parameter configuration interface

Request URL:

 /api/image/image

Request Method:

 POST

Get parameter request:

{
"action": "get",
"data": null
}

Get Return Example

{
"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
}
}

Set the parameter request:

{
"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
}
}

Set Return Example

{
"code": 0,
"data": {}
}

Return parameter description

Parameter Name Type Example values Description


Stream type: Fill in (ARG_STREAM_TYPE)
streamType int
video part
brightness int 128 Brightness
contrast int 128 Contrast Ratio
saturation int 128 Saturation
hue int 128 Color Tones
enableGainCtrl int Gain adjustment enable,0: Manual 1: Auto
gainCtrl int 128 Gain adjustment 0-255
gainRCtrl int 128 Red gain adjustment 0-255
gainGCtrl int 128 Green gain adjustment 0-255
gainBCtrl int 128 Blue gain adjustment 0-255
whiteBalance int White balance: 0 auto 1 manual
enableBackLight int Backlight compensation: 0 off 1 on
Backlight intensity: 0 low 1 medium 2
backLightStrength int
high. Backlight activation is effective
exposureCtrl int Auto Exposure Control: 0:On 1:Off
enableWideDynamic int WDR 0:off 1:on
WDR Level 0:Auto 1:Weak 2:Medium
wideDynamicLevel int
3:Strong 4:Super Strong
enableFlickerCtrl int Flicker control 0:off 1 on
Flicker control mode: 0:Indoor NTSC
flickerCtrlModel int
1:Indoor PAL 2 Outdoor
DNR mode Fill in the ARG_DNRMODE_TYPE
dnrModel int
section
dnr2DStrength int DNR 2D intensity: 0-255
dnr3DStrength int DNR 3D intensity: 0-255
defogEnable int Defog switch: 0:off 1:enable 2:auto
defogStrength int Defogging intensity: 0-255
enableStrongLightInh int HLC switch: 0:off 1:enable
strongLightInhibitionStreangth int HLC Intensity: 0-255
darkAreaAscension int Dark area boost intensity: 0-255
enableHdr int Dark area boost intensity: 0-255
sceneMode int Scene Mode: 0:Indoor 1:Outdoor
enableElectronicAntiShake int Electronic anti-shake: 0:off 1:enable
LDC enable:
enableLdc int
0:off 1:enable
ldcStrength int LDC intensity: 0-255
Parameter Name Type Example values Description
code int Return error code

7.5.2、OSD configuration attribute

Brief description:

 OSD configuration attribute

Request URL:

 /api/image/osd

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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
}
}

设置示例: Set the parameter request:

{
"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
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter description:

Parameter Name Type Example values Description


Whether mirroring: 0 no mirroring, 1 horizontal
mirrorMode int mirroring 2 vertical mirroring 3 horizontal and
vertical mirroring
electronicShutter int Electronic shutter: Fill in ARG_SHUTTERSPEED_TYPE
enableIrLed int 0:IRLED off 1:IRLED on
ircutMode int 0:LDR Auto 1:Video Auto 2:Color Mode 3:B&W Mode
ircutSwitchTime int ircut switching time, 3-120 seconds
ircutSensitivity int Sensitivity 0-7
visiable int 0 Do not show osd, 1 show osd
postion int Fill in ARG_POSITON_TYPE, valid when osd is displayed
dateVisiable int Display time 0 Display 1 No display
dateFormat int Date format 0:y/m/d 1:m/d/y 2:d/m/y
weekVisiable int Display week 0 display 1 no display
weekLanguageFormat int Week language format 0 English 1 Chinese
nameVisiable int Show text 0 show ipc name 1 don't show ipc name
text string osd text
rotateAngle int Rotation angle: Fill in ARG_ROTATE_TYPE

7.5.3、Fill light configuration attribute

Brief description:
 Fill light parameters configuration attribute

Request URL:

 /api/image/fill-light

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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
}
}

Set the parameter request:

{
"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
}
}

Set the parameters to return:

{
"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)

7.5.4、Zoom focus configuration attribute

Brief description:

 Zoom and focus configuration attribute

Request URL:

 /api/image/zoom-focus

Request Method:

 POST

Get example: Get parameter request:


{
"action": "get",
"data": null
}

Get parameter return:

{
"code": 0,
"data": {
"step": 4,
"apertureMode": 0,
"apertureVal": 0,
"focusModel": 0,
"enableDayNightFilter": 0
}
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"step": 4,
"apertureMode": 0,
"apertureVal": 0,
"focusModel": 0,
"enableDayNightFilter": 0
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter description:

Parameter Name Type Example values Description


code int Return error code
unsigned Speed, range 1-8, 8 control effect is the most
step
char obvious, movement speed
unsigned
apertureMode Aperture mode 0 auto 1 control
char
unsigned Aperture opening value 0-100 (valid when
apertureVal
char aperture mode is control)
unsigned
focusModel 0 Auto-focus 1 Manual Focus
char
unsigned Day and night switch to enable auto-focus 0:
enableDayNightFilter
char off, 1: on
7.5.5、PTZ configuration attribute

Brief description:

 PTZ configuration attribute.

Request URL:

 /api/image/ptz-config

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action":"get",
"data":null
}

Get parameter return:

{
"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],
}
}
}

Setting Example: Set the parameter request:

{
"action":"set",
"data":{
"serial":{
"protocol":1,
"addr":1,
"baudrate":9600,
"databit":8,
"stopbit":1,
"checkType":0,
}
}
}

Set the parameters to return:

{
"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

Get Example: Get Parameter Request Example:

{
"action": "get",
"data":null
}

Get parameter return:

{
"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,
}
]
}
}

Setting Example: Set the parameter request:


{
"action": "set",
"data": {
"optType": 4,
"speed":4,
"preset"
{
"presetIdx":1,
"enablePreset":0,
"presetName":"preset1",
},
"cruise"
{
"cruiseIdx":0,
}
"position3D"{
"x1" : 0,
"y1" : 0,
"x2" : 0,
"y2" : 0,
"width" : 1920,
"height" : 1920,
}
}
}

Set the parameters to return:

{
"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

7.5.7、PTZ cruise route

Brief description:

 PTZ Cruise

Request URL:

 /api/image/ptz-cruise

Request Method:

POST

Get example: Get PTZ cruise route request:


{
"action": "get",
"data": {
"cruiseIdx": 4,
}
}

Get parameter return:

{
"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,
}
]
}
}

Set PTZ cruise route request:

{
"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,
}
]
}
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter description:

Parameter Name Type Example values Description


cruiseIdx int Cruise route index
cruiseMin int Cruise route range minimum
cruiseMax int Cruise route range maximum
enableCruise bool Cruise route enable 1 is true; 0 is false;
Cruise route contains preset points, the
cruisePresetNum int
maximum 32 preset points
cruisePresetMin int Cruise route contains preset point minimum
cruisePresetMax int Cruise route contains preset point maximum
Cruise route preset
cruisePresetList array []
point list
presetIdx int Preset point serial number
speed int Preset Point Cruise Speed
presetDweelTime int Preset point dwell time (5-3600S)

7.6、Storage parameters configuration


7.6.1、Recording parameters configuration attribute

Brief description:

 Recording configuration parameters interface

Request URL:
 /api/storage/regular-record-property

Get Example:

 POST

Sending parameter description Get parameter request

{
"action": "get",
"data": null
}

Get parameter return

{
"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": [
[],[],[],[],[],[]
]
}
]
}
}
}

Setting example Setting parameter request:

{
"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

Parameter Name Type Example values Description


Whether to enable video recording: false: off,
enable bool
true: on
Valid weeks: 0
validWeek int permanently valid,
1-255 specific weeks
duration int Duration
storageType int Storage mode: Fill HS_STORAGE_TYPE_E
Stream type, 0 main stream, 1 sub stream, 2 triple
videoStreamType int
stream
scopeModel int Time mode, fill in HS_TIME_SCOPE_MODE
Time period, there are up to 6 periods in a day,
["start time", "end time", "time type"] unit S,
hourScope int
time type fill HS_RECORD_TIME_TYPE_E, for example
[0,1440,0]
code int Return error code

7.6.2、Recording storage parameters configuration


attribute

Brief description:

 Recording storage configuration parameters interface

Request URL:

 /api/storage/storage-property

Request Method:

 POST

Get example: Get parameter request:

{
"ation": "get",
"data": {
"storageType": 4,
"id": 255
}
}

Get parameter return:

{
"code": 0,
"data": {
"storageType": 2,
"packingModel": 0,
"lackSpaceModel": 1,
"preRecordTime": 1,
"recordDelay": 1,
"videoStoragePercentage": 81,
"packingValue": {
"packingTime": 60
}
}
}

Setting Example: Set the parameter request:

{
"ation": "set",
"data": {
"lackSpaceModel": 1,
"preRecordTime": 1,
"recordDelay": 1,
"videoStoragePercentage": 90
}
}

Set the parameters to return:

{
"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]

7.6.3、Capture parameters configuration attribute

Brief description:

 Capture configuration parameters interface

Request URL:

 /api/storage/snapshot

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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]]
]
}
}
}

Setting Example: Set the parameter request:

{
"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]]
]
}
}
}

Set the parameters to return:

{
"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

7.6.4、SD card information configuration attribute

Brief description:

 Get/Format SD card information configuration attribute

Request URL:

 /api/storage/storage-info

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": {
"storageType": 1,
"id": 255
}
}

Get parameter return:

{
"code": 0,
"data": {
"storageType": 1,
"status": 1,
"percent": 0,
"capacity ": 0,
"free": 0,
"id": 0,
"videoTotalSpace":4096,
"videoFreeSpace":1023,
"snapshotTotalSpace":512,
"snapshotFreeSpace":34
}
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"storageType": 1
}
}

Set the parameters to return:

{
"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)

7.6.5、SD card formatting configuration attribute

Brief description:

 Formatting SD Card Information Configuration attribute

Request URL:

 /api/storage/storage-option

Request Method:

 POST

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"storageType": 1,
"id": 0,
"optType": 0
}
}

Set the parameters to return:

"code": 0,
"data": {}

Parameter Description

Parameter Name Type Example values Description


storageType int Storage mode: Fill ARG_STORAGE_TYPE
id int id: Fill in STORAGE_ID_TYPE
optType int Operation type: Fill in STORAGE_OPTION_TYPE

7.6.6、Cloud parameters configuration attribute

Brief description:
 Cloud Parameters Configuration attribute

Request URL:

 /api/storage/cloud

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": {
"bindType": 17
}
}

Get parameter return:

{
"code": 0,
"data": {
"bindType": 0,
"website": "",
"verificationCode": ""
}
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"bindType": 0,
"website": "",
"verificationCode": ""
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter Description

Parameter Name Type Example values Description


Parameter Name Type Example values Description
bindType int Binding Type
website string Website
verificationCode string Verification Code

7.6.7、Cloud status acquire

Brief descriptionJ:

 Cloud Status acquire

Request URL:

 /api/storage/cloud-status

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"code": 0,
"data": {
"bindType": 0,
"bindStatus": 0,
"username": "",
"totalSize": "",
"usedSize": ""
}
}

Parameter Description

Parameter Name Type Example values Description


bindStatus int Binding status:1 for success,0 for failure
bindType int Binding Type
username string User Name
totalSize string Total size
usedSize string Use Size
7.6.8、Ipeye parameters configuration attribute

Brief description:

 Ipeye parameters configuration attribute

Request URL:

 /api/storage/ipeye

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"code": 0,
"data": {
"enable": false,
"url": "http://172.18.193.180:8282"
}
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"enable": false,
"url": "http://172.18.193.180:8282"
}
}

Set the parameters to return:

{
"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

7.7、General event parameters configuration


7.7.1、Motion detection parameters configuration attribute

Brief description:

 Motion detection parameter interface

Request URL:

 /api/event/motion

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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
]
}
}
}

Setting Example: Set the parameter request:

{
"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
]
},
}
}

Set the parameters to return:

{
"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

7.7.2、Alarm arming time parameters configuration


attribute

Brief description:
 Alarm arming time parameter interface

Request URL:

 /api/event/alarm-schedule

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": {
"alarmType": 1
}
}

Get parameter return:

{
"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"
}
}
}
}

Setting Example: Set the parameter request:


{
"ation": "set",
"data": {
"enable": true
"alarmLinkScope": 15,
"personFilterStatus": 1,
"alarmType": 1,
"ioStatus": 1
"process": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmIo": 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]]
],
}
}

Set parameters to return

{
"code": 0,
"data": {}
}

Return parameter description

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

7.7.3、Masking alarm parameters interface


Brief description:

 Masking alarm parameter interface

Request URL:

 /api/event/video-cover

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": NULL
}

Example of getting parameters returned:

{
"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
}
}
}

Setting Example: Set the parameter request:

{
"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
}
}
}

Set the parameters to return:

{
"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

7.7.4、Alarm output parameters configuration attribute

Short description:

 Alarm output parameter configuration attribute interface

Request URL:

 /api/event/alarm-out

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": NULL
}

Get parameter return:

{
"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]]
]
}
}

Setting Example: Set the parameter request:

{
"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]]
]
}
}

Set the parameters to return:

{
"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

7.7.5、Abnormal event configuration attribute

Brief description:

 Abnormal Event Configuration attribute

Request URL:

 /api/event/exception

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": {
"abnormalType": 1
}
}

Get parameter return:

{
"code": 0,
"data": {
"abnormalType": 1,
"alarmLinkScope": 16,
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
}
}
}

Setting Example: Set the parameter request:


{
"action": "set",
"data": {
"trigger": {
"enableAlarmSmtp": 0,
"enableAlarmFtp": 0,
"enableAlarmCloud": 0,
"enableAlarmRecord": 0,
"enableAlarmIo": 0,
"enableAlarmFlash": 0,
"enableAlarmSound": 0,
"enableAlarmFlashAll": 0
},
"abnormalType": 1,
"alarmLinkScope": 16
}
}

Set the parameters to return:

{
"code": 0,
"data": {}
}

Parameter description:

Parameter Name Type Example values Description


abnormalType int Exception type, fill in ARG_ABNORMAL_TYPE
alarmLinkScope int Alarm linkage type, fill in ARG_ALARM_LINK_TYPE
enableAlarmSmtp bool SMTP linkage enable
enableAlarmFtp bool FTP linkage enable
enableAlarmCloud bool Upload Cloud Enable
enableAlarmRecord bool Recording Enabling
enableAlarmIo bool IO linkage enable
enableAlarmFlash bool Flashing light linkage enable
enableAlarmSound bool Sound Linkage Enable
trigger int Alarm linkage processing

7.7.6、Alarm range parameters configuration attribute

Brief description:

 Alarm range parameters configuration attribute

Request URL:

 /api/event/alarm-scope
Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": null
}

Return Example

{
"code": 0,
"data": {
"alarmTypeScope": 1,
"enableStreamRecord": 1,
"streamRecordStorageScope": 25,
"enableSnapshoot": 1,
"snapshootScope": 56,
"enableMessage": 1,
"messageScope": 16
}
}

Return parameter description

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

7.7.7、ROI configuration attribute

Brief description:

 ROI Configuration attribute


Request URL:

 /api/event/roi

Request Method:

 POST

Get example: Get parameter request:

{
"action": "get",
"data": null
}

Get parameter return:

{
"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
}
}
]
}
}

Setting Example: Set the parameter request:

{
"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

7.8、Smart event parameters configuration


7.8.1、Face recognition attribute

Brief description:

 Get face recognition parameters interface

Request URL:

 /api/event/face-detect

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": NULL
}

Get parameter return:

{
"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
}
}

Setting Example: Set the parameter request:

{
"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"
}
}
}

Set the parameters to return:

{
"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

7.8.2、Area intrusion detection configuration

Brief description:

 Interface to obtain area intrusion detection parameters

Request URL:

 /api/event/intrusion

Request Method:

 POST

Get Example: Get Parameter Request:


{
"action": "get",
"data": NULL
}

Example of getting parameters returned:

{
"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
}
}
}

Setting Example: Set the parameter request:


{
"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
}
}
}

Set the parameters to return:

{
"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

7.8.3、Line crossing detection configuration

Brief description:

 Interface for line-crossing detection parameters

Request URL:

 /api/event/line-crossing

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": NULL
}

Get parameter return:

{
"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
}
}
}

Setting Example: Set the parameter request:

{
"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
}
}
}

Set the parameters to return:

{
"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

7.8.4、Wandering detection configuration

Brief description:

 Wandering detection parameter interface

Request URL:

 /api/event/loitering

equest Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": NULL
}

Get parameter return:

{
"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
}
}
}

Setting Example: Set the parameter request:

{
"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
}
}
}

Set the settings to return:

{
"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:

 People gathering detection parameter interface

Request URL:

 /api/event/people-gathering

Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": NULL
}

Get parameter return:

{
"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
}
}
}

Setting Example: Set the parameter request:

{
"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
}
}
}

Set the parameters to return:

{
"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

7.8.6、Smart detection mode

Short description:

 Smart detection mode

Request URL:

 /api/event/smart-mode
Request Method:

 POST

Get Example: Get Parameter Request:

{
"action": "get",
"data": NULL
}

Get parameter return:

{
"code": "0",
"data": {
"smartMode": 1,
"face2FtpEn": 1,
"audioAlarmEn":1
},
}

Setting Example: Set the parameter request:

{
"action": "set",
"data": {
"smartMode": 1,
"face2FtpEn": 1,
"audioAlarmEn":1
},
}

Set the parameters to return:

{
"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

You might also like