0% found this document useful (0 votes)
783 views

Dahua - HTTP - Api - v3.37 For Velseng SDN BHD

Uploaded by

salman1992
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
783 views

Dahua - HTTP - Api - v3.37 For Velseng SDN BHD

Uploaded by

salman1992
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 780

API of HTTP Protocol Specification

DA
HU
A_
HT
TP
_AP
I_
V3
.3
7
fo
rV
el
se
n
gS
dn
Bh
d

V3.37
2023-09-04
Cybersecurity Recommendations
Mandatory actions to be taken towards cybersecurity
1. Change Passwords and Use Strong Passwords:
The number one reason systems get "hacked" is due to having weak or default passwords. It is
recommended to change default passwords immediately and choose a strong password whenever
possible. A strong password should be made up of at least 8 characters and a combination of special
characters, numbers, and upper and lower case letters.
2. Update Firmware
As is standard procedure in the tech-industry, we recommend keeping NVR, DVR, and IP camera
firmware up-to-date to ensure the system is current with the latest security patches and fixes.
DA

"Nice to have" recommendations to improve your network security


HU

1. Change Passwords Regularly


Regularly change the credentials to your devices to help ensure that only authorized users are able to
A_

access the system.


HT

2. Change Default HTTP and TCP Ports:


TP
_

● Change default HTTP and TCP ports for systems. These are the two ports used to communicate and
AP

to view video feeds remotely.


I_

● These ports can be changed to any set of numbers between 1025-65535. Avoiding the default ports
V3

reduces the risk of outsiders being able to guess which ports you are using.
.3
7

3. Enable HTTPS/SSL:
fo

Set up an SSL Certificate to enable HTTPS. This will encrypt all communication between your devices
rV

and recorder.
el
se

4. Enable IP Filter:
n

Enabling your IP filter will prevent everyone, except those with specified IP addresses, from accessing
gS

the system.
dn

5. Change ONVIF Password:


Bh

On older IP Camera firmware, the ONVIF password does not change when you change the system's
d

credentials. You will need to either update the camera's firmware to the latest revision or manually
change the ONVIF password.
6. Forward Only Ports You Need:
● Only forward the HTTP and TCP ports that you need to use. Do not forward a huge range of numbers
to the device. Do not DMZ the device's IP address.
● You do not need to forward any ports for individual cameras if they are all connected to a recorder on
site; just the NVR is needed.
7. Limit Features of Guest Accounts:
If your system is set up for multiple users, ensure that each user only has rights to features and
functions they need to use to perform their job.
8. UPnP:

Cybersecurity Recommendations I
● UPnP will automatically try to forward ports in your router or modem. Normally this would be a good
thing. However, if your system automatically forwards the ports and you leave the credentials defaulted,
you may end up with unwanted visitors.
● If you manually forwarded the HTTP and TCP ports in your router/modem, this feature should be
turned off regardless. Disabling UPnP is recommended when the function is not used in real
applications.
9. SNMP:
Disable SNMP if you are not using it. If you are using SNMP, you should do so only temporarily, for
tracing and testing purposes only.
10. Multicast:
Multicast is used to share video streams between two recorders. Currently there are no known issues
involving Multicast, but if you are not using this feature, deactivation can enhance your network security.
11. Check the Log:
If you think that someone has gained unauthorized access to your system, you can check the system
log. The system log will show you which IP addresses were used to login to your system and what was
DA

accessed.
HU

12. Physically Lock Down the Device:


A_

Ideally, you want to prevent any unauthorized physical access to your system. The best way to achieve
HT

this is to install the recorder in a lockbox, locking server rack, or in a room that is behind a lock and key.
TP

13. Connect IP Cameras to the PoE Ports on the Back of an NVR:


_

Cameras connected to the PoE ports on the back of an NVR are isolated from the outside world and
AP

cannot be accessed directly.


I_
V3

14. Isolate NVR and IP Camera Network


.3

The network your NVR and IP camera resides on should not be the same network as your public
7

computer network. This will prevent any visitors or unwanted guests from getting access to the same
fo
rV

network the security system needs in order to function properly.


el
se
n gS
dn
Bh
d

Cybersecurity Recommendations II
Foreword

Purpose

Welcome to use API of HTTP protocol specification.

Reader

 API software development engineers


 Project managers
 Product managers
DA

Safety Instructions
HU
A_

The following categorized signal words with defined meaning might appear in the Manual.
HT

Signal Words Meaning


TP

Indicates a high potential hazard which, if not avoided, will result in


_ AP

DANGER death or serious injury.


I_
V3

Indicates a medium or low potential hazard which, if not avoided, could


.3

WARNING result in slight or moderate injury.


7
fo

Indicates a potential risk which, if not avoided, could result in property


rV

CAUTION damage, data loss, lower performance, or unpredictable result.


el
se
n

TIPS Provides methods to help you solve a problem or save you time.
gS
dn

Provides additional information as the emphasis and supplement to the


NOTE
Bh

text.
d

Revision History

No. Version Revision Content Release Time


1 V2.40 Based on the old version. August 8, 2018

2 V2.60 Add find media file with TrafficCar info. September 12, 2018

3 V2.61 Add the "16 AI APIs" chapter. October 24, 2018


4 V2.62 Add find media files with NonMotor info November 06, 2018
5 V2.63 Add close door and access control custom password November 27, 2018
6 V2.64 Add access control and video talk settings. December 12, 2018
7 V2.65 Add intelligent caps and resource usage info January 17, 2019

Foreword III
No. Version Revision Content Release Time
8 V2.66 Add people heat map, realtime trace, history trace info February 13, 2019
9 V2.67 Add subscribe heat map raw data April 18, 2019
10 V2.68 Add get traffic snap event info record May 15, 2019
11 V2.69 Add export traffic blacklist/redlist record May 20, 2019
12 V2.70 Add privacy masking May 29, 2019
13 V2.71 Add get the max and min temperature values June 3, 2019
14 V2.72 Add smart motion detection config June 27, 2019
15 V2.73 Add ecrypted download media file July 16, 2019
Adjust Camera Image, Exposure, Backlight, White
16 V2.74 Balance, Day-Night, Zoom and Focus, Lighting, Video July 25, 2019
in Options config.
17 V2.75 Add adjust angle and depth field August 13, 2019
DA

18 V2.76 Add subscribe vehicles distribution data. September 10, 2019


HU

19 V2.77 Add Seek Find Logs October 18, 2019


A_
HT

20 V2.78 Add face recognition event handler config October 30, 2019
TP

21 V2.79 Add RemoveEx Traffic BlackList/RedList record. December 9, 2019


_ AP

22 V2.80 Add Get GPS Status December 12, 2019


I_

23 V2.81 Add Get Last Event Info February 28, 2020


V3
.3

24 V2.82 Add Radar Adaptor March 23, 2020


7

Add Radar Adaptor getCapsEx


fo

25 V2.83 May 20, 2020


rV

Delete Radar Adaptor getCaps


el

26 V2.84 Add AccessControl getLockStatus June 12, 2020


se

27 V2.85 Add GlobalDeviceParam SupportGlobalDeviceParam July 2, 2020


n gS

Add ObjectPlacementDetection
28 V2.86 November 5,2020
dn

ObjectRemovalDetection
Bh

Add Radar Adaptor addRadarLinkSD, delRadarLinkSD


29 V2.87 November 6,2020
d

Add VideoInAnalyse getTemplateRule


30 V2.88 Add LensManager, resetAngle November 26,2020
31 V2.89 Add config to Radar Adaptor December 3, 2020
32 V2.90 Add Get Heat Map Info January 7, 2021
33 V2.91 Add export Encryped Log January 12, 2021
34 V2.92 Add controller related February 23, 2021
35 V2.93 Add config to objectdetect DirectionStats March 1,2021
36 V2.94 Add Camera to a Specific NVR Channel March 11, 2021
37 V2.95 Add add and remove configure March 26, 2021
38 V2.96 Add Add WorkSuitCompareServer April 22,2021

Foreword IV
No. Version Revision Content Release Time
Add VideoAnalyseRule head. Type add
39 V2.97 April 25,2021
ObjectPlacement and ObjectRemoval
40 V2.98 Modify WorkSuitCompareServer May 11,2021
41 V2.99 Modify WorkSuitCompareServer doFind May 11,2021
Add trafficFlowStat stopFind, trafficFlowStat doFind
42 V3.00 May 27,2021
and trafficFlowStat startFind
Add configManager setConfig
43 V3.01 June 3,2021
IntelliSchemeTour.Enable
44 V3.02 Add configManager getConfig IntelliSchemeTour June 11,2021
45 V3.03 Add method cancel upgrade June 21, 2021
46 V3.04 doFindHistoryByPic Add Time Sept 29, 2021
47 V3.05 Add Cloud Upgrade, add find smd data December 22, 2021
48 V3.06 Add OpenAI January 11,2022
DA
HU

49 V3.07 Add correctScene api January 21, 2022


A_

50 V3.08 Add SSHD config February 16, 2022


HT

51 V3.09 Add Water Data Analyse February 17, 2022


TP

52 V3.10 Add Http Uploading api April 20, 2022


_ AP

Add PassedNumber, EnteredDupNumber, … to People


53 V3.11 June 1, 2022
I_

Count Information.
V3

54 V3.12 Add method export account file June 29, 2022


.3
7

55 V3.13 Add method query data flux August 3, 2022


fo
rV

56 V3.14 Add method about SCADA August 23, 2022


el
se

57 V3.15 Add method get gyroscope info September 6, 2022


n gS

58 V3.16 Add Vehicle Manager October 11, 2022


dn
Bh

59 V3.17 Add method getCompleteMachineVersion October 17, 2022


d

60 V3.18 Add Tcp Test November 1, 2022

Modify method WorkSuitCompareServer.doFind,


61 V3.19 December 7,2022
getFlux, queryHistoryFlux and SCADA.doFind

Add method AudioAnalyseManager.setClassConfig,


AudioAnalyseManager.getClassConfig,
62 V3.20 December 8,2022
AudioAnalyseManager.setConfig and
AudioAnalyseManager.getConfig.

63 V3.21 Add method getViewRangeStatus December 19, 2022

Foreword V
No. Version Revision Content Release Time
Add method Get Device Info,
64 V3.22 Add method Get Camera States January 3, 2023
Add method Get Camera Recording State

65 V3.23 Add FaceAnalysis Report Data Upload January 5,2023

66 V3.24 Add Play the Specified Audio File February 6, 2023

Modify State of Getting the Analysis Configurations of


67 V3.25 February 21, 2023
the Specified Audio Channel

Add devVideoAnalyse.disableScene,
68 V3.26 devVideoAnalyse.enableScene, February 28, 2023
devVideoAnalyse.getSceneList
DA

69 V3.27 Add getChannelAlgVersion March 10, 2023


HU

Add Config VideoInDayNight、LightingScheme、


A_

70 V3.28 March 13, 2023


Lighting_V2、Lighting and RTMP_NVR
HT
TP

71 V3.29 Add SceneModeManager March 30, 2023


_ AP
I_

72 V3.30 Add set parking space light plan April 10, 2023
V3
.3

73 V3.31 Modify FishEye Setting,Add field April 20, 2023


7
fo
rV

74 V3.32 Document Format Adjusted May 24, 2023


el
se

75 V3.33 Add ExperienceRegistry June 28, 2023


n gS
dn

76 V3.34 Add Remote Delete Person July 4, 2023


Bh
d

77 V3.35 Add findDownload July 21, 2023

78 V3.36 Add devVideoInput setFocus August 8, 2023

RoadFlowStat,ObjectDetect add Direction、


79 V3.37 September 4, 2023
RoadwayDirection、LocalTime field

Privacy Protection Notice

As the device user or data controller, you might collect personal data of other such as face,
fingerprints, car plate number, Email address, phone number, GPS and so on. You need to be in
compliance with the local privacy protection laws and regulations to protect the legitimate rights and
interests of other people by implementing measures include but not limited to: providing clear and

Foreword VI
visible identification to inform data subject the existence of surveillance area and providing related
contact.

About the Manual

 The Manual is for reference only. If there is inconsistency between the Manual and the actual
product, the actual product shall prevail.
 We are not liable for any loss caused by the operations that do not comply with the Manual.
 The Manual would be updated according to the latest laws and regulations of related regions.
For detailed information, see the paper manual, CD-ROM, QR code or our official website. If
there is inconsistency between paper manual and the electronic version, the electronic version
shall prevail.
 All the designs and software are subject to change without prior written notice. The product
updates might cause some differences between the actual product and the Manual. Please
contact the customer service for the latest program and supplementary documentation.
DA

 There still might be deviation in technical data, functions and operations description, or errors
HU

in print. If there is any doubt or dispute, please refer to our final explanation.
A_

 Upgrade the reader software or try other mainstream reader software if the Manual (in PDF
HT

format) cannot be opened.


TP

All trademarks, registered trademarks and the company names in the Manual are the
_


AP

properties of their respective owners.


I_

Please visit our website, contact the supplier or customer service if there is any problem
V3


occurred when using the device.
.3
7

 If there is any uncertainty or controversy, please refer to our final explanation.


fo
rV
el
se
n gS
dn
Bh
d

Foreword VII
Table of Contents
Cybersecurity Recommendations ........................................................................................................... I
Foreword .................................................................................................................................................. III
Table of Contents .................................................................................................................................. VIII
1 Overview ............................................................................................................................................ 24
2 References......................................................................................................................................... 25
3 Definitions ......................................................................................................................................... 26
3.1 Abbreviations............................................................................................................................... 26
3.2 Syntax Convention ...................................................................................................................... 26
3.3 HTTP API Protocol Format ......................................................................................................... 26
3.3.1 key=value format .............................................................................................................. 27
DA

3.3.2 JSON format ..................................................................................................................... 28


HU

3.4 Authentication.............................................................................................................................. 31
3.5 Conventions ................................................................................................................................ 32
A_

3.5.1 Channels ........................................................................................................................... 32


HT

4 General APIs...................................................................................................................................... 33
TP

4.1 APIs of RTSP .............................................................................................................................. 33


_ AP

4.1.1 Get Real-Time Stream ...................................................................................................... 33


I_

4.1.2 Get Playback Stream ........................................................................................................ 35


V3

4.1.3 Get File Stream................................................................................................................. 35


.3

4.1.4 Get MJPG Stream ............................................................................................................ 36


7
fo

4.1.5 Create RTSP Pull and Authentication Token .................................................................... 36


rV

4.2 Configure Manager ..................................................................................................................... 37


el

4.2.1 Get and Set Configure ...................................................................................................... 37


se

4.2.2 Add and Remove Configure ............................................................................................. 38


n gS

4.2.3 Restore the Config ............................................................................................................ 39


dn

4.2.4 Restore except the Config ................................................................................................ 39


4.3 Audio ........................................................................................................................................... 40
Bh

4.3.1 Get Audio Input Channel Numbers................................................................................... 40


d

4.3.2 Get Audio Output Channel Numbers ................................................................................ 40


4.3.3 Post Audio Stream ............................................................................................................ 41
4.3.4 Get Audio Stream ............................................................................................................. 42
4.3.5 [Config] Volume Control .................................................................................................... 43
4.3.6 Getting the Analysis Configurations of the Specified Audio Channel .............................. 44
4.3.7 Setting the Analysis Configuration of the Specified Audio Channel ................................. 50
4.3.8 Getting the Related Business Configuration of the Specified Audio Channel ................. 52
4.3.9 Configuring the Related Business Configuration of the Specified Audio Channel .......... 59
4.3.10 AudioAnalyseRule Config ............................................................................................... 60
4.3.11 AudioAnalyseModule Config ........................................................................................... 61
4.3.12 Play the Specified Audio in the Device ........................................................................... 61
4.4 Snapshot ..................................................................................................................................... 62
4.4.1 [Config] Snap .................................................................................................................... 62
4.4.2 Get a Snapshot ................................................................................................................. 63

Table of Contents VIII


4.4.3 Subscribe to Snapshot ..................................................................................................... 64
4.5 Video Attributes ........................................................................................................................... 66
4.5.1 Get Max Extra Stream Numbers ...................................................................................... 66
4.5.2 Get Encode Capability ...................................................................................................... 66
4.5.3 Get Encode Config Capability .......................................................................................... 68
4.5.4 [Config] Encode of Media ................................................................................................. 72
4.5.5 [Config] Encode of Region Interested .............................................................................. 77
4.5.6 [Config] Channel Title ....................................................................................................... 78
4.5.7 Get Video Input Channels Device Supported .................................................................. 78
4.5.8 Get Video Output Channels Device Supported ................................................................ 79
4.5.9 Get Max Remote Input Channels ..................................................................................... 79
4.5.10 [Config] Video Standard ................................................................................................. 79
4.5.11 [Config] Video Widget ..................................................................................................... 80
4.5.12 Get Video Input Capability .............................................................................................. 83
4.5.13 Get Coordinates of Current Window .............................................................................. 87
4.5.14 Set Coordinates of Current Window ............................................................................... 88
DA

4.5.15 [Config] Video Out .......................................................................................................... 88


HU

4.5.16 [Config] Smart Encode ................................................................................................... 89


A_

4.5.17 Get Decoder Caps .......................................................................................................... 90


HT

4.5.18 [Config] PrivacyMasking ................................................................................................. 91


TP

4.5.19 Get Privacy Masking ....................................................................................................... 92


_

4.5.20 Set Privacy Masking ....................................................................................................... 94


AP

4.5.21 Goto Privacy Masking ..................................................................................................... 95


I_

4.5.22 Delete Privacy Masking .................................................................................................. 95


V3

4.5.23 Clear Privacy Masking .................................................................................................... 96


.3
7

4.5.24 Get Privacy Masking Rect .............................................................................................. 96


fo

4.5.25 [Config] Motion Detection Settings ................................................................................. 96


rV

4.5.26 [Config] LAEConfig ....................................................................................................... 102


el

4.5.27 Enable/Disable all privacy masking covers .................................................................. 104


se

4.5.28 Get enable/disable state of all privacy masking covers ............................................... 104
n gS

4.6 System ...................................................................................................................................... 105


dn

4.6.1 [Config] General.............................................................................................................. 105


Bh

4.6.2 Get Current Time ............................................................................................................ 106


d

4.6.3 Set Current Time............................................................................................................. 106


4.6.4 [Config] Locales .............................................................................................................. 107
4.6.5 [Config] Holiday Management ........................................................................................ 109
4.6.6 Get Language Capability .................................................................................................110
4.6.7 [Config] Language ...........................................................................................................110
4.6.8 Get Device Type .............................................................................................................. 111
4.6.9 Get Hardware Version ..................................................................................................... 111
4.6.10 Get Serial Number of Device ......................................................................................... 111
4.6.11 Get Machine Name ........................................................................................................112
4.6.12 Get System Information .................................................................................................112
4.6.13 Get Vendor Information .................................................................................................113
4.6.14 Get Software Information...............................................................................................114
4.6.15 Get Version of Onvif ......................................................................................................114
4.6.16 Get Version of HTTP API ...............................................................................................114

Table of Contents IX
4.6.17 Get Device Class ...........................................................................................................115
4.6.18 [Config] Auto Maintain ...................................................................................................115
4.6.19 Reboot ...........................................................................................................................116
4.6.20 Shutdown .......................................................................................................................116
4.6.21 Factory Reset ................................................................................................................117
4.6.22 Get Tracing Code of Device ..........................................................................................117
4.6.23 Add Camera to Specified Channel ................................................................................118
4.6.24 Delete Camera by Group...............................................................................................119
4.6.25 Acquiring All Available Resources ................................................................................ 120
4.6.26 Subscribing for Device Online/Offline Status ............................................................... 126
4.6.27 Get Complete Machine Version.................................................................................... 128
4.6.28 Connection test ............................................................................................................. 128
4.6.29 Getting Online Status of the Channel ........................................................................... 129
4.6.30 Getting the Recording Status of the Channel............................................................... 130
4.7 User management .................................................................................................................... 131
4.7.1 Get Information of a Particular User ............................................................................... 131
DA

4.7.2 Get Information of All Users............................................................................................ 132


HU

4.7.3 Get Information of All Active Users ................................................................................. 133


A_

4.7.4 Get Information of a Particular Group ............................................................................ 134


HT

4.7.5 Get Information of all Groups ......................................................................................... 134


TP

4.7.6 Add a New User .............................................................................................................. 135


_

4.7.7 Delete a User .................................................................................................................. 136


AP

4.7.8 Modify User Information ................................................................................................. 136


I_

4.7.9 Modify User's Password ................................................................................................. 137


V3

4.7.10 Manager Modify Common User's Password ................................................................ 137


.3
7

4.7.11 [Config] User Login Authentication Policy..................................................................... 138


fo

4.8 Network ..................................................................................................................................... 138


rV

4.8.1 Get Network Interfaces ................................................................................................... 138


el

4.8.2 [Config] Client Access Filter............................................................................................ 140


se

4.8.3 [Config] Network Basic Config ........................................................................................ 140


n gS

4.8.4 [Config] PPPoE ............................................................................................................... 142


dn

4.8.5 [Config] DDNS ................................................................................................................ 143


Bh

4.8.6 [Config] Email ................................................................................................................. 145


d

4.8.7 [Config] WLan ................................................................................................................. 147


4.8.8 Scan Wlan Devices......................................................................................................... 148
4.8.9 [Config] UPnP ................................................................................................................. 150
4.8.10 Get UPnP Status .......................................................................................................... 151
4.8.11 [Config] NTP.................................................................................................................. 152
4.8.12 [Config] RTSP ............................................................................................................... 153
4.8.13 [Config] Alarm Server ................................................................................................... 154
4.8.14 [Config] Onvif Service Authorization ............................................................................. 155
4.8.15 [Config] SSHD Config ................................................................................................... 155
4.8.16 [Config] Cellular Network Traffic Packages .................................................................. 156
4.8.17 Obtaining the Traffic Information of Current Month ...................................................... 157
4.8.18 Searching for History Traffic Statistics According to Specified Conditions .................. 159
4.8.19 [Config]Configuring General Settings of RTMP ........................................................... 161
4.9 Event ......................................................................................................................................... 163

Table of Contents X
4.9.1 [DataType] Event Handler .............................................................................................. 163
4.9.2 [Config] Alarm Event ....................................................................................................... 168
4.9.3 [Config] Alarm Out .......................................................................................................... 169
4.9.4 Get Alarm Input Channels .............................................................................................. 170
4.9.5 Get Alarm Output Channels............................................................................................ 170
4.9.6 Get States of Alarm Input Channels ............................................................................... 170
4.9.7 Get States of Alarm Output Channels ............................................................................ 171
4.9.8 [Config] Video Blind Event .............................................................................................. 171
4.9.9 [Config] Video Loss Event .............................................................................................. 172
4.9.10 [Config] Login Failure Event ......................................................................................... 172
4.9.11 [Config] Storage Not Exist Event .................................................................................. 173
4.9.12 [Config] Storage Access Failure Event ......................................................................... 173
4.9.13 [Config] Storage Low Space Event .............................................................................. 174
4.9.14 [Config] Net Abort Event ............................................................................................... 174
4.9.15 [Config] IP Conflict Event .............................................................................................. 175
4.9.16 Get Channels Event Happened .................................................................................... 175
DA

4.9.17 Subscribe to Event Message ........................................................................................ 176


HU

4.9.18 Get Capability of Event Management........................................................................... 179


A_

4.9.19 [Config] Net Alarm Event .............................................................................................. 182


HT

4.9.20 Set Net Alarm State ...................................................................................................... 183


TP

4.9.21 Get Supported Events .................................................................................................. 184


_

4.9.22 [Config] Triger Http User List ........................................................................................ 184


AP

4.10 Record ..................................................................................................................................... 185


I_

4.10.1 Get Capability of Recording.......................................................................................... 185


V3

4.10.2 [Config] Record Config ................................................................................................. 186


.3
7

4.10.3 [Config] Record Mode ................................................................................................... 187


fo

4.10.4 [Config] Media Global ................................................................................................... 188


rV

4.10.5 Find Media Files ........................................................................................................... 188


el

4.10.6 Find media files with FaceDetection info ...................................................................... 192


se

4.10.7 Find media files with FaceRecognition info .................................................................. 195


n gS

4.10.8 Find media files with HumanTrait info .......................................................................... 199


dn

4.10.9 Find media files with TrafficCar info ............................................................................. 204


Bh

4.10.10 Find media files with IVS info ..................................................................................... 207


d

4.10.11 Find media files with NonMotor info ........................................................................... 209


4.10.12 Searching for Media Files According to WorkClothesDetection ................................ 213
4.10.13 Download Media File with the File Name ................................................................... 218
4.10.14 Download Media File between Times......................................................................... 219
4.10.15 Encrypted Download Media File with the File Name ................................................. 220

4.10.16 Query Total Number of Alarms ............................................................................... 220

4.11 Log........................................................................................................................................... 221


4.11.1 Find Logs ...................................................................................................................... 221
4.11.2 Clear All the Logs .......................................................................................................... 223
4.11.3 Backup Logs ................................................................................................................. 223
4.11.4 Seek Find Logs ............................................................................................................. 224
4.11.5 Export Encryped Log .................................................................................................... 225
4.11.6 [Config] Serial Port Log Redirection ............................................................................. 225

Table of Contents XI
4.12 Upgrader ................................................................................................................................. 226
4.12.1 Strat to Upgrade ........................................................................................................... 226
4.12.2 Get Upgrade State ........................................................................................................ 227
4.12.3 Set upgrader url ............................................................................................................ 227
4.12.4 Cancel Upgrade ............................................................................................................ 228
4.12.5 Checking Cloud Update Version .................................................................................. 228
4.12.6 Performing Online Update ............................................................................................ 230
4.12.7 Canceling Online Update.............................................................................................. 231
4.13 Http Uploading ........................................................................................................................ 232
4.13.1 [Config] Active Image and Event Uploading ................................................................. 232
4.13.2 Active Image and Event Uploading .............................................................................. 233
4.13.3 [Config] Active Event Uploading ................................................................................... 234
4.13.4 Active Event Uploading................................................................................................. 235
4.13.5 [Config] Active Report Data Uploading ......................................................................... 236
4.13.6 People Counting Report Data Uploading ..................................................................... 237
4.13.7 Video Structuring Report Data Upload ......................................................................... 240
DA

4.13.8 People Flow Heat Map Report Data Upload ................................................................ 242
HU

4.13.9 ANPR Report Data Upload ........................................................................................... 242


A_

4.13.10 Crowd Distribution Report Data upload ...................................................................... 244


HT

4.13.11 Vehicle Density Report Data Upload .......................................................................... 245


TP

4.13.12 FaceAnalysis Report Data Upload ............................................................................. 247


_

5 Camera APIs ...................................................................................................................................... 249


AP

5.1 Image ........................................................................................................................................ 249


I_

5.1.1 [Config] Brightness, Contrast and Saturation ................................................................. 249


V3

5.1.2 [Config] Sharpness ......................................................................................................... 250


.3
7

5.1.3 [Config] Flip, Mirror and Rotate90 .................................................................................. 250


fo

5.2 Exposure ................................................................................................................................... 251


rV

5.2.1 [Config] Exposure Config................................................................................................ 251


el

5.3 Backlight .................................................................................................................................... 253


se

5.3.1 [Config] Backlight Config ................................................................................................ 253


n gS

5.4 White Balance ........................................................................................................................... 254


dn

5.4.1 [Config] White Balance Config ....................................................................................... 254


Bh

5.5 Day-Night .................................................................................................................................. 255


d

5.5.1 [Config] Day-Night Config ............................................................................................... 255


5.6 Zoom and Focus ....................................................................................................................... 256
5.6.1 Adjust Focus ................................................................................................................... 256
5.6.2 Adjust Focus Continuously ............................................................................................. 256
5.6.3 Auto Focus ...................................................................................................................... 257
5.6.4 Get Focus Status ............................................................................................................ 257
5.6.5 setFocus ......................................................................................................................... 258
5.6.6 [Config] Zoom Config ...................................................................................................... 258
5.6.7 [Config] Focus Config ..................................................................................................... 259
5.7 Lighting ...................................................................................................................................... 261
5.7.1 [Config] Lighting Config .................................................................................................. 261
5.8 Video in Options ........................................................................................................................ 262
5.8.1 Change binocular camera's splice mode ....................................................................... 262
5.8.2 [Config] Video in Options Config .................................................................................... 263

Table of Contents XII


6 Storage APIs .................................................................................................................................... 269
6.1 Storage Devices ........................................................................................................................ 269
6.1.1 Get Hard Disk Information .............................................................................................. 269
6.1.2 Get the Name of All Storage Devices ............................................................................. 270
6.1.3 Get Storage Device Information ..................................................................................... 270
6.1.4 Get Storage Capability ................................................................................................... 271
6.1.5 Format Camera SD-Card ............................................................................................... 271
6.1.6 [Config] Hard Disk Recording Type ................................................................................ 272
6.1.7 Getting Disk Information ................................................................................................. 272
6.2 NAS ........................................................................................................................................... 280
6.2.1 [Config] NAS Information ................................................................................................ 280
6.3 Storage Point ............................................................................................................................ 282
6.3.1 [Config] Record Storage Point ........................................................................................ 282
6.3.2 [Config] Storage Group ................................................................................................... 283
6.4 SDEncrypt ................................................................................................................................. 284
6.4.1 Encrypt SD Card ............................................................................................................. 284
DA

6.4.2 Decrypt SD Card............................................................................................................. 285


HU

6.4.3 Clear SD Card Password ............................................................................................... 285


A_

6.4.4 Modify SD Card Password ............................................................................................. 285


HT

6.4.5 Get SD Card Operate Error Policy ................................................................................. 286


TP

6.4.6 [Config] Storage Health Alarm Settings .......................................................................... 286


_

7 Display APIs ..................................................................................................................................... 288


AP

7.1 GUI ............................................................................................................................................ 288


I_

7.1.1 [Config] GUISet............................................................................................................... 288


V3

7.2 Split Screen ............................................................................................................................... 289


.3
7

7.2.1 Split Screen Mode .......................................................................................................... 289


fo

7.3 Moniter Tour .............................................................................................................................. 290


rV

7.3.1 [Config] Moniter Tour ...................................................................................................... 290


el

7.3.2 Enable Tour ..................................................................................................................... 291


se

7.3.3 [Config] Monitor Collection ............................................................................................. 291


n gS

8 Comm APIs ....................................................................................................................................... 293


dn

8.1 PTZ............................................................................................................................................ 293


Bh

8.1.1 [Config] PTZ Config ........................................................................................................ 293


d

8.1.2 Get PTZ Protocol List ..................................................................................................... 294


8.1.3 Get PTZ Capability of Current Protocol .......................................................................... 295
8.1.4 Get PTZ Status ............................................................................................................... 296
8.1.5 PTZ Control .................................................................................................................... 297
8.1.6 Preset.............................................................................................................................. 302
8.1.7 Tour ................................................................................................................................. 304
8.1.8 Scan ................................................................................................................................ 307
8.1.9 Pattern ............................................................................................................................ 308
8.1.10 Pan................................................................................................................................ 310
8.1.11 [Config] PTZ Auto Movement.........................................................................................311
8.1.12 PTZ Restart .................................................................................................................. 313
8.1.13 PTZ Reset ..................................................................................................................... 313
8.1.14 OSD Menu .................................................................................................................... 314
8.1.15 [Config] Electronic PTZ ................................................................................................. 316

Table of Contents XIII


8.1.16 Get View Range Status ................................................................................................ 317
8.2 Wiper ......................................................................................................................................... 318
8.2.1 Move Continuously ......................................................................................................... 318
8.2.2 Stop Move ....................................................................................................................... 319
8.2.3 Move Once...................................................................................................................... 319
8.3 Illuminator .................................................................................................................................. 319
8.3.1 [Config] Visible-light Illuminator ...................................................................................... 319
8.3.2 [Config]Configuring Lighting ........................................................................................... 320
8.3.3 [Config]Configuring Lighting V2 ...................................................................................... 322
8.3.4 [Config]Configuring Light Schemes ................................................................................ 326
8.4 Flashlight ................................................................................................................................... 328
8.4.1 [Config] Flashlight Config ............................................................................................... 328
8.5 Coaxial Control IO ..................................................................................................................... 329
8.5.1 Control White Light or Speaker ...................................................................................... 329
8.5.2 Get White Light and Speaker Status .............................................................................. 329
8.6 Pir Alarm .................................................................................................................................... 330
DA

8.6.1 [Config] Pir Parameter .................................................................................................... 330


HU

8.7 SCADA....................................................................................................................................... 333


A_

8.7.1 Searching for SCADA Attributes ..................................................................................... 333


HT

8.7.2 Configuring SCADA Attributes ........................................................................................ 336


TP

8.7.3 Obtaining Real-time Data of Monitoring Points .............................................................. 337


_

8.7.4 Configuring Monitoring Points ........................................................................................ 339


AP

8.7.5 Starting Searching for Historical Data ............................................................................ 340


I_

8.7.6 Obtaining Historical Data ................................................................................................ 340


V3

8.7.7 Stopping Searching for Historical Data .......................................................................... 342


.3
7

8.7.8 Obtaining IDs of External Devices Connected to the Host ............................................ 342
fo

8.8 Gyro........................................................................................................................................... 343


rV

8.8.1 get gyroscope info .......................................................................................................... 343


el

8.9 Other ......................................................................................................................................... 344


se

8.9.1 [Config]Day/Night Settings of PTZ Module .................................................................... 344


n gS

9 Video Analyse APIs ........................................................................................................................... 347


dn

9.1 Video Analyse Event ................................................................................................................. 347


Bh

9.1.1 [Event] LeftDetection ...................................................................................................... 347


d

9.1.2 [Event] TakenAwayDetection .......................................................................................... 348


9.1.3 [Event] WanderDetection ................................................................................................ 348
9.1.4 [Event] StayDetection ..................................................................................................... 350
9.1.5 [Event] HumanTrait ......................................................................................................... 351
9.1.6 [Event] CrossLineDetection ............................................................................................ 354
9.1.7 [Event] CrossRegionDetection ....................................................................................... 356
9.1.8 [Event] QueueStayDetection .......................................................................................... 357
9.1.9 [Event] QueueNumDetection .......................................................................................... 359
9.1.10 [Event] WorkClothesDetection...................................................................................... 360
9.2 FaceRecognitionServer ............................................................................................................ 373
9.2.1 Create Face Group ......................................................................................................... 373
9.2.2 Modify Face Group ......................................................................................................... 374
9.2.3 Delete Face Group ......................................................................................................... 374
9.2.4 Deploy Face Group......................................................................................................... 375

Table of Contents XIV


9.2.5 Find Face Group ............................................................................................................. 377
9.2.6 Re-Abstract Feature By Group ....................................................................................... 379
9.2.7 Add Person ..................................................................................................................... 380
9.2.8 Modify Person ................................................................................................................. 381
9.2.9 Delete Person ................................................................................................................. 382
9.2.10 Find Person .................................................................................................................. 382
9.2.11 Re-Abstract Features By Person .................................................................................. 385
9.2.12 [Config] Face Recognition AlarmOut Setting................................................................ 385
9.2.13 Find Person by Picture ................................................................................................. 387
9.2.14 Find History Person by Picture ..................................................................................... 391
9.2.15 [Event] FaceDetection .................................................................................................. 394
9.2.16 [Event] FaceRecognition .............................................................................................. 395
9.2.17 [Event] FaceFeatureAbstract ........................................................................................ 398
9.2.18 [Config] Face Recognition Event Handler Setting ........................................................ 398
9.2.19 [Config] Face-ID Recognition Threshold ...................................................................... 400
9.2.20 Export Face Database .................................................................................................. 400
DA

9.2.21 Importing Face Database ............................................................................................. 401


HU

9.2.22 Remote Delete Person ................................................................................................. 401


A_

9.2.23 Add Face Lib Download Task ....................................................................................... 402


HT

9.3 People Counting........................................................................................................................ 403


TP

9.3.1 Get Summary.................................................................................................................. 403


_

9.3.2 Query the Count of People ............................................................................................. 405


AP

9.3.3 Clear the People Count Information ............................................................................... 408


I_

9.3.4 Subscribe the People Count Information ....................................................................... 408


V3

9.3.5 Clear statistics in time section .........................................................................................411


.3
7

9.3.6 [Config] Video Widget Number Status.............................................................................411


fo

9.3.7 [Event] NumberStat ........................................................................................................ 412


rV

9.3.8 [Event] ManNumDetection.............................................................................................. 413


el

9.3.9 [Event] CrowdDetection .................................................................................................. 414


se

9.3.10 [Event] LeaveDetection ................................................................................................ 415


n gS

9.4 Heat Map ................................................................................................................................... 417


dn

9.4.1 Get Heat Map Information .............................................................................................. 417


Bh

9.4.2 Get People Heat Map Information .................................................................................. 417


d

9.4.3 Subscribe People Realtime Trace Information ............................................................... 419


9.4.4 Get People Histroy Trace Information ............................................................................ 420
9.4.5 Subscribe Heat Map Raw Data ...................................................................................... 422
9.5 Crowd Distribute Map ............................................................................................................... 423
9.5.1 Get Channel Caps .......................................................................................................... 423
9.5.2 Subscribe to Realtime Crowd Stat ................................................................................. 423
9.5.3 Get Current Crowd Stat .................................................................................................. 425
9.6 Video Analyse ........................................................................................................................... 427
9.6.1 Get Video Analyse Capability ......................................................................................... 427
9.6.2 [Config] Video Analyse Global ........................................................................................ 429
9.6.3 [Config] Video Analyse Rule ........................................................................................... 430
9.6.4 Get Last Event Info ......................................................................................................... 434
9.6.5 [Config] GlobalDeviceParam .......................................................................................... 435
9.6.6 Get Template Rule .......................................................................................................... 435

Table of Contents XV
9.6.7 [Config] IntelliSchemeTourEnableSetting ....................................................................... 436
9.6.8 [Config] Intelligent Tour Plan........................................................................................... 437
9.6.9 Export Intelligent Diagnosis, Allowlist, and Blocklist Information ................................... 441
9.6.10 Import Intelligent O&M, Allowlist, and Blocklist Information ......................................... 442
9.6.11 Get Intelligent Capability ............................................................................................... 443
9.6.12 Subscribe Resource Usage Info ................................................................................... 445
9.6.13 Export Encrypted Files ................................................................................................. 446
9.6.14 Platform intelligent control ............................................................................................ 447
9.6.18 Get Algorithm Version Of Channel ............................................................................... 449
9.7 WorkSuitCompareServer .......................................................................................................... 450
9.7.1 Add Compliance Library ................................................................................................. 450
9.7.2 Delete Compliance Library ............................................................................................. 451
9.7.3 Find Compliance Library................................................................................................. 452
9.7.4 Get Compliance Library Arming Information of Channels .............................................. 453
9.7.5 Modify Compliance Group Information ........................................................................... 454
9.7.6 Deploy Compliance Library ............................................................................................ 455
DA

9.7.7 Find Workwear Information in Compliance Library ........................................................ 456


HU

9.7.8 Get Find Workwear Information Result .......................................................................... 456


A_

9.7.9 Stop Find Workwear Information .................................................................................... 459


HT

9.7.10 Delete Workwear Information ....................................................................................... 459


TP

9.7.11 Re-extracting Features by Workwear ........................................................................... 460


_

9.7.12 Stop Re-extracting Workwear Features ....................................................................... 460


AP

9.8 Smart Motion Detection ............................................................................................................ 461


I_

9.8.1 [Config] SmartMotionDetect ........................................................................................... 461


V3

9.8.2 Start SMD Data Search .................................................................................................. 462


.3
7

9.8.3 Get SMD Data Search Result......................................................................................... 463


fo

9.8.4 End SMD Data Search ................................................................................................... 464


rV

9.9 Intelligent analysis tasks ........................................................................................................... 464


el

9.9.1 Add task .......................................................................................................................... 464


se

9.9.2 Attach task result ............................................................................................................ 476


n gS

9.9.3 Remove task ................................................................................................................... 478


dn

9.9.4 Push Picture File............................................................................................................. 479


Bh

9.10 SceneModeManager............................................................................................................... 480


d

9.10.1 Get Scene Mode Capabilities ....................................................................................... 480


9.10.2 Get The Current Scene Mode ...................................................................................... 481
9.10.3 Get The Default Scene Mode ....................................................................................... 481
9.10.4 Set The Scene Mode .................................................................................................... 482
9.11 ExperienceRegistry ................................................................................................................. 482
9.11.1 Acquiring Experience Database Capabilities ................................................................ 482
9.11.2 Creating Experience Database ..................................................................................... 488
9.11.3 Searching for Group Information on Experience Database ......................................... 490
9.11.4 Deleting Information on Experience Database Groups ................................................ 492
9.11.5 Modifying Information on Experience Database Groups.............................................. 493
9.11.6 Searching for Remaining Storage Size of the Experience Database .......................... 494
9.11.7 Acquiring Additional Tokens .......................................................................................... 495
9.11.8 Adding Multiple Experience Database Samples Asynchronously ................................ 496
9.11.9 Searching for Image Information on the Experience Database .................................... 499

Table of Contents XVI


9.11.10 Reading Search Results of Experience Database Images ........................................ 501
9.11.11 Stopping Searching for Image Information on Experience Database ........................ 503
9.11.12 Deleting Image Information on the Experience Database.......................................... 504
9.11.13 Subscribing Feature Extraction Results ..................................................................... 505
9.11.14 Remodeling Experience Database ............................................................................. 509
9.11.15 Modeling All Items in the Experience Databases ....................................................... 510
9.11.16 Unbinding Experience Databases .............................................................................. 510
9.11.17 Searching for Records of Suspected False Alarm Events ..........................................511
9.11.18 Reading Search Results for Suspected False Alarm Events ..................................... 512
9.11.19 Stopping Searching for Records of Suspected False Alarm Events .......................... 514
10 Intelligent Traffic APIs..................................................................................................................... 516
10.1 Intelligent Traffic Event ............................................................................................................ 516
10.1.1 [Event] TrafficJunction .................................................................................................. 516
10.1.2 [Event] TrafficRetrograde.............................................................................................. 518
10.1.3 [Event] TrafficJam ......................................................................................................... 518
10.1.4 [Event] TrafficUnderSpeed ........................................................................................... 519
DA

10.1.5 [Event] TrafficOverSpeed ............................................................................................. 520


HU

10.1.6 [Event] TrafficPedestrain .............................................................................................. 521


A_

10.1.7 [Event] TrafficParking.................................................................................................... 522


HT

10.2 Traffic Flow .............................................................................................................................. 524


TP

10.2.1 [Event] TrafficFlowStat .................................................................................................. 524


_

10.2.2 Find Traffic Flow History ............................................................................................... 524


AP

10.2.3 Start Traffic Statistics Search ....................................................................................... 526


I_

10.2.4 Get Traffic Statistics ...................................................................................................... 527


V3

10.2.5 End Traffic Statistics Search......................................................................................... 528


.3
7

10.3 Traffic Record .......................................................................................................................... 529


fo

10.3.1 Insert Traffic BlockList/AllowList Record ...................................................................... 529


rV

10.3.2 Update Traffic BlockList/AllowList Record .................................................................... 529


el

10.3.3 Remove Traffic BlockList/AllowList Record .................................................................. 530


se

10.3.4 Find Traffic BlockList/AllowList Record ........................................................................ 531


n gS

10.3.5 RemoveEx Traffic BlockList/AllowList Record .............................................................. 532


dn

10.3.6 Import Traffic BlockList/AllowList .................................................................................. 532


Bh

10.3.7 Export Traffic BlockList/AllowList .................................................................................. 533


d

10.3.8 Export Traffic Flow ........................................................................................................ 534


10.3.9 Export Traffic Snap Event Info ...................................................................................... 536
10.4 Traffic Snap Operation ............................................................................................................ 538
10.4.1 Open Strobe ................................................................................................................. 538
10.4.2 Close Strobe ................................................................................................................. 538
10.4.3 Open/Close Unlicensed Vehicle Detection ................................................................... 538
10.4.4 Manual Snap................................................................................................................. 539
10.5 Traffic Parking ......................................................................................................................... 539
10.5.1 Get the Specific Parking Space Status ........................................................................ 539
10.5.2 Get All Status of Parking Spaces ................................................................................. 540
10.5.3 [Config] Parking Space Light State .............................................................................. 541
10.5.4 Set Order State ............................................................................................................. 544
10.5.5 Set Light State .............................................................................................................. 545
10.5.6 [Config] Parking Space Access Filter Setting ............................................................... 545

Table of Contents XVII


10.5.7 Set OverLine State ...................................................................................................... 546

10.5.8 Set Parking Control Info ............................................................................................ 546

10.5.9 Set Parking Space Lighting Plan ............................................................................... 549

10.6 Vehicles Distribution................................................................................................................ 550


10.6.1 Subscribe Vehicles Distribution Data ........................................................................... 550
10.7 Vehicle Manager ..................................................................................................................... 552
10.7.1 Adding Vehicle Groups ................................................................................................. 552
10.7.2 Modifying Vehicle Groups ............................................................................................. 552
10.7.3 Deleting Vehicle Groups ............................................................................................... 553
10.7.4 Searching for Vehicle Groups ....................................................................................... 553
10.7.5 Adding Vehicle Records................................................................................................ 554
10.7.6 Modifying Vehicle Information....................................................................................... 557
10.7.7 Deleting Vehicle Information ......................................................................................... 559
DA

10.7.8 Searching for Vehicles from Registered Database ...................................................... 560


HU

10.7.9 Obtaining Vehicle Search Results ................................................................................ 563


A_

10.7.10 Stopping Searching for Vehicles ................................................................................ 564


HT

10.7.11 Add PlateNumberLib Download Task ......................................................................... 564


TP

11 Thermography and Radiometry APIs ............................................................................................ 566


_

11.1 Thermography Manager .......................................................................................................... 566


AP

11.1.1 Get Capability of Thermography ................................................................................... 566


I_

11.1.2 [Config] Thermography Options.................................................................................... 569


V3

11.1.3 Get ExternSystem Information...................................................................................... 571


.3
7

11.1.4 Get Information of Preset Mode.................................................................................... 572


fo

11.1.5 Get Optimized Region Information ............................................................................... 573


rV

11.1.6 Enable Shutter .............................................................................................................. 573


el

11.1.7 Fix Focus....................................................................................................................... 574


se

11.1.8 Do Flat Field Correction ................................................................................................ 574


n gS

11.2 Radiometry .............................................................................................................................. 574


dn

11.2.1 Get Capability of Radiometry ........................................................................................ 574


Bh

11.2.2 [Config] Heat Image Thermometry ............................................................................... 576


d

11.2.3 [Config] Thermometry Rule ........................................................................................... 578


11.2.4 [Config] Heat Image Temper Event............................................................................... 580
11.2.5 Get Temperature of Particular Point ............................................................................. 581
11.2.6 Get Temperature of Particular Condition ...................................................................... 581
11.2.7 Find Temperature Information....................................................................................... 582
11.2.8 Subscribe Temperature Information.............................................................................. 584
11.2.9 Subscribe Radiometry Data .......................................................................................... 586
11.2.10 Fetch Radiometry Data ............................................................................................... 588
11.2.11 [Config] FireWarning Config ........................................................................................ 588
11.2.12 [Config] FireWarningMode Config .............................................................................. 590
11.2.13 Get Current Hot Cold Spot.......................................................................................... 590
11.2.14 [Config] Heat Image Temper PreAlarm Event ............................................................ 591
11.2.15 Get Heat Map Info....................................................................................................... 592
11.2.16 Get Temperature of Particular Region ........................................................................ 593

Table of Contents XVIII


11.3 TemperCustom ........................................................................................................................ 594
11.3.1 Set Environment Temperature ...................................................................................... 594
12 Access Control APIs ..................................................................................................................... 596
12.1 Access Control ........................................................................................................................ 596
12.1.1 Open Door .................................................................................................................... 596
12.1.2 Close Door .................................................................................................................... 596
12.1.3 Get Door Status ............................................................................................................ 597
12.1.4 Get Lock Status ............................................................................................................ 597
12.1.5 Capture Fingerprint ....................................................................................................... 598
12.1.6 Capture Face Picture .................................................................................................... 599
12.1.7 Query AccessControl Record ....................................................................................... 600
12.1.8 Query Access Control Alarm Record ............................................................................ 604
12.1.9 [Event] AccessControl .................................................................................................. 605
12.1.10 [Event] CitizenPictureCompare .................................................................................. 608
12.1.11 [Event] Door Status Event .......................................................................................... 610
12.1.12 [Config] Access Control General Setting .....................................................................611
DA

12.1.13 [Config] Access Control Setting .................................................................................. 613


HU

12.1.14 [Config] Wiegand Setting ............................................................................................ 616


A_

12.1.15 [Config] Access Time Schedule Setting ..................................................................... 617


HT

12.1.16 [Config] Special Day Group Setting............................................................................ 618


TP

12.1.17 [Config] Special Days Schedule Setting ..................................................................... 619


_

12.1.18 [Config] MeasureTemperature Setting ....................................................................... 620


AP

12.1.19 [Config] CitizenPictureCompare Setting ..................................................................... 623


I_

12.2 Access Control Manager ......................................................................................................... 624


V3

12.2.1 Get Access Control Capability ...................................................................................... 624


.3
7

12.2.2 Add SubController......................................................................................................... 626


fo

12.2.3 Modify SubController .................................................................................................... 626


rV

12.2.4 Remove SubController ................................................................................................. 626


el

12.2.5 Get SubController Info .................................................................................................. 627


se

12.2.6 Get SubController States.............................................................................................. 628


n gS

12.2.7 Set RepeatEnter Route ................................................................................................ 628


dn

12.2.8 Get RepeatEnter Route ................................................................................................ 629


Bh

12.2.9 Set ABLock Route......................................................................................................... 630


d

12.2.10 Get ABLock Route ...................................................................................................... 630


12.2.11 Get Log Status ............................................................................................................ 631
12.2.12 Sync Offline Log ......................................................................................................... 631
12.2.13 Sync SubController Time ............................................................................................ 631
12.3 Access User Account ( V1 ) .................................................................................................... 633
12.3.1 Add Access User Face ................................................................................................. 633
12.3.2 Modify Access User Face ............................................................................................. 634
12.3.3 Delete Access User Face ............................................................................................. 635
12.3.4 Find Access User Face................................................................................................. 635
12.3.5 Add Access User Card and Fingerprint ........................................................................ 636
12.3.6 Modify Access User Card and Fingerprint.................................................................... 639
12.3.7 Delete Access User Card and Fingerprint .................................................................... 642
12.3.8 Find Access User Card and Fingerprint ....................................................................... 643
12.3.9 Get the Total Number of Records of Access User Card and Fingerprint ..................... 651

Table of Contents XIX


12.4 Access User Account ( V2 ) .................................................................................................... 652
12.4.1 Add Access User........................................................................................................... 652
12.4.2 Modify Access User ...................................................................................................... 653
12.4.3 Delete All Access User ................................................................................................. 655
12.4.4 Delete Multiple Access Users ....................................................................................... 655
12.4.5 Find Multiple Access Users .......................................................................................... 655
12.4.6 Start Find Access User Related Information ................................................................ 657
12.4.7 Get Find Result of Access User Related Information ................................................... 658
12.4.8 Stop Find Access User Related Information ................................................................ 660
12.4.9 Add Multiple Access Cards ........................................................................................... 660
12.4.10 Modify Multiple Access Cards .................................................................................... 661
12.4.11 Delete All Access Cards .............................................................................................. 662
12.4.12 Delete Multiple Access Cards..................................................................................... 662
12.4.13 Find Multiple Access Cards ........................................................................................ 663
12.4.14 Start Find Access User Card Related Information ..................................................... 664
12.4.15 Get Find Result of Access User Card Related Information ........................................ 665
DA

12.4.16 Stop Find Access User Card Related Information ..................................................... 666
HU

12.4.17 Add Multiple Access User Fingerprint......................................................................... 666


A_

12.4.18 Modify Access User Fingerprint.................................................................................. 667


HT

12.4.19 Delete All Access User Fingerprint ............................................................................. 668


TP

12.4.20 Delete Multiple Access User Fingerprint .................................................................... 669


_

12.4.21 Find Access User Fingerprint ..................................................................................... 669


AP

12.4.22 Add Multiple Access User Face .................................................................................. 670


I_

12.4.23 Update Multiple Access User Face ............................................................................ 671


V3

12.4.24 Delete All Access User Face ...................................................................................... 671


.3
7

12.4.25 Delete Multiple Access User Face.............................................................................. 672


fo

12.4.26 Find Access User Face............................................................................................... 672


rV

12.4.27 Start Find Access User Face Related Information ..................................................... 673
el

12.4.28 Get Find Result of Access User Face Related Information ....................................... 674
se

12.4.29 Stop Find Access User Face Related Information ..................................................... 674
n gS

12.4.30 Access Control Protocol Capability Query ................................................................. 675


dn

12.4.31 Inserting Bluetooth Card Information.......................................................................... 680


Bh

12.4.32 Searching for Information on Bluetooth Card ............................................................. 681


d

12.4.33 Deleting All Bluetooth Card Information ..................................................................... 681


12.4.34 Deleting Bluetooth Card Information .......................................................................... 681
12.4.35 Searching for Information on Access Control Bluetooth Card ................................... 682
12.4.36 Acquiring the Search Results of Bluetooth Card ........................................................ 683
12.4.37 Ending the Bluetooth Card Search ............................................................................. 683
12.5 Admin Password ..................................................................................................................... 684
12.5.1 Add Access Control Admin Password .......................................................................... 684
12.5.2 Modify Access Control Admin Password ...................................................................... 685
12.5.3 Delete Access Control Admin Password ...................................................................... 686
12.5.4 Find Access Control Admin Password.......................................................................... 686
12.5.5 Get the Total Number of Records of Access Control Admin Password ....................... 689
13 Intelligent Building APIs ................................................................................................................. 691
13.1 Video Talk ................................................................................................................................ 691
13.1.1 Subscribe Video Talk Status ......................................................................................... 691

Table of Contents XX
13.1.2 Unsubscribe Video Talk Status ..................................................................................... 693
13.1.3 Invite Server on Video Talk ........................................................................................... 693
13.1.4 Cancel the Video Talk ................................................................................................... 695
13.1.5 Answer the Invitation .................................................................................................... 695
13.1.6 Refuse to Answer the Video Talk Invitation .................................................................. 696
13.1.7 Hang Up ........................................................................................................................ 697
13.2 Intelligent Building Record ...................................................................................................... 697
13.2.1 Query Video Talk Log Record....................................................................................... 697
13.2.2 Insert Announcement Record ....................................................................................... 698
13.2.3 Query Alarm Record ..................................................................................................... 699
13.3 SIP........................................................................................................................................... 700
13.3.1 [Config] SIP Configuration ............................................................................................ 701
13.3.2 [Config] Registar Configuration .................................................................................... 703
13.4 Room Number Database Management .................................................................................. 704
13.4.1 Adding Room Number .................................................................................................. 704
13.4.2 Getting Records by Video Talk short number ............................................................... 706
DA

13.4.3 Getting Records by recno ............................................................................................. 708


HU

13.4.4 Updating Room Number Records ................................................................................ 710


A_

13.4.5 Deleting Records by recno ............................................................................................711


HT

13.4.6 Clearing All Room Numbers ......................................................................................... 712


TP

13.4.7 Getting Total Quantity of Room Number ...................................................................... 712


_

13.5 ElevatorFloorCounter .............................................................................................................. 712


AP

13.5.1 Set Elevator Floor Info .................................................................................................. 712


I_

13.5.2 Get Elevator WorkInfo .................................................................................................. 713


V3

13.5.3 Get Capability ............................................................................................................... 713


.3
7

13.6 Elevator Control ...................................................................................................................... 714


fo

13.6.1 Lift Control Interface ..................................................................................................... 714


rV

13.6.2 Getting Lift Control Capability Set ................................................................................ 716


el

13.6.3 Getting Lift Control Protocol List ................................................................................... 716


se

13.6.4 Inserting Lift Control Protocol ....................................................................................... 717


n gS

13.6.5 Deleting Lift Control Protocol ........................................................................................ 718


dn

14 DVR Custom APIs............................................................................................................................ 719


Bh

14.1 File Finder ............................................................................................................................... 719


d

14.1.1 Create a File Finder ...................................................................................................... 719


14.1.2 Create a Motion File Finder .......................................................................................... 721
14.1.3 Get the File Information Found by the Finder .............................................................. 721
14.1.4 Stop the Finder ............................................................................................................. 722
14.1.5 Get Bound Files ............................................................................................................ 723
14.2 BandLimit ................................................................................................................................ 724
14.2.1 Get Bandwidth Limit State ............................................................................................ 724
14.3 Record Files Protection........................................................................................................... 725
14.3.1 Add Protection .............................................................................................................. 725
14.3.2 Cancel Protection ......................................................................................................... 725
14.3.3 Remove Protection ....................................................................................................... 726
14.3.4 DownloadFile ................................................................................................................ 726
14.3.5 UploadFile ..................................................................................................................... 727
14.3.6 List all elements in the specified directory .................................................................... 728

Table of Contents XXI


14.3.7 DownloadFile By Condition ............................................................................................ 729
14.4 Daylight ................................................................................................................................... 731
14.4.1 Get Daylight .................................................................................................................. 731
15 Other APIs ...................................................................................................................................... 732
15.1 Discover Devices .................................................................................................................... 732
15.1.1 Discover Devices on Internet........................................................................................ 732
15.2 Open Platform ......................................................................................................................... 733
15.2.1 Application Start and Stop ............................................................................................ 733
15.2.2 Install Application .......................................................................................................... 734
15.2.3 Update Application and License ................................................................................... 735
15.2.4 Uninstall Application ..................................................................................................... 736
15.2.5 Download Application Log ............................................................................................ 736
15.3 GPS ......................................................................................................................................... 737
15.3.1 Get Capablity ................................................................................................................ 737
15.3.2 [Config] GPS config ...................................................................................................... 738
15.3.3 Get GPS Status ............................................................................................................ 738
DA

15.4 Lens Function.......................................................................................................................... 739


HU

15.4.1 Get Lens Capability ...................................................................................................... 739


A_

15.4.2 Adjust Angle Continuously ............................................................................................ 740


HT

15.4.3 Stop Adjusting Angle ..................................................................................................... 740


TP

15.4.4 Adjust Depth Field......................................................................................................... 741


_

15.4.5 Adjust Depth Field Continuously .................................................................................. 741


AP

15.4.6 Get Depth Field Status ................................................................................................. 741


I_

15.4.7 Auto Adjust Depth Field ................................................................................................ 742


V3

15.4.8 Scene Correction .......................................................................................................... 742


.3
7

15.4.9 Reset Angle .................................................................................................................. 743


fo

15.5 FishEye ................................................................................................................................... 744


rV

15.5.1 Get FishEye Capability ................................................................................................. 744


el

15.5.2 [Config] FishEye Setting ............................................................................................... 745


se

15.6 Radar Adaptor ......................................................................................................................... 747


n gS

15.6.1 Get Radar Capability .................................................................................................... 747


dn

15.6.2 Get Radar Capbility ( Enhanced ) ................................................................................ 748


Bh

15.6.3 Get Status ..................................................................................................................... 749


d

15.6.4 Calculate Real Size ...................................................................................................... 750


15.6.5 Subscribe Alarm Point Info ........................................................................................... 750
15.6.6 Manual Locate .............................................................................................................. 753
15.6.7 Start Radar Calibration ................................................................................................. 754
15.6.8 Add Radar Link SD ....................................................................................................... 754
15.6.9 Del Radar Link SD ........................................................................................................ 755
15.6.10 Get Link SD State ....................................................................................................... 755
15.6.11 [Config] MapPara ........................................................................................................ 756
15.6.12 [Config] RadarAnalyseRule ........................................................................................ 757
15.6.13 [Config] RadarCalibration ........................................................................................... 759
15.6.14 [Config] RadarGuardLine............................................................................................ 760
15.6.15 [Config] RadarLink ...................................................................................................... 761
15.6.16 [Config] RadarLinkDevice ........................................................................................... 761
15.6.17 [Config] RadarPara ..................................................................................................... 762

Table of Contents XXII


15.6.18 [Config] RadarTrackGlobal ......................................................................................... 763
15.6.19 [Config] RemoteSDLink .............................................................................................. 764
15.7 Water Radar ............................................................................................................................ 765
15.7.1 Acquire Radar Capability .............................................................................................. 765
15.7.2 Get Radar Detection Target Data ................................................................................. 765
15.8 Water Quality Detection .......................................................................................................... 766
15.8.1 Get Capability ............................................................................................................... 766
15.8.2 Get Real-time Detection Data ...................................................................................... 766
15.8.3 Start Find Water Quality Report ................................................................................... 768
15.8.4 Get Find Water QUality Report Search Results ........................................................... 769
15.8.5 Stop Find Water Quality Report.................................................................................... 771
15.9 Advertisement ......................................................................................................................... 771
15.9.1 Modifying the Display Duration of Image Advertisments.............................................. 771
15.9.2 Releasing Advertisements ............................................................................................ 772
15.9.3 Getting the List of Advertisement Resources ............................................................... 774
15.9.4 Searching for the Released Advertisements ................................................................ 776
DA

15.9.5 Deleting Advertisement Resources .............................................................................. 778


HU
A_
HT
TP
_ AP
I_
V3
.3
7
fo
rV
el
se
n gS
dn
Bh
d

Table of Contents XXIII


1 Overview
This document specifies the HTTP-based application programming interface of video products.
The HTTP-based interface provides the functionality for requesting snapshot and media stream,
controlling camera functions (for example, PTZ and focus), and getting and setting internal
parameter values.
The video products serve as a server. The client sends requests to server, and then server handles
requests and returns resources accordingly.
DA
HU
A_
HT
TP
_ AP
I_
V3
.3
7
fo
rV
el
se
ngS
dn
Bh
d

Overview 24
2 References
[1] RFC 2326 Real Time Streaming Protocol (RTSP)
[2] RFC 2616 Hypertext Transfer Protocol-HTTP/1.1
[3] RFC 3986 Uniform Resource Identifiers (URI) Generic Syntax
[4] RFC 7616 HTTP Digest Access Authentication
[5] RFC 8259 The JavaScript Object Notation (JSON) Data Interchange Format
DA
HU
A_
HT
TP
_ AP
I_
V3
.3
7
fo
rV
el
se
ngS
dn
Bh
d

References 25
3 Definitions

3.1 Abbreviations
The following abbreviations are used throughout this document.
Application Programming Interface. In the document, it especially presents
API
application programming interface of video products.

3.2 Syntax Convention


 In URL syntax and in descriptions of API parameters, text in italic within angle brackets
denotes content that should be replaced with either a value or a string. When replacing the text
DA

string, the angle brackets must also be replaced. For example, <server> in URL syntax is
HU

replaced with the IP number of server, e.g., 192.168.1.108.


A_

 String shown in bold face denotes a brief explanatory note of the string close to it.
HT

 Name-value pair in square brackets denotes content that is optional. For example,
TP

"http ://<server>/cgi-bin/snapshot.cgi[?channel=1]" can be like this "http ://<server>/cgi-


_ AP

bin/snapshot.cgi".
I_

 The API syntax must follow the standard of URI. (RFC 3986: Uniform Resource Identifiers
V3

(URI) Generic Syntax); that is, spaces and other reserved characters (e.g, ":", "/", "?", "@", ";",
.3

"=", "+", ",", "$", "&") within a name-value pair should be replaced with %< ASCII hex>. For
7
fo

example, the blank should be replaced with %20.


rV

 To describe the range of a variable, we use some symbols such as "[]" and "{}". For example,
el

"[0-100]" denotes an integer not less than 0 and not larger than 100. "{0, 1, 2, 3}" denotes the
se
n

valid value of an integer among 0, 1, 2 and 3.


gS

 "[]" following a string denotes an array. The index is an integer and starts from 0. For example,
dn

"Snap[channel]" may be "Snap[0]" "Snap[0]" etc.


Bh

The variable may be different types: string, integer, bool or float. Integer is 32 bits. The range
d


of bool is "true" and "false".
 "R/O" in parameters means this parameter is required or not, "R"means required, "O"means
optional.

3.3 HTTP API Protocol Format


HTTP APIs support HTTP and HTTPS protocol. It is recommend using HTTPS to improve network
security.
The request and response parameters of the HTTP APIs have two formats: key=value format and
JSON format. Each HTTP API will choose one of these formats, please refer to the API detail in
later chapters.

Definitions 26
3.3.1 key=value format
If the HTTP API use key=value format for it's parameters, the URL syntax is :

<protocol>://<server><abs_path>[?query]

protocol: URL scheme for the particular request. The http protocol and https protocol are both
supported in this specification. So "http", as most of the APIs' default protocol except several RTSP
APIs, can be replaced by "https".
server: Server could be "hostname[:port]". The hostname can be IP address or the fully qualified
domain name of an IP device. The port is the port number of server listening for TCP connections.
If the port is not given, the default port is assumed. For HTTP, the default port is 80. For HTTPS,
the default port is 443.
abs_path: The Request-URI for the resources is abs_path. The abs_path in this specification is
most often of the form "/cgi-bin/*.cgi".
DA

query: The query field is a string of information to be interpreted by the resource. It consists of
HU

resource-related parameters. And it must be listed in name-value pair syntax


A_

(p1=v1&p2=v2&…&pn=vn).
HT

For the HTTP API that use key=value format for it's parameters, it usually has no HTTP Body.
TP

Request Example: HTTP request with key=value format parameters


_ AP

GET http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getFocusStatus&channel=1
I_

HTTP/1.1
V3

User-Agent: client/1.0
.3

Content-Length: 0
7
fo
rV

The server uses the standard HTTP status codes, the syntax of the status line of the response is:
el
se

HTTP/1.1 <HTTP code> <HTTP text>


n gS

With the following HTTP code and meanings:


dn

HTTP code HTTP text Description


Bh

The request has succeeded. The requested


200 OK
d

resource will be returned in the HTTP text.


The request had bad syntax or was inherently
400 Bad Request
impossible to be satisfied.
The request requires user authentication or the
401 Unauthorized
authorization has been refused.
The user does not have the right to access the
403 Forbidden
service.
The server has not found anything matching the
404 Not Found
request.
The server encountered an unexpected condition
500 Internal Server Error
that prevented it from fulfilling the request.
501 Not Implemented The server has not implemented the service.
If the HTTP code is 200, means the API execute success, and the response data in HTTP Body
( maybe multipart ) can be a multiline key=value data, or just a line with a word "OK".

Definitions 27
Reponse Example: success respose with multiline key=value
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: text/plain
Content-Length: <length>

status.Focus=0.5
status.Zoom=0.5

Reponse Example: success respose with a word "OK"
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: text/plain
Content-Length: <length>
DA

OK
HU

If the HTTP code is not 200, means the API execute failed, and the response data in HTTP Body
A_

maybe empty, or just two line, first line is a word "Error" to indicate error happened, the second line
HT

contain error detail.


TP

Reponse Example: request does not fit with syntax.


_AP

HTTP/1.1 404 Not Found


I_

Server: Device/1.0
V3
.3
7

Reponse Example: Request spells wrong.


fo
rV

HTTP/1.1 400 Bad Request


el

Server: Device/1.0
se

Content-Type: text/plain
n gS

Content-Length: <length>
dn

Error
Bh

Bad Request!
d

Reponse Example: If the request fits with syntax but an error occurs while the server handles it,
the response would like this:
HTTP/1.1 500 Internal Server Error
Server: Device/1.0
Content-Type: text/plain
Content-Length: <length>

Error
Internal Server Error!

3.3.2 JSON format


If the HTTP API use JSON format for it's parameters, the URL syntax is :

Definitions 28
<protocol>://<server><abs_path>

protocol: URL scheme for the particular request. The http and https protocols are both supported
in this specification. So "http", as most of the APIs' default protocol except several RTSP APIs, can
be replaced by "https".
server: Server could be "hostname[:port]". The hostname can be IP address or the fully qualified
domain name of an IP device. The port is the port number of server listening for TCP connections.
If the port is not given, the default port is assumed. For HTTP, the default port is 80. For HTTPS,
the default port is 443.
abs_path: The Request-URI for the resources is abs_path. The abs_path in this specification is
most often prefix with "/cgi-bin/api/" , and followed with resource name, for example : "/cgi-
bin/api/CloudUpgrader/check" .
For the HTTP API that use JSON format for it's parameters, the parameters are put to the HTTP
Body as a JSON object. If the API has no request parameter, then the HTTP Body is an empty
JSON object, for example " {} ", or there is no HTTP Body.
DA

Request Example: HTTP request with JSON format parameters


HU

GET http://192.168.1.108/cgi-bin/api/CloudUpgrader/check HTTP/1.1


A_

User-Agent: client/1.0
HT

Content-Type: application/json
TP

Content-Length: xxx
_
AP
I_

{
V3

"way" : 0,
.3

"proxy" : {
7
fo

"IP" : "10.1.2.3",
rV

"Port" : 8080
el

}
se

}
n gS

The server uses the standard HTTP status codes, the syntax of the status line of the response is:
dn

HTTP/1.1 <HTTP code> <HTTP text>


Bh

With the following HTTP code and meanings:


d

HTTP code HTTP text Description


The request has succeeded. The requested
200 OK
resource will be returned in the HTTP text.
The request had bad syntax or was inherently
400 Bad Request
impossible to be satisfied.
The request requires user authentication or the
401 Unauthorized
authorization has been refused.
The user does not have the right to access the
403 Forbidden
service.
The server has not found anything matching the
404 Not Found
request.
The server encountered an unexpected condition
500 Internal Server Error
that prevented it from fulfilling the request.

Definitions 29
HTTP code HTTP text Description
501 Not Implemented The server has not implemented the service.
If the HTTP code is 200, means the API execute success, and the response data in HTTP Body
( maybe multipart ) can be a JSON object. If the API has no response parameter, then the HTTP
Body is an empty JSON object, for example " {} ", or there is no HTTP Body.
Reponse Example: success respose with JSON format Body
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: application/json
Content-Length: <length>

{
"info" : {
"State" : "None",
"PackageType" : "all",
DA

"OldVersion" : "0000",
HU

"NewVersion" : "0004",
A_

"Attention" : "What is new",


HT

"PackageUrl" : "https://example.com/1.zip",
TP

"PackageId" : "1d2ee7",
_

"CheckSum" : "F3D288AB",
AP

"BuildTime" : "08-10-2018 01:01:02"


I_

}
V3

}
.3
7

If the HTTP code is not 200, means the API execute failed, and the response data in HTTP Body
fo

maybe empty, or a JSON object to describe the error detail. The value of "ErrorCode" contains
rV

error code, and the value of "ErrorMsg" contains error detail.


el
se

Reponse Example: request does not fit with syntax.


n gS

HTTP/1.1 404 Not Found


dn

Server: Device/1.0
Bh
d

Reponse Example: Request spells wrong.


HTTP/1.1 400 Bad Request
Server: Device/1.0
Content-Type: application/json
Content-Length: <length>

{
"ErrorCode" : 10086,
"ErrorMsg" : "Bad Request!"
}
Reponse Example: If the request fits with syntax but an error occurs while the server handles it,
the response would like this:

Definitions 30
HTTP/1.1 500 Internal Server Error
Server: Device/1.0
Content-Type: application/json
Content-Length: <length>

{
"ErrorCode" : 10097
"ErrorMsg" : "Internal Server Error!"
}

3.4 Authentication
Video products support digest authentication, see RFC 7616 for detail. If the http request sent by
client does not provide valid "Authorization" header information, video products would return HTTP
status code 401 and some information for authentication, then client should calculate authentication
information according to RFC 7616, and sent request again with authentication information using
DA

“Authorization” header. Video products return the required resource only if authorization information
HU

correct.
A_

1. When the client does not provoding digest authentication or the client calculates digest
HT

authentication with expired "nonce" data, video product reply 401 with information for
TP

authorization.
_ AP

Request Example: The client send request without authentication infomation


I_

GET /cgi-bin/magicBox.cgi?action=getLanguageCaps HTTP/1.1


V3

User-Agent: client/1.0
.3
7

Content-Length: 0
fo
rV

Reponse Example: The device send 401 reponse with parameters for authentication calculation.
el
se

HTTP/1.1 401 Unauthorized


n gS

Server: Device/1.0
dn

WWW-Authenticate: Digest realm="Device_00408CA5EA04",


nonce="000562fd20ef95ad", qop="auth",
Bh

opaque="5ccc069c403ebaf9f0171e9517f40e41"
d

2. Then the client generate "nc" and "cnonce", calculates the digest authorization using
"username" "password" "HTTP method" "URI" "nc" "cnonce" "realm" "nonce" , according to RFC
7616, and then sends it to video product again. If the digest authorization is correct, the video
product will reply HTTP status code 200 with the response data. If digest authorization is not
correct, the video product will reply HTTP status code 403 .
Request Example: The client send request again with authentication information ( suppose the
password of admin user is "abcd1234" )

Definitions 31
GET /cgi-bin/magicBox.cgi?action=getLanguageCaps HTTP/1.1
User-Agent: client/1.0
Authorization: Digest username="admin", realm="Device_00408CA5EA04",
nonce="000562fd20ef95ad", nc=00000001, cnonce="0a4f113b", qop="auth",
uri="/cgi-bin/magicBox.cgi?action=getLanguageCaps",
response="dfd0f24bed4c336d20c8f0729dd5dbc8"
opaque="5ccc069c403ebaf9f0171e9517f40e41"
Content-Length: 0

Reponse Example: If the authentication information is correct, the device send 200 reponse.
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: text/plain
Content-Length: <length>
DA

Languages=SimpChinese,English,French
HU

Reponse Example: If the authentication information is not correct, the device send 403 reponse.
A_

HTTP/1.1 403 Forbidden


HT

Server: Device/1.0
TP

Content-Length: 0
_ AP
I_
V3

3.5 Conventions
.3
7
fo

3.5.1 Channels
rV
el

For requests containing the param ‘channel’ like :


se
n

http://<server>/cgi-bin/mjpg/video.cgi[?channel=<ChannelNo>]
gS

ChannelNo: integer, must starts from 1. Default is 1 if not present.


dn

But for responses, the ‘ChannelNo’ should start from 0. In other words, the request channel 1
Bh

equals response channel 0.


d

Definitions 32
4 General APIs
The APIs specified in this section are supported by all video products.

4.1 APIs of RTSP

4.1.1 Get Real-Time Stream


Get real-time media stream APIs use RTSP protocol, please refer to RFC 2326 for detail. The rtsp
service default port is 554. The IP Camera supports both TCP and UDP transmission forms. It
supplies digest authentication ways. The authentication process is similar with "3.5 Authentication".
 The format of the RTSP URL parameter for getting real-time media stream is as follows.
DA

URL rtsp://<server>:[port]/cam/realmonitor
HU

Method DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, ...


A_

URL Params ( key=value format in URL )


HT

Name Type R/O Description Example


TP

channel int R Video channel number, starting from 1. 1


_

The stream type, including main stream and sub 0


AP

stream.
I_
V3

Execute the "4.5.1 Getting Maximum Number of


Sub Streams" command to get the number of sub
.3
7

subtype int R streams.


fo

Optional values:
rV

0: Main stream
el

1: Sub stream 1
se
n

2: Sub stream 2
gS

URL Example
dn

rtsp://192.168.1.108:554/cam/realmonitor?channel=1&subtype=0
Bh

Step 1: Obtain media description by executing the DESCRIBE command.


d

Request Example
DESCRIBE rtsp://192.168.1.108/cam/realmonitor?channel=1&subtype=0 RTSP/1.0
CSeq: 1
User-Agent: LibVLC/3.0.5

Response Example
RTSP/1.0 200 OK
CSeq: 1
Server: Rtsp Server/3.0
Content-Base: rtsp://192.168.1.108/cam/realmonitor?channel=1&subtype=0/
Content-Length: xxx
Content-Type: application/sdp

General APIs 33
v=0
o=- 2253484289 2253484289 IN IP4 0.0.0.0
s=Media Server
c=IN IP4 0.0.0.0
t=0 0
a=control:*
a=range:npt=now-
m=video 0 RTP/AVP 98
a=control:trackID=0
a=framerate:25.000000
a=rtpmap:98 H265/90000
a=recvonly
Step 2: Establish a transmission channel for each media by executing the SETUP command.
Take RTP over UDP as an example. Establish the UDP socket for receiving and sending UDP
packages on 63088 and 63089 interfaces.
DA

Request Example
HU

SETUP rtsp://192.168.1.108/cam/realmonitor?channel=1&subtype=0/trackID=0 RTSP/1.0


A_

CSeq: 2
HT

User-Agent: LibVLC/3.0.5
TP

Transport: RTP/AVP;unicast;client_port=63088-63089
_AP

Response Example
I_

RTSP/1.0 200 OK
V3

CSeq: 2
.3
7

Server: Rtsp Server/3.0


fo

Session: 1546116282447;timeout=60
rV

Transport: RTP/AVP/UDP;unicast;client_port=63088-63089;server_port=24764-24765;ssrc=71B0AF
el

DC
se
ngS

Step 3: Execute the play command to play the media, and receive and send RTP and RTCP data
dn

through the UDP socket established in step 2.


Bh

Request Example
d

PLAY rtsp://192.168.1.108/cam/realmonitor?channel=1&subtype=0/ RTSP/1.0


CSeq: 3
User-Agent: LibVLC/3.0.5
Session: 1546116282447
Range: npt=0.000-

Response Example
RTSP/1.0 200 OK
CSeq: 3
Server: Rtsp Server/3.0
Session: 1546116282447
Range: npt=0.000-
RTP-Info: url=trackID=0;seq=45020;rtptime=1907404764

General APIs 34
Step 4: Execute the TEARDOWN command to stop playing the media, and then disable the UDP
socket.
Request Example
TEARDOWN rtsp://192.168.1.108/cam/realmonitor?channel=1&subtype=0/ RTSP/1.0
CSeq: 4
User-Agent: LibVLC/3.0.5
Session: 1546116282447

Response Example
RTSP/1.0 200 OK
CSeq: 4
Server: Rtsp Server/3.0
Session: 1546116282447

4.1.2 Get Playback Stream


DA
HU

It's similar with "4.1.1 Get Real-Time Stream", except that there are parameters "starttime" and
A_

"endtime".
HT

URL rtsp://<server>:[port]/cam/playback
TP

Method DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, ...


_ AP

URL Params ( key=value format in URL )


I_

Name Type R/O Description Example


V3

The video channel index which starts 1


.3

channel int R
from 1
7
fo

char[32 2012_09_15_12_37_05
starttime O The playback begin time
rV

]
el

char[32 2012_09_15_18_34_14
O The playback end time
se

endtime
]
n gS

starttimeRealU char[32 O UTC time of the playback begin. 2012_09_15_04_37_05


dn

TC ] And (starttime, endtime) are


mutually exclusive; If both exist, use
Bh

RealUTC time first.


d

endtimeRealU char[32 O UTC time of the playback end. 2012_09_15_10_37_05


TC ] And (starttime, endtime) are
mutually exclusive; If both exist, use
RealUTC time first.
URL Example
rtsp://192.168.1.108:554/cam/playback?channel=1&starttime=2012_09_15_12_37_05&endtime=201
2_09_15_18_34_14

4.1.3 Get File Stream


It's similar with "4.1.1 Get Real-Time Stream". The filename with absolute path of file stream to get
is place in rtsp url.
URL rtsp://<server>:[port]/<path to filename>

General APIs 35
Method DESCRIBE, SETUP, PLAY, PAUSE, TEARDOWN, ...
URL Params ( key=value format in URL )
Name Type R/O Description Example
URL Example
rtsp://192.168.1.108:554//mnt/sd/2015-09-16/001/dav/20/20.32.08-20.32.28[M][0@0][0].dav

4.1.4 Get MJPG Stream


Get a video stream encoded by mjpg ( motion jpeg ).
Request URL http://<server>/cgi-bin/mjpg/video.cgi
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R The video channel index which starts from 1 1
The stream type, It can be the following value: 0
0-Main Stream
DA

subtype int R
1-Extra Stream 1
HU

2-Extra Stream 2
A_

Request Example
HT

http://192.168.1.108/cgi-bin/mjpg/video.cgi?channel=1&subtype=0
TP
_ AP

Response Params ( multipart, binary in body )


I_

<binary data> : JPEG image data


V3

Response Example
.3

HTTP/1.1 200 OK
7

Server: Device/1.0
fo
rV

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


el
se

--<boundary>
n

Content-Type: image/jpeg
gS

Content-Length:<image size>
dn
Bh

<JPEG image data>


d

--<boundary>
Content-Type: image/jpeg
Content-Length:<image size>

<JPEG image data>


--<boundary>
……

4.1.5 Create RTSP Pull and Authentication Token


Request URL http://<server>/cgi-bin/api/TokenManager/createToken
Method POST
Request Params ( JSON format in body )

General APIs 36
Name Type R/O Description Example
Channel uint32 R video channel number which starts from 0
0
Request Example
{
"Channel": 0
}

Response Params ( key=value format in body )


Name Type R/O Description Example
Token char[128] R Token "AwDSEci0j4EUW6pU
z5bcQ0yK8_Rbq0vaU
sUwqQKmFoUpuMJj
Oxy9kgcV6BlCty8U"
Response Example
{
DA

"Token": "AwDSEci0j4EUW6pUz5bcQ0yK8_Rbq0vaUsUwqQKmFoUpuMJjOxy9kgcV6BlCty8U"
HU

}
A_
HT

4.2 Configure Manager


TP
_AP
I_

4.2.1 Get and Set Configure


V3
.3

 Get Configure
7
fo

Get configure detail by name. Each configure name has it’s specific configure detail. Please refer to
rV

configure detail APIs in later [Config] chapters.


el

http://<server>/cgi-bin/configManager.cgi?action=getConfig
se

Request URL
n

Method GET
gS

Request Params ( key=value format in URL )


dn

Name Type R/O Description Sample


Bh

name string R The name of the configure SmartEncode


d

Request Example
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=General

Response Params ( key=value format in body )


Name Type R/O Description Sample
table object R The configure table object.
The configure detail of the
requested configure name. Each
string/object/o configure name has it’s specific
+<config name> R
bject[] configure detail. Please refer to
configure detail apis in later
chapters.
Response Example
table.General.MachineID=20832748927

General APIs 37
table.General.MachineName=DVR001
table.General.MachineAddress=XXX Road

 Set Configure
Set configure detail by name. Each configure name has it’s specific configure detail. Please refer to
configure detail APIs in later [Config] chapters.
Request URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Sample
The configure detail of the configure
name. Each configure name has it’s
string/object/ob
<config name> R specific configure detail. Please refer
ject[]
to configure detail apis in later
chapters.
DA

Request Example
HU

http://192.168.1.108/cgi-
A_

bin/configManager.cgi?action=setConfig&General.MachineID=20832748927&General.MachineName
HT

=DVR001&General.MachineAddress=XXX%20Road
TP
_

Response Params ( OK in body )


AP

Response Example
I_

OK
V3
.3

4.2.2 Add and Remove Configure


7
fo
rV

 Add configure
el
se

The configuration name is put in the URL in the form of key-value; the specific configuration field
n

can be obtained through getConfig. Each configure name has it’s specific configure detail. Please
gS

refer to configure detail APIs in later [Config] chapters.


dn

Request URL http://<server>/cgi-bin/configManager.cgi?action=addConfig


Bh

Method GET
d

Request Params ( key=value format in URL )


Name Type R/O Description Sample
The configure detail of the configure
name. Each configure name has it’s
string/object/ob
<config name> R specific configure detail. Please refer
ject[]
to configure detail apis in later
chapters.
Request Example
http://192.168.1.108/cgi-
bin/configManager.cgi?action=addConfig&General.MachineAddress=XXX%20Road

Response Params ( OK in body )


Response Example

General APIs 38
OK
 Remove configure
Specific configuration fields can be obtained through getConfig. Only configuration fields can be
deleted, not configuration items. Each configure name has it’s specific configure detail. Please refer
to configure detail APIs in later [Config] chapters.
Request URL http://<server>/cgi-bin/configManager.cgi?action=removeConfig
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Sample
General.Machine
name string R configuration param name
Address
Request Example
http://192.168.1.108/cgi-
bin/configManager.cgi?action=removeConfig&name=General.MachineAddress
DA

Response Params ( OK in body )


HU

Response Example
A_

OK
HT

4.2.3 Restore the Config


TP
_ AP

Restore specified configurations to the default values.


I_
V3

Request URL http://<server>/cgi-bin/configManager.cgi?action=restore


.3

Method GET
7

Request Params ( key=value format in URL )


fo

Name Type R/O Description Example


rV

names char[][32] R Array of the configuration names that [ "General", "UPnP" ]


el
se

needs to be restored to the default


n

values.
gS

Request Example
dn

http://<server>/cgi-bin/configManager.cgi?action=restore&names[0]=General&names[1]=UPnp
Bh
d

Response Params ( OK in body )


Response Example
OK

4.2.4 Restore except the Config


Restore all other configurations except for the specified configurations to the default values.
Request URL http://<server>/cgi-bin/configManager.cgi?action=restoreExcept
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example

General APIs 39
names char[][32] R Array of the configuration names that [ "General", "UPnP" ]
does not need to be restored to the
default values.
Request Example
http://<server>/cgi-bin/configManager.cgi?action=restoreExcept&names[0]=General&names[1]=UPnp

Response Params ( OK in body )


Response Example
OK

4.3 Audio

4.3.1 Get Audio Input Channel Numbers


Get audio input channel number.
DA

Request URL http://<server>/cgi-bin/devAudioInput.cgi?action=getCollect


HU

Method GET
A_

Request Params ( key=value format in URL )


HT

Name Type R/O Description Example


TP

Request Example
_

http://192.168.1.108/cgi-bin/devAudioInput.cgi?action=getCollect
AP
I_

Response Params ( key=value format in body )


V3

Name Type R/O Description Example


.3
7

result int R audio input channel number. 1


fo

Response Example
rV

result=1
el
se

4.3.2 Get Audio Output Channel Numbers


n gS
dn

Get audio output channel number.


Bh

Request URL http://<server>/cgi-bin/devAudioOutput.cgi?action=getCollect


d

Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/devAudioOutput.cgi?action=getCollect

Response Params ( key=value format in body )


Name Type R/O Description Example
result int R audio output channel number. 2
Response Example
result=2

General APIs 40
4.3.3 Post Audio Stream
Post audio stream to device, request is very long and client continues to send audio data. If client
want to stop, just close the connection.
Request URL http://<server>/cgi-bin/audio.cgi?action=postAudio
Method POST
Request Params ( key=value format in URL )
Name Type R/O Description Example
audio http transmit format, can be : singlepart
singlepart: HTTP content is a continuous flow
of audio packets
httptype string R
multipart: HTTP content type is multipart/x-
mixed-replace, and each audio packet ends
with a boundary string
channel int R The audio channel index which starts from 1. 1
DA

Request Example ( singlepart )


HU

POST http://192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1 HTT


A_

P/1.1
HT

User-Agent: client/1.0
Content-Type: Audio/G.711A
TP
_

Content-Length: 9999999
AP
I_

<Audio data>
V3

<Audio data>
.3


7
fo

Request Example ( multipart )


rV

POST http://192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=multipart&channel=1 HTT


el

P/1.1
se

User-Agent: client/1.0
n gS

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


dn

--<boundary>
Bh

Content-Type: Audio/G.711A
d

Content-Length: 800

<Audio data>
--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800

<Audio data>
--<boundary>

Response Params ( N/A )


Name Type R/O Description Example

General APIs 41
Response Example
( N/A )

Appendix A: Audio Encode Type

MIME ( Content-Type ) Description


Audio/PCM PCM
Audio/ADPCM ADPCM
Audio/G.711A G.711 A Law
Audio/G.711Mu G.711 Mu Law
Audio/G.726 G.726
Audio/G.729 G.729
Audio/MPEG2 MPEG2
Audio/AMR AMR
Audio/AAC AAC

4.3.4 Get Audio Stream


DA
HU

Get audio stream from device, response is very long and client continues to recv audio data. If
A_

client want to stop, just close the connection.


HT

Request URL http://<server>/cgi-bin/audio.cgi?action=getAudio


TP

Method GET
_ AP

Request Params ( key=value format in URL )


I_

Name Type R/O Description Example


V3

audio http transmit format, can be : singlepart


.3

singlepart: HTTP content is a continuous flow


7
fo

of audio packets
httptype string R
rV

multipart: HTTP content type is multipart/x-


el

mixed-replace, and each audio packet ends


se

with a boundary string


n gS

channel int R The audio channel index which starts from 1. 1


dn

Request Example
http://192.168.1.108/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=1
Bh
d

Response Params ( binary in body )


Name Type R/O Description Example
Response Example ( singlepart )
200 OK HTTP/1.1
Server: device/1.0
Content-Type: Audio/G.711A
Content-Length: 9999999

<Audio data>
<Audio data>

Response Example ( multipart )

General APIs 42
200 OK HTTP/1.1
Server: device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>

--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800

<Audio data>
--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800

<Audio data>
--<boundary>

DA
HU

4.3.5 [Config] Volume Control


A_
HT

Volume control configuration parameters:


TP

Config Data Params


_ AP

Name Type R/O Description Example


R Audio output volume. Each element of [80,50]
I_
V3

the array represents the volume value of


AudioOutputVolume int[]
.3

an audio output channel, and the range


7

is [0-100].
fo
rV

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
el
se

are as follows :
n

Get Config Request Example


gS

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AudioOutputVolume
dn

Get Config Response Example


Bh

table.AudioOutputVolume[0]=80
d

table.AudioOutputVolume[1]=50

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&AudioOutputVolume[0]=80&AudioOutputVolume[1]=50
Set Config Response Example
OK

General APIs 43
4.3.6 Getting the Analysis Configurations of the Specified Audio
Channel
Get the analysis configurations of the specified audio channel.
Request URL http://<server>/cgi-bin/api/AudioAnalyseManager/getConfig
Method POST
Request Params (JSON format in body )
Name Type R/O Description Example
PresetID int32 O Preset. The field is valid when the 0
analysis channel is specified. When
there are no fields, the default preset
is 0, and the field can be empty for
IPC. When the preset is -1, all the
preset configurations will be returned.
DA

AudioChannel int32 O Audio channel number. When there 0


HU

are no signs indicating that the audio


source is from the Internet, then the
A_

AudioChannel means the local


HT

channel number. When using the


TP

number, it must be linked with logical


_ AP

audio channel through channel


I_

number or other fields. If it fails to link,


V3

the API will be failed to return.


.3

DeviceID char[128] O Device ID. It is mainly used in the "12345678"


7
fo

back-end cascade scenes, and if there


rV

are no special requirements, it will not


el

be used in front-end devices.


se

Request Example
n gS

{
dn

"PresetID": 0,
"AudioChannel": 0,
Bh

"DeviceID": "12345678"
d

Response Params ( JSON format in body )


Name Type R/O Description Example
Configuration object O Analysis configuration of audio
channel
+AudioChannel uint32 O Audio channel number. When there 0
are no signs indicating that the audio
source is from the Internet, then the
AudioChannel means the local
channel number.
+Rules object[] O Analysis rule
++Class char[64] O Rule category "<ClassType>"

General APIs 44
++Type char[64] O Rule type "<RuleType>"
++Id uint O Rule ID. The field can be 0, which 0
means the system will automatically
allocate the appropriate ID. If there are
businesses that bonds the rule ID, the
client will be responsible for ensuring
that the code and the name are
unique.
++Name char[64] O Rule name "..."
++Enable bool O Enable the rules true
++PresetID uint32 O Preset spots 0
++EventHandle object O Rule linkage items
r
+++TimeSectio char[8][6][20] O Alarm period [["1 00:00:00-
n 08:00:00", "1
10:00:00-
DA

24:00:00",]]
HU

+++RecordEna bool O Enable recording, with true


A_

ble RecordChannels. Record is enabled if


HT

it is true; start recording when the


TP

event action is start and stop recording


_

when it is stop. Record is disabled if it


AP

is false.
I_
V3

+++RecordCha int[] O Recording channel number list [0, 1, 2]


.3

nnels One-dimensional array. Each member


7

indicates that the corresponding


fo

channel needs to record, and the


rV

channel number starts from 0.


el
se

+++RecordLatc int O Recording delay time (second) 10


n

h Range [10, 300]


gS

+++AlarmOutE bool O Enable alarm output true


dn

nable
Bh

+++AlarmOutC int[] O Alarm output channel number list [1, 4]


d

hannels One-dimensional array. Each member


indicates that the corresponding
channel needs to output alarm, and
the channel number starts from 0.
+++AlarmOutL int O Output delay time (second) after the 10
atch alarm output stops. Range: [1, 300]
+++SnapshotE bool O Enable snapshot true
nable
+++SnapshotC int[] O Snapshots channel number list [2, 4]
hannels One-dimensional array. Each member
indicates that the corresponding
channel needs to take snapshot, and
the channel number starts from 0.

General APIs 45
+++MailEnable bool O Send emails. If there are images, the true
images will be sent as email
attachment.
+++Dejitter int O Dejitter time. The field is only 0
meaningful for part of the start or stop
type events. Unit: Second (0 s–600 s).
It can only be used for applications to
automatically tour the detected events,
such as motion detection and
tampering. The similar intelligent
events that reported by the algorithm
database such as tripwire and face
detection cannot configure dejitter
time.
+++BeepEnabl bool O Buzzer true
e
DA

+++Delay uint O Set the delay time for the event to take 30
HU

effect. Unit: second [0-300].


A_

+++ExAlarmOu int[] O Expands alarm output channel list [2, 3]


HT

tChannels One-dimensional array. Each member


TP

indicates that the corresponding


_

channel needs to output extension


AP

alarm, and the channel number starts


I_
V3

from 0.
.3

+++ExAlarmOu bool O Enable expand alarm output true


7

tEnable
fo

+++LightingLin object O PTZ illuminator linkage item


rV

k
el
se

++++Enable bool O Enable true


n

++++FilckerLig enumchar[32] O Flicker light type "WhiteLight"


gS

htType enumchar[32]{
dn

"WhiteLight": indicates the flashing


Bh

light is white light


d

"RedBlueLight": indicates the flashing


light is red and blue light
}
++++LightLink enumchar[32] O Light linkage way "Filcker"
Type enumchar[32]{
"Filcker": flicker (by defaut)
"KeepLighting": solid on
}
++++FilckerInt float O Flicker interval 5
evalTime Unit: 0.1 s, and the default value is 0.5
s.
++++FilckerTi int O The flicker times that can be 5
mes configured.
Unit: times, and the default value is 5.

General APIs 46
++++LightDura uint O The duration time of the flicker or 10
tion normally lighting. Unit: second.
++++LightBrigh uint O Brightness of the linkage light. 50
t The range refers to the capacity of
LinkLightBrightRange. If this item does
not exist, the default brightness will be
adopted.
+++LogEnable bool O Whether to record alarm logs (Includes false
local and remote logs). The type is
fixed to
EventStart/EventStop/EventPulse and
the original event type is recorded in
the Detail.Code field in the log.
+++LogRemot bool O Whether to record remote logs. The false
e type is fixed as
EventStart/EventStop/EventPulse and
DA

the original event type is recorded in


HU

the Detail.Code field in the log. (When


A_

LogRemote and LogEnable exist at


HT

the same time, the remote log records


TP

will use the data from LogRemote).


_

+++MMSEnabl bool O Enable sending MMS false


AP

e
I_
V3

+++MatrixChan int[] O Link with video matrix channels [1, 6]


.3

nels number
7

+++MatrixEnab bool O Enable linkage video matrix true


fo

le
rV

+++MessageE bool O Whether to upload the message to the true


el
se

nable alarm central server. Alarm center


n

does not need to log in to the device,


gS

and the device itself can directly send


dn

the message to alarm center.


Bh

+++PtzLink object[][] O PTZ linkage. It is a two-dimensional [ ["Preset", 3, 0, 0,


d

array, each member indicates a 0], ["Tour", 4, 0, 0,


linkage item, and the last item 1], ["Pattern", 1, 0,
indicates channel number. Each 0, 2] ]
linkage item includes 5 components
including linkage type, three relating
parameters and the PTZ channel it
linked with.
Linkage types include:
"Preset": linkage preset;
"Tour": linkage tour;
"Pattern" : linkage mode; "Zoom” :
linkage zoom
"SingleScene”: link with single
scene. (The second linkage parameter

General APIs 47
indicates the scene number, and the
third linkage parameter indicates the
stay time of the scene after the alarm
finished, the fourth linkage parameter
indicates reserve the parameter and
the fifth linkage parameter indicates
the PTZ channel it linked with.
"QuickFocus”: the thermal imaging
PTZ links with quick focus function
(the second one indicates the zoom of
the thermal imaging channel), and its
value ranges from 0 to 24. The third
parameter indicates the stay time and
the fourth indicates reserve the
parameter. If it is a positive value, then
it means zoom in, and the fifth
DA

parameter indicates the PTZ channel


HU

number it linked with.


A_

“None” can be empty or none, which is


HT

used for compatibility.


TP

+++PtzLinkEna bool O Enable PTZ linkage true


_

ble
AP

+++SnapshotP int O Frame interval. It means the number of 3


I_

eriod frames it takes to capture one image,


V3

and in a certain period of time, the


.3
7

number of images depends on the


fo

capturing frame rate.


rV

0 indicates it takes multiple snapshots


el

continuously.
se
n

+++SnapshotTi int O Times of continuous snapshot. When 5


gS

mes SnapshotEnable is true,


dn

snapshortTimes=0 means the device


Bh

will continuously take snapshots until


d

the event ends.


+++VoiceEnabl bool O Voice prompts true
e
+++Voice object O Linkage prompted by voice
++++Channels int[] O The channel number that the audio [1, 2]
prompts playing.
++++AudioFile char[256] O Absolute path of the linkage audio file. "/mnt/alarm.g711a"
Name It can be an empty string. If it is, it
means the default alarm linkage voice
that specified by Sound. AlarmSound.
“Null” means no audio linkage.
++++PlayTime uint O Playing times of the linkage audio. 3
s

General APIs 48
++++LinkTime uint O The playing time of the linkage audio. 30
Unit: second
++++Interval uint O The playing interval of the sound, and 30
the default value is 0. Unit: second.
++Config object O The specific configuration of rule, and
the corresponding configuration
depends on the value of Type. For
more information, please see
AudioAnalyseRule(<RuleType>).
+Global object O Global configuration. This field
has no relationship with PTZ position.
++ClassList char[32][64] O The valid intelligent business ["<ClassType1>","<
ClassType2>"]
++Module object O Business configuration. The field
name indicates the business name.
For the detailed configuration, please
DA

see
HU

AudioAnalyseModule(<ClassType>).
A_

+++SmartSoun object O Sound detection business


HT

dDetect
TP

++++Threshold uint32 O Sound intensity threshold, and it 50


_

ranges from [1,100]


AP

++Detail object O Other universal or non-service related


I_
V3

global configurations.
.3

+Scene object[] O Scene configuration


7

++PresetID uint O Preset ID 0


fo
rV

++ClassList char[32][64] O Valid intelligent business ["<ClassType1>","<


ClassType2>"]
el
se

++Module object O Refer to the module under“Global”


n

++Detail object O Other universal or non-service related


gS

scene configurations.
dn

+State uint32 O Analysis status of audio channel 1


Bh

0 : not support
d

1 : support
Response Example
{
"Config": {
"AudioChannel": 0,
"Global": {
"ClassList": [],
"Detail": null,
"Module": null
},
"Rules": [
{
"Class": "SmartSoundDetect",
"Config": {

General APIs 49
"Sensitive": 5,
"TimesThreshold": 2,
"Types": [
"AudioCrashingGlass",
"AudioScream",
"AudioGunshot",
"AudioExplosion"
]
},
"Enable": false,
"EventHandler": {
"TourEnable": false,
"VoiceEnable": false,
...
},
"Id": 1,
DA

"Name": "SmartSoundDetect",
HU

"PresetID": 0,
A_

"Type": "SmartSoundDetect"
HT

}
TP

],
_

"Scene": [
AP

{
I_

"ClassList": [],
V3

"Detail": null,
.3
7

"Module": {
fo

"SmartSoundDetect": {
rV

"Threshold": 50
el

}
se

},
n gS

"PresetID": 0
dn

}
Bh

],
d

"State": 1
}
}

4.3.7 Setting the Analysis Configuration of the Specified Audio


Channel
Configure the analysis configuration of the specified audio channel. We recommend you to use it in
combination with getConfig. http://<server>/cgi-bin/api/AudioAnalyseManager/getConfig
Request URL http://<server>/cgi-bin/api/AudioAnalyseManager/setConfig
Method POST
Request Params (JSON format in body )
Name Type R/O Description Example

General APIs 50
Config object R For the detailed content, please see
getConfig to request for the returned
value. http://<server>/cgi-
bin/api/AudioAnalyseManager/getConfi
g
AudioChannel int32 O Audio channel number. When there are 0
no signs indicate that the audio source
is from the Internet, then the
AudioChannel means the local channel
number. When using the number, it
must be linked with logical audio
channel through channel number or
other fields. If fails to link, the API will
be failed to return.
DeviceID char[64] O Device ID. It mainly used in the back- "12345678"
end cascade scenes, and if there are
DA

no special requirements, it will not be


HU

used in front-end devices.


A_

Complete Example
HT

{
TP

"AudioChannel": 0,
_

"DeviceID": "12345678",
AP

"Config": {
I_
V3

"AudioChannel": 0,
.3

"Global": {
7

"ClassList": [],
fo

"Detail": null,
rV

"Module": null
el

},
se
n

"Rules": [
gS

{
dn

"Class": "SmartSoundDetect",
Bh

"Config": {
d

"Sensitive": 6,
"TimesThreshold": 1,
"Types": [
"AudioCrashingGlass",
"AudioScream",
"AudioGunshot",
"AudioExplosion"
]
},
"Enable": false,
"EventHandler": {
"TourEnable": false,
"VoiceEnable": false,
...

General APIs 51
},
"Id": 1,
"Name": "SmartSoundDetect",
"PresetID": 0,
"Type": "SmartSoundDetect"
}
],
"Scene": [
{
"ClassList": [],
"Detail": null,
"Module": {
"SmartSoundDetect": {
"Threshold": 50
}
},
DA

"PresetID": 0
HU

}
A_

],
HT

"State": 1
TP

}
_

}
AP
I_
V3

Response Params ( JSON format in body )


Name Type R/O Description Example
.3
7

Response Example
fo

{}
rV
el
se
n

4.3.8 Getting the Related Business Configuration of the Specified


gS
dn

Audio Channel
Bh
d

Get the relating business configuration of the specified audio channel.


Request URL http://<server>/cgi-bin/api/AudioAnalyseManager/getClassConfig
Method POST
Request Params (JSON format in body )
Name Type R/O Description Example
Class char[64] R Audio analysis business "<ClassType>"
PresetID int32 O Preset. If it is empty, the default 0
value 0 is taken and the field can
be empty for IPC.
AudioChannel int32 O Audio channel number. When there 0
are no signs indicating that the
audio source is from the Internet,
then the AudioChannel means the
local channel number. When using

General APIs 52
the number, it must be linked with
logical audio channel through
channel number or other fields. If it
fails to link, the API will be failed to
return.
DeviceID char[128] O Device ID. It mainly used in the "12345678"
back-end cascade scenes, and if
there are no special requirements,
it will not be used in front-end
devices.
Complete Example
{
"Class": "SmartSoundDetect",
"PresetID": 0,
"AudioChannel": 0,
"DeviceID": "12345678"
DA

}
HU
A_

Response Params ( JSON format in body )


HT

Name Type R/O Description Example


TP

Config object O
_

+Rules object[] O
AP

++Class char[64] O Rule category "<ClassType>"


I_
V3

++Type char[64] O Rule type "<RuleType>"


.3

++Id uint O Rule ID. It can be 0, which means 0


7

the system will automatically


fo
rV

allocate the appropriate ID. If there


are businesses that bonds the rule
el
se

ID, the client will be responsible for


n

ensuring that the code and the


gS

name are unique.


dn

++Name char[64] O Rule name "..."


Bh

++Enable bool O Enable the rules true


d

++PresetID uint32 O Preset spots 0


++EventHan object O Rule linkage ltems
dler
+++TimeSec char[8][6][20] O Alarm period [["1 00:00:00-
tion 08:00:00", "1
10:00:00-24:00:00",]]
+++RecordE bool O Enable recording, with true
nable RecordChannels. Record is
enabled if it is true; start recording
when the event action is start and
stop recording when it is stop.
Record is disabled if it is false.

General APIs 53
+++RecordC int[] O Recording channel number list [0, 1, 2]
hannels One-dimensional array. Each
member indicates that the
corresponding channel needs to
record, and the channel number
starts from 0.
+++RecordL int O Recording delay time (second) 10
atch Range [10, 300]
+++AlarmOu bool O Enable alarm output true
tEnable
+++AlarmOu int[] O Alarm output channel number list [1, 4]
tChannels One-dimensional array. Each
member indicates that the
corresponding channel needs to
output alarm, and the channel
number starts from 0.
DA

+++AlarmOu int O Output delay time (second) after 10


HU

tLatch the alarm output stops. Scope


A_

[1,300]
HT

+++Snapsho bool O Enable snapshot true


TP

tEnable
_

+++Snapsho int[] O Snapshot channel number list [2, 4]


AP

tChannels One-dimensional array. Each


I_
V3

member indicates that the


.3

corresponding channel needs to


7

take snapshot, and the channel


fo

number starts from 0.


rV

+++MailEna bool O Send emails. If there are images, true


el
se

ble the images will be sent as email


n

attachment.
gS

+++Dejitter int O Dejitter time. The field is only 0


dn

meaningful for part of the start or


Bh

stop type events. Unit: Second (0


d

s–600 s). It can only be used for


applications to automatically tour
the detected events, such as
motion detection and tampering.
The similar intelligent events that
reported by the algorithm database
such as tripwire and face detection
cannot configure dejitter time.
+++BeepEn bool O Buzzer: true
able
+++Delay uint O Set the delay time for the event to
take effect. Unit: second [0-300].
+++ExAlarm int[] O Expands alarm output channel list [2, 3]
OutChannels One-dimensional array. Each

General APIs 54
member indicates that the
corresponding channel needs to
output extension alarm, and the
channel number starts from 0.
+++ExAlarm bool O Enable alarm output extension true
OutEnable
+++LightingL object O PTZ illuminator linkage item
ink
++++Enable bool O Enable true
++++FilckerL enumchar[32] O Flicker light type "WhiteLight"
ightType enumchar[32]{
"WhiteLight": indicates the flashing
light is white light
"RedBlueLight": indicates the
flashing light is red and blue light
}
DA

++++LightLin enumchar[32] O Light linkage way "Filcker"


HU

kType enumchar[32]{
A_

"Filcker": flicker (by defaut)


HT

"KeepLighting": solid on
TP

}
_

++++FilckerI float O Flicker interval 5


AP

ntevalTime Unit: 0.1s, and the default value is


I_
V3

0.5 s.
.3

++++Filcker int O The flicker times that can be 5


7

Times configured.
fo

Unit: times, and the default value is


rV

5.
el
se

++++LightDu uint O The duration time of the flicker or 10


n

ration normally lighting. Unit: second.


gS

++++LightBri uint O Brightness of the linked light 50


dn

ght The range refers to the capacity of


Bh

LinkLightBrightRange. If this item


d

does not exist, the default


brightness will be adopted.
+++LogEnab bool O Whether to record alarm logs. The false
le type is fixed to
EventStart/EventStop/EventPulse
and the original event type is
recorded in the Detail.Code field in
the log.
+++LogRem bool O Whether to record remote logs. The false
ote type is fixed as
EventStart/EventStop/EventPulse
and the original event type is
recorded in the Detail.Code field in
the log. (When LogRemote and

General APIs 55
LogEnable exist at the same time,
the remote log records will use the
data from LogRemote).
+++MMSEn bool O Enable sending MMS false
able
+++MatrixCh int[] O Link with video matrix channels [1, 6]
annels number
+++MatrixEn bool O Enable linkage video matrix true
able
+++Message bool O Whether to upload the message to true
Enable the alarm central server. Alarm
center does not need to log in to
the device, and the device itself can
directly send the message to alarm
center.
+++PtzLink object[][] O PTZ linkage. It is a two-dimensional [ ["Preset", 3, 0, 0, 0],
DA

array, each member indicates a ["Tour", 4, 0, 0, 1],


HU

linkage item, and the last item ["Pattern", 1, 0, 0, 2] ]


A_

indicates channel number. Each


HT

linkage item includes 5 components


TP

including linkage type, three


_

relating parameters and the PTZ


AP

channel it linked with.


I_
V3

Linkage types include:


.3

"Preset": linkage preset;


7

"Tour": linkage tour;


fo

"Pattern" : linkage mode.


rV

"Zoom” : linkage zoom


el
se

"SingleScene”: link with single


n

scene. (The second linkage


gS

parameter indicates the scene


dn

number, and the third linkage


Bh

parameter indicates the stay time of


d

the scene after the alarm finished,


the fourth linkage parameter
indicates reserve the parameter
and the fifth linkage parameter
indicates the PTZ channel it linked
with.
"QuickFocus”: the thermal imaging
PTZ links with quick focus function
(the second one indicates the zoom
of the thermal imaging channel),
and its value ranges from 0 to 24.
The third parameter indicates the
stay time and the fourth indicates
reserve the parameter. If it is a

General APIs 56
positive value, then it means zoom
in, and the fifth parameter indicates
the PTZ channel number it linked
with.
“None” can be empty or none,
which is used for compatibility.
+++PtzLinkE bool O Enable PTZ linkage true
nable
+++Snapsho int O Frame interval. It means the 3
tPeriod number of frames it takes to
capture one image, and in a certain
period of time, the number of
images depends on the capturing
frame rate.
0 indicates it takes multiple
snapshots continuously.
DA

+++Snapsho int O Times of continuous snapshot. 5


HU

tTimes When SnapshotEnable is true,


A_

snapshortTimes=0 means the


HT

device will continuously take


TP

snapshots until the event ends.


_

+++VoiceEn bool O Voice prompts true


AP

able
I_
V3

+++Voice object O Audio Linkage


.3

++++Channe int[] O Channel [1, 2]


7

ls
fo

++++AudioFi char[256] O Absolute path of the linkage audio "/mnt/alarm.g711a"


rV

leName file. It can be an empty string. If it


el
se

is, it means the default alarm


n

linkage voice that specified by


gS

Sound. AlarmSound. “Null” means


dn

no audio linkage.
Bh

++++PlayTi uint O Play times of the linkage audio. 3


d

mes
++++LinkTim uint O The playing time of the linkage 30
e audio. Unit: second
++++Interval uint O The playing interval of the sound, 30
and the default value is 0. Unit:
second.
++Config object O The specific configuration of rule,
and the corresponding
configuration depends on the value
of Type. For more information,
please see
AudioAnalyseRule(<RuleType>).
+Module object O The specific business configuration,
and its value refer to the "request"

General APIs 57
section. For more information,
please see
AudioAnalyseModule(<ClassType>
)
+Global object O
++Detail object O Universal configuration of the
global business
+Scene object O The business universal
configuration of the current preset
++PresetID uint32 O Preset ID 0
++Detail object O
Response Example
{
"Config": {
"Global": {
"Detail": null
DA

},
HU

"Module": {
A_

"Threshold": 50
HT

},
TP

"Rules": [
_

{
AP

"Class": "SmartSoundDetect",
I_
V3

"Config": {
.3

"Sensitive": 6,
7

"TimesThreshold": 1,
fo

"Types": [
rV

"AudioCrashingGlass",
el
se

"AudioScream",
n

"AudioGunshot",
gS

"AudioExplosion"
dn

]
Bh

},
d

"Enable": false,
"EventHandler": {
"TourEnable": false,
"VoiceEnable": false,
...
},
"Id": 1,
"Name": "SmartSoundDetect",
"PresetID": 0,
"Type": "SmartSoundDetect"
}
],
"Scene": {
"Detail": null

General APIs 58
}
}
}

4.3.9 Configuring the Related Business Configuration of the Specified


Audio Channel
Configure the analysis configuration of the specified audio channel. We recommend you to use it in
combination with getConfig. http://<server>/cgi-bin/api/AudioAnalyseManager/getConfig
Request URL http://<server>/cgi-bin/api/AudioAnalyseManager/setClassConfig
Method POST
Request Params (JSON format in body )
Name Type R/O Description Example
Configuration object R For the detailed content, please see
getConfig to request for the returned
DA

value. http://<server>/cgi-
HU

bin/api/AudioAnalyseManager/getCon
A_

fig
HT

Class char[64] R Audio analysis business "<ClassType>"


TP

AudioChannel int32 O Audio channel number. When there 0


_

are no signs indicate that the audio


AP

source is from the Internet, then the


I_
V3

AudioChannel means the local


.3

channel number. When using the


7

number, it must be linked with logical


fo

audio channel through channel


rV

number or other fields. If fails to link,


el
se

the API will be failed to return.


n

DeviceID char[128] O Device ID. It is mainly used in the "12345678"


gS

back-end cascade scenes, and if


dn

there are no special requirements, it


Bh

will not be used in front-end devices.


d

PresetID int32 O Preset. When there are no fields, the 0


default preset is 0, and the field can
be empty for IPC.
Request Example
{
"Config": {
"Global": {
"Detail": null
},
"Module": {
"Threshold": 50
},
"Rules": [
{

General APIs 59
"Class": "SmartSoundDetect",
"Config": {
"Sensitive": 6,
"TimesThreshold": 1,
"Types": [
"AudioCrashingGlass",
"AudioScream",
"AudioGunshot",
"AudioExplosion"
]
},
"Enable": false,
"EventHandler": {
"TourEnable": false,
"VoiceEnable": false,
...
DA

},
HU

"Id": 1,
A_

"Name": "SmartSoundDetect",
HT

"PresetID": 0,
TP

"Type": "SmartSoundDetect"
_

}
AP

],
I_

"Scene": {
V3

"Detail": null
.3
7

}
fo

},
rV

"Class": "SmartSoundDetect",
el

"AudioChannel": 0,
se

"DeviceID": "12345678",
n
gS

"PresetID": 0
dn

}
Bh
d

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

4.3.10 AudioAnalyseRule Config

4.3.10.1 AudioAnalyseRule(SmartSoundDetect)
Name Type R/O Description Example
Types char[32][32] R Sound Type ["AudioCry"]
enumchar[][32]{
"AudioCry"

General APIs 60
"AudioAlarm"
"AudioGunshot"
"AudioExplosion"
"AudioScream"
"AudioCrashingGlass"
}
Sensitive uint32 O Detection sensitivity, range [1,10] 5
TimesThreshold uint32 O Times threshold, range [1, 5] 2

4.3.11 AudioAnalyseModule Config

4.3.11.1 AudioAnalyseModule(SmartSoundDetect)
Name Type R/O Description Example
DA

Threshold uint32 O Sound intensity threshold, range [1, 100] 50


HU
A_

4.3.12 Play the Specified Audio in the Device


HT
TP

Request URL http://<server>/cgi-bin/api/Speak/startPlayByTime


_AP

Method POST
I_

Request Params ( JSON format in body )


V3

Name Type R/O Description Example


.3
7

Path string R Audio file path "/Audio_Path"


fo

FileName string R Audio file name "alarm.wav"


rV

PlayTimes int32 O times of broadcasts, default once 1


el

Request Example
se

{
ngS

"Path":"/Audio_Path",
dn

"FileName":"alarm.wav",
Bh

"PlayTimes":1
d

Response Params (JSON format in body )


Name Type R/O Description Example
Status enumcha R enumchar[32]{ "OK"
r[32] "OK": indicates that the operation is
successful and returns before the end of the
broadcast, which is different from API
"PostAudio"
"Busy": Indicates that the device is
broadcasting
"Error": Broadcast error
}
Response Example

General APIs 61
{
"Status" : "OK"
}

4.4 Snapshot

4.4.1 [Config] Snap


Snapshot configuration parameters:
Config Data Params
Name Type R/O Description Example
R One element for each channel, and the [80,50]
Snap object[] array index represents the channel
number which starts from 0.
DA

O Whether holiday setting is supported. false


+HolidayEnable bool
HU

It is not supported by default.


A_

O Configure the period of capturing [ [ "6 00:00:00-


HT

snapshots. 23:59:59", "0 00:


TP

Two-dimensional array in strings. 00:00-


_

The first dimension of the array is the 23:59:59","0 00:0


AP

day of the week, and the range is [0–7] 0:00-


I_

(Sunday–Saturday). The last item is for 23:59:59", "0 00:


V3

holiday. 00:00-
.3
7

The second dimension is the period 23:59:59", … ] ]


fo

index. One day is divided into multiple


rV

periods, and the range is [0–23].


el

Each period is set as a string in the


se

format of:mask hh: mm: ss-hh: mm: ss


ngS

char[8][24][ Mask: The range is [0–4294967295],


TimeSection
dn

32] and each bit carries a special meaning.


Bh

See the description as follows:


hh: Hour; range: [0–24]
d

mm: Minute; range: [0–59]


ss: Description; ranges [0 to 59]
Mask: record type.
Meaning of each bit:
Bit0: Normal snapshot
Bit1: Motion detection snapshot
Bit2: Alarm snapshot
Bit3: Card-swiping snapshot
Bit6: POS snapshot
Bit4, Bit5, Bit7–Bit31: Reserved.

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :

General APIs 62
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Snap
Get Config Response Example
table.Snap[0].HolidayEnable=true
table.Snap[0].TimeSection[0][0]=6 00:00:00-23:59:59
table.Snap[0].TimeSection[0][1]=0 00:00:00-23:59:59

table.Snap[1].HolidayEnable=false
table.Snap[1].TimeSection[0][1]=0 00:00:00-23:59:59
table.Snap[1].TimeSection[0][1]=0 00:00:00-23:59:59

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Snap[0].HolidayEnable=true&Snap
[0].TimeSection[0][0]=6 00:00:00-23:59:59&Snap[0].TimeSection[0][1]=0 00:00:00-23:59:59&Snap
[1].HolidayEnable=false&Snap[1].TimeSection[0][1]=0 00:00:00-23:59:59&Snap[1].TimeSection[0][1]
DA

=0 00:00:00-23:59:59
HU

Set Config Response Example


A_

OK
HT
TP

4.4.2 Get a Snapshot


_ AP

Get snapshots of a specified video channel


I_
V3

Request URL http://<server>/cgi-bin/snapshot.cgi


.3

Method GET
7

Request Params ( key=value format in URL )


fo
rV

Name Type R/O Description Example


channel int O Video channel number starting from 1, and 1
el
se

the default value is 1.


n

type uint32 O 0: Acquire the snapshot from the front end 0


gS

1: Represent capture of local real-time


dn

video secondary decoding encoding


Bh

Default 0
d

Request Example
http://192.168.1.108/cgi-bin/snapshot.cgi?channel=1&type=0

Response Params ( binary in body )


<binary data>: images in JPEG format
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: image/jpeg
Content-Length:<image size>

<jpeg data>

General APIs 63
4.4.3 Subscribe to Snapshot
Subscribe to the events and event snapshots. For details on the event name and parameters, see
the corresponding [Event] sections.
Request URL http://<server>/cgi-bin/snapManager.cgi?action=attachFileProc
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int O Video channel number, starting from 1. 1
If not specified, the default value is 1.
-1 means subscribing to all channels.
heartbeat int O Heartbeat interval. 5
Unit: s
Range: [1–60], and the default value is 5.
While sending the events, the device
DA

regularly sends a heartbeat message to


HU

keep itself alive.


A_

The message is a string named


HT

"heartbeat".
Flags char[][32] R Subscription parameter. "Event"
TP

The value "Event" should be included.


_AP

Events char[][32] R The list of event codes [ "VideoMotion" ,


I_

Select All to subscribe all events "TrafficJunction" ]


V3

Common event codes are as follows:


.3

VideoMotion: Motion detection


7
fo

VideoLoss: Video loss


rV

VideoBlind: Video Tampering


el

AlarmLocal: Local alarms


se

TrafficJunction: ANPR
n gS

TrafficRetrograde: Wrong-way driving


dn

TrafficParking: Illegal parking


TrafficJam: Traffic congestion
Bh

TrafficThrow: Throwing out of the vehicle


d

TrafficPedestrain: A pedestrian walks onto


a motor vehicle lane
TrafficParkingSpaceParking: A vehicle is in
the parking space
TrafficParkingSpaceNoParking: No vehicle
is in the parking space
TrafficParkingSpaceOverLine: A vehicle
crosses the line of a parking space
TrafficManualSnap: Manual snapshot
capturing
FaceRecognition: Face recognition
TrafficParkingStatistics: Parking space
counting

General APIs 64
AccessControl: Access control unlocking

Request Example
http://192.168.1.108/cgi-bin/snapManager.cgi?action=attachFileProc&channel=1&heartbeat=5&Flags
[0]=Event&Events=[VideoMotion%2CVideoLoss]

Response Params ( multipart in body )


Name Type R/O Description Example
Events object[] R Event detail array
+EventBaseInfo object R Shared basic information for all events
Event code “”FaceRecognition“
++Code char[32] R
See the description on Events ”
Event action "Pulse"
++Action char[16] R
Value: "Start", "Stop" and "Pulse"
The channel number where the event 0
++Index int R
happens, starting from 0
DA

+Channel int O The video channel number of the 0


HU

generated picture, starting from 0.


A_

Unique parameters of each event


HT

+… … … For details on each event, see the


TP

corresponding section.
_

Response Example
AP

HTTP/1.1 200 OK
I_

Server: Device/1.0
V3

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


.3
7

Connection: closed
fo
rV

--<boundary>
el

Content-Type: text/plain
se
n

Content-Length: <data length>


gS
dn

Events[0].EventBaseInfo.Code=TrafficJunction
Bh

Events[0].EventBaseInfo.Action=Pulse
d

Events[0].EventBaseInfo.Index=0
Events[0].Channel=0
Events[0].CountInGroup=3
Events[0].IndexInGroup=1
Events[0].Lane=1
Events[0].PTS=42949485818.0
Events[0].TrafficCar.PlateNumber=ZZZ12345
Events[0].TrafficCar.DeviceAddress=XXXRoad
……
Events[1].Channel=1
Events[1].EventBaseInfo.Code=TrafficJunction
Events[1].EventBaseInfo.Action=Pulse
Events[1].EventBaseInfo.Index=1
Events[1].CountInGroup=3

General APIs 65
Events[1].IndexInGroup=2
Events[1].Lane=1
……
--<boundary>
Content-Type: image/jpeg
Content-Length:<image size>

<JPEG image data>


--<boundary>
Content-Type: text/plain
Content-Length:<data length>

Heartbeat
--<boundary>
……
DA

4.5 Video Attributes


HU
A_

4.5.1 Get Max Extra Stream Numbers


HT
TP

Get the maximum number of sub streams


_ AP

Request URL http://<server>/cgi-bin/magicBox.cgi?action=getProductDefinition


I_

Method GET
V3

Request Params ( key=value format in URL )


.3

Name Type R/O Description Example


7
fo

name char[] R Name "MaxExtraStream"


rV

Fixed value: MaxExtraStream


el

Request Example
se

http://192.168.1.108/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream
n gS
dn

Response Params ( key=value format in body )


Bh

Name Type R/O Description Example


table object R Return content
d

The maximum number of sub streams 1


+MaxExtraStream int R
Values: 1, 2 and 3.
Response Example
table.MaxExtraStream=1

4.5.2 Get Encode Capability


Get encoding capabilities.
Request URL http://<server>/cgi-bin/encode.cgi?action=getCaps
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Request Example

General APIs 66
http://192.168.1.108/cgi-bin/encode.cgi?action=getCaps

Response Params ( key=value format in body )


Name Type R/O Description Example
caps object R Encoding capability
Maximum number of sub stream 3
+MaxExtraStream int O
channels
+PreviewSplitNu The live view page can be split to [1, 4, 9, 16]
int[] O
mList multiple windows
Secondary compressed playback [1, 4, 9, 16]
+PlaybackCompr
int[] O supports being split to multiple
essSplitNumList
windows.
Multi-window live view mode. "SplitEncode"
Values:
SplitEncode: Split encoding mode
SnapShot: Fast snapshot mode
DA

+PreviewMode char[16] O
SplitSnap: Split fast snapshot mode
HU

If the field does not exist or is null, it


A_

means the device does not support


HT

multi-window live view.


TP

Encoding capability
+VideoEncodeDe
_

object[] O Each element of the array represents a


AP

vices
channel.
I_

++SupportIndivid Whether independent resolution for true


V3

bool O
ualResolution snapshots is supported
.3
7

Whether independent resolutions for true


fo

++RecordIndividu
bool O motion detection and alarm videos are
rV

alResolution
supported.
el

++MaxCIFPFram CIF maximum value of the P frame. 40


se

int O
n

eSize Unit: Kbits


gS

++MinCIFPFrame CIF minimum value of the P frame. 7


int O
dn

Size Unit: Kbits


Bh

Display capability of mixed exposure.


d

+CoriaDisplay object[] O Each element of the array represents a


channel.
Supported display mode: [0,1,2]
++CoriaDisplayS 0: Default
int[] O
witchs 1: Vehicle mode
2: Person mode
Response Example
caps.MaxExtraStream=3
caps.PreviewSplitNumList[0]=1
caps.PreviewSplitNumList[1]=4
caps.PreviewSplitNumList[2]=9
caps.PlaybackCompressSplitNumList[0]=1
caps.PlaybackCompressSplitNumList[1]=4
caps.PlaybackCompressSplitNumList[2]=9

General APIs 67
caps.PreviewMode=SplitSnap
caps.VideoEncodeDevices[0].SupportIndividualResolution=true
caps.VideoEncodeDevices[0].RecordIndividualResolution=true
caps.VideoEncodeDevices[0].MaxCIFPFrameSize=40
caps.VideoEncodeDevices[0].MinCIFPFrameSize=7
caps.CoriaDisplay[0].CoriaDisplaySwitchs[0]=0
caps.CoriaDisplay[0].CoriaDisplaySwitchs[1]=1
caps.CoriaDisplay[0].CoriaDisplaySwitchs[2]=2

4.5.3 Get Encode Config Capability


Get encoding configuration capabilities
Request URL http://<server>/cgi-bin/encode.cgi?action=getConfigCaps
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
DA

channel int O Video channel number.


HU

It an integer starting from 1.


A_

When the channel does not exist, the


HT

default number is 1.
TP

Encode object[] O The encoding configurations set before will


_AP

influence the encoding configurations of


other channels and streams.
I_
V3

+MainFormat object[] O Main stream.


.3

Each element of the array represents a


7

recording type.
fo

0: General encoding
rV

1: Motion detection encoding


el
se

2: Alarm encoding
n

++Video object O Video format


gS

+++Compressi char[16 O Video encoding mode "H.264"


dn

on ] For example, "MPEG4", "H.264", "H.265"


Bh

+++Width int O Video width 1920


d

Unit: pixels
+++Height int O Video height 1080
Unit: pixels
+++BitRate int O Video stream 2048
Unit: kbps
+ExtraFormat object[] O Sub stream
Each element of the array represents a sub
stream.
0: Sub stream 1
1: Sub stream 2
2: Sub stream 3
++Video object O Video format
+++Compressi char[16 O Video encoding mode "H.264"
on ] For example, "MPEG4", "H.264", "H.265"

General APIs 68
+++Width int O Video width 720
Unit: pixels
+++Height int O Video height 576
Unit: pixels
+++BitRate int O Video stream 512
Unit: kbps
Request Example
http://192.168.1.108/cgi-
bin/encode.cgi?action=getConfigCaps&channel=1&Encode[0].MainFormat[0].Video.Compression=H.
264&Encode[0].MainFormat[0].Video.Width=1920&Encode[0].MainFormat[0].Video.Height=1080

Response Params ( key=value format in body )


Name Type R/O Description Example
caps object R Encoding configuration capability
+MainFormat object[] O Main stream.
Each element of the array represents a
DA

recording type.
HU

0: General encoding
A_

1: Motion detection encoding


HT

2: Alarm encoding
TP

++Audio object O Audio encoding capability


_

+++Compression char[] O Supported audio encoding formats: G.711A, AMR


AP

Types PCM, ADPCM, G.711A, G.711Mu,


I_

G.726, G.729, MPEG2, AMR, and


V3

SVAC.
.3
7

++Video object O Video encoding capability


fo

+++Compression char[] O Supported vidio encoding formats: MPEG4, H.264,


rV

Types MPEG4, MPEG2, MPEG1, MJPG, H.265


el

H.263, H.264 and H.265.


se
n

+++ResolutionTy char[] O Supported video resolutions. D1, 1920x1080


gS

pes See the table below for the optional


dn

values.
Bh

+++BitRateOption char[] O Stream capability 80,448


d

s Two numbers are divided by a comma.


The former number represents the
minimal stream, and the latter
represents the maximum stream.
Unit: kbps
+++FPSMax int O Maximum frame rate 25
Sub stream.
Each element of the array represents a
sub stream.
+ExtraFormat object[] O
0: Sub stream 1
1: Sub stream 2
2: Sub stream 3
Audio In object O Audio encoding capabilities

General APIs 69
+++Compression char[] O Supported audio encoding formats: G.711A, AMR
Types PCM, ADPCM, G.711A, G.711Mu,
G.726, G.729, MPEG2, AMR, and
SVAC.
++Video object O Video encoding capability
+++Compression char[] O Supported video encoding formats: MPEG4, H.264,
Types MPEG4, MPEG2, MPEG1, MJPG, H.265
H.263, H.264 and H.265.
+++ResolutionTy char[] O Supported video resolutions. D1, 1280x720
pes See the table below for the options.
+++BitRateOption char[] O Stream capability 80,448
s Two numbers are divided by a comma.
The former number represents the
minimal stream, and the latter
represents the maximum stream. Unit:
kbps
DA

+++FPSMax int O Maximum frame rate: 25


HU

Snapshot encoding capability


A_

Each element of the array represents a


HT

snapshot capturing type.


+SnapFormat object[] O
TP

0: General snapshot
_

1: Motion detection snapshot


AP

2: Alarm snapshot
I_

++Video object O Snapshot format


V3

+++Compression char[16] O Supported encoding formats JPEG


.3
7

Types For example, "JPEG"


fo

+++ResolutionTy int O Supported video resolutions D1, 1280x720


rV

pes See the table below for the options.


el

+++FPSMax int O Maximum frame rate 2


se
n

Response Example
gS

caps.MainFormat[0].Audio.CompressionTypes=G.711A, AMR
dn

caps.MainFormat[0].Video.CompressionTypes=H.264,MJPG
Bh

caps.MainFormat[0].Video.ResolutionTypes=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF


d

caps.MainFormat[0].Video.BitRateOptions=448,2560
caps.MainFormat[0].Video.FPSMax=25
caps.ExtraFormat[0].Audio.CompressionTypes=G.711A, AMR
caps.ExtraFormat[0].Video.CompressionTypes=H.264,MJPG
caps.ExtraFormat[0].Video.ResolutionTypes=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
caps.ExtraFormat[0].Video.BitRateOptions=448,2560
caps.ExtraFormat[0].Video.FPSMax=25
caps.SnapFormat[0].Video.CompressionTypes=JPEG
caps.SnapFormat[0].Video.ResolutionTypes=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
caps.SnapFormat[0].Video.FPSMax=2

Appendix A: Video Resolution

Fixed Resolution Name Size in PAL Size in NTSC


"D1" 704 x 576 704 x 480

General APIs 70
Fixed Resolution Name Size in PAL Size in NTSC
"HD1" 352 x 576 352 x 480
"BCIF"/"2CIF" 704 x 288 704 x 240
"CIF" 352 x 288 352 x 240
"QCIF" 176 x 144 176 x 120
"NHD" 640 x 360 —
"VGA" 640 x 480 —
"QVGA" 320 x 240 —
"SVCD" 480 x 480 —
"QQVGA" 160 x 128 —
"SVGA" 800 x 592 —
"SVGA1" 800 x 600 —
"WVGA" 800 x 480 —
"FWVGA" 854 x 480 —
"DVGA" 960 x 640 —
DA

"XVGA" 1024 x 768 —


"WXGA" 1280 x 800 —
HU

"WXGA2" 1280 x 768 —


A_

"WXGA3" 1280 x 854 —


HT

"WXGA4" 1366 x 768 —


TP

"SXGA" 1280 x 1024 —


_AP

"SXGA+" 1400 x 1050 —


I_

"WSXGA" 1600 x 1024 —


V3

"UXGA" 1600 x 1200 —


.3

"WUXGA" 1920 x 1200 —


7
fo

"ND1" 240 x 192 —


rV

"720P" 1280 x 720 —


el

"1080P" 1920 x 1080 —


se

"QFHD" 3840 x 2160 —


n gS

"1_3M", "1280x960" 1280 x 960 (1.3 Mega Pixels) —


dn

"2_5M", "1872x1408" 1872 x 1408 (2.5 Mega Pixels) —


Bh

"5M", "3744x1408" 3744 x 1408 (5 Mega Pixels) —


d

"3M", "2048x1536" 2048 x 1536 (3 Mega Pixels) —


"5_0M", "2432x2048" 2432 x 2048 (5 Mega Pixels) —
"1_2M", "1216x1024" 1216 x 1024 (1.2 Mega Pixels) —
"1408x1024" 1408 x 1024 (1.5 Mega Pixels) —
"3296x2472" 3296 x 2472 (8 Mega Pixels) —
"5_1M", "2560x1920" 2560 x 1920 (5 Mega Pixels) —
"960H", 960 x 576 960 x 480
"DV720P" 960 x 720 —
"2560x1600" 2560 x 1600 (4 Mega Pixels) —
"2336x1752" 2336 x 1752 (4 Mega Pixels) —
"2592x2048" 2592 x 2048 —
"2448x2048" 2448 x 2048 —
"1920x1440" 1920x1440 —
"2752x2208" 2752x2208 —

General APIs 71
Fixed Resolution Name Size in PAL Size in NTSC
"3840x2160" 3840x2160 —
"4096x2160" 4096x2160 —
"3072x2048" 3072x2048 —

4.5.4 [Config] Encode of Media


Config Data Params
Name Type R/O Description Example
Encode object[] O encode config.
array index starts from 0, which means
video channel (equals to video channel
index -1, and so 0 means channel 1)
+MainFormat object[] O main format
array index starts from 0, which
means :
DA

0 = regular encode
HU

1 = motion detection encode


A_

2 = alarm encode
HT

3= emergency encode
TP

++AudioEnabl bool O Enable/Disable audio true


_

e
AP

++Audio object O audio


I_
V3

Unit is kbps 64
.3

+++Bitrate int O Range depends on capacity in


7

GetAudioConfigCaps
fo
rV

+++Compressi char[16] O Range depends on capacity in "PCM"


on GetAudioConfigCaps
el
se

+++Frequency uint O Audio sampling frequency 44100


n

8K~192K
gS

+++Depth uint8 O Audio sampling depth 16


dn

+++PacketPeri int O Packaging cycle, Unit is ms, where 0 40


Bh

od indicates using the default cycle.


d

Range[10, 250]
+++Mode uint8 O code rate 0
Different encoding types have different
definitions:
"AMR" code rate
0: 4.75kbps,
1: 5.15 kbps,
2: 5.9 kbps,
3: 6.7 kbps,
4: 7.4 kbps,
5: 7.95 kbps,
6: 10.2 kbps,
7: 12.2 kbps,
G726 code rate

General APIs 72
0: 40kbps(default)
1: 16kbps
2: 24kbps
3: 32kbps
+++Pack char[16] O "DHAV","PS" "PS"
+++Channels uint[8] O List of accompanying audio channels [0, 1]
for this video channel
++VideoEnabl bool O True: enable video true
e
++Video object O video
+++Compressi char[16] O Range is {MPEG4, MPEG2, MPEG1, "H.264"
on MJPG, H.263, H.264, H.265, SVAC2}
Depends on capacity in
GetVideoConfigCaps
+++Width int O Video Width 720
+++Height int O Video height 576
DA

+++CustomRe char[16] O Resolution Name "D1"


HU

solutionName
A_

+++BitRateCo char[16] O Range is {CBR, VBR} "CBR"


HT

ntrol CBR: constant bitrates


TP

VBR: variable bitrates


_
AP

+++BitRate int O Unit is Kbps 384


I_

Range depends on capability in


V3

GetVideoConfigCaps
.3

+++FPS double O Frames per second. 25.0


7

<1.0: several seconds/frame,


fo
rV

FPS=0.3333: 3 seconds per frame.


el

>1.0: several frames/second. FPS=3: 3


se

frames per second.


n

Range depends on capability


gS

in GetVideoConfigCaps
dn

+++GOP int O Range is [1—100]. 50


Bh

Group of picture, it's the interval of I


d

Frame,
Example: GOP=50, means there is one
I frame every 49 P or B frames
+++QualityRa uint8 O quality range 6
nge 6~100, default 6
+++SVCTLaye int O Number of SVC-T layers 0
r The number of SVC-T layers is only
valid in H.264 encoding mode, 0 is not
used, and N represents the number of
layers 1-N in the SVC. The higher the
level, the less important it is. When N
is 1, the effect is the same as not
opening, that is, 0 and 1 have the
same effect. Default 0

General APIs 73
+++Quality int O Range is [1—QualityRange]. 4
Image Quality, available when
Video.BitRateControl=VBR
1: worst quality
QualityRange: best quality
+++Priority int O Range is 0 or 1 0
0 for Image Quality first
1 for Bitstream first
+++Pack char[16] O "DHAV","PS" "DHAV"
+++Profile char[16] O when video compression is H.264, "Baseline"
range is { Baseline, Main , Extended ,
High }
when video compression is H.265,
range is {"Main","Main10"}
+ExtraFormat object[] O extra stream, details refer to
MainFormat
DA

array index starts from 0, which


HU

means:
A_

0 = extra stream 1
HT

1 = extra stream 2
TP

2 = extra stream 3
_

+SnapFormat object[] O snap stream, details refer to


AP

MainFormat. only for dahua devices.


I_
V3

array index starts from 0, which


.3

means:
7

0-normal snap
fo

1-motion detection snap


rV

2-alarm detection
el
se
n

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
gS

are as follows :
dn

Get Config Request Example


Bh

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Encode
d

Get Config Response Example


table.Encode[0].MainFormat[0].Audio.Bitrate=64
table.Encode[0].MainFormat[0].Audio.Channels[0]=0
table.Encode[0].MainFormat[0].Audio.Compression=G.711A
table.Encode[0].MainFormat[0].Audio.Depth=16
table.Encode[0].MainFormat[0].Audio.Frequency=8000
table.Encode[0].MainFormat[0].Audio.Mode=0
table.Encode[0].MainFormat[0].Audio.Pack=PS
table.Encode[0].MainFormat[0].AudioEnable=true
table.Encode[0].MainFormat[0].Video.resolution=1920x1080
table.Encode[0].MainFormat[0].Video.BitRate=4096
table.Encode[0].MainFormat[0].Video.BitRateControl=CBR
table.Encode[0].MainFormat[0].Video.Compression=H.264
table.Encode[0].MainFormat[0].Video.CustomResolutionName=1080P

General APIs 74
table.Encode[0].MainFormat[0].Video.FPS=18
table.Encode[0].MainFormat[0].Video.GOP=36
table.Encode[0].MainFormat[0].Video.Height=1080
table.Encode[0].MainFormat[0].Video.Pack=PS
table.Encode[0].MainFormat[0].Video.Profile=High
table.Encode[0].MainFormat[0].Video.Quality=4
table.Encode[0].MainFormat[0].Video.QualityRange=6
table.Encode[0].MainFormat[0].Video.SVCTLayer=1
table.Encode[0].MainFormat[0].Video.Width=1920
table.Encode[0].MainFormat[0].Video.Priority=0
table.Encode[0].MainFormat[0].VideoEnable=true
table.Encode[0].MainFormat[1].Audio.Bitrate=64
table.Encode[0].MainFormat[1].Audio.Channels[0]=0
table.Encode[0].MainFormat[1].Audio.Compression=G.711A
table.Encode[0].MainFormat[1].Audio.Depth=16
table.Encode[0].MainFormat[1].Audio.Frequency=8000
DA

table.Encode[0].MainFormat[1].Audio.Mode=0
HU

table.Encode[0].MainFormat[1].Audio.Pack=PS
A_

table.Encode[0].MainFormat[1].AudioEnable=true
HT

table.Encode[0].MainFormat[1].Video.resolution=1920x1080
TP

table.Encode[0].MainFormat[1].Video.BitRate=4096
_

table.Encode[0].MainFormat[1].Video.BitRateControl=CBR
AP

table.Encode[0].MainFormat[1].Video.Compression=H.264
I_
V3

table.Encode[0].MainFormat[1].Video.CustomResolutionName=1080P
.3

table.Encode[0].MainFormat[1].Video.FPS=18
7

table.Encode[0].MainFormat[1].Video.GOP=36
fo

table.Encode[0].MainFormat[1].Video.Height=1080
rV

table.Encode[0].MainFormat[1].Video.Pack=PS
el

table.Encode[0].MainFormat[1].Video.Profile=High
se
n

table.Encode[0].MainFormat[1].Video.Quality=4
gS

table.Encode[0].MainFormat[1].Video.QualityRange=6
dn

table.Encode[0].MainFormat[1].Video.SVCTLayer=1
Bh

table.Encode[0].MainFormat[1].Video.Width=1920
d

table.Encode[0].MainFormat[1].Video.Priority=0
table.Encode[0].MainFormat[1].VideoEnable=true
table.Encode[0].MainFormat[2].Audio.Bitrate=64
table.Encode[0].MainFormat[2].Audio.Channels[0]=0
table.Encode[0].MainFormat[2].Audio.Compression=G.711A
table.Encode[0].MainFormat[2].Audio.Depth=16
table.Encode[0].MainFormat[2].Audio.Frequency=8000
table.Encode[0].MainFormat[2].Audio.Mode=0
table.Encode[0].MainFormat[2].Audio.Pack=PS
table.Encode[0].MainFormat[2].AudioEnable=true
table.Encode[0].MainFormat[2].Video.resolution=1920x1080
table.Encode[0].MainFormat[2].Video.BitRate=4096
table.Encode[0].MainFormat[2].Video.BitRateControl=CBR
table.Encode[0].MainFormat[2].Video.Compression=H.264

General APIs 75
table.Encode[0].MainFormat[2].Video.CustomResolutionName=1080P
table.Encode[0].MainFormat[2].Video.FPS=18
table.Encode[0].MainFormat[2].Video.GOP=36
table.Encode[0].MainFormat[2].Video.Height=1080
table.Encode[0].MainFormat[2].Video.Pack=PS
table.Encode[0].MainFormat[2].Video.Profile=High
table.Encode[0].MainFormat[2].Video.Quality=4
table.Encode[0].MainFormat[2].Video.QualityRange=6
table.Encode[0].MainFormat[2].Video.SVCTLayer=1
table.Encode[0].MainFormat[2].Video.Width=1920
table.Encode[0].MainFormat[2].Video.Priority=0
table.Encode[0].MainFormat[2].VideoEnable=true
table.Encode[0].MainFormat[3].Audio.Bitrate=64
table.Encode[0].MainFormat[3].Audio.Channels[0]=0
table.Encode[0].MainFormat[3].Audio.Compression=G.711A
table.Encode[0].MainFormat[3].Audio.Depth=16
DA

table.Encode[0].MainFormat[3].Audio.Frequency=8000
HU

table.Encode[0].MainFormat[3].Audio.Mode=0
A_

table.Encode[0].MainFormat[3].Audio.Pack=PS
HT

table.Encode[0].MainFormat[3].AudioEnable=true
TP

table.Encode[0].MainFormat[3].Video.resolution=704x576
_

table.Encode[0].MainFormat[3].Video.BitRate=2048
AP

table.Encode[0].MainFormat[3].Video.BitRateControl=VBR
I_
V3

table.Encode[0].MainFormat[3].Video.Compression=H.264
.3

table.Encode[0].MainFormat[3].Video.FPS=25
7

table.Encode[0].MainFormat[3].Video.GOP=50
fo

table.Encode[0].MainFormat[3].Video.Height=576
rV

table.Encode[0].MainFormat[3].Video.Pack=PS
el

table.Encode[0].MainFormat[3].Video.Profile=Main
se
n

table.Encode[0].MainFormat[3].Video.Quality=4
gS

table.Encode[0].MainFormat[3].Video.QualityRange=6
dn

table.Encode[0].MainFormat[3].Video.SVCTLayer=1
Bh

table.Encode[0].MainFormat[3].Video.Width=704
d

table.Encode[0].MainFormat[3].Video.Priority=0
table.Encode[0].MainFormat[3].VideoEnable=true
table.Encode[0].ExtraFormat[0].Audio.Bitrate=64

table.Encode[0].SnapFormat[0].Audio.Bitrate=64

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&Encode[1].MainFormat[0].Video.Compression=MPEG4
Set Config Response Example
OK

General APIs 76
4.5.5 [Config] Encode of Region Interested
Config Data Params
Name Type R/O Description Example
VideoEncode object[] O ROI(Region of Intrest)
ROI Array.
One element for each channel, and the
array index represents the channel
number which starts from 0.
+Regions int[][4] O each point has x and y value, oordinate [, ]
remap to 0 — 8192.
+Quality uint8 O Image Quality, [1,6] 4
1: worst quality
6: best quality
+Main bool O Enable/Disable true
DA

+Extra1 bool O Enable/Disable true


HU

+Extra2 bool O Enable/Disable true


A_

+Extra3 bool O Enable/Disable true


HT

+Extra4 bool O Enable/Disable true


+Snapshot bool O true
TP

Enable/Disable
_

+DynamicTrac bool O Enable/Disable true


AP

k
I_

+DynamicDela uint16 O uint is s. 60


V3

yTime default:60
.3
7
fo

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
rV

are as follows :
el

Get Config Request Example


se

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoEncodeROI
ngS

Get Config Response Example


dn

table.VideoEncodeROI[0].Regions[0][0]=0
Bh

table.VideoEncodeROI[0].Regions[0][1]=0
d

table.VideoEncodeROI[0].Regions[0][2]=0
table.VideoEncodeROI[0].Regions[0][3]=0
table.VideoEncodeROI[0].Regions[1][0]=0

table.VideoEncodeROI[0].Quality=4,
table.VideoEncodeROI[0].Main=true,
table.VideoEncodeROI[0].Extra1=true,
table.VideoEncodeROI[0].Extra2=true,
table.VideoEncodeROI[0].Extra3=true,
table.VideoEncodeROI[0].Snapshot=true
table.VideoEncodeROI[0].DynamicTrack=true,
table.VideoEncodeROI[0].DynamicDelayTime=60

Set Config Request Example

General APIs 77
http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&VideoEncodeROI[0].DynamicTrack=true
Set Config Response Example
OK

4.5.6 [Config] Channel Title


Channel title configuration parameters:
Config Data Params
Name Type R/O Description Example
Array
One element for each channel, and
ChannelTitle object[] R
the array index represents the channel
number which starts from 0.
The content represented in the form of "CAM1|123"
DA

string.
+Name char[] R
HU

'|' means line change, and up to two


lines are supported.
A_
HT

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
TP

are as follows :
_
AP

Get Config Request Example


I_

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ChannelTitle
V3

Get Config Response Example


.3

table.ChannelTitle[0].Name=CAM1|123
7
fo

table.ChannelTitle[1].Name=CAM2|456
rV


el
se

Set Config Request Example


n gS

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ChannelTitle[0].Name=CAM1|123&
dn

ChannelTitle[1].Name=CAM2|456
Set Config Response Example
Bh

OK
d

4.5.7 Get Video Input Channels Device Supported


Request URL http://<server>/cgi-bin/devVideoInput.cgi?action=getCollect
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCollect

Response Params ( key=value format in body )


Name Type R/O Description Example
result uint O the video input channel numbers 1

General APIs 78
Response Example
result=1

4.5.8 Get Video Output Channels Device Supported


Request URL http://<server>/cgi-bin/devVideoOutput.cgi?action=getCollect
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/devVideoOutput.cgi?action=getCollect

Response Params ( key=value format in body )


Name Type R/O Description Example
DA

result uint O the video output channel numbers 2


HU

Response Example
A_

result=2
HT
TP
_

4.5.9 Get Max Remote Input Channels


AP
I_
V3

Request URL http://<server>/cgi-bin/magicBox.cgi?action=getProductDefinition


.3

Method GET
7

Request Params ( key=value format in URL)


fo

Name Type R/O Description Example


rV

name char[128] O product definition name "MaxRemoteInputCh


el
se

annels"
n

Request Example
gS

http://192.168.1.108/cgi-
dn

bin/magicBox.cgi?action=getProductDefinition&name=MaxRemoteInputChannels
Bh
d

Response Params ( key=value format in body )


Name Type R/O Description Example
table object O
+MaxRemoteI int R the max remote input channel num 16
nputChannels
Response Example
table.MaxRemoteInputChannels=16

4.5.10 [Config] Video Standard


Config Data Params
Name Type R/O Description Example

General APIs 79
VideoStandard char[16] O range is {PAL, NTSC} "PAL"

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoStandard
Get Config Response Example
table.VideoStandard=PAL

Set Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&VideoStandard=PAL
Set Config Response Example
OK

4.5.11 [Config] Video Widget


DA
HU

Config Data Params


A_

Name Type R/O Description Example


HT

VideoWidget object[] O Array. One element for each


TP

channel, and the array index


_
AP

represents the channel number


I_

which starts from 0.


V3

+ChannelTitle object O channel title


.3

++BackColor uint8[4] O Range is [0—255]. [0,0,0,128]


7

BackColor[0]:red value
fo
rV

BackColor[1]:green value
BackColor[2]:blue value
el
se

BackColor[3]: alpha value


n

++FrontColor uint8[4] O Range is [0—255]. [255,255,255,0]


gS

FrontColor[0]:red value
dn

FrontColor[1]:green value
Bh

FrontColor[2]:blue value
d

FrontColor[3]: alpha value


++Rect uint16[4] O Range is [0—8191]. [147, 349, 2769,
Rect[0]: top left corner x coordinate 784]
(left)
Rect[1]: top left corner y coordinate
(top)
Rect[2]: bottom right x coordinate
(right)
Rect[3]: bottom right y coordinate
(bottom)
++EncodeBlend bool O false - widget blend is not enabled. true
+TimeTitle object O time title
++BackColor uint8[4] O Range is [0—255]. [0,0,0,128]
BackColor[0]:red value

General APIs 80
BackColor[1]:green value
BackColor[2]:blue value
BackColor[3]: alpha value
++FrontColor uint8[4] O Range is [0—255]. [255,255,255,0]
FrontColor[0]:red value
FrontColor[1]:green value
FrontColor[2]:blue value
FrontColor[3]: alpha value
++Rect uint16[4] O Range is [0—8191]. [147, 349, 2769,
Rect[0]: top left corner x coordinate 784]
(left)
Rect[1]: top left corner y coordinate
(top)
Rect[2]: bottom right x coordinate
(right)
Rect[3]: bottom right y coordinate
DA

(bottom)
HU

++EncodeBlend bool O false - widget blend is not enabled. true


A_

++ShowWeek bool O whether to display the day of the true


HT

week
TP

+Covers object[16] O covers


_

++BackColor uint8[4] O Range is [0—255]. [0,0,0,128]


AP

BackColor[0]:red value
I_

BackColor[1]:green value
V3

BackColor[2]:blue value
.3
7

BackColor[3]: alpha value


fo

++FrontColor uint8[4] O Range is [0—255]. [255,255,255,0]


rV

FrontColor[0]:red value
el

FrontColor[1]:green value
se
n

FrontColor[2]:blue value
gS

FrontColor[3]: alpha value


dn

++Rect uint16[4] O Range is [0—8191]. [147, 349, 2769,


Bh

Rect[0]: top left corner x coordinate 784]


d

(left)
Rect[1]: top left corner y coordinate
(top)
Rect[2]: bottom right x coordinate
(right)
Rect[3]: bottom right y coordinate
(bottom)
++EncodeBlend bool O false - widget blend is not enabled. true
+UserDefinedTitle object[] O custom title
++Text char[1024] O Title content. Character '|' means "11|222"
newlines.
Limit: Support 2 lines at most.
++TextAlign uint O text alignment 0x0001
Default Right Alignment

General APIs 81
0x0000, left aligned
0x0001, align in X coordinate
0x0010, align in Y coordinate
0x0011, centered
0x0002, right aligned
0x0020, aligned at the top
0x0000, align according to bottom
0x0000, aligned according to the top
left corner
0x0100, line wrap alignment
++BackColor uint8[4] O Range is [0—255]. [0,0,0,128]
BackColor[0]:red value
BackColor[1]:green value
BackColor[2]:blue value
BackColor[3]: alpha value
++FrontColor uint8[4] O Range is [0—255]. [255,255,255,0]
DA

FrontColor[0]:red value
HU

FrontColor[1]:green value
A_

FrontColor[2]:blue value
HT

FrontColor[3]: alpha value


TP

++Rect uint16[4] O Range is [0—8191]. [147, 349, 2769,


_

Rect[0]: top left corner x coordinate 784]


AP

(left)
I_

Rect[1]: top left corner y coordinate


V3

(top)
.3
7

Rect[2]: bottom right x coordinate


fo

(right)
rV

Rect[3]: bottom right y coordinate


el

(bottom)
se
n

++EncodeBlend bool O false - widget blend is not enabled. true


gS
dn

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
Bh

are as follows :
d

Get Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget
Get Config Response Example
table.VideoWidget[0].ChannelTitle.BackColor[0]=0
table.VideoWidget[0].ChannelTitle.BackColor[1]=0
table.VideoWidget[0].ChannelTitle.BackColor[2]=0
table.VideoWidget[0].ChannelTitle.BackColor[3]=128
table.VideoWidget[0].ChannelTitle.EncodeBlend=true
table.VideoWidget[0].ChannelTitle.FrontColor[0]=255
table.VideoWidget[0].ChannelTitle.FrontColor[1]=255
table.VideoWidget[0].ChannelTitle.FrontColor[2]=255
table.VideoWidget[0].ChannelTitle.FrontColor[3]=0
table.VideoWidget[0].ChannelTitle.Rect[0]=0
table.VideoWidget[0].ChannelTitle.Rect[1]=8191

General APIs 82
table.VideoWidget[0].ChannelTitle.Rect[2]=0
table.VideoWidget[0].ChannelTitle.Rect[3]=8191

table.VideoWidget[0].UserDefinedTitle[0].BackColor[0]=0
table.VideoWidget[0].UserDefinedTitle[0].BackColor[1]=0
table.VideoWidget[0].UserDefinedTitle[0].BackColor[2]=0
table.VideoWidget[0].UserDefinedTitle[0].BackColor[3]=128
table.VideoWidget[0].UserDefinedTitle[0].EncodeBlend=true
table.VideoWidget[0].UserDefinedTitle[0].FrontColor[0]=255
table.VideoWidget[0].UserDefinedTitle[0].FrontColor[1]=255
table.VideoWidget[0].UserDefinedTitle[0].FrontColor[2]=255
table.VideoWidget[0].UserDefinedTitle[0].FrontColor[3]=0
table.VideoWidget[0].UserDefinedTitle[0].Rect[0]=0
table.VideoWidget[0].UserDefinedTitle[0].Rect[1]=8191
table.VideoWidget[0].UserDefinedTitle[0].Rect[2]=0
table.VideoWidget[0].UserDefinedTitle[0].Rect[3]=8191
DA


HU
A_

Set Config Request Example


HT

http://192.168.1.108/cgi-
TP

bin/configManager.cgi?action=setConfig&VideoWidget[1].Covers[0].BackColor[0]=128&VideoWidget[1].
_

Covers[0].BackColor[1]=128&VideoWidget[1].Covers[0].BackColor[2]=128&VideoWidget[1].Covers[0].B
AP

ackColor[3]=0
I_

Set Config Response Example


V3

OK
.3
7
fo

4.5.12 Get Video Input Capability


rV
el

Request URL http://<server>/cgi-bin/devVideoInput.cgi?action=getCaps


se
n

Method GET
gS

Request Params ( key=value format at URL )


dn

Name Type R/O Description Example


Bh

channel int R video channel index which starts 1


d

from 1.
Request Example
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCaps&channel=1

Response Params (key=value format in body )


Name Type R/O Description Example
caps object O capability
+AutoSyncPhas bool O Does it support automatic phase false
e adjustment
0: not support backlight ; 0
+Backlight int O 1: support backlight;
2: support regional regulation
+ChipID char[] O ID of chips in this channel 0
+CoverCount int O The maximum cover region count. 8

General APIs 83
0: don't support cover 1
+CoverType in O 1: support realtime cover
2: support non-realtime cover
+CustomManual true: support use defined manual false
bool, O
Exposure exposure time
true: support color alternate true
+DayNightColor bool O
between day and night.
true: support down scaling, binning true
+DownScaling bool O
mode not included.
Exposure grade. 0 — don't support 10
+Exposure int O
exposure control.
+ExternalSyncIn true: support HD signal external true
bool O
put synchronization.
+FlashAdjust bool O true: support flash adjust true
+Flip bool O true: support picture flip. true
+Gain bool O true: support gain control. true
DA

+GainAuto bool O true: support auto gain. true


HU

Horizontal pixel binning mask, 1


A_

1 — support 2 pixel binning,


HT

+HorizontalBinni 2 — support 3 pixel binning


int O
TP

ng 4 — support 4 pixel binning


_


AP

2^n — support n+2 pixel binning


I_

Vertical pixel binning mask, 1


V3

1 — support 2 pixel binning,


.3
7

2 — support 3 pixel binning


fo

+VerticalBinning int O
4 — support 4 pixel binning
rV


el

2^n — support n+2 pixel binning


se
n

+InfraRed bool O true: support Infra compensation true


gS

+Iris bool O true: support Iris adjust true


dn

+IrisAuto bool O true: support auto Iris adjust true


Bh

Unit is Kbps.
d

+LadenBitrate int O Maximum value of video stream


bitrates, 16bpp, not in binning mode.
+LimitedAutoEx true: support auto exposure with true
bool O
posure time limit.
+MaxExposureTi upper limit of exposure time, unit:
double O
me ms
+MaxExposureTi upper limit of exposure time, unit:
double O
me1 ms
+MaxHeight int O Maximum video height
+MaxWidth int O Maximum video width
+MinExposureTi
double O lower limit of exposure time, unit: ms
me
+MinExposureTi
double O lower limit of exposure time, unit: ms
me1

General APIs 84
+Mirror bool O true: support picture mirror. true
+NightOptions bool O true: support night options. true
+ReferenceLeve true
bool O true: support reference level.
l
true: support true
+Rotate90 bool O
clockwise/anticlockwise 90°rotate
+SetColor bool O true: support color set. true
It's a string contains supported Inside
video input signal formats for this
channel. Signal formats are
separated by comma.
+SignalFormats char[] O Range is {Inside, BT656, 720p,
1080p, 1080i, 1080sF, 1_3M}

Inside — inside input.


1_3M — 1280*960
DA

True: channels in same chip should true


HU

+SyncChipChan be synchronized. Synchronized


bool O
A_

nels means video resolution of these


HT

channels should be the same.


TP

+TitleCount int O Maximum count of blending titles.


_

+UpScaling bool O true: support up scaling. false


AP

Range is {0, 1, 2, 3} 3
I_

0: don't support white balance.


V3

1: support auto white balance


.3
7

+WhiteBalance int O 2: support auto and pre defined


fo

white balance.
rV

3: support auto, pre defined and


el

user defined white balance


se
n

+VideoInIR object O Infrared capability


gS

++SupportIRPlat bool O Does it support plate mode false


dn

eMode adjustment in infrared mode


Bh

+Flicker object O Flicker capability


d

++Support uint32 O 0: for not support; 0


1: for support
++MaxAmplitude uint32 O Max Amplitude 0
++MaxBiasing uint32 O Max Biasing 0
+KillShutLine object O
++Support bool O false
++MaxChannels uint32 O channel num 1
++MinKillShutLin int32 O the min 0
e
++MaxKillShutLi int32 O the max 0
ne
++SensorNum uint32 O total sensor number on this channel 1
Response Example
caps.AutoSyncPhase=false

General APIs 85
caps.Backlight=2
caps.BrightnessCompensation=true
caps.ChipID=0
caps.CoverCount=4
caps.CoverType=1
caps.CustomManualExposure=true
caps.DayNightColor=true
caps.DayNightColorIO=false
caps.DoubleExposure=0
caps.DownScaling=false
caps.EEModeRange=100
caps.ElectricFocus=false
caps.Exposure=16
caps.ExposureMode=31
caps.ExternalSyncInput=false
caps.FishEye=false
DA

caps.FlashAdjust=false
HU

caps.Flip=true
A_

caps.FormatCount=5
HT

caps.Gain=true
TP

caps.GainAuto=true
_

caps.Gamma=true
AP

caps.GammaModeRange=100
I_

caps.GlareInhibition=1
V3

caps.HorizontalBinning=0
.3
7

caps.IRCUT=true
fo

caps.ImageEnhancement.LevelRange[0]=0
rV

caps.ImageEnhancement.LevelRange[1]=100
el

caps.ImageEnhancement.Support=true
se

caps.InfraRed=true
ngS

caps.Iris=true
dn

caps.IrisAuto=true
Bh

caps.LadenBitrate=972000
d

caps.LimitedAutoExposure=true
caps.MaxExposureTime=300.0
caps.MaxExposureTime1=0.0
caps.MaxHeight=1080
caps.MaxMultiProfile=3
caps.MaxWidth=1920
caps.MeteringRegionCount=0
caps.MinExposureTime=1.0
caps.MinExposureTime1=0.0
caps.Mirror=true
caps.MultiOptions=false
caps.NightOptions=true
caps.ReferenceLevel=false
caps.Rotate90=true

General APIs 86
caps.SetColor=true
caps.SignalFormats=Inside
caps.SignalType[0]=VGA
caps.SnapshotExposure=false
caps.SupportProfile=false
caps.SupportWhiteLevel=true
caps.SupportWriteLevel=false
caps.SyncChipChannels=false
caps.SyncFocus=false
caps.TitleCount=4
caps.TridimDenoise=2
caps.TridimDenoiseDetails=0
caps.UTC=0
caps.UpScaling=false
caps.Version=0
caps.VerticalBinning=0
DA

caps.VideoInDenoise.2D.LevelRange[0]=0
HU

caps.VideoInDenoise.2D.LevelRange[1]=100
A_

caps.VideoInDenoise.2D.Support=true
HT

caps.VideoInDenoise.3D.3DAutoType.ModRange[0]=0
TP

caps.VideoInDenoise.3D.3DAutoType.ModRange[1]=100
_

caps.VideoInDenoise.3D.Support=true
AP

caps.VideoInDenoise.Support=true
I_

caps.WhiteBalance=3
V3

caps.WideDynamicRange=1
.3
7

caps.VideoInIR.SupportIRPlateMode=false
fo

caps.Flicker.Support=0,
rV

caps.Flicker.MaxAmplitude= 0,
el

caps.Flicker.MaxBiasing=0
se

caps.KillShutLine.Support=false,
n gS

caps.KillShutLine.MaxChannels=1,
dn

caps.KillShutLine.MinKillShutLine=0,
Bh

caps.KillShutLine.MaxKillShutLine=0
d

4.5.13 Get Coordinates of Current Window


Request URL http://<server>/cgi-bin/devVideoInput.cgi?action=getCurrentWindow
Method GET
Request Params ( key=value format at URL )
Name Type R/O Description Example
channel int R video channel index which starts 1
from 1.
Request Example
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCurrentWindow&channel=1

Response Params (key=value format in body )


Name Type R/O Description Example

General APIs 87
relative coordinates, range is 0- [500,500,5000,5000]
8192.{0,0,0,0} top-left,
rect int[4] R {8192,0,0,0} top-right,
{0,8192,0,0} bottom-left,
{8192,8192,0,0} bottom-right
Response Example
rect[0]=500
rect[1]=500
rect[2]=5000
rect[3]=5000

4.5.14 Set Coordinates of Current Window


Request URL http://<server>/cgi-bin/devVideoInput.cgi?action=setCurrentWindow
Method GET
Request Params ( key=value format at URL )
DA

Name Type R/O Description Example


HU

channel int R video channel index which starts 1


A_

from 1.
HT

Represents the coordinates of a [0,0,5000,5000]


TP

rectangle, an array of 4 elements,


_

with coordinates normalized to 0-


AP

8192
I_

+rect int[] O
{0,0,0,0} top-left,
V3

{8192,0,0,0} top-right,
.3
7

{0,8192,0,0} bottom-left,
fo

{8192,8192,0,0} bottom-right
rV

Request Example
el

http://192.168.1.108/cgi-
se
n

bin/devVideoInput.cgi?action=setCurrentWindow&channel=1&rect[0]=0&rect[1]=0&rect[2]=5000&rect
gS

[3]=5000
dn
Bh

Response Params ( OK in body )


d

Name Type R/O Description Example


Response Example
OK

4.5.15 [Config] Video Out


Config Data Params
Name Type R/O Description Example
VideoOut object[] O Array. One element for each
channel, and the array index
represents the channel number
which starts from 0.
+Margin uint8[4] O Margin [0, 0, 0, 0]
0~100

General APIs 88
+Color object O video out color
++Brightness uint8 O Brightness 50
0~100
++Contrast uint8 O Contrast 50
0~100
++Saturation uint8 O Saturation 50
0~100
++Hue uint8 O Hue 50
0~100
+Mode object O mode
++Width int O Resolution 800
++Height int O Resolution 600
++BPP int O Bits per pixel. 16
++Format char[16] O The range is "VGA"
{"Auto","TV","VGA","DVI","HDMI",
"SPOT","SDI", "HDMI/VGA"}.
DA

++RefreshRate int O Refresh rate. 60


HU
A_

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
HT

are as follows :
TP

Get Config Request Example


_

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoOut
AP

Get Config Response Example


I_
V3

table.VideoOut[0].Margin[0]=0
table.VideoOut[0].Margin[1]=0
.3
7

table.VideoOut[0].Margin[2]=0
fo

table.VideoOut[0].Margin[3]=0
rV

table.VideoOut[0].Color.Brightness=50
el

table.VideoOut[0].Color.Contrast=50
se
n

table.VideoOut[0].Color.Satuation=50
gS

table.VideoOut[0].Color.Hue=50
dn

table.VideoOut[0].Mode.Width=800
Bh

table.VideoOut[0].Mode.Height=600
d

table.VideoOut[0].Mode.BPP=16
table.VideoOut[0].Mode.Format="Auto"
table.VideoOut[0].Mode.RefreshRate=60

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&table.VideoOut[1].Color.Brightness=50
Set Config Response Example
OK

4.5.16 [Config] Smart Encode


Config Data Params

General APIs 89
Name Type R/O Description Example
SmartEncode object[] O Smart Encode config. Array.
One element for each channel,
and the array index represents
the channel number which starts
from 0.
+Enable bool O Open or close the smart encode true
of the main stream.
+Extra bool[] O Open or close the smart encode [true]
of the extra stream.

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=SmartEncode
Get Config Response Example
DA

table.SmartEncode[0].Enable=false
HU

table.SmartEncode[0].Extra[0]=false
A_

table.SmartEncode[0].Extra[1]=false
HT


TP
_

Set Config Request Example


AP

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&SmartEncode[0].Enable=true
I_

Set Config Response Example


V3

OK
.3
7
fo

4.5.17 Get Decoder Caps


rV
el

Request URL http://<server>/cgi-bin/DevVideoDec.cgi?action=getCaps


se
n

Method GET
gS

Request Params ( key=value format at URL )


dn

Name Type R/O Description Example


Bh

Request Example
d

http://192.168.1.108/cgi-bin/DevVideoDec.cgi?action=getCaps

Response Params (key=value format in body )


Name Type R/O Description Example
Video object R The video caps
The stream types that the device ["h264", "h265"]
+StreamType char[][] R
supports, ex : h264, h265 etc.
The maximum decoding 7776000
capability that the device
supports
+LadenBitrate int R
(w * h * FPS * 16)/1024, uint:
kbps, ex : 7680*4320*30*8/1024
= 7776000
Response Example

General APIs 90
Video.StreamType[0]=h264
Video.StreamType[1]=h265
Video.LadenBitrate=7776000

4.5.18 [Config] PrivacyMasking


Config Data Params
Name Type R/O Description Example
PrivacyMaskin object[][] O PrivacyMasking config, each channel
g has several masking region
+Name char[64] O name "Privacy Mask1"
+Enable bool O Enable/Disable false
+Postion double[3] O Size is 3 [0.0, 0.0, 1.0]
Postion[0] is horizontal angle, range is
[-1—1]
DA

Postion[1] is vertical angel, range is [-


HU

1—1]
A_

Postion[2] is zoom, range is [ 0—1]


HT

+ShapType char[16] O Shape type,can be: "Rect", "Polygon" "Rect"


TP

+Rect Rect O It is valid if ShapeType is Rect , top left Rect


_
AP

and bottom right point, each point has x


and y value, oordinate remap to 0 —
I_
V3

8192.
.3

+Polygon Point[] O It is valid if ShapeType is Polygon [[0, 0], [128, 128] ]


7

the first array is point list, minimum item


fo

is 3, the second array is point, must be


rV

two int, means x and y value, coordinate


el
se

remap to 0 — 8192.
n

+Color Color O Mask color, RGBA color, 4 integer range Color


gS

is 0-255
dn

+Mosaic int O Mosaic type, Range is {0, 8, 16, 24, 32} 8


Bh

0: no mosaic
d

8: mosaic size 8*8


16: mosaic size 16*16
24: mosaic size 24*24
32: mosaic size 32*32
+ViewAngle double O View angle, range is [0.0, 360.0], unit: 30.0
degree

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=PrivacyMasking
Get Config Response Example
table.PrivacyMasking[0][0].Enable=true
table.PrivacyMasking[0][0].Postion[0]=0.0

General APIs 91
table.PrivacyMasking[0][0].Postion[1]=0.0
table.PrivacyMasking[0][0].Postion[2]=1.0
table.PrivacyMasking[0][0].ShapeType=Rect
table.PrivacyMasking[0][0].Rect[0]=0
table.PrivacyMasking[0][0].Rect[1]=0
table.PrivacyMasking[0][0].Rect[2]=50
table.PrivacyMasking[0][0].Rect[3]=100
table.PrivacyMasking[0][0].Color[0]=128
table.PrivacyMasking[0][0].Color[1]=128
table.PrivacyMasking[0][0].Color[2]=128
table.PrivacyMasking[0][0].Color[3]=255
table.PrivacyMasking[0][0].Mosaic=8
table.PrivacyMasking[0][0].ViewAngle=30.0
table.PrivacyMasking[0][1].Enable=true

DA

Set Config Request Example


HU

http://192.168.1.108/cgi-
A_

bin/configManager.cgi?action=setConfig&PrivacyMasking[0][0].Enable=true&PrivacyMasking[0][0].Posti
HT

on[0]=0.0&PrivacyMasking[0][0].Postion[1]=0.0&PrivacyMasking[0][0].Postion[2]=1.0&PrivacyMasking[0
TP

][0].ShapeType=Rect&PrivacyMasking[0][0].Rect[0]=0&PrivacyMasking[0][0].Rect[1]=0&PrivacyMasking
_

[0][0].Rect[2]=50&PrivacyMasking[0][0].Rect[3]=100&PrivacyMasking[0][0].Mosaic=8&PrivacyMasking[0
AP

][0].ViewAngle=30.0
I_

Set Config Response Example


V3

OK
.3
7
fo

4.5.19 Get Privacy Masking


rV
el

Request URL http://<server>/cgi-bin/PrivacyMasking.cgi?action=getPrivacyMasking


se
n

Method GET
gS

Request Params ( key=value format at URL )


dn

Name Type R/O Description Example


Bh

channel int R video channel index which starts 1


d

from 1
Offset in the result record set, 2
offset int R
range is [0, Total – 1].
limit int R Count of result to get. 5
Request Example
http://192.168.1.108/cgi-
bin/PrivacyMasking.cgi?action=getPrivacyMasking&channel=1&offset=2&limit =5

Response Params ( key=value format in body )


Name Type R/O Description Example
total int R Count of result 5
PrivacyMasking object[] R PrivacyMasking config
Index of PrivacyMasking which 0
+Index int R
starts from 0

General APIs 92
+Name char[] O PrivacyMasking name "Privacy Masking1"
+Enable int R 1: enable; 0: disable 1
Shape type,can be: "Rect", "Rect"
+ShapeType char[] O
"Polygon"
It is valid if ShapeType is Rect , [0,0,50,100]
top left and bottom right point,
+Rect int[] O
each point has x and y value,
oordinate remap to 0 — 8192.
It is valid if ShapeType is Polygon [[],[],[]]
the first array is point list,
minimum item is 3, the second
+Polygon int[][] O
array is point, must be two int,
means x and y value, coordinate
remap to 0 — 8192.
Mask color, RGBA color, 4 integer []
+Color int[] O
range is 0-255
DA

Mosaic type, Range is {0, 8, 16, 8


HU

24, 32}
A_

0: no mosaic
HT

+Mosaic int O 8: mosaic size 8*8


TP

16: mosaic size 16*16


_

24: mosaic size 24*24


AP

32: mosaic size 32*32


I_

Response Example
V3

total=5
.3
7

PrivacyMasking[0].Index=0
fo

PrivacyMasking[0].Name=Privacy Masking1
rV

PrivacyMasking[0].Enable=1
el

PrivacyMasking[0].ShapeType=Polygon
se
n

PrivacyMasking[0].Polygon[0][0]= 0
gS

PrivacyMasking[0].Polygon[0][1]=0
dn

PrivacyMasking[0].Polygon[1][0]=128
Bh

PrivacyMasking[0].Polygon[1][1]=128
d

PrivacyMasking[0].Polygon[2][0]=256
PrivacyMasking[0].Polygon[2][1]=200

PrivacyMasking[0].Color[0]=128,
PrivacyMasking[0].Color[1]=128,
PrivacyMasking[0].Color[2]=128,
PrivacyMasking[0].Color[3]=255,
PrivacyMasking[0].Mosaic=8,
PrivacyMasking[1].Index =1,
PrivacyMasking[1].Enable=1,

General APIs 93
4.5.20 Set Privacy Masking
Request URL http://<server>/cgi-bin/PrivacyMasking.cgi?action=setPrivacyMasking
Method GET
Request Params ( key=value format at URL )
Name Type R/O Description Example
channel int R video channel index which starts 2
from 1
PrivacyMasking object R Privacy masking config
Index of PrivacyMasking which 3
+Index int R
starts from 0
+Name char[] O PrivacyMasking name "Privacy Masking1"
+Enable int R 1: enable; 0: disable 1
Shape type,can be: “Rect”, "Rect"
+ShapeType char[] R
“Polygon”
DA

It is valid if ShapeType is Rect , [0,0,50,100]


HU

top left and bottom right point,


each point has x and y value,
A_

+Rect int[] O
oordinate remap to 0 — 8192.
HT

mandatory when ShapeType is


TP

"Rect"
_ AP

It is valid if ShapeType is Polygon [[],[],[]]


I_

the first array is point list,


V3

minimum item is 3, the second


.3

array is point, must be two int,


7

+Polygon int[][] O
fo

means x and y value, coordinate


rV

remap to 0 — 8192.
el

mandatory when ShapeType is


se

"Polygon"
n gS

Mask color, RGBA color, 4 integer []


+Color int[] O range is 0-255.
dn

mandatory when Mosaic is 0


Bh

Mosaic type, Range is {0, 8, 16, 8


d

24, 32}
0: no mosaic
+Mosaic int R 8: mosaic size 8*8
16: mosaic size 16*16
24: mosaic size 24*24
32: mosaic size 32*32
Request Example
http://192.168.1.108/cgi-
bin/PrivacyMasking.cgi?action=setPrivacyMasking&channel=2&PrivacyMasking.Index=3&PrivacyMa
sking.Name=Privacy%20Masking1&PrivacyMasking.Enable=1&PrivacyMasking.ShapeType=Rect&P
rivacyMasking.Rect[0]=0&PrivacyMasking.Rect[1]=0&PrivacyMasking.Rect[2]=50&PrivacyMasking.R
ect[3]=100&PrivacyMasking.Mosaic=8

General APIs 94
Response Params ( OK in body )
Name Type R/O Description Example
Response Example
OK

4.5.21 Goto Privacy Masking


Request URL http://<server>/cgi-bin/PrivacyMasking.cgi?action=gotoPrivacyMasking
Method GET
Request Params ( key=value format at URL )
Name Type R/O Description Example
channel int R video channel index which starts 2
from 1
Index of PrivacyMasking which 3
index int R
starts from 0
DA

Request Example
HU

http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=gotoPrivacyMasking&channel=2&index=3
A_
HT

Response Params ( OK in body )


TP

Name Type R/O Description Example


_ AP

Response Example
I_

OK
V3
.3
7

4.5.22 Delete Privacy Masking


fo
rV
el

Request URL http://<server>/cgi-bin/PrivacyMasking.cgi?action=deletePrivacyMasking


se

Method GET
n gS

Request Params ( key=value format at URL )


dn

Name Type R/O Description Example


channel int R video channel index which starts 2
Bh

from 1
d

Index of PrivacyMasking which 3


index int R
starts from 0
Request Example
http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=deletePrivacyMasking&channel=2&index=3

Response Params ( OK in body )


Name Type R/O Description Example
Response Example
OK

General APIs 95
4.5.23 Clear Privacy Masking
Request URL http://<server>/cgi-bin/PrivacyMasking.cgi?action=clearPrivacyMasking
Method GET
Request Params ( key=value format at URL )
Name Type R/O Description Example
channel int R video channel index which starts 2
from 1
Request Example
http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=clearPrivacyMasking&channel=2

Response Params ( OK in body )


Name Type R/O Description Example
Response Example
OK
DA
HU

4.5.24 Get Privacy Masking Rect


A_
HT
TP

Request URL http://<server>/cgi-bin/PrivacyMasking.cgi?action=getRealRect


_

Method GET
AP

Request Params ( key=value format at URL )


I_

Name Type R/O Description Example


V3

channel int R video channel index which starts 2


.3
7

from 1
fo

Index of PrivacyMasking which


rV

index int R
starts from 0
el

Request Example
se

http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=getRealRect&channel=2&index=1
n gS
dn

Response Params (key=value format in body )


Bh

Name Type R/O Description Example


d

Rect, top left and bottom right [0,0,50,100]


point, each point has x and y
Rect int[4] R
value, oordinate remap to 0 —
8192.

4.5.25 [Config] Motion Detection Settings


Config Data Params
Name Type R/O Description Example
MotionDetect object[] O Array.One element for each
channel, and the array index
represents the channel number
which starts from 0.

General APIs 96
+Enable bool O Enable/Disable motion detect true
feature in a channel.
+PtzManualEna bool O Enable/Disable manual control Ptz, true
ble only for Hahua devices
+OsdTwinkleEna bool O Osd Twinkle Enable true
ble default : false
+Row int O motion detect row number 18
+Col int O motion detect colum number 22
+Level uint8 O sensitive ,range 1-6 3
+TimeDivide object[] O
++TimeSchedule TimeSchedu O TimeSchedule
le
++Level uint8 O sensitive in timesection, different 4
with global sensitive.
+DetectVersion char[32] O detect version "V1.0"
+PirMotionEnabl bool O false
DA

Customized Pir Motion Enable


e
HU

+PirMotionLevel uint8 O Customized Pir Motion sensitive 3


A_

level
HT

+VolumeRatio uint8 O Area occupancy ratio 50


TP

+SubRatio uint8 O SubRatio 50


_

+Region int[] O [
AP

4194303,
I_

Region 3216384,
V3


.3
7

]
fo

+EventHandler EventHandl O Setting of EventHandler is


rV

er described in SetEventHandler.
el

+MotionDetectW object[4] O detect windows


se
n

indow
gS

++Threshold uint8 O Range is [0—100]. 50


dn

It presents the threshold value when


Bh

trigger motion detect.


d

++Sensitive uint8 O Range is [0—100]. 50


Sensitivity of motion detection.
It presents more sensitive if the
value is larger.
++Region int[] O It is similar with head.Region [
[LineNum]. 4194303,
Currently, a region is divided into 18 3145728,
lines and 22 blocks per line. …
A bit describes a block in the line. ]
Bit = 1: motion in this block is
monitored.
Example:

General APIs 97
MotionDetect [0].Region [0] =
4194303 (0x3FFFFF): the 22 blocks
in channel 0 line 0 is monitored.
MotionDetect [0].Region [1] =0: the
22 blocks in channel 0 line 1 is not
monitored.
MotionDetect [0].Region [17] = 3:
the left two blocks in the last line of
channel 0 is monitored.
++Id int O It is the Id of a detect window. 33
++Name char[256] O It is the name of a detect window. "Region1"

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect
DA

Get Config Response Example


HU

table.MotionDetect[0].Enable=false
A_

table.MotionDetect[0].EventHandler.AlarmOut=1
HT

table.MotionDetect[0].EventHandler.AlarmOutChannels[0]=0
TP

table.MotionDetect[0].EventHandler.AlarmOutEnable=true
_

table.MotionDetect[0].EventHandler.AlarmOutLatch=10
AP

table.MotionDetect[0].EventHandler.BeepEnable=false
I_
V3

table.MotionDetect[0].EventHandler.Dejitter=5
.3

table.MotionDetect[0].EventHandler.Delay=0
7

table.MotionDetect[0].EventHandler.ExAlarmOut=1
fo

table.MotionDetect[0].EventHandler.ExAlarmOutChannels[0]=0
rV

table.MotionDetect[0].EventHandler.ExAlarmOutEnable=false
el
se

table.MotionDetect[0].EventHandler.FlashEnable=false
n

table.MotionDetect[0].EventHandler.FlashLatch=10
gS

table.MotionDetect[0].EventHandler.LogEnable=true
dn

table.MotionDetect[0].EventHandler.MailEnable=false
Bh

table.MotionDetect[0].EventHandler.Matrix=1
d

table.MotionDetect[0].EventHandler.MatrixChannels[0]=0
table.MotionDetect[0].EventHandler.MatrixEnable=false
table.MotionDetect[0].EventHandler.MessageEnable=false
table.MotionDetect[0].EventHandler.PtzLink[0][0]=None
table.MotionDetect[0].EventHandler.PtzLink[0][1]=1
table.MotionDetect[0].EventHandler.PtzLinkEnable=false
table.MotionDetect[0].EventHandler.Record=1
table.MotionDetect[0].EventHandler.RecordChannels[0]=0
table.MotionDetect[0].EventHandler.RecordEnable=true
table.MotionDetect[0].EventHandler.RecordLatch=10
table.MotionDetect[0].EventHandler.Snapshot=1
table.MotionDetect[0].EventHandler.SnapshotChannels[0]=0
table.MotionDetect[0].EventHandler.SnapshotEnable=false
table.MotionDetect[0].EventHandler.TimeSection[0][0]=1 00:00:00-23:59:59

General APIs 98
table.MotionDetect[0].EventHandler.TimeSection[0][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][4]=0 00:00:00-23:59:59
DA

table.MotionDetect[0].EventHandler.TimeSection[2][5]=0 00:00:00-23:59:59
HU

table.MotionDetect[0].EventHandler.TimeSection[3][0]=1 00:00:00-23:59:59
A_

table.MotionDetect[0].EventHandler.TimeSection[3][1]=0 00:00:00-23:59:59
HT

table.MotionDetect[0].EventHandler.TimeSection[3][2]=0 00:00:00-23:59:59
TP

table.MotionDetect[0].EventHandler.TimeSection[3][3]=0 00:00:00-23:59:59
_

table.MotionDetect[0].EventHandler.TimeSection[3][4]=0 00:00:00-23:59:59
AP

table.MotionDetect[0].EventHandler.TimeSection[3][5]=0 00:00:00-23:59:59
I_
V3

table.MotionDetect[0].EventHandler.TimeSection[4][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][1]=0 00:00:00-23:59:59
.3
7

table.MotionDetect[0].EventHandler.TimeSection[4][2]=0 00:00:00-23:59:59
fo

table.MotionDetect[0].EventHandler.TimeSection[4][3]=0 00:00:00-23:59:59
rV

table.MotionDetect[0].EventHandler.TimeSection[4][4]=0 00:00:00-23:59:59
el

table.MotionDetect[0].EventHandler.TimeSection[4][5]=0 00:00:00-23:59:59
se
n

table.MotionDetect[0].EventHandler.TimeSection[5][0]=1 00:00:00-23:59:59
gS

table.MotionDetect[0].EventHandler.TimeSection[5][1]=0 00:00:00-23:59:59
dn

table.MotionDetect[0].EventHandler.TimeSection[5][2]=0 00:00:00-23:59:59
Bh

table.MotionDetect[0].EventHandler.TimeSection[5][3]=0 00:00:00-23:59:59
d

table.MotionDetect[0].EventHandler.TimeSection[5][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TipEnable=false
table.MotionDetect[0].EventHandler.Tour=1
table.MotionDetect[0].EventHandler.TourChannels[0]=0
table.MotionDetect[0].EventHandler.TourEnable=false
table.MotionDetect[0].EventHandler.Voice.AudioFileName=
table.MotionDetect[0].EventHandler.VoiceEnable=false

General APIs 99
table.MotionDetect[0].MotionDetectWindow[0].Id=0
table.MotionDetect[0].MotionDetectWindow[0].Name=Region1
table.MotionDetect[0].MotionDetectWindow[0].Region[0]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[1]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[2]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[3]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[4]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[5]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[6]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[7]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[8]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[9]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[10]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[11]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[12]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[13]=4194303
DA

table.MotionDetect[0].MotionDetectWindow[0].Region[14]=4194303
HU

table.MotionDetect[0].MotionDetectWindow[0].Region[15]=4194303
A_

table.MotionDetect[0].MotionDetectWindow[0].Region[16]=4194303
HT

table.MotionDetect[0].MotionDetectWindow[0].Region[17]=4194303
TP

table.MotionDetect[0].MotionDetectWindow[0].Sensitive=60
_

table.MotionDetect[0].MotionDetectWindow[0].Threshold=5
AP

table.MotionDetect[0].MotionDetectWindow[0].Window[0]=0
I_
V3

table.MotionDetect[0].MotionDetectWindow[0].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[0].Window[2]=8191
.3
7

table.MotionDetect[0].MotionDetectWindow[0].Window[3]=8191
fo

table.MotionDetect[0].MotionDetectWindow[1].Id=1
rV

table.MotionDetect[0].MotionDetectWindow[1].Name=Region2
el

table.MotionDetect[0].MotionDetectWindow[1].Region[0]=0
se
n

table.MotionDetect[0].MotionDetectWindow[1].Region[1]=0
gS

table.MotionDetect[0].MotionDetectWindow[1].Region[2]=0
dn

table.MotionDetect[0].MotionDetectWindow[1].Region[3]=0
Bh

table.MotionDetect[0].MotionDetectWindow[1].Region[4]=0
d

table.MotionDetect[0].MotionDetectWindow[1].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[6]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[7]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[9]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[10]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[11]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[12]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[13]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[14]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[15]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[17]=0
table.MotionDetect[0].MotionDetectWindow[1].Sensitive=60

General APIs 100


table.MotionDetect[0].MotionDetectWindow[1].Threshold=5
table.MotionDetect[0].MotionDetectWindow[1].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[2]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[3]=0
table.MotionDetect[0].MotionDetectWindow[2].Id=2
table.MotionDetect[0].MotionDetectWindow[2].Name=Region3
table.MotionDetect[0].MotionDetectWindow[2].Region[0]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[1]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[2]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[3]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[4]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[6]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[7]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[8]=0
DA

table.MotionDetect[0].MotionDetectWindow[2].Region[9]=0
HU

table.MotionDetect[0].MotionDetectWindow[2].Region[10]=0
A_

table.MotionDetect[0].MotionDetectWindow[2].Region[11]=0
HT

table.MotionDetect[0].MotionDetectWindow[2].Region[12]=0
TP

table.MotionDetect[0].MotionDetectWindow[2].Region[13]=0
_

table.MotionDetect[0].MotionDetectWindow[2].Region[14]=0
AP

table.MotionDetect[0].MotionDetectWindow[2].Region[15]=0
I_
V3

table.MotionDetect[0].MotionDetectWindow[2].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[17]=0
.3
7

table.MotionDetect[0].MotionDetectWindow[2].Sensitive=60
fo

table.MotionDetect[0].MotionDetectWindow[2].Threshold=5
rV

table.MotionDetect[0].MotionDetectWindow[2].Window[0]=0
el

table.MotionDetect[0].MotionDetectWindow[2].Window[1]=0
se
n

table.MotionDetect[0].MotionDetectWindow[2].Window[2]=0
gS

table.MotionDetect[0].MotionDetectWindow[2].Window[3]=0
dn

table.MotionDetect[0].MotionDetectWindow[3].Id=3
Bh

table.MotionDetect[0].MotionDetectWindow[3].Name=Region4
d

table.MotionDetect[0].MotionDetectWindow[3].Region[0]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[1]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[2]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[3]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[4]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[6]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[7]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[9]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[10]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[11]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[12]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[13]=0

General APIs 101


table.MotionDetect[0].MotionDetectWindow[3].Region[14]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[15]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[17]=0
table.MotionDetect[0].MotionDetectWindow[3].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[3].Threshold=5
table.MotionDetect[0].MotionDetectWindow[3].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[3].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[3].Window[2]=0
table.MotionDetect[0].MotionDetectWindow[3].Window[3]=0
table.MotionDetect[0].OsdTwinkleEnable=false
table.MotionDetect[0].PirMotionLevel=3

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&MotionDetect[0].MotionDetectWindow[0].Region[0]=1&Moti
DA

onDetect[0].MotionDetectWindow[0].Region[1]=1&MotionDetect[0].MotionDetectWindow[0].Region[2]
HU

=1&MotionDetect[0].MotionDetectWindow[0].Region[3]=1&MotionDetect[0].MotionDetectWindow[0].R
A_

egion[4]=1&MotionDetect[0].DetectVersion=V3.0
HT

Set Config Response Example


TP

OK
_ AP
I_
V3

4.5.26 [Config] LAEConfig


.3
7

Config Data Params


fo

Name Type R/O Description Example


rV

LAEConfig object O
el
se

+Enable bool O turn on/off LAE fuction true


n

The following parameters will take


gS

effacts when it’s on


dn

+ManulEn uint32 O whether use manual mode, 1 for 1


Bh

manual mode, 0 for alternative plan


d

+YSIGMA uint32 O absolute strength of Y channel 1


Grinding,
The smaller the stronger(fuzzier)
+Dethr uint32 O relative strength of Y channel 1
Grinding,
The smaller the stronger(fuzzier)
+STS uint32 O Y channel STS 1
+GauFilter0 uint32 O Y channel pre filter0, meet the 1
conditions: GauFilter0 * 2 +
GauFilter1 * 2 + GauFilter2 = 256
+GauFilter1 uint32 O Y channel pre filter1 1
+GauFilter2 uint32 O Y channel pre filter2 1

General APIs 102


+UVGauFilter0 uint32 O UV channel pre filter0, meet the 1
conditions: GauFilter0 * 2 +
GauFilter1 * 2 + GauFilter2 = 256
+UVGauFilter1 uint32 O UV channel pre filter1 1
+UVGauFilter2 uint32 O UV channel pre filter2 1
+UVSigma uint32 O absolute strength of UV channel 1
Grinding,
The smaller the stronger
+EEGauFilter0 uint32 O EE pre filter0, meet the conditions: 1
GauFilter0 * 2 + GauFilter1 * 2 +
GauFilter2 = 256
+EEGauFilter1 uint32 O EE pre filter1, extracts low-frequenc 1
+EEGauFilter2 uint32 O EE pre filter2 1
+EERatio uint32 O strength of enhancement, the bigger 1
the stronger
+GEnable uint32 O Brightening switch, default false 1
DA

+GainLevel uint32 O it is used to choose paramas, as an 1


HU

alternative
A_

+DebugPin uint32 O debug option 1


HT
TP

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
_

are as follows :
AP

Get Config Request Example


I_

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=LAEConfig
V3

Get Config Response Example


.3
7

table.LAEConfig.Enable=true
fo

table.LAEConfig.ManulEn=1
rV

table.LAEConfig.YSIGMA =1
el

table.LAEConfig.Dethr =1
se
n

table.LAEConfig.STS =1
gS

table.LAEConfig.GauFilter0=1
dn

table.LAEConfig.GauFilter1=1
Bh

table.LAEConfig.GauFilter2=1
d

table.LAEConfig.UVGauFilter0=1
table.LAEConfig.UVGauFilter1=1
table.LAEConfig.UVGauFilter2=1
table.LAEConfig.UVSigma =1
table.LAEConfig.EEGauFilter0=1
table.LAEConfig.EEGauFilter1=1
table.LAEConfig.EEGauFilter2=1
table.LAEConfig.EEratio =1
table.LAEConfig.GEnable =1
table.LAEConfig.GainLevel =1
table.LAEConfig.DebugPin =1

Set Config Request Example

General APIs 103


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LAEConfig.Enable=true&
LAEConfig.ManulEn=1
Set Config Response Example
OK

4.5.27 Enable/Disable all privacy masking covers


Request URL http://<server>/cgi-bin/PrivacyMasking.cgi?action=setPrivacyMaskingEnable
Method GET
Request Params ( key=value format at URL )
Name Type R/O Description Example
channel int R video channel index which starts 2
from 1
Enable bool R true: Enable, false: Disable
Request Example
DA

http://192.168.1.108/cgi-
HU

bin/PrivacyMasking.cgi?action=setPrivacyMaskingEnable&channel=2&Enable=true
A_
HT

Response Params ( OK in body )


TP

Name Type R/O Description Example


_ AP

Response Example
I_

OK
V3
.3

4.5.28 Get enable/disable state of all privacy masking covers


7
fo
rV

Request URL http://<server>/cgi-bin/PrivacyMasking.cgi?action=getPrivacyMaskingEnable


Method GET
el
se

Request Params ( key=value format at URL )


n

Name Type R/O Description Example


gS

channel int R video channel index which starts 2


dn

from 1
Bh

Request Example
d

http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=getPrivacyMaskingEnable&channel=2

Response Params ( key=value format in body )


Name Type R/O Description Example
Enable bool R true: Enable, false: Disable false
Response Example
Enable=false

General APIs 104


4.6 System

4.6.1 [Config] General


Config Data Params
Name Type R/O Description Example
General object O general config
+LocalNo uint O Local number for remote 8
controller
+MachineID char[] O Device ID "20832748927"
+MachineName char[] O Device name or serial number. "Dahua001"
+MachineAddress char[] O Address machine places in "XXXDistrict.YYYRoad"
+MachineGroup char[] O Group machine belongs to "xxxx"
+LockLoginEnable bool O Enable login failure attempts true
+CheckDuration uint32 O Zeroing cycle, if the number of 30
DA

login attempts within the


HU

specified time does not exceed


A_

the number of attempts, the


HT

number of attempts will be reset


TP

to zero Unit seconds


_

0 for never
AP

+LockLoginTimes int O Number of attempts to log in 3


I_
V3

failed
+LoginFailLockTime int O 1800
.3

Login failure lock time


7

Unit seconds
fo

+MaxOnlineTime int O Maximum user online time 1800


rV

Unit seconds
el

+LocalPolicy object O
se

Local GUI locking policy


n

++LockLoginEnable bool O Enable login failure attempts true


gS

++CheckDuration uint32 O Zeroing cycle 30


dn

0 for never
Bh

++LockLoginTimes int O Number of attempts to log in 3


d

failed
++LoginFailLockTime int O Login failure lock time 1800
Unit seconds
+ActivationTime char[24] O Date when the device started "2000-01-01 00:00:00"
using, date format: "yyyy-MM-dd
HH:mm:ss"
range "2000-01-01 00:00:00",
"2099-01-01 00:00:00"

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=General
Get Config Response Example

General APIs 105


table.General.LocalNo=8,
table.General.MachineID=20832748927,
table.General.MachineName=Device001,
table.General.MachineAddress=XXXDistrict.YYYRoad,
table.General.MachineGroup=xxxx,
table.General.LockLoginEnable=true,
table.General.CheckDuration=30,
table.General.LockLoginTimes=3,
table.General.LoginFailLockTime=1800,
table.General.MaxOnlineTime=1800,
table.General.LocalPolicy.LockLoginEnable=true,
table.General.LocalPolicy.CheckDuration=30,
table.General.LocalPolicy.LockLoginTimes=3,
table.General.LocalPolicy.LoginFailLockTime=1800
table.General.ActivationTime=2000-01-01 00:00:00
DA

Set Config Request Example


HU

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&General.MachineName=MyIPC
A_

Set Config Response Example


HT

OK
TP
_

4.6.2 Get Current Time


AP
I_

Request URL http://<server>/cgi-bin/global.cgi?action=getCurrentTime


V3

Method GET
.3
7

Request Params ( none)


fo

Name Type R/O Description Example


rV

Request Example
el
se

http://192.168.1.108/cgi-bin/global.cgi?action=getCurrentTime
ngS

Response Params ( key=value format in body )


dn

Name Type R/O Description Example


Bh

result char[20] O The time format is "Y-M-D H-m-S". It's 2011-7-3 21:02:32
d

not be effected by Locales. TimeFormat


in SetLocalesConfig.
Response Example
result=2011-7-3 21:02:32

4.6.3 Set Current Time


Request URL http://<server>/cgi-bin/global.cgi?action=setCurrentTime
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example

General APIs 106


time char[20] R The time format is "Y-M-D H-m-S". It's 2016-01-
not be effected by Locales. 01%2021:02:32
TimeFormat in SetLocalesConfig.
Request Example
http://192.168.1.108/cgi-bin/global.cgi?action=setCurrentTime&time=2016-01-01%2021:02:32

Response Params ( OK in body )


Response Example
OK

4.6.4 [Config] Locales


Config Data Params
Name Type R/O Description Example
Locales object O locales
DA

+TimeFormat char[24] O Defines time format displayed in video "yyyy-MM-dd HH:mm:ss"


HU

time title.
A_

String form is: year-month-day


HT

hour:mm:ss.
TP

Position of year, month and day can


_
AP

be exchanged.
I_
V3

Range of year is {yy, yyyy}


.3

yy = year without century, yyyy = year


7

with century.
fo

Range of month is {M, MM, MMMM}


rV

M = 1 for January, MM = 01 for


el
se

January, MMMM = Jan for January


n

Range of day is {d, dd}


gS

d = 1 for first day, dd = 01 for first day


dn

Range of hour is {H, HH, h, hh}


Bh

H = 1 for 1:00, HH = 01 for 1:00, range


d

is 0-23
h = 1 for 1:00, hh = 01 for 1:00, time
range is 1-12

Example:
yyyy-MM-dd HH:mm:ss or
MM-dd-yyyy HH:mm:ss or
dd-M-yy hh:mm:ss
+DSTEnable bool O Enable/Disable DST (daylight saving false
time)
+DSTStart object O DST start time
++Year int O Range is [2000-2038] 0
++Month int O Range is [1—12] 1
++Week int O Range is {1, 2, 3, 4, -1, 0}. 1

General APIs 107


0 = Use month day
[1, 2, 3, 4, -1]: use week day.
1 = first week, 2 = second, 3 = third, 4
= fourth, -1 = last.
++Day int O Range is [0—6] or [1—31] 0
[0 — 6]: week day, 0 = Sunday, 6 =
Saturday
[1—31]: month day
If Locales.DSTEnd.Week is 0, use
month day, otherwise, use week day.
++Hour int O Range is [0—23] 0
++Minute int O Range is [0—59] 0
+DSTEnd object O DST end time
++Year int O Range is [2000-2038] 0
++Month int O Range is [1—12] 1
++Week int O Range is {1, 2, 3, 4, -1, 0}. 1
DA

0 = Use month day


HU

[1, 2, 3, 4, -1]: use week day.


A_

1 = first week, 2 = second, 3 = third, 4


HT

= fourth, -1 = last.
TP

++Day int O Range is [0—6] or [1—31] 0


_

[0 — 6]: week day, 0 = Sunday, 6 =


AP

Saturday
I_

[1—31]: month day


V3

If Locales.DSTEnd.Week is 0, use
.3
7

month day, otherwise, use week day.


fo

++Hour int O Range is [0—23] 0


rV

++Minute int O Range is [0—59] 0


el
se
n

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
gS

are as follows :
dn

Get Config Request Example


Bh

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Locales
d

Get Config Response Example


table.Locales.DSTEnable=false
table.Locales.DSTEnd.Day=1
table.Locales.DSTEnd.Hour=0
table.Locales.DSTEnd.Minute=0
table.Locales.DSTEnd.Month=1
table.Locales.DSTEnd.Week=2
table.Locales.DSTEnd.Year=2011
table.Locales.DSTStart.Day=0
table.Locales.DSTStart.Hour=0
table.Locales.DSTStart.Minute=0
table.Locales.DSTStart.Month=1
table.Locales.DSTStart.Week=1
table.Locales.DSTStart.Year=2011

General APIs 108


table.Locales.TimeFormat=yyyy-MM-dd HH:mm:ss

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Locales.DSTEnable=false
Set Config Response Example
OK

4.6.5 [Config] Holiday Management


Config Data Params
Name Type R/O Description Example
Holiday object O holiday configuration
+MonthMask int[12] O Array index presents the index of a [3,0,0,0,0,0,0,0,0,
month. 0 presents January, 1 presents 1610612739,0,0]
February, 11 presents December.
DA

It is the mask of a month.Every bit


HU

present a day. For example, 0x0001


A_

presents the first day of a month is


HT

holiday. 0x0002 presents the second


TP

day of a month is holiday, 0x0003


_ AP

presents the first day and second day


of a month is holiday.
I_
V3
.3

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
7

are as follows :
fo
rV

Get Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Holiday
el
se

Get Config Response Example


n

table.Holiday.MonthMask[0]=3
gS

table.Holiday.MonthMask[1]=0
dn

table.Holiday.MonthMask[2]=0
Bh

table.Holiday.MonthMask[3]=0
d

table.Holiday.MonthMask[4]=0
table.Holiday.MonthMask[5]=0
table.Holiday.MonthMask[6]=0
table.Holiday.MonthMask[7]=0
table.Holiday.MonthMask[8]=0
table.Holiday.MonthMask[9]=1610612739
table.Holiday.MonthMask[10]=0
table.Holiday.MonthMask[11]=0

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Holiday.MonthMask[0]=3
Set Config Response Example
OK

General APIs 109


4.6.6 Get Language Capability
Request URL http://<server>/cgi-bin/magicBox.cgi?action=getLanguageCaps
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getLanguageCaps

Response Params ( key=value format in body )


Name Type R/O Description Example
Languages char[] R response is a string contains SimpChinese,English,Fr
languages with comma separated. ench
Languages include { English,
DA

SimpChinese, TradChinese, Italian,


HU

Spanish, Japanese, Russian, French,


A_

German }
HT

Response Example
TP

Languages=SimpChinese,English,French
_
AP

4.6.7 [Config] Language


I_
V3
.3

NOTE: After changing language setting, system will automatically reboot!


7

Config Data Params


fo
rV

Name Type R/O Description Example


Language char[12] O The language range is get "English"
el
se

from interface in
n

GetLanguageCaps
gS
dn

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
Bh

are as follows :
d

Get Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Language
Get Config Response Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Language=SimpChinese

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Language=SimpChinese
Set Config Response Example
OK

General APIs 110


4.6.8 Get Device Type
Get the device type displayed (instead of the real type).
Request URL http://<server>/cgi-bin/magicBox.cgi?action=getDeviceType
Method GET
Request Params ( none )
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getDeviceType

Response Params ( key=value format in body )


Name Type R/O Description Sample
type string R The displayed device model DVR
Response Example
type=DVR
DA

4.6.9 Get Hardware Version


HU
A_

Get the device hardware version information.


HT

Request URL http://<server>/cgi-bin/magicBox.cgi?action=getHardwareVersion


TP

Method GET
_

Request Params ( none )


AP

Request Example
I_
V3

http://192.168.1.108/cgi-bin/magicBox.cgi?action=getHardwareVersion
.3
7

Response Params ( key=value format in body )


fo

Name Type R/O Description Sample


rV

version string R The hardware version in the format of 1.00


el
se

xx.xx.
n

Use two numbers to respectively


gS

represent the main and sub versions.


dn

If the beginning number of the main


Bh

version is 0, it should be omitted.


d

Response Example
version=1.00

4.6.10 Get Serial Number of Device


Get the serial number of the device.
Request URL http://<server>/cgi-bin/magicBox.cgi?action=getSerialNo
Method GET
Request Params ( none )
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getSerialNo

Response Params ( key=value format in body )

General APIs 111


Name Type R/O Description Sample
sn string R The device serial number YZC0GZ05100020
Response Example
sn=YZC0GZ05100020

4.6.11 Get Machine Name


Get the device machine name.
Request URL http://<server>/cgi-bin/magicBox.cgi?action=getMachineName
Method GET
Request Params ( none )
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getMachineName

Response Params ( key=value format in body )


Name Type R/O Description Sample
DA

name string O The device name my machine


HU

Response Example
A_

name=my machine
HT
TP

4.6.12 Get System Information


_ AP
I_

Get the system information of the device.


V3

Request URL http://<server>/cgi-bin/magicBox.cgi?action=getSystemInfoNew


.3

Method GET
7
fo

Request Params ( none )


rV

Request Example
el

http://192.168.1.108/cgi-bin/magicBox.cgi?action=getSystemInfoNew
se
ngS

Response Params ( key=value format in body )


dn

Name Type R/O Description Sample


info object O System information
Bh

+SyncTime object O For devices without RTC or when


d

the RTC of the device is out of


battery, you might also need to
synchronize the time.
++Strategy enumchar[16 R Time synchronization strategy PerLogin
] enumchar[16]{
"None"
"PerLogin": Synchronizes the time
each time you log in
}
+2DCode char[32] O security code 123456
0-9 and capitalized A–Z
+TotalRunTime uint64 O The total running time of the 12456
device.

General APIs 112


Unit: s
+cameraNum uint8 O The number of cameras 1
+cardReader bool O Whether card swiping is true
supported:
true: supported
false: not supported
+flashID uint8[8] O flash ID [200,209,128,149,64,1
27,127,200]
+hasRTC bool O Whether the RTC chip is included true
(for recording the system time).
If the filed does not exist, the value
is true and the RTC is included by
default.
RTC included: true
No RTC: false
Response Example
DA

info.SyncTime.Strategy=“PerLogin”,
HU

info.2DCode=“123456”,
A_

info.TotalRunTime=123456
HT

info.cameraNum=0
TP

info.cardReader=false
_

info.flashID[0]=200
AP

info.flashID[1]=209
I_

info.flashID[2]=128
V3

info.flashID[3]=149
.3
7

info.flashID[4]=64
fo

info.flashID[5]=127
rV

info.flashID[6]=127
el

info.flashID[7]=200
se
n

info.hasRTC=true
gS
dn

4.6.13 Get Vendor Information


Bh
d

Request URL http://<server>/cgi-bin/magicBox.cgi?action=getVendor


Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getVendor

Response Params ( key=value format in body )


Name Type R/O Description Example
vendor char[32] O OEM TTT
Response Example
vendor=TTT

General APIs 113


4.6.14 Get Software Information
Request URL http://<server>/cgi-bin/magicBox.cgi?action=getSoftwareVersion
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getSoftwareVersion

Response Params ( key=value format in body )


Name Type R/O Description Example
version char[64] O software version 2.212.0000.0.R,build:2013-11-14
Response Example
version=2.212.0000.0.R,build:2013-11-14
DA
HU

4.6.15 Get Version of Onvif


A_
HT

Request URL http://<server>/cgi-bin/IntervideoManager.cgi?action=getVersion


TP

Method GET
_

Request Params ( key=value format in url)


AP

Name Type R/O Description Example


I_
V3

Name char[] R Onvif Onvif


.3

Request Example
7

http://192.168.1.108/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=Onvif
fo
rV
el

Response Params ( key=value format in body )


se

Name Type R/O Description Example


n gS

version char[64] R version info 2.4.2


Response Example
dn

version=2.4.2
Bh
d

4.6.16 Get Version of HTTP API


Request URL http://<server>/cgi-bin/IntervideoManager.cgi?action=getVersion
Method GET
Request Params ( key=value format in url)
Name Type R/O Description Example
Name char[] R CGI CGI
Request Example
http://192.168.1.108/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=CGI

Response Params ( key=value format in body )


Name Type R/O Description Example

General APIs 114


version char[64] R version info 2.0.0
Response Example
version=2.0.0

4.6.17 Get Device Class


Get the class information of the device.
Request URL http://<server>/cgi-bin/magicBox.cgi?action=getDeviceClass
Method GET
Request Params ( none )
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getDeviceClass

Response Params ( key=value format in body )


DA

Name Type R/O Description Sample


HU

class string R The class information of the device. HDVR


A_

Response Example
HT

class=HDVR
TP
_

4.6.18 [Config] Auto Maintain


AP
I_
V3

Config Data Params


.3

Name Type R/O Description Example


7

AutoMaintain object O auto maintain


fo
rV

+AutoRebootDay int O Range is [-1—7]. -1


Auto reboot day.
el
se

-1 = never auto reboot


n

0~6 = Sunday~Saturday
gS

7 = reboot every day


dn

+AutoRebootHour int O Range is [0—23]. 0


Bh

Auto reboot hour


d

+AutoRebootMinute int O Range is [0—59]. 0


Auto reboot minute
+AutoShutdownDay int O Range is [-1—7]. -1
Auto shutdown day.
-1 = never auto shutdown
0~6 = Sunday~Saturday
7 = shutdown every day
+AutoShutdownHour int O Range is [0—23]. 0
Auto shutdown hour
+AutoShutdownMinute int O Range is [0—59]. 0
Auto shutdown minute
+AutoStartUpDay int O Range is [-1—7]. -1
Auto start day.
-1 = never auto start

General APIs 115


0~6 = Sunday~Saturday
7 = start every day
+AutoStartUpHour int O Range is [0—23]. 0
Auto start hour
+AutoStartUpMinute int O Range is [0—59]. 0
Auto start minute

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=AutoMaintain
Get Config Response Example
table.AutoMaintain.AutoRebootDay=3
table.AutoMaintain.AutoRebootHour=0
table.AutoMaintain.AutoRebootMinute=0
table.AutoMaintain.AutoShutdownDay=1
DA

table.AutoMaintain.AutoShutdownHour=0
HU

table.AutoMaintain.AutoShutdownMinute=0
A_

table.AutoMaintain.AutoStartUpDay=1
HT

table.AutoMaintain.AutoStartUpHour=2
TP

table.AutoMaintain.AutoStartUpMinute=0
_ AP

Set Config Request Example


I_

http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&AutoMaintain.AutoRebootDay=7
V3

Set Config Response Example


.3
7

OK
fo
rV
el
se

4.6.19 Reboot
ngS

Request URL http://<server>/cgi-bin/magicBox.cgi?action=reboot


dn

Method GET
Bh

Request Params ( key=value format in URL )


d

Name Type R/O Description Example


delay char[20] O delay time 2016
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=reboot

Response Params ( OK in body )


Response Example
OK

4.6.20 Shutdown
Request URL http://<server>/cgi-bin/magicBox.cgi?action=shutdown
Method GET
Request Params ( none )

General APIs 116


Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=shutdown

Response Params ( OK in body )


Response Example
OK

4.6.21 Factory Reset


Request URL http://<server>/cgi-bin/magicBox.cgi?action=resetSystemEx
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
type int O 0 means all parameters are set to their 0
DA

factory default value;


HU

1 means all parameters are set to their


A_

factory default value expect the


HT

specific parameters;
TP

The specific parameters of different


_ AP

device types are different. But it


I_

always contains the network settings


V3

and user settings. After resetting, the


.3

device is reachable on the same ip


7

address as used before the reset.


fo
rV

When the Type parameter is not


present in the URL, the default value
el
se

of the Type is 0.
n

Request Example
gS

http://192.168.1.108/cgi-bin/magicBox.cgi?action=resetSystemEx&type=0
dn
Bh

Response Params ( OK in body )


d

Response Example
OK

4.6.22 Get Tracing Code of Device


Request URL http://<server>/cgi-bin/magicBox.cgi?action=getTracingCode
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getTracingCode

General APIs 117


Response Params ( key=value format in body )
Name Type R/O Description Example
tc char[] O Only system default admin can get it. 0001...1101
tc is a 64bit binary string.
Response Example
tc=0001...1101

4.6.23 Add Camera to Specified Channel


Request URL http://<server>/cgi-bin/LogicDeviceManager.cgi?action=addCameraByGroup
Method POST
Request Params ( Json format in body )
Name Type R/O Description Example
Add device groups in batches
DA

+group object[] R It is an array with the same


HU

elements as addCameraByDevice.
++DeviceInfo object R Device details
A_

O RTSP port: Required when


HT

+++RtspPort int ProtocolType is not Private, 554 by 554


TP

default.
_AP

O HTTP port: Required when


I_

+++HttpPort int ProtocolType is not Private, 80 by 80


V3

default.
.3

O TCP port: Required when


7
fo

+++Port int ProtocolType is Private, 37777 by 37777


rV

default.
el

+++UserName char[32] R Username admin


se

+++Password char[32] R Password, plain text pass123456


ngS

R Protocol Type
+++ProtocolTy
dn

char[128] "Private","Dahua2","Dahua3","Gene "Private"


pe
ral","Onvif","GB28181","Ehome"
Bh

+++Address char[16] R Device address 172.11.1.161


d

++cameras object[] R Video source information


+++uniqueCha R Unique channel number, starting
int 1
nnel from 1
Example
{
"group":[{
"DeviceInfo":{
"UserName":"admin",
"Password":"pass123456",
"ProtocolType":"Private",
"Port":37777,
"Address":"172.11.1.161"

General APIs 118


},
"cameras":[{
"uniqueChannel":1
}]
}]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
group object[] O device group info
+deviceID char[128] O device ID "uuid:4848"
+cameras object[] O camera info
++uniqueChan uint O unique channel 1
nel
++failedCode uint O error code. 1
0: succeed
DA

1: the specific channel does not


HU

support configuration
A_

Response Example
HT

{
TP

"group": [{
_
AP

"deviceID": "uuid:4848",
"cameras": [{
I_
V3

"uniqueChannel": 1,
.3

"failedCode": 1
7

},…{}]
fo

},…{}]
rV

}
el
se
n

4.6.24 Delete Camera by Group


gS
dn
Bh

Request URL http://<server>/cgi-bin/api/LogicDeviceManager/deleteCameraByGroup


d

Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
group object[] O
+uniqueChannels int[] O unique channel list [1…3]
When the array size is 1 and the
element value is - 1, it indicates
that all channels under the
"DeviceID" device are deleted
+DeviceID char[128] O Device ID, "DH12345678910"
returned by method
addCameraByGroup.
When the "uniqueChannels"
array size is 1 and the element

General APIs 119


value is - 1, "DeviceID" is
required, otherwise it is not
required.
Request Example
{
"group": [{
"DeviceID": "DH12345678910",
"uniqueChannels": [1…3]
},…{}]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
info object[] O details
+failedCode uint O 0 indicates success, 0
other indicates failure
DA

+deviceID char[128] O Device ID "DH12345678910"


HU

+uniqueChannel int O unique channel 1


A_

Response Example
HT

{
TP

"info": [{
_

"failedCode": 0,
AP

"deviceID": "DH12345678910",
I_
V3

"uniqueChannel": 1
.3

},…{}]
7

}
fo
rV
el

4.6.25 Acquiring All Available Resources


se
n gS

Customer requests to obtain camera information, such as MAC address and SN, through CGI
dn

commands.
Bh

Request URL http://<server>/cgi-bin/LogicDeviceManager.cgi?action=getCameraAll


d

Method GET
Request Params ( key=value format in Url )
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/LogicDeviceManager.cgi?action=getCameraAll

Response Params (key=value format in body )


Name Type R/O Description Example
camera object[] R camera info
+ControlID char[128] O Control number. "5001"
Keyboard users can use the
number to locate channels to
improve operation efficiency.

General APIs 120


Control number “0” is not
available, which is reserved for
special use.
+Name char[128] O Name “XXX Road”
+Enable bool O Enable only when using DeviceID true
to add/delete devices. Do not
enable it through DeviceInfo.
true: Meaning trying to connect
the device, but not necessarily
successful. You can acquire the
connection status through
getCameraState.
false: Do not connect the device.
From user's point of view, it is the
same as that the device is not
added.
DA

This Enable field is only used for


HU

the case of adding a device


A_

through DeviceID. We keep this


HT

field for compatibility and


TP

recommend using the Enable in


_

DeviceInfo.
AP

When acquiring the field, this


I_

Enable and the Enable in


V3

DeviceInfo are returned at the


.3
7

same time.
fo

When sending the field, you can


rV

only select one between this


el

Enable and the Enable in


se
n

DeviceInfo. We recommend
gS

sending the Enable in DeviceInfo.


dn

+DeviceInfo DeviceInfo O Device details.


Bh

Use the Enable in the structure to


d

add/delete devices.
True: Add devices.
False: delete devices from the
channel.
A device can be added only when
"DeviceID" is " " and Info is not
NULL.
++Enable bool O The device is enabled or not. true
++EncryptStrea int O Device stream encryption 0
m algorithm (custom field for NVR).
(If other encryption algorithms are
used, refer to the encryption type
definition in stream format code
0x95).

General APIs 121


0: No encryption by default.
++Address char[16] O Device IP address or domain "10.6.5.10"
name.
++Port int O Port number. 37777
++usePreSecret enumint8 O Select whether to use NVR 1
preset password to add cameras
(the naming remains the same
globally, so the case is not
uniform here).
enumint8{
0: Use UserName/Password to
connect devices (default).
1: When using a preset password
to connect devices,
UserName/Password is not
required.
DA

2: When using camera login


HU

password to connect devices,


A_

UserName/Password is not
HT

required.
TP

}
_

++UserName char[32] O Username "admin"


AP

++Password char[32] O Password in plain text. "admin"


I_
V3

++ProtocolType enumchar[32 O The protocol type of the "Private"


.3

] connected device. For the value


7

range, see the ProtocolType field


fo

of the RemoteDevice
rV

configuration.
el
se

enumchar[32]{
n

"Private"
gS

"Dahua2"
dn

"Dahua3"
Bh

"General"
d

"Onvif"
"Ehome"
“ICC”: The special protocol for the
central Intelligence platform. It
has not been reviewed, therefore
it is not allowed to add the
protocol type in this way in the
future.
"DahuaDSS": The special
protocol for the central
Intelligence platform. It has not
been reviewed, therefore it is not
allowed to add the protocol type
in this way in the future.

General APIs 122


}
++VideoInput++ uint O Total number of video input 16
Channels channels, including analog and
digital channels
++AudioInput++ uint O Total number of audio input 4
Channels channels
++DeviceClass char[64] O Device type "IPC"
++DeviceType char[64] O Device model "IPC-HF3300"
++HttpPort int O HTTP port number 80
++HttpsPort int O HTTPS port number 443
++RtspPort int O RTSP port number 554
++Name char[64] O Device name "IPC1"
++MachineAddr char[256] O Device deployment location “XXX District, YYY
ess Road”
++SerialNo char[48] O Device serial number "Device12345678"
++VendorAbbr char[32] O Vendor abbreviation (optional) "VVV"
DA

Vendor type: VVV (for example).


HU

++HardID char[64] O Hardware ID (optional) "454"


A_

++SoftwareVersi char[64] O Software version (optional) "2.420.0000006.0.R.


HT

on 150311"
TP

++ActivationTim char[24] O The date when starting using the "2000-01-01


_ AP

e device. 00:00:00"
I_

Date format: "yyyy-MM-dd


V3

HH:mm:ss”
.3

“Year–Month–Day Hour: Minute:


7

Second"
fo
rV

Range {"2000-01-01 00:00:00",


el

/*Minimum date*/
se

"2099-01-01
n

00:00:00",/*Maximum date*/}
gS

++NodeType char[32] O Device node type (main or sub


dn

node). It is used when adding


Bh

storage node
d

(DataNodeManager.addDataNod
e) in N + M cluster mode.
++Mac char[] O MAC address "08:00:20:0A:8C:6D"
++OEMVendor char[] O OEM vendor type. "XXX"
During cloud update, for some
vendors, the Vendor field is
displayed as OEM, and
OEMVendor is added to indicate
the actual vendor information.
OEMVendor is the same as
Vendor by default. If OEMVendor
is defined in the product

General APIs 123


definition, refer to the the product
definition.
+DeviceID char[128] O Device ID "dev123"
When DeviceID is not " ", ignore
DeviceInfo and use the existing
DeviceID information in the
RemoteDevice configuration.
+Type enumchar[32 O Input channel type. "Remote"
] enumchar[32]{
"Local": Local channel (physical
channel).
"Remote": Remote channel.
"Reserved32": Reserve 32
channels (compatible with the
device protocol of the second
generation).
DA

"Output": Output channel.


HU

"Matrix”: Analog matrix channel.


A_

"Compose": Composite channel.


HT

"Cascade": Optical fiber


TP

cascading channel.
_

}
AP

+VideoStream enumchar[32 O Video stream. "Main"


I_
V3

] enumchar[32]{
"Main": Main stream
.3
7

"Extra1": Sub stream 1


fo

"Extra2": Sub stream 2


rV

"Extra3": Sub stream 3


el

"Auto": Automatically selects the


se
n

appropriate stream.
gS

"Preview": Preview raw data


dn

stream.
Bh

"None": No video stream (pure


d

audio stream).
}
+Channel uint O Channel number of the remote 0
device (optional).
DeviceID is unique.
+UniqueChannel int O Unique channel number of 0
uniform device number
(required).
You can obtain video/audio
streams by specifying the
channel number with 0x11/0xF4
second-generation protocol.
Notes: When implementing any
addressing function of

General APIs 124


DeviceID+Channel,
LogicDeviceManager.getCamera
All() must be implemented, and
the device must support
“DeviceID=Unique” unified
numbering method for input
channels.
For setCamera(), uniqueChannel
equals -1 means that the device
automatically assigns a channel
number.
+DataNodeId int O Indicates the data node to which 1
the global channel is currently
allocated (N+0 cluster).
Counted from 0. If it is -1 or when
the field does not exist, it means
DA

that it is not allocated currently.


HU

+DataNodeChan int O Indicates the local channel of 2


A_

nel data node to which the global


HT

channel is currently allocated


TP

(N+0 cluster).
_

Counted from 0. If it is -1 or when


AP

the field does not exist, it means


I_

that it is not currently allocated.


V3

+AutoReset bool O Auto reset. false


.3
7

Compatible process:
fo

If this parameter is not


rV

configured, the default value is


el

false and the channel cannot be


se
n

reset automatically.
gS

when there is no client to access


dn

the video stream (streaming


Bh

client access count changes from


d

non-zero to zero), if
AutoReset=true, the device will
actively enable the channel to be
idle (that is, the video source
attribute Enable=false ).
+VideoStandard enumchar[32 O Current video standard "PAL"
] enumchar[32]{
"PAL"
"NTSC"
"SECAM"
}
+Label enumchar[32 O Device label "Indoor"
] enumchar[32]{
"Indoor": Indoor

General APIs 125


"Outdoor": Outdoor
}
+ImageInfo object O Device snapshot
When adding a device, take a
snapshot and save it to local
computer.
++FilePath char[256] R Image path "/var/local/ch1.jpg"
+PasswordGenT enumchar[32 O Password generation method "UserInput"
ype ] enumchar[32]{
"UserInput": Entered by users.
"Auto": Automatically generated.
}
Response Example
camera[0].ControlID=5001
camera[0].Name= XXX Road
camera[0].Enable=true
DA

camera[0].DeviceInfo.Enable=true
HU

camera[0].DeviceInfo.EncryptStream=0
A_

camera[0].DeviceInfo.Adress=10.6.5.10
HT

camera[0].DeviceInfo.Port=37777
TP

camera[0].DeviceInfo.usePreSecret=1
_

camera[0].DeviceInfo.UserName=admin
AP

camera[0].DeviceInfo.Password=pass123456
I_
V3

camera[0].DeviceInfo.ProtocolType=Private
.3

camera[0].DeviceInfo.SoftwareVersion=2.420.0000006.0.R.150311
7


fo

camera[0].DeviceID= dev123
rV

camera[0].ImageInfo. FilePath=/var/local/ch1.jpg"
el
se

camera[0].PasswordGenType=UserInput
n


gS

camera[1].ControlID=5002
dn

camera[1].Name= YYY Road


Bh
d

4.6.26 Subscribing for Device Online/Offline Status


Subscribe to the online and offline status of the device.
Request URL http://<server>/cgi-bin/api/LogicDeviceManager/attachCameraState
Method POST
Request Params (JSON format in body)
Name Type R/O Description Example
channel int[] R Observed unique channel number. [1, 2]
"-1" means all unique channels. If
one of the array elements is "-1", it
will observe all channels.
heartbeat int32 O Send heartbeat interval, range is [1, 10
60],unit is second. If the URL

General APIs 126


contains this parameter, and the
value is 5, it means every 5
seconds the device should send
the heartbeat message to the
client, the heartbeat message is an
string "Heartbeat". If this parameter
is not present, its default value is
60.
Request Example
{
"type": [1, 2],
"heartbeat": 10
}

Response Params (multipart in body)


Name Type R/O Description Example
DA

state object R The new status of the camera


HU

+channel int32 R Unique channel number (the 1


A_

channel number with changed


HT

status)
TP

+connectionState enumchar[12] R Connection status “Connected”


_

enumchar[12]{
AP

"Connecting"
I_
V3

"Connected"
.3

"Unconnect": Not connected


7

"Empty": The channel is not


fo

configured and there is no


rV

information.
el
se

"Disable": The channel is


n

configured but disabled (the


gS

protocol cannot be reflected,


dn

and delete it first).


Bh

"Changed": The information of


d

the device connected to the


channel is changed.
"Hibernation"
}
Response Example
HTTP/1.1 200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: close

--<boundary>
Content-Type: application/json
Content-Length: <data length>

General APIs 127


"channel" : 1,
"connectionState" : "Connected"
}
--<boundary>
Content-Type: text/plain
Content-Length: 11

Heartbeat
--<boundary>

4.6.27 Get Complete Machine Version


get complete machine version
Request URL http://<server>/cgi-bin/api/MagicBox/getCompleteMachineVersion
DA

Method POST
HU

Request Params ( JSON format in body )


A_

Name Type R/O Description Example


HT

Request Example
TP

http://192.168.1.108/cgi-bin/api/MagicBox/getCompleteMachineVersion
_ AP

Response Params ( JSON format in body )


I_
V3

Name Type R/O Description Example


.3

CompleteMac char[32] R complete machine version "S2"


7

hineVersion
fo

Response Example
rV

{
el
se

"CompleteMachineVersion": "S2"
n

}
gS
dn
Bh

4.6.28 Connection test


d

network connection test of devices and http servers


Request URL http://<server>/cgi-bin/api/tcpConnect/tcpTest
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Ip char[40] R Http server IP "10.34.9.21"
Port int32 R The port number of the http server 80
Request Example
{
"Ip": "10.34.9.21",
"Port": 80
}

General APIs 128


Response Params ( JSON format in body )
Name Type R/O Description Example
Connect bool R Whether the connection is successful true
Response Example
{
"Connect": true
}

4.6.29 Getting Online Status of the Channel


Request URL http://<server>/cgi-bin/api/LogicDeviceManager/getCameraState
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
uniqueChanne Int[] R Unique channel number [-1]
DA

ls If the array is 1, the corresponding value


HU

is -1, and it means to get all the


A_

channels.
HT

Request Example
TP

{
_

"uniqueChannels": [-1]
AP

}
I_
V3
.3

Response Params ( JSON format in body )


7

Name Type R/O Description Example


fo

states object[] R Online status


rV

+ channel uint R Channel number 0


el
se

++connection enumchar[12] R Connect status "Connected"


n

State enumchar[12]{
gS

"Connecting": connecting.
dn

"Connected": successfully connected


Bh

"Unconnect": configured but not


d

connect
"Empty”: The channel is not
configured or configured into ""
"Disable": The channel is configured
but disabled.
"UnInited": the front-end devices are
not initialized.
"Hibernation": hibernate
}
++capsState bool O Represents whether the current true
channel can get capacity from the
front-end devices.
++errorMessa char[128] O Reason for failed to connect "LoginConnectFailed"
ge

General APIs 129


When the connection status is
unconnected, it is valid.
"LoginConnectFailed", failed to
connect to the internet when login.
"ErrorHasNotInit", failed to login for
the device is not initialized and there
are no users.
"UserOrPwdNotValid", failed to login
for entering the wrong user name or
the wrong password.
"LoginConnectTimeout", login
connection timeout.
"LoginFailure", failed to login for
unknown reason.
Response Example
{
DA

"states" : [ {
HU

"channel" : 0,
A_

"connectionState" : "Connecting",
HT

"capsState": true,
TP

"errorMessage": "LoginConnectFailed"
_

}, …, {}]
AP

}
I_
V3
.3

4.6.30 Getting the Recording Status of the Channel


7
fo
rV

Request URL http://<server>/cgi-bin/api/recordManager/getStateAll


el

Method POST
se
n

Request Params ( JSON format in body )


gS

Name Type R/O Description Example


dn

Request Example
Bh

{}
d

Response Params ( JSON format in body )


Name Type R/O Description Example
state object[] R Recording status. The array index
represents the corresponding
channel.
+ Main object R Main stream
++ State uint R Whether the main stream is 1
recording, and if yes, Flag has
meaning.
+Extra1 object O If the recording can be performed
in sub streams, then it may exist
information such as the recording

General APIs 130


status of the sub streams, and it is
the same with field “Main”.
+Extra2 object O If the recording can be performed
in sub streams, then it may exist
information such as the recording
status of the sub streams, and it is
the same with field “Main”.
+Extra3 object O If the recording can be performed
in sub streams, then it may exist
information such as the recording
status of the sub streams, and it is
the same with field “Main”.
Response Example
{
"state" : [ {
"Main" : {
DA

"State" : 1
HU

},
A_

"Extra1" : {},
HT

"Extra2" : {},
TP

"Extra3" : {}
_

}, …, {}]
AP

}
I_
V3
.3

4.7 User management


7
fo
rV

4.7.1 Get Information of a Particular User


el
se
ngS

Request URL http://<server>/cgi-bin/userManager.cgi?action=getUserInfo


Method GET
dn

Request Params ( key=value format in url)


Bh

Name Type R/O Description Example


d

name char[] R user name admin


Request Example
http://192.168.1.108/cgi-bin/userManager.cgi?action=getUserInfo?name=admin

Response Params ( key=value format in body )


Name Type R/O Description Example
user object O user info
+Name char[128] O user name "admin"
+Memo char[32] O remark "admin's account"
+Group char[32] O user group "admin"
default as follows: admin, user

General APIs 131


+Sharable bool O Allow the same user to log in from true
multiple different IP addresses
simultaneously
+Reserved bool O Is it a reserved user? Reserved users true
cannot be deleted
+PwdValidPeri int O Remind users to change their account 30
od password when it is about to expire.
+AuthorityList char[][128] O authority list ["ShutDown", "Monitor0
1", "DataFormat" ]
Response Example
user.Name=admin
user.Memo=admin's account
user.Group=admin
user.Reserved=true
user.Sharable=true
user.PwdValidPeriod=30
DA

user.AuthorityList[0]=AuthUserMag
HU

user.AuthorityList[1]=Monitor_01
A_

user.AuthorityList[2]=Replay_01
HT

user.AuthorityList[3]=AuthSysCfg
TP

user.AuthorityList[4]=AuthSysInfo
_

user.AuthorityList[5]=AuthManuCtr
AP
I_
V3
.3

4.7.2 Get Information of All Users


7
fo
rV

Request URL http://<server>/cgi-bin/userManager.cgi?action=getUserInfoAll


el

Method GET
se

Request Params ( none)


n gS

Name Type R/O Description Example


dn

Request Example
http://192.168.1.108/cgi-bin/userManager.cgi?action=getUserInfoAll
Bh
d

Response Params ( key=value format in body )


Name Type R/O Description Example
user object[] O user infos
+Id int O user id 1
+Name char[128] O user name "admin"
+Memo char[32] O remark "admin's account"
+Group char[32] O user group "admin"
default as follows: admin, user
+Sharable bool O Allow the same user to log in from true
multiple different IP addresses
simultaneously
+Reserved bool O Is it a reserved user? Reserved users true
cannot be deleted

General APIs 132


+PwdValidPeri int O Remind users to change their account 30
od password when it is about to expire.
+AuthorityList char[][128] O authority list ["ShutDown", "Monitor0
1", "DataFormat",… ]
Response Example
user[0].Name=admin
user[0].Memo=admin's account
user[0].Group=admin
user[0].Reserved=true
user[0].Sharable=true
user[0].PwdValidPeriod=30
user[0].AuthorityList[0]=AuthUserMag
user[0].AuthorityList[1]=Monitor_01
user[0].AuthorityList[2]=Replay_01
user[0].AuthorityList[3]=AuthSysCfg
user[0].AuthorityList[4]=AuthSysInfo
DA

user[0].AuthorityList[5]=AuthManuCtr
HU


A_
HT
TP

4.7.3 Get Information of All Active Users


_AP
I_

Request URL http://<server>/cgi-bin/userManager.cgi?action=getActiveUserInfoAll


V3

Method GET
.3

Request Params ( none)


7
fo

Name Type R/O Description Example


rV

Request Example
el

http://192.168.1.108/cgi-bin/userManager.cgi?action=getActiveUserInfoAll
se
n gS

Response Params ( key=value format in body )


dn

Name Type R/O Description Example


user object[] O user info
Bh

+name char[128] O user name "admin"


d

+ip char[32] O IP address "10.43.2.16"


+group char[32] O user group "admin"
default as follows: admin, user
+clienttype char[32] O client type "web3.0"
+logintime char[32] O login in time "2011-11-08 09:51:03"
Response Example
users[0].name=admin
users[0].ip=10.43.2.16
users[0].group=admin
users[0].clienttype=web3.0
users[0].logintime=2011-11-08 09:51:03

General APIs 133


4.7.4 Get Information of a Particular Group
Request URL http://<server>/cgi-bin/userManager.cgi?action=getGroupInfo
Method GET
Request Params ( key=value format in url)
Name Type R/O Description Example
name char[] R name of the group. admin
If the group named groupName does
not exist, the device returns Error.
Request Example
http://192.168.1.108/cgi-bin/userManager.cgi?action=getGroupInfo&name=admin

Response Params ( key=value format in body )


Name Type R/O Description Example
group object O group info
DA

+Name char[128] O The device has one or two default user "admin"
HU

groups: "admin"or "admin"and "user".


A_

+Memo char[32] O remark info "administrator group"


HT

+AuthorityList char[][128] O The "admin"group has all the ["ShutDown", "Monitor0


TP

authorities of operating the device. The 1", "DataFormat", … ]


_

"user"group only has monitoring and


AP

replaying authorities.
I_

Response Example
V3

group.Name=admin
.3
7

group.Memo=administrator group
fo

group.AuthorityList[0]=AuthUserMag
rV

group.AuthorityList[1]=Monitor_01
el

group.AuthorityList[2]=Replay_01
se

group.AuthorityList[3]=AuthSysCfg
n gS

group.AuthorityList[4]=AuthSysInfo
dn

group.AuthorityList[5]=AuthManuCtr
Bh


d

4.7.5 Get Information of all Groups


Request URL http://<server>/cgi-bin/userManager.cgi?action=getGroupInfoAll
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/userManager.cgi?action=getGroupInfoAll

Response Params ( key=value format in body )


Name Type R/O Description Example
group object[] O group infos

General APIs 134


+Name char[128] O The device has one or two default "admin"
user groups: "admin"or "admin"and
"user".
+Memo char[32] O remark info "administrator group"
+AuthorityList char[][128] O The "admin"group has all the ["ShutDown", "Monitor01
authorities of operating the device. ", "DataFormat", … ]
The "user"group only has monitoring
and replaying authorities.
Response Example
group[0].Id=1
group[0].Name=admin
group[0].Memo=administrator group
group[0].AuthorityList[0]=AuthUserMag
group[0].AuthorityList[1]=Monitor_01
group[0].AuthorityList[2]=Replay_01
group[0].AuthorityList[3]=AuthSysCfg
DA


HU

group[1].Id=1
A_

group[1].Name=user
HT

group[1].Memo=user group
TP

group[1].AuthorityList[0]=Monitor_01
_


AP
I_
V3
.3

4.7.6 Add a New User


7
fo
rV

Access Control products are not supported.


el

Request URL http://<server>/cgi-bin/userManager.cgi?action=addUser


se

Method GET
n gS

Request Params ( key=value format in URL )


dn

Name Type R/O Description Example


user object R user info
Bh

+Name char[128] O user name "George"


d

+Password char[] O [assword "123456"


+Memo char[32] O remark info "George's account"
+Group char[32] O the range is "admin"and "user". In "user"
different group, the user has different
authorities.
+Sharable bool O true means allow multi-point login. true
+Reserved bool O true means this user can't be deleted. false
Request Example
http://192.168.1.108/cgi-
bin/userManager.cgi?action=addUser&user.Name=George&user.Password=123456&user.Group=us
er&user.Sharable=true&user.Reserved=false

Response Params ( OK in body )

General APIs 135


Response Example
OK

4.7.7 Delete a User


Access Control products are not supported.
Request URL http://<server>/cgi-bin/userManager.cgi?action=deleteUser
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name char[128] R user name "George"
Request Example
http://192.168.1.108/cgi-bin/userManager.cgi?action=deleteUser&name=George
DA

Response Params ( OK in body )


HU

Response Example
OK
A_
HT

4.7.8 Modify User Information


TP
_AP

Access Control products are not supported.


I_

Request URL http://<server>/cgi-bin/userManager.cgi?action=modifyUser


V3

Method GET
.3
7

Request Params ( key=value format in URL )


fo

Name Type R/O Description Example


rV

name char[128] R User name, specified by user name "George"


el

user object R user info


se
n

+Memo char[32] O remark info "George's account"


gS

+Group char[32] O the range is "admin"and "user". In "user"


dn

different group, the user has different


Bh

authorities.
d

+Sharable bool O true means allow multi-point login. true


+Reserved bool O true means this user can't be deleted. false
+AuthorityList char[][12 O authority list ["ShutDown", "Monitor0
8] 1", "DataFormat",… ]
Request Example
http://192.168.1.108/cgi-
bin/userManager.cgi?action=addUser&user.Name=George&user.Password=123456&user.Group=us
er&user.Sharable=true&user.Reserved=false&user.AuthorityList[0]=ShutDown&user.AuthorityList[1]=
Monitor01&user.AuthorityList[2]=DataFormat&user.AuthorityList[3]=Replay_01

Response Params ( OK in body )


Response Example
OK

General APIs 136


4.7.9 Modify User's Password
Access Control products are not supported.
Request URL http://<server>/cgi-bin/userManager.cgi?action=modifyPassword
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name char[128] R User name, specified by user name "George"
pwd char[] R new password "abcdef"
pwdOld char[] R Old password should be supplied "123456"
Request Example
http://192.168.1.108/cgi-
bin/userManager.cgi?action=modifyPassword&name=George&pwd=abcdef&pwdOld=123456

Response Params ( OK in body )


DA

Response Example
HU

OK
A_
HT
TP

4.7.10 Manager Modify Common User's Password


_ AP

Access Control products are not supported.


I_
V3

Request URL http://<server>/cgi-bin/userManager.cgi?action=modifyPasswordByManager


.3

Method GET
7

Request Params ( key=value format in URL )


fo
rV

Name Type R/O Description Example


el

userName char[128] R The name of the common user to be "George"


se

modified
n

pwd char[] R new password "abcdef"


gS

managerName char[] R manager name is only admin "admin"


dn

managerPwd char[] R manager password "abc123"


Bh

accountType int R accountType support 0 is common 0


d

account, 1 is Onvif account


Request Example
http://192.168.1.108/cgi-
bin/userManager.cgi?action=modifyPasswordByManager&userName=Geoge&pwd=123456&manage
rName=admin&managerPwd=abc123&accountType=0

Response Params ( OK in body )


Response Example
OK

General APIs 137


4.7.11 [Config] User Login Authentication Policy
Config Data Params
Name Type R/O Description Example
LoginAuthCtrl object O
+PriSvrPolicy enumint8 R login policy setting for Private Protocol. 1
1 - safe mode, only support digest
authentication. (Recommended.);
2 - compatible mode for traditional
devices;

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=LoginAuthCtrl
DA

Get Config Response Example


HU

table.LoginAuthCtrl.PriSvrPolicy=1
A_

Set Config Request Example


HT

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LoginAuthCtrl.PriSvrPolicy=2
TP

Set Config Response Example


_
AP

OK
I_
V3
.3

4.8 Network
7
fo
rV

4.8.1 Get Network Interfaces


el
se
n

Request URL http://<server>/cgi-bin/netApp.cgi?action=getInterfaces


gS

Method GET
dn

Request Params ( none)


Bh

Name Type R/O Description Example


d

Request Example
http://192.168.1.108/cgi-bin/netApp.cgi?action=getInterfaces

Response Params ( key=value format in body )


Name Type R/O Description Example
netInterface object[] O network interface info
+Name char[] O network interface name. 3g
"eth0" - wired network interface
"eth2" - wireless network interface
"3G" - 3G network interface
"bond0" - bond network interface
"bond1" - bond network interface
Not listed in detail

General APIs 138


+Type char[] O Network types that support settings Auto,WCDMA,TD-
"Normal" — wired network SCDMA,TD-LTE,FDD-LTE
"Wireless" — wireless network
"Auto", "TD-SCDMA", "WCDMA",
"CDMA1x", "EDGE", "EVDO", "TD-
LTE", "FDD-LTE", "NR" — 3G
network types.
+Valid bool O Is network interface valid. true
+NetCardNam char[8] O Real network card name, for "eth0"
e example:
"eth0","wlan0","ppp5","lte0"
O Link connection status of wired
network cards, WiFi, and 3G
enumchar[32]{
"Inexistence": The network does
enumchar[ not exist
DA

+ConnStatus "Connected"
32] "Down": close
HU

"Disconn": not connected


A_

"Connecting"
HT

"Connected"
TP

}
_

O Network card theoretical speed


AP

+Speed uint8 100


Mbps
I_
V3

O A string of hexadecimal addresses


+PhysicalAddr
.3

char[18] for the physical address of the "00:10:5C:F2:1C:B4"


ess
7

network card
fo

+SupportLong O Does the device support long-


rV

bool true
PoE distance POE speed negotiation
el
se

Response Example
n

netInterface[0].Name=eth0
gS

netInterface[0].Type=Normal
dn

netInterface[0].Valid=true
Bh

netInterface[0].NetCardName=eth0
d

netInterface[0].ConnStatus=Connected
netInterface[0].Speed=100
netInterface[0].PhysicalAddress=00:10:5C:F2:1C:B4
netInterface[0].SupportLongPoE=true

netInterface[1].Name=3g
netInterface[1].Type=Auto,WCDMA,TD-SCDMA,TD-LTE,FDD-LTE
netInterface[1].Valid=true
netInterface[1].NetCardName=eth0
netInterface[1].ConnStatus=Connected
netInterface[1].Speed=100
netInterface[1].PhysicalAddress=00:10:5C:F2:1C:B4
netInterface[1].SupportLongPoE=true

General APIs 139


4.8.2 [Config] Client Access Filter
Config Data Params
Name Type R/O Description Example
AccessFilter object O access filter function
+Enable bool O Enable/Disable access filter function true
+Type enumchar[ O Range is {TrustList, BannedList}, "BannedList"
32] TrustList: Trust list is used, banned list
is not used.
BannedList: Banned list is used, trust
list is not used.
+TrustList char[][] O Trusted IP address list , for example: ["10.6.10.1", "10.6.10.2"]
"10.6.10.10-10.6.10.20"
+BannedList char[][] O Banned IP address list ["10.6.10.1", "10.6.10.2"]
DA
HU

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
A_

are as follows :
HT

Get Config Request Example


TP

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=AccessFilter
_

Get Config Response Example


AP

table.AccessFilter.Enable=false
I_

table.AccessFilter.TrustList[0]=10.6.10.23
V3

table.AccessFilter.TrustList[1]=10.6.10.62
.3
7

table.AccessFilter.BannedList[0]=10.6.10.1
fo

table.AccessFilter.BannedList[1]=10.6.10.2
rV

table.AccessFilter.Type=BannedList
el
se
n

Set Config Request Example


gS

http://10.0.0.8/cgi-
dn

bin/configManager.cgi?action=setConfig&AccessFilter.Enable=true&AccessFilter.Type=BannedList&Acc
Bh

essFilter.BannedList[0]=10.6.10.1
d

Set Config Response Example


OK

4.8.3 [Config] Network Basic Config


Config Data Params
Name Type R/O Description Example
Network object O network basic config
specified by the interface name, up to
32 inferfaces.
+Hostname char[128] O Hostname and Domain compose a "badak"
network address.
+Domain char[128] O Domain name. "dahua"

General APIs 140


+DefaultInterfa char[32] O Set default network interface when "eth0"
ce multiple interfaces exist.
Range of interfaces is depends on
GetInterfaces.
+eth0 object O interfcace name eth0
details as follows.
++PhysicalAd char[18] O MAC address of interface. "11:2D:A3:4C:5F:66"
dress HEX string in the form of:
xx:xx:xx:xx:xx:xx.
Range of x is [0-9, a-f, A-F]
Example:
00:10:5c:f2:1c:b4
00:10:5C:F2:1C:B5
++MTU uint O Interface MTU. 1500
++NetMode enumchar[ O Network transmission mode "adapt"
32] enumchar[32]{
DA

"adapt"
HU

"half10M"
A_

"full10M"
HT

"half100M"
TP

"full100M"
_

"full1000M"
AP

"longPoE10M"
I_

"longPoE100M"
V3

}
.3
7

++IPAddress char[40] O Interface IP address. "192.168.0.108"


fo

++SubnetMas char[40] O Network mask string: "255.255.0.0"


rV

k In the form of x.x.x.x, range of x is [0-


el

255]
se
n

Example:
gS

255.255.255.0
dn

++DefaultGate char[40] O "192.168.0.1"


Gateway IP address.
Bh

way
d

++DhcpEnabl bool O false


Enable/Disable DHCP.
e
++EnableDhc bool O Enable/Disable true
pReservedIP when dhcp failed, it will continue
sending dhcp request, if it was
enabled.
++DnsServers char[2][40] O IP address of DNS servers ["221.123.33.228",
"221.12.1.228"]
+eth2 object O other interface config, refer to eth0

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Network

General APIs 141


Get Config Response Example
table.Network.DefaultInterface=eth0
table.Network.Domain=ttt
table.Network.Hostname=hhh
table.Network.eth0.DefaultGateway=10.7.0.1
table.Network.eth0.DhcpEnable=false
table.Network.eth0.DnsServers[0]=221.123.33.228
table.Network.eth0.DnsServers[1]=221.12.1.228
table.Network.eth0.IPAddress=10.7.2.3
table.Network.eth0.MTU=1500
table.Network.eth0.PhysicalAddress=00:10:5c:f2:1c:b4
table.Network.eth0.SubnetMask=255.255.0.0

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&NetWork.Domain=ttt&NetWork.eth0.DhcpEnable=true
DA

Set Config Response Example


HU

OK
A_
HT

4.8.4 [Config] PPPoE


TP
_

Config Data Params


AP

Name Type R/O Description Example


I_

PPPoE object O PPPoE


V3

+Enable bool O Enable/Disable PPPoE. true


.3
7

+AuthType enumchar[] O The PPPoE dial-up authentication ["PAP",]


fo

[32] method, which authentication method


rV

to use, is determined by the server. No


el

this field, default to selecting all


se
n

enumchar[][32]{
gS

"PAP"
dn

"CHAP"
Bh

"EAP"
d

}
+UserName char[64] O PPPoE user name. "hz150260"
+Password char[64] O PPPoE user password. "Dont Know"
+Mode char[8] O dial mode "Default"
default Custom
"Default":Use default network card
"Custom": network card specified by
eth
+Eth char[32] O Network card used for current dialing "eth0"
+DefaultPPPo char[8] O The default ppp network card "ppp0"
EInterface
+PPPOE1 object O Other PPPOE dialing configurations
The naming method is:PPPOE1、
PPPOE2、PPPOE3

General APIs 142


++Enable bool O Enable/Disable PPPoE. true
++AuthType enumchar[] O The PPPoE dial-up authentication ["PAP",]
[32] method, which authentication method
to use, is determined by the server. No
this field, default to selecting all
enumchar[][32]{
"PAP"
"CHAP"
"EAP"
}
++UserName char[8] O PPPoE user name. "hz150260"
++Password char[64] O PPPoE user password. "Don’t Know"
++Mode char[8] O dial mode "Custom"
default Custom
"Default":Use default network card
"Custom": network card specified by
DA

eth
HU

++Eth char[32] O Network card used for current dialing "eth1"


A_
HT

Get Config Request Example


TP

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=PPPoE
_

Get Config Response Example


AP

table.PPPoE.Enable=true,
I_

table.PPPoE.AuthType[0]=PAP,
V3

table.PPPoE.UserName=hz150260,
.3
7

table.PPPoE.Password=Dont Know,
fo

table.PPPoE.Mode=Default,
rV

table.PPPoE.Eth=eth0,
el

table.PPPoE.DefaultPPPoEInterface=ppp0,
se
n

table.PPPoE.PPPOE1.Enable=true,
gS

table.PPPoE.PPPOE1.AuthType[0]=PAP,
dn

table.PPPoE.PPPOE1.UserName=hz150260,
Bh

table.PPPoE.PPPOE1.Password=Don’t Know,
d

table.PPPoE.PPPOE1.Mode=Custom,
table.PPPoE.PPPOE1.Eth=eth1

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&PPPoE.UserName=user1&PPPoE.Password=123456
Set Config Response Example
OK

4.8.5 [Config] DDNS


Config Data Params
Name Type R/O Description Example

General APIs 143


DDNS object[10] O Dynamic Domain Name System
configuration can support multiple
DDNS protocols at the same time. The
maximum number is 10
+Enable bool O Multiple DDNS hostname can be true
configured, but Only one hostname can
be enabled, others should not be
enabled.
+Protocol enumchar[ R DDNS protocol type. "Private DDNS"
32] Range is {
"PRIVATE DDNS": private ddns version
1
"Private DDNS": private ddns version 2
"CN99 DDNS"
"NO-IP DDNS"
"Dyndns DDNS"
DA

"LUPUS DDNS"
HU

"Oray DDNS"
A_

"CP Plus DDNS"


HT

"Ipplus DDNS"
TP

"Q-See DDNS"
_

"SYSDNS DDNS"
AP

"Videotrend DDNS"
I_

"CEPSA DDNS"
V3

"G4IP DDNS"
.3
7

"HOSS DDNS"
fo

"Intelbras DDNS"
rV

"HSY DDNS"
el

"Flir DDNS"
se

"Private P2P DDNS": private ddns for


ngS

P2P
dn

"Mivigilante DDNS"
Bh

"ByDemes DDNS"
d

"DYNDNS OLD DDNS": old dyndns for


storate device
"WATASHI DDNS"
"CNB DDNS"
"Peoplefu DDNS"
"MINT DDNS"
"SPECO DDNS"
"SHANY DDNS"
"WITHCCTV DDNS":
"SONIC DDNS"
"KBVISION DDNS"
"BOSCH DDNS"
}.
+Address char[128] O DDNS server IP address or name. "www.ddns.com"

General APIs 144


+Port uint16 O Range is [1—65535]. 5050
Port of DDNS server
+Password char[64] O DDNS user password "ro238na"
+HostName char[128] O "www.tech.com/IPCam
Hostname of this device.
era1"
+KeepAlive int O Range is [1—65535]. 10
Unit is minutes.
+DefaultHostN object O Only protocol is in range {"Private
ame DDNS", "DHDDNS", "QUICK DDNS"}, it
effects.
++Enable bool O true: use the true
DefaultHostName.HostName
false: use HostName
++HostName char[128] O The default hostname. It cannot be "9002A9D77133.ttt.co
modified. m"
DA

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
HU

are as follows :
A_

Get Config Request Example


HT

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=DDNS
TP

Get Config Response Example


_

table.DDNS[0].Address=www.ttt.com
AP

table.DDNS[0].Enable=true
I_

table.DDNS[0].HostName=www.ttt.com
V3

table.DDNS[0].KeepAlive=10
.3
7

table.DDNS[0].Password=none
fo

table.DDNS[0].Port=5050
rV

table.DDNS[0].Protocol= Quick DDNS


el

table.DDNS[0].UserName=user1
se
n

table.DDNS[0].DefaultHostName.Enable=false
gS

table.DDNS[0].DefaultHostName.HostName=9002A9D77133.ttt.com
dn


Bh
d

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&DDNS[0].Address=www.ttt.com&DDNS[0].Enable=true
Set Config Response Example
OK

4.8.6 [Config] Email


Config Data Params
Name Type R/O Description Example
Email object O email configuration
+Enable bool O Enable/Disable email function true
+SslEnable bool O Is mandatory encryption enabled? false
Both SslEnable and TlsEnable can

General APIs 145


only have one true, usually using port
465
+TlsEnable bool O True: enable Tls email. false
+Address char[128] O SMTP server IP address or name. "www.xxx.com"
+Port uint16 O Range is [1-65535] 25
+UserName char[128] O User name of email account. "anonymity"
+Password char[128] O User password of email account. "none"
+Anonymous bool O Enable/Disable anonymous email. true
+Authenticatio bool O Enable email authentication true
n
+SendAddress char[254] O sender address "[email protected]"
+Receivers char[3][254 O Email addresses of 3 receivers. ["[email protected]",
] "[email protected]"]
+Title char[256] O Title of email. "DVR Message"
+OnlyAttachm bool O Only send emails with attachments false
ent
DA

+AttachEnable bool O Enable/Disable email attachment true


HU

+SendInterv uint O send interval 10


A_

+HealthReport object O report device status by email


HT

++Enable bool O email enable false


TP

++Interval uint O Interval, unit is second 120


_

ranges is 0~86400
AP

+CustomTitle enumchar[] O mail custom title ["IP", "Index", ..]


I_
V3

[32] enumchar[][32]{
"MachineName"
.3
7

"IP"
fo

"Index"
rV

"EventName"
el

}
se
ngS

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
dn

are as follows :
Bh

Get Config Request Example


d

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Email
Get Config Response Example
table.Email.Address=www.ttt.com
table.Email.Anonymous=true
table.Email.AttachEnable=true
table.Email.Enable=true
table.Email.HealthReport.Enable=false
table.Email.HealthReport.Interval=61
table.Email.Password=123456
table.Email.Port=26
table.Email.Receivers[0][email protected]
table.Email.Receivers[1][email protected]
table.Email.Receivers[2][email protected]
[email protected]

General APIs 146


table.Email.SslEnable=false
table.Email.TlsEnable=false
table.Email.Authentication=false
table.Email.OnlyAttachment=false
table.Email.SendInterv=10
table.Email.Title=DVRMessage
table.Email.UserName=anonymity

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&Email.Address=mail.ttt.com&Email.Anonymous=false
Set Config Response Example
OK

4.8.7 [Config] WLan


DA
HU

Config Data Params


A_

Name Type R/O Description Example


HT

WLan object O All wireless network card settings,


TP

specified by the wireless interface


_
AP

name
+eth2 object O wileless interface configuration
I_
V3

++Enable bool O True: Enable WLan on this interface. true


.3

++SSID char[32] O SSID "ttt"


7

++BSSID char[18] O MAC "00:aa:0a:a0:11:23"


fo
rV

++ConnectEn bool O Connect Manually true


able
el
se

++LinkMode enumchar[ O Range is {Auto, Ad-hoc, and "Auto"


n

32] Infrastructure}.
gS

Auto – select suitable mode


dn

automatically.
Bh

Ad-hoc – Device with wireless network


d

adapter can connect to each other


without Access Point.
Infrastructure – Integrate wire and
wireless LAN together to share
network resource, access point is need
in this mode.
++Encryption enumchar[ O Range is {Off, On, WEP64Bits, "Off"
32] WEP128Bits, WPA-PSK-TKIP, WPA-
PSK-CCMP}
Encryption mode
++KeyType enumchar[ O Range is {Hex, ASCII] "Hex"
32]
++KeyID int O Range is [0—3] 0
Indicates which key is used.

General APIs 147


0: WLan.interface.Keys[0] is used.
++Keys char[4][128 O For ASCII key type: 64bits encryption ["password1",
] key length is 5, 128bits encryption key "password2",
length is 13, consists of [0—9, a—z, A— "password3",
Z] "password4"]
For HEX key type: 64bits encryption
key length is 10, 128bits encryption
key length is 26, consists of [0—9, a—
z, A—Z]
++KeyFlag bool O true: key is configured. false
+wlan0 object O other wileless interface
+wlan1 object O other wileless interface

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
DA

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=WLan
HU

Get Config Response Example


A_

table.WLan.eth2.Enable=true
HT

table.WLan.eth2.Encryption=off
TP

table.WLan.eth2.KeyFlag=false
_

table.WLan.eth2.KeyID=0
AP

table.WLan.eth2.KeyType=Hex
I_

table.WLan.eth2.Keys[0]=password1
V3

table.WLan.eth2.Keys[1]=password2
.3
7

table.WLan.eth2.Keys[2]=password3
fo

table.WLan.eth2.Keys[3]=password4
rV

table.WLan.eth2.LinkMode=Auto
el

table.WLan.eth2.SSID=ttt
se
ngS

Set Config Request Example


dn

http://192.168.1.108/cgi-
Bh

bin/configManager.cgi?action=setConfig&WLan.eth2.Enable=true&WLan.eth2.KeyType=Hex
d

Set Config Response Example


OK

4.8.8 Scan Wlan Devices


Request URL http://<server>/cgi-bin/wlan.cgi?action=scanWlanDevices
Method GET
Request Params ( key=value format in url)
Name Type R/O Description Example
SSID char[] O SSID xia_yuguo 13098
Internet
Request Example

General APIs 148


http://192.168.1.108/cgi-bin/wlan.cgi?action=scanWlanDevices&SSID=xia_yuguo 13098 Internet

Response Params ( key=value format in body )


Name Type R/O Description Example
found int R Quantity found 1
wlanDevice object[] O wireless devices
+BSSID char[18] O MAC "00:aa:0a:a0:11:23"
+ApConnecte enumint O connection status 0
d range{
0: not connected
1: connecting
2: connected
}
+ApMaxBitRat uint O The maximum transmission rate 54000000
e supported by the route, in Bps
+ApNetWorkT enumint O ap network type 3
DA

ype range {
HU

0: 11b
A_

1: 11a
HT

2: 11a/n
TP

3: 11b/g
_

4: 11b/g/n
AP

}
I_
V3

+AuthMode int O Authorization mode 0


.3

+BSSID char[18] O MAC "00:aa:0a:a0:11:23"


7

+EncrAlgr enumint O encryption 0


fo
rV

range{
0: NONE
el
se

1: WEP
n

2: TKIP
gS

3: AES(CCMP)
dn

4: TKIP+AES( mix Mode)


Bh

5: UnKnown
d

}
+LinkMode enumint O link mode 0
range{
0: auto
1: adhoc
2: Infrastructure
}
+LinkQuality uint8 O quality, percentage 30
range[0, 100]
+RSSIQuality int8 O Received signal strength in dBm -68
range [-100, 0]
+SSID char[32] O Specified SSID, if not include any "xia_yuguo 13098
SSID, all Wi-Fi information will be Internet"
searched and displayed.

General APIs 149


Response Example
found=1
wlanDevice[0].ApConnected=0
wlanDevice[0].ApMaxBitRate=54000000
wlanDevice[0].ApNetWorkType=255
wlanDevice[0].AuthMode=7
wlanDevice[0].BSSID=28:2c:b2:5c:de:36
wlanDevice[0].EncrAlgr=3
wlanDevice[0].LinkMode=0
wlanDevice[0].LinkQuality=31
wlanDevice[0].RSSIQuality=0
wlanDevice[0].SSID=xia_yuguo 13098 Internet

4.8.9 [Config] UPnP


Config Data Params
DA

Name Type R/O Description Example


HU

UPnP object O UPnP configuration


A_

+Enable bool O Enable/Disable UPNP feature. false


HT

+StartDeviceD bool O Be searched by UPnP true


TP

iscover
_

+Mode enumchar[ O mode "Manual"


AP

32] range{
I_
V3

"Manual"
"Auto"
.3
7

}
fo

+MapTable object[255] O UPNP map table


rV

++Enable bool O Enable/Disable this UPNP map. true


el

++ServiceNa char[64] O User defined UPnP service name. "WebService"


se
n

me
gS

++Protocol enumchar[ O Range is {TCP, UDP] "TCP"


dn

32]
Bh

++InnerPort uint16 O Range is [1—65535]. 80


d

Inner port number


++OuterPort uint16 O Range is [1—65535]. 8080
Outer port number.

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=UPnP
Get Config Response Example
table.UPnP.Enable=true
table.UPnP.MapTable[0].Enable=true
table.UPnP.MapTable[0].InnerPort=80
table.UPnP.MapTable[0].OuterPort=8080
table.UPnP.MapTable[0].Protocol=TCP

General APIs 150


table.UPnP.MapTable[0].ServiceName=HTTP

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&UPnP.Enable=true&UPnP.MapTable[0].Protocol=TCP
Set Config Response Example
OK

4.8.10 Get UPnP Status


Request URL http://<server>/cgi-bin/netApp.cgi?action=getUPnPStatus
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/netApp.cgi?action=getUPnPStatus
DA
HU

Response Params ( key=value format in body )


A_

Name Type R/O Description Example


HT

status object O mapping status


TP

+Working bool O is working true


_
AP

+Status enumchar[ O Enumchar[32]{ "Success"


I_

32] Success
V3

Unknown
.3

Error
7

}
fo
rV

+InnerAddress char[40] O Inner IP "10.6.2.50"


el

+OuterAddres char[40] O Outer IP "200.1.2.8"


se

s
n

+PortMapStat enumchar[] O Port mapping status, ["Success", …,]


gS

us [32] The order is consistent with the order in


dn

MapTable in UpnP configuration.


Bh

Enumchar[32]{
d

Success
Unknown
Failed
}
Response Example
status.InnerAddress=0.0.0.0
status.OuterAddress=0.0.0.0
status.PortMapStatus[0]=Failed
status.PortMapStatus[1]=Failed
status.PortMapStatus[2]=Failed
status.PortMapStatus[3]=Failed
status.Status=Unknown
status.Working=false

General APIs 151


4.8.11 [Config] NTP
Config Data Params
Name Type R/O Description Example
NTP object O NTP
+Enable bool O Enable/Disable true
+Address char[128] O main NTP server address or domain "clock.isc.org"
name
+Port uint16 O port 37
+ServerList object[] O Alternative NTP Server Address List
++Enable bool O Enable/Disable true
++Address char[40] O IP address or domain name 192.168.1.108
++Port uint16 O port 123
+UpdatePerio uint16 O Update cycle, in minutes 30
DA

d 1~65535, 0 indicates non calibration


HU

+Tolerance int O Indicates the tolerance between the set 5


A_

time and the current time, in seconds. If


HT

the set time and the current time are


TP

within the tolerance range, the current


_

time is not updated. 0 means it is


AP

modified every time.


I_

+TimeZone int O time zone 13


V3

{0, 0*3600,"GMT+00:00"},
.3
7

{1, 1*3600,"GMT+01:00"},
fo

{2, 2*3600,"GMT+02:00"},
rV

{3, 3*3600,"GMT+03:00"},
el

{4, 3*3600+1800,"GMT+03:30"},
se
n

{5, 4*3600,"GMT+04:00"},
gS

{6, 4*3600+1800,"GMT+04:30"},
dn

{7, 5*3600,"GMT+05:00"},
Bh

{8, 5*3600+1800,"GMT+05:30"},
d

{9, 5*3600+1800+900,"GMT+05:45"},
{10, 6*3600,"GMT+06:00"},
{11, 6*3600+1800,"GMT+06:30"},
{12, 7*3600,"GMT+07:00"},
{13, 8*3600,"GMT+08:00"},
{14, 9*3600,"GMT+09:00"},
{15, 9*3600+1800,"GMT+09:30"},
{16, 10*3600,"GMT+10:00"}
{17, 11*3600,"GMT+11:00"}
{18, 12*3600,"GMT+12:00"}
{19, 13*3600,"GMT+13:00"}
{20, -1*3600,"GMT-01:00"},
{21, -2*3600,"GMT-02:00"},
{22, -3*3600,"GMT-03:00"},

General APIs 152


{23, -3*3600-1800,"GMT-03:30"},
{24, -4*3600,"GMT-04:00"},
{25, -5*3600,"GMT-05:00"},
{26, -6*3600,"GMT-06:00"},
{27, -7*3600,"GMT-07:00"},
{28, -8*3600,"GMT-08:00"},
{29, -9*3600,"GMT-09:00"},
{30, -10*3600,"GMT-10:00"},
{31, -11*3600,"GMT-11:00"},
{32, -12*3600,"GMT-12:00"},
{33, -4*3600-1800,"GMT-4:30"},
{34, 10.5*3600,"GMT+10:30"},
{35, 14*3600, "GMT+14:00"},
{36,-9*3600-1800,"GMT-09:30"},
{37,8*3600+1800,"GMT+08:30"},
{38,8*3600+2700,"GMT+08:45"},
DA

{39,12*3600+2700,"GMT+12:45"}
HU

+TimeZoneDe char[128] O time zone description "Beijing"


A_

sc
HT
TP

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
_

are as follows :
AP

Get Config Request Example


I_

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=NTP
V3

Get Config Response Example


.3
7

table.NTP.Address=clock.isc.org
fo

table.NTP.Enable=false
rV

table.NTP.Port=38
el

table.NTP.TimeZone=9
se
n

table.NTP.UpdatePeriod=31
gS

table.NTP.ServerList[0].Enable=true,
dn

table.NTP.ServerList[0].Address=192.168.1.108,
Bh

table.NTP.ServerList[0].Port=123
d

table.NTP.Tolerance=5,
table.NTP.TimeZoneDesc=GMT

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&NTP.Address=time.ttt.com&NTP.Enable=true
Set Config Response Example
OK

4.8.12 [Config] RTSP


Config Data Params
Name Type R/O Description Example

General APIs 153


RTSP object O RTSP
+Enable bool O Enable/Disable RTSP. false
+Port uint16 O RTSP port. 554
+RTP object O
++StartPort uint16 O RTP start port. 20000
++EndPort uint16 O RTP end port. 40000

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=RTSP
Get Config Response Example
table.RTSP.Enable=true
table.RTSP.Port=554
table.RTSP.RTP.EndPort=40000
table.RTSP.RTP.StartPort=20000
DA
HU

Set Config Request Example


A_

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RTSP.Enable=true&RTSP.Port=554
HT

Set Config Response Example


TP

OK
_
AP
I_
V3

4.8.13 [Config] Alarm Server


.3
7

Config Data Params


fo
rV

Name Type R/O Description Example


AlarmServer object O alarm server
el
se

+Enable bool O Enable/Disable Alarm server. true


n

+Protocol enumchar[ O enumchar[32]{ "DAHUA"


gS

32] "DAHUA"
dn

"BOSCH"
Bh

"DAHUA_CLOUD"
d

}
+Address char[128] O IP address "www.dahuatech.com"
+Port uint16 O port 37777
+EthernetNam char[32] O The network card name "3G"
e
+UserName char[64] O user name "anonymity"
+Password char[64] O password "none"
+ReportWeek int O -1 means not to report, 0-6 means to 4
Day report regularly from Sunday to
Saturday, and 7 means to report
regularly every day
+ReportTime char[32] O Regular report time "12:00:00"

General APIs 154


Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=AlarmServer
Get Config Response Example
table.AlarmServer.Address=10.7.8.9
table.AlarmServer.Enable=false
table.AlarmServer.Password=
table.AlarmServer.Port=8888
table.AlarmServer.Protocol=ttt
table.AlarmServer.ReportTime=02:00:00
table.AlarmServer.ReportWeekDay=2
table.AlarmServer.UserName=admin

Set Config Request Example


http://192.168.1.108/cgi-
DA

bin/configManager.cgi?action=setConfig&AlarmServer.Address=as.ttt.com&AlarmServer.Enable=false
HU

Set Config Response Example


A_

OK
HT
TP

4.8.14 [Config] Onvif Service Authorization


_ AP

Config Data Params


I_

Name Type R/O Description Example


V3

UserGlobal object O global configuration


.3
7

+OnvifLoginC bool O If "OnvifLoginCheck" is false, you can true


fo

heck get Onvif service directly; if true, you


rV

should enter your ID/username and


el

password.
se
n gS

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
dn

are as follows :
Bh

Get Config Request Example


d

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=UserGlobal
Get Config Response Example
table.UserGlobal.OnvifLoginCheck=false

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCheck=true
Set Config Response Example
OK

4.8.15 [Config] SSHD Config


Config Data Params
Name Type R/O Description Example
SSHD object O

General APIs 155


+Enable bool R enable/disable false
default false
+Port uint16 R sshd listen port , default 22 22

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=SSHD
Get Config Response Example
table.SSHD.Enable=true
table.SSHD.Port=22

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&SSHD.Enable=true&SSHD.Port=22
Set Config Response Example
OK
DA
HU
A_

4.8.16 [Config] Cellular Network Traffic Packages


HT
TP

Config Data Params


_

Name Type R/O Description Example


AP

CellularFlux object O Configure cellular network traffic


I_
V3

packages.
.3

+3G object O Connect cellular network.


7

Supports 4 cellular modules. Single


fo

module: 3G; multiple modules: 3G, 3G1,


rV

3G2, and 3G3.


el

Notes: Considering the compatibility, the


se
n

3G naming is reserved, which can


gS

actually represent 4G and 5G network


dn

adapters.
Bh

++SIM1 object O Configure the traffic package of the first


d

SIM card. If there is a second one, it will


be named SIM2, and the third one will be
named SIM3.
+++Enable bool O Enable traffic strategy. false
+++MonthFlux object O Configure monthly traffic.
++++FluxUp uint32 O The upper limit of traffic usage 299
++++FluxUpUnit char[32] O The upper limit unit of traffic usage. GB "GB"
and MB are available.
++++FluxWarn uint32 O The upper limit of traffic reminders 99
++++FluxWarnUn char[32] O The upper limit unit of traffic reminders. "GB"
it GB and MB are available.
++++FluxStartDa uint32 O The digit indicates what day the package 1
y starts every month.

General APIs 156


Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific
examples are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=CellularFlux
Get Config Response Example
table.CellularFlux.3G.SIM1.Enable=true
table.CellularFlux.3G.SIM1.MonthFlux.FluxStartDay=1
table.CellularFlux.3G.SIM1.MonthFlux.FluxUp=299
table.CellularFlux.3G.SIM1.MonthFlux.FluxUpUnit=GB
table.CellularFlux.3G.SIM1.MonthFlux.FluxWarn=99
table.CellularFlux.3G.SIM1.MonthFlux.FluxWarnUnit=GB

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&CellularFlux.3G.SIM1.Enable=true&CellularFlux.3G.SIM1.
DA

MonthFlux.FluxStartDay=1&CellularFlux.3G.SIM1.MonthFlux.FluxUp=299&CellularFlux.3G.SIM1.Mo
nthFlux.FluxUpUnit=GB&CellularFlux.3G.SIM1.MonthFlux.FluxWarn=99&CellularFlux.3G.SIM1.Mont
HU

hFlux.FluxWarnUnit=GB
A_

Set Config Response Example


HT

OK
TP
_

4.8.17 Obtaining the Traffic Information of Current Month


AP
I_
V3

Acquiring the traffic information of current month


.3

Request URL http://<server>/cgi-bin/api/DataFlux/getFlux


7

Method POST
fo
rV

Request Params ( JSON format in body )


el

Name Type R/O Description Example


se

card char[32] R The key value of the first-level node "3G"


n gS

under Wireless. For earlier devices,


it represents the SIM card number;
dn

For new devices, it represents the


Bh

module name. The specific values


d

are:
enumchar[32]{
3G
3G1
3G2
3G3
}
Single card/module: 3G; Multiple
cards/modules: 3G, 3G1, 3G2, and
3G3.
SimName char[32] O SIM card name. The first SIM card "SIM1"
is SIM1, the second SIM2, and the
third SIM3.

General APIs 157


ICCID char[24] O IC card identification code (namely
SIM card number). It consists of 20
digits.
Request Example
{
"card": "3G",
"SimName": "SIM1",
"ICCID": "898607E2112251029357"
}

Response Params ( JSON format in body )


Name Type R/O Description Example
info object R Traffic information.
+LastMonthTotal uint R The total traffic of the last month. 8000
Flux Unit: 0.1 kb.
+totalFlux uint R Total traffic = uplink traffic + 8000
DA

downlink traffic. Unit: 0.1 kb.


HU

+SendFlux uint R Uplink traffic. Unit: 0.1 kb. 3000


A_

+RecvFlux uint R Downlink traffic. Unit: 0.1 kb. 5000


HT

+Time string R Total traffic write time. "2014-01-


TP

YYYY-MM-DD hh:mm:ss 01 14:01:01"


_ AP

+Record object[] R Traffic records in the last seven


I_

days.
V3

++Date string R Date. "2014-01-01"


.3

++DaySendFlux uint R Uplink traffic of the day. Unit: 0.1 3000


7

kb.
fo
rV

++DayRecvFlux uint R Downlink traffic of the day. Unit: 0.1 3000


el

kb.
se

++DayTotalFlux uint64 O The total traffic of the day. Unit: 8000


n gS

Byte.
++MonthTotalFlu uint64 O The total traffic of the month. Unit: 8000
dn

x Byte.
Bh

Response Example
d

{
"info": {
LastMonthTotalFlux" : 8000,
"totalFlux" : 8000,
"SendFlux": 3000,
"RecvFlux": 5000,
"Time": "2014-01-01 14:01:01",
"Record" : [{
"Date": "2014-01-01",
"DaySendFlux" : 3000,
"DayRecvFlux" : 3000,
"DayTotalFlux" : 8000,

General APIs 158


"MonthTotalFlux" : 8000
}, …, {}]
}
}

4.8.18 Searching for History Traffic Statistics According to Specified


Conditions
Searching for history traffic statistics by specified conditions.
Request URL http://<server>/cgi-bin/api/DataFlux/queryHistoryFlux
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
condition object R Search condition
DA

+Card char[32] R The key value of the first-level node "3G"


HU

under Wireless. For earlier devices, it


A_

represents the SIM card number; For


HT

new devices, it represents the


TP

module name. The specific values


_

are:
AP

enumchar[32]{
I_
V3

3G
.3

3G1
7

3G2
fo

3G3
rV

}
el
se

Single card/module: 3G; Multiple


n

cards/modules: 3G, 3G1, 3G2, and


gS

3G3.
dn

+SimName char[32] O SIM card name. The first SIM card is "SIM1"
Bh

SIM1, the second SIM2, and the third


d

SIM3.
+ICCID char[24] O IC card identification code (namely "898601168360145
SIM card number). It consists of 20 32534"
digits.
Mode char[32] R Search modes: "day"
enumchar[32]{
month: Search by month
day: Search by day
hour: Search by hour
}
+StartTime char[20] O Start time of statistics "2021-01-01
00:00:00"
+EndTime char[20] O End time of statistics "2021-04-01
00:00:00"

General APIs 159


Request Example
{
"condition": {
"Card": "3G",
"Mode": "month",
"StartTime": "2022-08-01 00:00:00",
"EndTime": "2022-09-30 23:59:59",
"SimName": "SIM1",
"ICCID": "898607E2112251029357"
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
info object O Search results
+TotalFlux uint64 R Total traffic = uplink traffic + downlink 1299700
DA

traffic. Unit: 0.1 Byte.


HU

+SendFlux uint64 R The total uplink traffic in the 70305


A_

statistical time interval. Unit: Byte.


HT

+RecvFlux uint64 R The total downlink traffic in the 1229395


TP

statistical time interval. Unit: Byte.


_

+Time string R Data update time. "2021-03-


AP

YYYY-MM-DD hh::mm:ss 31 00:00:00"


I_
V3

+Record object[] R Traffic statistic records. maximum 31


.3

entries for variable length array.


7

++Date string R Year/month/day. "2014-01-01"


fo
rV

YYYY-MM-DD
++SendFlux uint64 R Uplink traffic of the year/month/day. 70305
el
se

Unit: Byte.
n

++RecvFlux uint64 R Uplink traffic of the year/month/day. 1229395


gS

Unit: Byte.
dn

++TotalFlux uint64 O The total traffic in the current 8000


Bh

statistical period. Unit: Byte.


d

++StartTime string O Start time of this entry. "2010-05-


YYYY-MM-DD hh:mm:ss 25 00:00:00"
Response Example
{
"info": {
"TotalFlux": 1299700,
"SendFlux": 70305,
"RecvFlux": 1229395,
"Time": "2021-03-31 00:00:00",
"Record": [
{
"Date": "2021-03-31",

General APIs 160


"StartTime": "2022-09-01 00:00:00",
"SendFlux": 70305,
"RecvFlux": 1229395,
"TotalFlux": 0
},…{} ]
}
}

4.8.19 [Config]Configuring General Settings of RTMP


The function is the same as RTMP, but the rules for generating Channel ID in URL are different.
Existing requirements: The customer requires that the URL of RTMP connection can be directly
managed on NVR web page. At the same time, when the related URL cannot be connected
successfully, the URL can be automatically obtained from the management platform by using HTTPS
interaction for updating, so the following two fields need to be added on the basis of RTMP_NVR
configuration: URL: Configure and manage the URL of the main and sub streams on NVR. Key: Enter
DA

this filed when using signaling to interact with the management platform. Note: Although the
HU

configuration name is RTMP_NVR, both NVR and IPC will use this configuration, which is a general
A_

configuration.
HT

Config Data Params


TP

Name Type R/O Description Example


_

RTMP_NVR object O Both IPC and NVR are using the general
AP

configuration of RTMP.
I_

+Enable bool O Enable the function. false


V3

+Address char[40] O RTMP server address "192.168.1.108"


.3
7

+Port uint16 O RTMP server port 5500


fo

+CustomPath char[64] O Custom path name "live"


rV

+StreamPath char[64] O Stream path prefix. Different channels "liveStream"


el

are distinguished by suffix numbers.


se
n

+Key char[64] O Used to connect to the cloud server to "axklala"


gS

obtain the key needed for RTMP


dn

address.
Bh

+Main object[] O
d

It is an array. Each element represents


the configuration of a video channel.
++Enable bool O Enable the function. false
++ChannelID uint O Custom channel ID. 2
Channel ID in URL.
++Url char[256] O URL of RTMP connection "rtmp://livepush.myqcl
oud.com/live/camera
001"
+Extra object[] O Sub stream 1.
It is an array. Each element represents
the configuration of a video channel.
++Enable bool O Enable the function. false
++ChannelID uint O Custom channel ID. 1
Channel ID in URL.

General APIs 161


++Url char[256] O URL of RTMP connection "rtmp://livepush.myqcl
oud.com/live/camera
001"
+Extra2 object[] O Sub stream 2.
It is an array. Each element represents
the configuration of a video channel.
++Enable bool O Enable the function. false
++ChannelID uint O Custom channel ID. 1
Channel ID in URL.
++Url char[256] O URL of RTMP connection "rtmp://livepush.myqcl
oud.com/live/camera
001"
+SSLEncryptE bool O Enable SSL encryption or not. false
nable
+AudioSimulat bool O Enable the audio simulation function for false
ion the audio-free devices or not.
DA
HU

See the following examples to read and modify configurations.


A_

Get Config Request Example


HT

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=RTMP_NVR
TP

Get Config Response Example


_

table.RTMP_NVR.Address=0.0.0.0
AP

table.RTMP_NVR.CustomPath=live
I_

table.RTMP_NVR.Enable=true
V3

table.RTMP_NVR.Extra[0].ChannelID=0
.3
7

table.RTMP_NVR.Extra[0].Enable=false
fo

table.RTMP_NVR.Extra[0].Url=
rV

table.RTMP_NVR.Extra2[0].ChannelID=0
el

table.RTMP_NVR.Extra2[0].Enable=false
se
n

table.RTMP_NVR.Extra2[0].Url=
gS

table.RTMP_NVR.Key=
dn

table.RTMP_NVR.Main[0].ChannelID=0
Bh

table.RTMP_NVR.Main[0].Enable=true
d

table.RTMP_NVR.Main[0].Url=
table.RTMP_NVR.Port=1935
table.RTMP_NVR.StreamPath=liveStream

Set Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&RTMP_NVR.Enable=true
Set Config Response Example
OK

General APIs 162


4.9 Event

4.9.1 [DataType] Event Handler


Config Data Params
Name Type R/O Description Example
<EventName> object/object[] O EventHandler configuration.
The specific type is determined
by the event name. If it is an
array, each element in the array
represents the configuration of
a channel
<EventName> can be:
Alarm
BlindDetct
DA

LossDetect
HU

MotionDetect
A_

LoginFailureAlarm
HT

NetAbort
TP


_

+EventHandler object O linkage handler


AP

++TimeSection TimeSection[w O It's an effective time period for [["1 12:00:00-18:00:00",


I_
V3

d][ts] eventHanlder everyday. "1 19:00:00-20:00:00"],


.3

wd (week day) range is [0—6] ["1 12:00:00-18:00:00",


7

(Sunday—Saturday) "1 19:00:00-20:00:00"],


fo

ts (time section) range is [0-23], ["1 12:00:00-18:00:00",


rV

it's index of time section table. "1 19:00:00-20:00:00"],


el

Format: mask hh:mm:ss- ["1 12:00:00-18:00:00",


se
n

hh:mm:ss "1 19:00:00-20:00:00"],


gS

Mask: {0,1}, hh: [0—24], mm: ["1 12:00:00-18:00:00",


dn

[00—59], ss: [00—59] "1 19:00:00-20:00:00"],


Bh

Mask 0: this time section is not ["1 12:00:00-18:00:00",


d

used. "1 19:00:00-20:00:00"],


Mask 1: this time section is ["1 12:00:00-18:00:00",
used. "1 19:00:00-20:00:00"]]
Example:
TimeSection[1][0]=1 12:00:00-
18:00:00
Means EventHandler is
effective between 12:00:00 and
18:00:00 at Monday.
++RecordEnable bool O Enable/Disable record function. true
++RecordCloud bool O Enable/Disable record cloud true
Enable storage
++RecordChann int[] O record channel list [0, 1, 2]
els

General APIs 163


++RecordLatch int O Range is [10—300]. 10
Unit is seconds, indicates the
time to record after input alarm
is cleared.
++AlarmOutEna bool O Enable/Disable alarm out true
ble function.
++AlarmOutCha int[] O index starts from 0. Range is {0, [1, 4]
nnels 1},
0 — do not output alarm at
alarm out channel
1 — output alarm at alarm out
channel
++AlarmOutLatc int O Range is [10—300]. 10
h Unit is seconds, indicates the
time to output alarm after input
alarm is cleared.
DA

++ExAlarmOutE bool O Enable/Disable extend alarm true


HU

nable out ability


A_

++ExAlarmOutC int[] O [2, 3]


extend alarm out channels
HT

hannels
TP

++PtzLink (char[], int)[] O The first dimension represents [


_

the channel index. ["Preset", 3],


AP

The second dimension ["Tour", 4],


I_
V3

represents actions and values. ["Pattern", 1]


.3

It contains two elements. ]


7

The first is PTZ action linked


fo

with events.
rV

Range is {None, Preset, Tour,


el
se

Pattern}
n

The second is the parameter of


gS

PtzLink[ch][0],
dn

If PtzLink[ch]][0] is
Bh

Preset: this is preset point.


d

Tour: this is tour path number.


Pattern: this is pattern number.
++PtzLinkEnable bool O Enable/Disable PTZ link. true
++SnapshotEna bool O Enable/Disable snapshot true
ble function.
++SnapshotCha int[] O snapshot channel list [2, 4]
nnels
SnapshotPeriod int O Range is [0—255]. 3
Frames between snapshots.
0 means continuously snapshot
for every frame.
++SnapshotTime int O Range is [0—65535] 5
s Snapshot times before stop, 0
means don't stop snapshot.

General APIs 164


++TipEnable bool O Enable/Disable local message true
box tip.
++MailEnable bool O Enable/Disable mail send for true
alarm.
++BeepEnable bool O Enable/Disable beep. true
++Dejitter int O Range is [0—255]. 0
Alarm signal dejitter seconds.
Alarm signal change during this
period is ignored.
++Delay uint O Range is [0—300]. 30
Delay seconds before setting
take effect.
++LightingLink object O LightingLink
+++Enable bool O Enable/Disable LightingLink true
+++FilckerLightT enumchar[32] O Filcker Light Type "WhiteLight"
ype range :"WhiteLight","RedBlueLi
DA

ght"
HU

+++LightLinkTyp enumchar[32] O range:"Filcker","KeepLighting" "Filcker"


A_

e
HT

+++FilckerInteva float O Filcker Inteval Time 5


TP

lTime unit: 0.1s


_ AP

+++FilckerTimes int O Filcker Times, default 5 5


+++LightDuratio uint 10
I_

O Light Duration
V3

n unit: s
.3

+++WhiteLightTi char[][][] O time section


7

meSection
fo
rV

+++LightBright uint O brightness 50


TrigerHttp object
el

O linkage command
se

+TrigerHttpCom char[] R "/cgi-


Uri of linkage command
n

mand bin/eventManager.cgi?"
gS

+TrigerHttpEnabl bool R true


dn

enable linkage command


e
Bh

+TrigerServerNa char[32] R linkage server name in [Config] "server1"


d

me Triger Http User List

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect[0].EventHandler
Get Config Response Example
table.MotionDetect[0].EventHandler.AlarmOut=1
table.MotionDetect[0].EventHandler.AlarmOutChannels[0]=0
table.MotionDetect[0].EventHandler.AlarmOutEnable=true
table.MotionDetect[0].EventHandler.AlarmOutLatch=10
table.MotionDetect[0].EventHandler.BeepEnable=false
table.MotionDetect[0].EventHandler.Dejitter=30

General APIs 165


table.MotionDetect[0].EventHandler.Delay=0
table.MotionDetect[0].EventHandler.ExAlarmOut=1
table.MotionDetect[0].EventHandler.ExAlarmOutChannels[0]=0
table.MotionDetect[0].EventHandler.ExAlarmOutEnable=true
table.MotionDetect[0].EventHandler.LightingLink.Enable=false
table.MotionDetect[0].EventHandler.LightingLink.FilckerIntevalTime=2
table.MotionDetect[0].EventHandler.LightingLink.FilckerLightType=WhiteLight
table.MotionDetect[0].EventHandler.LightingLink.FilckerTimes=5
table.MotionDetect[0].EventHandler.LightingLink.LightDuration=10
table.MotionDetect[0].EventHandler.LightingLink.LightLinkType=Filcker
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[0][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[0][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[0][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[0][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[0][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[0][5]=0 00:00:00-23:59:59
DA

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[1][0]=1 00:00:00-23:59:59
HU

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[1][1]=0 00:00:00-23:59:59
A_

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[1][2]=0 00:00:00-23:59:59
HT

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[1][3]=0 00:00:00-23:59:59
TP

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[1][4]=0 00:00:00-23:59:59
_

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[1][5]=0 00:00:00-23:59:59
AP

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[2][0]=1 00:00:00-23:59:59
I_

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[2][1]=0 00:00:00-23:59:59
V3

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[2][2]=0 00:00:00-23:59:59
.3
7

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[2][3]=0 00:00:00-23:59:59
fo

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[2][4]=0 00:00:00-23:59:59
rV

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[2][5]=0 00:00:00-23:59:59
el

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[3][0]=1 00:00:00-23:59:59
se

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[3][1]=0 00:00:00-23:59:59
n gS

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[3][2]=0 00:00:00-23:59:59
dn

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[3][3]=0 00:00:00-23:59:59
Bh

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[3][4]=0 00:00:00-23:59:59
d

table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[3][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[4][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[4][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[4][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[4][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[4][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[4][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[5][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[5][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[5][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[5][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[5][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[5][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[6][0]=1 00:00:00-23:59:59

General APIs 166


table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[6][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[6][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[6][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[6][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.LightingLink.WhiteLightTimeSection[6][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.MailEnable=false
table.MotionDetect[0].EventHandler.PtzLink[0][0]=None
table.MotionDetect[0].EventHandler.PtzLink[0][1]=0
table.MotionDetect[0].EventHandler.PtzLink[1][0]=None
table.MotionDetect[0].EventHandler.PtzLink[1][1]=0
table.MotionDetect[0].EventHandler.PtzLink[2][0]=None
table.MotionDetect[0].EventHandler.PtzLink[2][1]=0
table.MotionDetect[0].EventHandler.PtzLink[3][0]=None
table.MotionDetect[0].EventHandler.PtzLink[3][1]=0
table.MotionDetect[0].EventHandler.PtzLink[4][0]=None
table.MotionDetect[0].EventHandler.PtzLink[4][1]=0
DA

table.MotionDetect[0].EventHandler.PtzLinkEnable=false
HU

table.MotionDetect[0].EventHandler.Record=1
A_

table.MotionDetect[0].EventHandler.RecordChannels[0]=0
HT

table.MotionDetect[0].EventHandler.RecordEnable=true
TP

table.MotionDetect[0].EventHandler.RecordLatch=10
_

table.MotionDetect[0].EventHandler.Snapshot=1
AP

table.MotionDetect[0].EventHandler.SnapshotChannels[0]=0
I_

table.MotionDetect[0].EventHandler.SnapshotEnable=true
V3

table.MotionDetect[0].EventHandler.SnapshotPeriod=0
.3
7

table.MotionDetect[0].EventHandler.SnapshotTimes=0
fo

table.MotionDetect[0].EventHandler.TimeSection[0][0]=1 00:00:00-23:59:59
rV

table.MotionDetect[0].EventHandler.TimeSection[0][1]=0 00:00:00-23:59:59
el

table.MotionDetect[0].EventHandler.TimeSection[0][2]=0 00:00:00-23:59:59
se

table.MotionDetect[0].EventHandler.TimeSection[0][3]=0 00:00:00-23:59:59
n gS

table.MotionDetect[0].EventHandler.TimeSection[0][4]=0 00:00:00-23:59:59
dn

table.MotionDetect[0].EventHandler.TimeSection[0][5]=0 00:00:00-23:59:59
Bh

table.MotionDetect[0].EventHandler.TimeSection[1][0]=1 00:00:00-23:59:59
d

table.MotionDetect[0].EventHandler.TimeSection[1][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][2]=0 00:00:00-23:59:59

General APIs 167


table.MotionDetect[0].EventHandler.TimeSection[3][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][0]=1 00:00:00-23:59:59
DA

table.MotionDetect[0].EventHandler.TimeSection[6][1]=0 00:00:00-23:59:59
HU

table.MotionDetect[0].EventHandler.TimeSection[6][2]=0 00:00:00-23:59:59
A_

table.MotionDetect[0].EventHandler.TimeSection[6][3]=0 00:00:00-23:59:59
HT

table.MotionDetect[0].EventHandler.TimeSection[6][4]=0 00:00:00-23:59:59
TP

table.MotionDetect[0].EventHandler.TimeSection[6][5]=0 00:00:00-23:59:59
_

table.MotionDetect[0].EventHandler.TipEnable=false
AP

table.MotionDetect[0].EventHandler.Tour=0
I_

table.MotionDetect[0].EventHandler.TourChannels[0]=0
V3

table.MotionDetect[0].EventHandler.TourEnable=false
.3
7
fo

Set Config Request Example


rV

http://192.168.1.108/cgi-
el

bin/configManager.cgi?action=setConfig&Alarm[0].EventHandler.AlarmOutChannels[0]=1&Alarm[0].Eve
se

ntHandler.AlarmOutEnable=true
ngS

Set Config Response Example


dn

OK
Bh
d

4.9.2 [Config] Alarm Event


Config Data Params
Name Type R/O Description Example
Alarm object[] O alarm configuration, array
alarm channel, starts from 0
+Enable bool R Enable/Disable alarm from a input false
channel
+EventHandle EventHand O Setting of EventHandler is described
r ler in SetEventHandler
+Name char[] O Name of alarm input channel. Door1
+SensorType char[] O Range is [NC, NO]. NC
NC: normal close

General APIs 168


NO: normal open

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Alarm
Get Config Response Example
table.Alarm[0].Enable=false
table.Alarm[0].EventHandler….(output of EventHandler is described in GetEventHandler)
table.Alarm[0].Name=Door1
table.Alarm[0].SensorType=NC
table.Alarm[1]….

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Alarm[0].Enable=true
DA

Set Config Response Example


HU

OK
A_
HT
TP

4.9.3 [Config] Alarm Out


_
AP
I_

Config Data Params


V3

Name Type R/O Description Example


.3

AlarmOut object[] O alarm out configuration, array


7

alarm out channel, starts from 0


fo
rV

+Name char[] O Alarm out port name. Beep


+Mode int O Range is {0, 1, 2} 0
el
se

0: automatically alarm
n

1: force alarm
gS

2: close alarm
dn
Bh

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific examples
d

are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=AlarmOut
Get Config Response Example
table.AlarmOut[0].Mode=0
table.AlarmOut[0].Name=Beep

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&AlarmOut[0].Mode=0&AlarmOut[0].Name=port1
Set Config Response Example
OK

General APIs 169


4.9.4 Get Alarm Input Channels
Request URL http://<server>/cgi-bin/alarm.cgi?action=getInSlots
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/alarm.cgi?action=getInSlots

Response Params ( key=value format in body )


Name Type R/O Description Example
result int R alarm in channel number 2
Response Example
result=2
DA
HU
A_

4.9.5 Get Alarm Output Channels


HT
TP

Request URL http://<server>/cgi-bin/alarm.cgi?action=getOutSlots


_
AP

Method GET
I_

Request Params ( none)


V3

Name Type R/O Description Example


.3
7

Request Example
fo

http://192.168.1.108/cgi-bin/alarm.cgi?action=getOutSlots
rV
el

Response Params ( key=value format in body )


se

Name Type R/O Description Example


ngS

result int R alarm output channel number. 1


dn

Response Example
Bh

result=1
d

4.9.6 Get States of Alarm Input Channels


Request URL http://<server>/cgi-bin/alarm.cgi?action=getInState
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/alarm.cgi?action=getInState

Response Params ( key=value format in body )


Name Type R/O Description Example

General APIs 170


result int R A bit in the response result indicates 3
a channel alarm states, result 3
means alarm channel 1 and channel
2 have alarm now.
Response Example
result=3

4.9.7 Get States of Alarm Output Channels


Request URL http://<server>/cgi-bin/alarm.cgi?action=getOutState
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/alarm.cgi?action=getOutState
DA

Response Params ( key=value format in body )


HU

Name Type R/O Description Example


A_

result int R A bit in the response result indicates 1


HT

a channel, result 1 means alarm is


TP

present.
_
AP

Response Example
I_

result=1
V3
.3

4.9.8 [Config] Video Blind Event


7
fo
rV

Config Data Params


el

Name Type R/O Description Example


se

BlindDetect object[] O video blind configuration, array


n gS

video channel, starts from 0


+Enable bool R false
dn

Enable/Disable blind detect feature.


+EventHandle EventHand O Setting of EventHandler is described
Bh

r ler in SetEventHandler
d

+Level int O Range is [1—6]. 3


Sensitivity of blind detection.
1: lowest sensitivity.
6: highest sensitivity.

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=BlindDetect
Get Config Response Example
table.BlindDetect[0].Enable=false
table.BlindDetect[0].EventHandler….(output of EventHandler is described in GetEventHandler)
table.BlindDetect[0]. Level=3

General APIs 171


table.BlindDetect[1]….

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&BlindDetect[0].Enable=true
Set Config Response Example
OK

4.9.9 [Config] Video Loss Event


Config Data Params
Name Type R/O Description Example
LossDetect object[] O video loss configuration, array
video channel, starts from 0
+Enable bool R false
DA

Enable/Disable loss detect feature.


+EventHandle EventHand O Setting of EventHandler is described
HU

r ler in SetEventHandler.
A_
HT

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific
TP

examples are as follows :


_
AP

Get Config Request Example


I_

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=LossDetect
V3

Get Config Response Example


.3

table.LossDetect[0].Enable=false
7

table.LossDetect[0].EventHandler…(output of EventHandler is described in GetEventHandler)


fo
rV

table.LossDetect[1]….

el
se
n

Set Config Request Example


gS

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LossDetect[0].Enable=true
dn

Set Config Response Example


Bh

OK
d

4.9.10 [Config] Login Failure Event


Config Data Params
Name Type R/O Description Example
LoginFailureAl object O login failure event config
arm
+Enable bool R Enable/Disable to notify LoginFailure false
event. Now this event can be linked with
send email and alarm out. The max try
login times can be configured in chapter
SetGeneralConfig.
+EventHandle EventHand O Setting of EventHandler is described in
r ler SetEventHandler.

General APIs 172


Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific
examples are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=LossDetect
Get Config Response Example
table.LoginFailureAlarm.Enable=false
table.LoginFailureAlarm.EventHandler…(output of EventHandler is described in GetEventHandler)

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LoginFailureAlarm.Enable=true
Set Config Response Example
OK

4.9.11 [Config] Storage Not Exist Event


DA

Config Data Params


HU

Name Type R/O Description Example


A_

StorageNotExi object O storage not exist event config


HT

st
TP

+Enable bool R Enable/Disable false


_

+EventHandle EventHand O Setting of EventHandler is described


AP

r ler in SetEventHandler.
I_
V3

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific examples
.3
7

are as follows :
fo

Get Config Request Example


rV

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=StorageNotExist
el

Get Config Response Example


se
n

table.StorageNotExist.Enable=false
gS

table.StorageNotExist.EventHandler…(output of EventHandler is described in GetEventHandler)


dn
Bh

Set Config Request Example


d

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageNotExist.Enable=true
Set Config Response Example
OK

4.9.12 [Config] Storage Access Failure Event


Config Data Params
Name Type R/O Description Example
StorageFailure object O storage access failure event config
+Enable bool R Enable/Disable to notify access false
failure event
+EventHandle EventHand O Setting of EventHandler is
r ler described in SetEventHandler.

General APIs 173


Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific
examples are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=StorageFailure
Get Config Response Example
table.StorageFailure.Enable=false
table.StorageFailure.EventHandler…(output of EventHandler is described in GetEventHandler)

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageFailure.Enable=true
Set Config Response Example
OK

4.9.13 [Config] Storage Low Space Event


Config Data Params
DA

Name Type R/O Description Example


HU

StorageLowSp object O storage low space event config


A_

ace
HT

+Enable bool R Enable/Disable to notify low space event false


TP

+EventHandler EventHan O Setting of EventHandler is described in


_

dler SetEventHandler.
AP
I_
V3

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific
examples are as follows :
.3
7

Get Config Request Example


fo

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=StorageLowSpace
rV

Get Config Response Example


el

table.StorageLowSpace.Enable=false
se
n

table.StorageLowSpace.EventHandler…(output of EventHandler is described in GetEventHandler)


gS
dn

Set Config Request Example


Bh

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageLowSpace.Enable=true
d

Set Config Response Example


OK

4.9.14 [Config] Net Abort Event


Config Data Params
Name Type R/O Description Example
NetAbort object O net abort event config
+Enable bool R Enable/Disable to notify net abort event false
+EventHandler EventHan O Setting of EventHandler is described in
dler SetEventHandler.

General APIs 174


Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=NetAbort
Get Config Response Example
table.NetAbort.Enable=false
table.NetAbort.EventHandler…(output of EventHandler is described in GetEventHandler)

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetAbort.Enable=true
Set Config Response Example
OK

4.9.15 [Config] IP Conflict Event


Config Data Params
DA

Name Type R/O Description Example


HU

IPConflict object O IP conflict event config


A_

+Enable bool R Enable/Disable to notify IP conflict event false


HT

+EventHandler EventHan O Setting of EventHandler is described in


TP

dler SetEventHandler.
_

+FilterEth char[8][16] O net cards to be filtered ["eth0"]


AP

+SendArpWhe bool O send ARP when IP conflict false


I_
V3

nConflict default false


.3
7

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific examples
fo

are as follows :
rV

Get Config Request Example


el

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=IPConflict
se
n

Get Config Response Example


gS

table.IPConflict.Enable=false
dn

table.IPConflict.EventHandler…(output of EventHandler is described in GetEventHandler)


Bh

table.IPConflict.FilterEth[0]=eth0
d

table.IPConflict.SendArpWhenConflict=false

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&IPConflict.Enable=true
Set Config Response Example
OK

4.9.16 Get Channels Event Happened


Get channels indexes that event of code eventCode happens.
Not all events support this command. Do not recommend to use it, use Attach command instead.
Request URL http://<server>/cgi-bin/eventManager.cgi?action=getEventIndexes
Method GET

General APIs 175


Request Params ( key=value format in url)
Name Type R/O Description Example
code char[] R eventCode includes: AlarmLocal
VideoMotion: motion detection event
VideoLoss: video loss detection
event
VideoBlind: video blind detection
event.
AlarmLocal: alarm detection event.
StorageNotExist: storage not exist event.
StorageFailure: storage failure event.
StorageLowSpace: storage low space
event.
AlarmOutput: alarm output event.
Request Example
http://192.168.1.108/cgi-bin/eventManager.cgi?action=getEventIndexes&code=AlarmLocal
DA
HU

Response Params ( key=value format in body )


A_

Name Type R/O Description Example


HT

channels int[] O The list of channels where the specified [0, 2, 3]


TP

event codes have occurred. The element


_

value is the channel number.


AP

(This response means event happened


I_
V3

on channel 0, channel 2 and channel 3


.3

while video channel index starts from 0)


7

Response Example
fo

channels[0]=0
rV

channels[1]=2
el
se

channels[2]=3
ngS

4.9.17 Subscribe to Event Message


dn
Bh

Subscribe to event messages. For details on the event name and parameters, see the
d

corresponding [Event] sections.


Request URL http://<server>/cgi-bin/eventManager.cgi?action=attach
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
codes string R Event code, can be a list of event cod [ AlarmLocal, VideoM
es or "All" to cover all event codes. otion, VideoLoss, Vid
Here are some frequently used event c eoBlind, FaceDetectio
odes: n ]
VideoMotion: motion detection event
SmartMotionHuman: human smart motio
n detection

General APIs 176


SmartMotionVehicle: Vehicle smart moti
on detection
VideoLoss: video loss detection event
VideoBlind: video blind detection event.
AlarmLocal: alarm detection event.
StorageNotExist: storage not exist even
t.
StorageFailure: storage failure event.
StorageLowSpace: storage low space e
vent.
AlarmOutput: alarm output event.
AudioMutation: intensity change
AudioAnomaly: input abnormal
CrossLineDetection: tripwire event
CrossRegionDetection: intrusion event
LeftDetection: abandoned object detecti
DA

on
HU

TakenAwayDetection: missing object det


A_

ection
HT

VideoAbnormalDetection: scene change


TP

event
_

FaceDetection: face detect event


AP

VideoUnFocus: defocus detect event


I_

WanderDetection: loitering detection eve


V3

nt
.3
7

RioterDetection: People Gathering event


fo

ParkingDetection: parking detection eve


rV

nt
el

MoveDetection: fast moving event


se

HeatImagingTemper: temperature alarm


n gS

event
dn

CrowdDetection: crowd density overrun


Bh

event
d

FireWarning: fire warning event


FireWarningInfo: fire warning specific da
ta info
ObjectPlacementDetection: placement o
bject detection
ObjectRemovalDetection: removal object
detection
AccessControl: Access control event
……
keepalive int O Client keep-alive. If this parameter exist 20
s, the client will send keep-alive data t
o the device at an interval in seconds;
the value range is [1–60].

General APIs 177


The keep-alive data can be "keep alive
" in the form of string.
Note: It is recommended to use the He
artbeat parameter instead of the keepal
ive parameter.
heartbeat int O Server keep-alive; integer; Unit: s; 5
The value range is [1–60].
For example, if the parameter exists in
the URL and the value is 5, the device
will send "heartbeat" to the client as a
keep-alive message.
Note: The keep-alive message must be
sent before the keepalive parameter e
xpires.
Request Example
http://192.168.1.108/cgi-bin/eventManager.cgi?action=attach&codes=[AlarmLocal%2CVideoMotion%
DA

2CVideoLoss%2CVideoBlind%2CFaceDetection]
HU
A_

Response Params ( multipart , key=value format in body , Heartbeat in body )


HT

Name Type R/O Description Example


TP

Code string R Event code VideoBlind


_

action string R Event action Start


AP

Values: Start/Stop/pulse
I_

index int R Number; meaningless sometimes. 0


V3

data object O Event data; json message body. ““


.3
7

For detailed message bodies, see the


fo

corresponding section.
rV

Response Example
el

HTTP/1.1 200 OK
se
n

Cache-Control: no-cache
gS

Pragma: no-cache
dn

Expires: Thu, 01 Dec 2099 16:00:00 GMT


Bh

Connection: close
d

Content-Type: multipart/x-mixed-replace; boundary=myboundary

--myboundary
Content-Type: text/plain
Content-Length: 39

Code=VideoMotion;action=Start;index=0

--myboundary
Content-Type: text/plain
Content-Length: 38

Code=FaceDetection;action=Start;index=0;data={
“Faces”: [ { “BoundingBox”: [2992,136,6960,8192],

General APIs 178


“Sex”: “Man”,
“Age”: 40,
“Feature”: [ “WearGlasses”, “Smile”],
“Eye”: 2,
“Mouth”: 1,
“Mask”: 1,
“Beard”: 2
}, {…}, … ]
}

--myboundary
Content-Type: text/plain
Content-Length: 9

Heartbeat
DA

--myboundary
HU

……
A_
HT

4.9.18 Get Capability of Event Management


TP
_

Request URL http://<server>/cgi-bin/eventManager.cgi?action=getCaps


AP

Method GET
I_

Request Params ( none)


V3

Name Type R/O Description Example


.3
7

Request Example
fo

http://192.168.1.108/cgi-bin/eventManager.cgi?action=getCaps
rV
el

Response Params (key=value format in body)


se
n

Name Type R/O Description Example


gS

caps object O capabilities


dn

+TimeSectionEna bool O default false false


Bh

ble
d

+RecordEnable bool O default false false


+RecordCloudEna bool O default false false
ble
+AlarmOutEnable bool O default false false
+PtzLinkEnable bool O default false false
+SnapshotEnable bool O enable snapshot false
+SnapshotCloudE bool O default false; false
nable
+SnapshotTimes uint32[2] O The first element represents the [3, 10]
minimum value
The second element represents the
maximum value
If this option is not available, it
indicates no restrictions

General APIs 179


+MailEnable bool O support Email false
+BeepEnable bool O support beep false
+DejitterEnable bool O support dejitter false
+TipEnable bool O false
+MonitorTourEnab bool O false
le
+MMSEnable bool O default true false
+SMSEnable bool O default false false
+SupportAlarmBel bool O default false false
l
+SupportAccessC bool O default false false
ontrol
+SipCallEnable bool O default false false
+SupportAlarmSer bool O DVR supports this feature by false
ver default;
IPC does not
DA

+SupportPtzLinkD bool O default false false


HU

elay
A_

+SupportPSTNAla bool O default false false


HT

rmServer
TP

+SupportICR bool O default false false


_

+BeepTime bool O default false false


AP

+DejitterRange object O Dejitter range


I_
V3

++Min int O unit is second 0


++Max int O unit is second 60
.3
7

+AlarmOutLatch int[2] O Alarm output delay [1, 300]


fo

[0,0] for not support


rV

If this option is not available, use [1,


el

300] by default
se
n

+RecordLatch int[2] O [0, 300]


gS

+VoiceEnable bool O default false true


dn

+VoiceLinkTimeR int32[2] O The first element represents the [10, 30]


Bh

ange minimum value


d

The second element represents the


maximum value
+VoicePlayTimes uint16[2] O The first element represents the [1, 10]
Range minimum value
The second element represents the
maximum value
+VoiceLinkFileOpt bool O default true true
ional
+LogEnable bool O default false true
+SupportLightCon bool O default false false
trol
+LinkLightBrightR int32[2] O Range of lighting linkage brightness [0,100]
ange adjustment

General APIs 180


The first element represents the
minimum value
The second element represents the
maximum value
If this option is not available, it
indicates that brightness
adjustment is not supported
+SupportVideoMa bool O default false false
trix
+LinkDetailCamer bool O Does it support linkage with detail false
aEnable camera
+SupportHTTPUpl object O Does it support reporting business
oad data to the server through the
HTTP protocol
++PictureHttpUplo bool O Does it support reporting picture false
adEnable data to the server through the
DA

HTTP protocol
HU

++EventHttpUploa bool O Does it support reporting event false


A_

dEnable data to the server through the


HT

HTTP protocol
TP

+SMSEnable bool O whether support SMS false


_

Response Example
AP

caps.AlarmOutEnable=true
I_

caps.BeepEnable=true
V3

caps.DejitterEnable=true
.3
7

caps.MMSEnable=true
fo

caps.MailEnable=true
rV

caps.MonitorTourEnable=true
el

caps.PtzLinkEnable=true
se
n

caps.RecordEnable=true
gS

caps.SnapshotEnable=true
dn

caps.TimeSectionEnable=true
Bh

caps.TipEnable=true
d

caps.RecordCloudEnable=true,
caps.SnapshotCloudEnable=false,
caps.SnapshotTimes[0]=3,
caps.SnapshotTimes[1]=10,
caps.SupportAlarmBell=false,
caps.SupportAccessControl=false,
caps.SipCallEnable=false,
caps.SupportAlarmServer=false,
caps.SupportPtzLinkDelay=false,
caps.SupportPSTNAlarmServer=false,
caps.SupportICR=false,
caps.BeepTime=false,
caps.DejitterRange.Min=0,
caps.DejitterRange.Max=60

General APIs 181


caps.AlarmOutLatch[0]=1,
caps.AlarmOutLatch[1]=300,
caps.RecordLatch[0]=0,
caps.RecordLatch[1]=300,
caps.VoiceEnable=true,
caps.VoiceLinkTimeRange[0]=10,
caps.VoiceLinkTimeRange[1]=30,
caps.VoicePlayTimesRange[0]=1,
caps.VoicePlayTimesRange[1]=10,
caps.VoiceLinkFileOptional=true,
caps.LogEnable=true,
caps.SupportLightControl=false,
caps.LinkLightBrightRange[0]=0,
caps.LinkLightBrightRange[1]=100,
caps.SupportVideoMatrix=false,
caps.LinkDetailCameraEnable=false,
DA

caps.SupportDisableLinkage[0]=0
HU

caps.SupportDisableLinkage[1]=0
A_

caps.SupportDisableLinkage[2]=0
HT

caps.SupportDisableLinkage[3]=0
TP

caps.SupportHTTPUpload.PictureHttpUploadEnable=false
_

caps.SupportHTTPUpload.EventHttpUploadEnable=false
AP
I_

4.9.19 [Config] Net Alarm Event


V3
.3
7

Net alarm event configuration parameters:


fo

Config Data Params


rV

Name Type R/O Description Example


el
se

Network alarm; one-dimensional


n

array.
gS

NetAlarm object[] R The array index represents the


dn

corresponding channel which starts


Bh

from 0.
d

+Enable bool O Enable alarm input (bypass switch) true


Type of the protection zone "Intime"
enumchar[32]{
"Intime": Real-time protection zone
+DefenceAreaTy "Delay": Time-delay protection zone
string O
pe "Fullday": 24-hour protection zone
Get the capability set to judge the
protection zone type.
}
Delay disarming time 30
Unit: s
+DisableDelay integer O
Get the maximum delay time from
the capability set.

General APIs 182


Effective when EnableAlways is
selected or when the EnableControl
is set to Normal.
Others:
Effective only when the protection
zone type is Delay.
Delay arming time 30
Unit: s
Get the maximum delay time from
+EnableDelay integer O
the capability set.
Effective when the protection zone
type is Delay.
+Name string O Alarm Channel Name "Door"
The sensor is solid on or off. "NC"
enumchar[32]{
+SensorType string O "NC"
DA

"NO"
HU

}
A_

Alarm linkage
HT

+EventHandler object O For linkage configurations, see


TP

SetEventHandler.
_ AP

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
I_
V3

Get Config Request Example


.3

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=NetAlarm
7
fo

Get Config Response Example


rV

table.NetAlarm[0].Enable=false
el

table.NetAlarm[0].Name=channel1
se

table.NetAlarm[0].SensorType=NO
ngS

table.NetAlarm[0].EventHandler= (output of EventHandler is described in GetEventHandler)


dn

Set Config Request Example


Bh

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetAlarm[0].Enable=true
d

Set Config Response Example


OK

4.9.20 Set Net Alarm State


Set the network alarm status.
Request URL http://<server>/cgi-bin/netAlarm.cgi?action=setState
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Sample
channel int R Channel number; access control 1
number; starting from 1
alarm bool R Alarm status; bool; true

General APIs 183


"true" means the alarm is enabled
name string O Alarm name; string; less than 32 101
characters
trigger string O Alarm triggering source; string; less Remote
than 32 characters. For example,
Infrared, WaterSensor Manual and
more
desc string O Alarm description; string; less than Zone8
128 characters
Request Example
http://192.168.1.108/cgi-
bin/netAlarm.cgi?action=setState&channel=1&alarm=true&name=somke&trigger=SmokingSensor&d
esc=Zone8

Response Params ( OK in body )


Response Example
DA

OK
HU
A_

4.9.21 Get Supported Events


HT
TP

Get the event list which the device supports.


_

Request URL http://<server>/cgi-bin/eventManager.cgi?action=getExposureEvents


AP

Method GET
I_

Request Params ( none )


V3

Request Example
.3
7

http://192.168.1.108/cgi-bin/eventManager.cgi?action=getExposureEvents
fo
rV

Response Params ( key=value format in body )


el

Name Type R/O Description Sample


se
n

events string[] R Supported event list; one- [VideoMotion,


gS

dimensional array AlarmLocal,


dn

FaceDetection,
Bh

VideoMotion,…]
d

Response Example
events[0]=VideoMotion
events[1]=AlarmLocal
events[2]=FaceDetection
events[3]=VideoMotion

4.9.22 [Config] Triger Http User List


Cooperate with TrigerHttp in event linkage to obtain username and password. This configuration
requires a privacy processing process.
Config Data Params
Name Type R/O Description Example

General APIs 184


TrigerHttpUserList object[] R user info of TrigerHttp
+TrigerHttpName char[] R user admin "admin"
+TrigerHttpPassword char[] R password "admin"
+TrigerServerName char[32] R linkage server name "Server1"
+TrigerServerIP char[32] R linkage server ip address "0.0.0.0"
+TrigerServerPort uint16 R linkage server port 80
+TrigerHttpsEnable bool R https enable false

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=TrigerHttpUserList
Get Config Response Example
table.TrigerHttpUserList[0].TrigerHttpName=admin
table.TrigerHttpUserList[0].TrigerHttpPassword=admin
table.TrigerHttpUserList[0].TrigerServerName=Server1
DA

table.TrigerHttpUserList[0].TrigerServerIP=0.0.0.0
HU

table.TrigerHttpUserList[0].TrigerServerPort=80
A_

table.TrigerHttpUserList[0].TrigerHttpsEnable=false
HT

table.TrigerHttpUserList[1].TrigerHttpName=admin
TP


_
AP

Set Config Request Example


I_

http://10.0.0.8/cgi-
V3

bin/configManager.cgi?action=setConfig&TrigerHttpUserList[0].TrigerHttpName=admin&TrigerHttpUserL
.3
7

ist[0].TrigerHttpPassword=admin
fo

Set Config Response Example


rV

OK
el
se
ngS

4.10 Record
dn
Bh

4.10.1 Get Capability of Recording


d

Request URL http://<server>/cgi-bin/recordManager.cgi?action=getCaps


Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/recordManager.cgi?action=getCaps

Response Params ( key=value format in body )


Name Type R/O Description Example
caps object R Capabilities
+PacketLengt int[2] O Video packaging time range [1, 120]
hRange in minutes

General APIs 185


The first element of the array
represents the minimum value, and
the second element represents the
maximum value.
default [1, 60]
+PacketSizeR int[2] O Range packaged by file length [1024, 4096]
ange Unit: kb
+SupportExtra bool O if support extra stream record mode true
RecordMode default false
+SupportHolid bool O Does the recording plan support true
ay holiday function
default false
+SupportPack char[][16] O Supported video packaging ["Time", "Size"]
etType methods: Time and Size
+SupportResu bool O Does support broken-point true
meTransmit continuingly-transferring
DA

default false
HU

Response Example
A_

caps.MaxPreRecordTime=30
HT

caps.PacketLengthRange[0]=1
TP

caps.PacketLengthRange[1]=60
_

caps.PacketSizeRange[0]=131072
AP

caps.PacketSizeRange[1]=2097152
I_
V3

caps.SupportExtraRecordMode=true
.3

caps.SupportHoliday=true
7

caps.SupportPacketType[0]=Time
fo

caps.SupportPacketType[1]=Size
rV

caps.SupportResumeTransmit=false
el
se
n gS

4.10.2 [Config] Record Config


dn
Bh

Config Data Params


d

Name Type R/O Description Example


Record object[] O record configuration
array, video channel, starts from 0
+TimeSection char[8][24][ O Array, the first dimension index range is [["15535 00:00:00-
29] [0 — 7] ,[0-6]:(Sunday - 24:00:00",…"15535
Saturday),7:Holiday 00:00:00-
the second dimension index range is 24:00:00"],…[]]
[0—23], time section table index.

Format: mask hh:mm:ss-hh:mm:ss


Mask: [0 — 4294967295], hh: [0 — 24],
mm: [0—59], ss: [0—59]
Mask indicates record type by bits:

General APIs 186


Bit0: regular record
Bit1: motion detection record
Bit2: alarm record
Bit3: card record
+PreRecord uint O Range is [0—300]. 5
Prerecord seconds, 0 means no
prerecord.
channel number starts form 0

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Record
Get Config Response Example
table.Record[0].PreRecord=6
table.Record[0].TimeSection[1][0]=65535 00:00:00-24:00:00
DA

table.Record[0].TimeSection[1][1]=0 02:00:00-24:00:00
HU

table.Record[0].TimeSection[1][2]=0 03:00:00-24:00:00
A_

table.Record[0].TimeSection[1][3]=0 04:00:00-24:00:00
HT

table.Record[0].TimeSection[1][4]=0 05:00:00-24:00:00
TP

table.Record[0].TimeSection[1][5]=0 06:00:00-24:00:00
_
AP

Set Config Request Example


I_

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Record[0].TimeSection[0][0]=6
V3

00:00:00-23:59:59
.3
7

Set Config Response Example


fo

OK
rV
el
se
n

4.10.3 [Config] Record Mode


gS
dn

Config Data Params


Bh

Name Type R/O Description Example


d

RecordMode object[] O array, the index represents video channel,


which starts from 0.
+Mode uint8 O Range is {0, 1, 2 }. 0
0: automatically record
1: manually record
2: stop record.

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=RecordMode
Get Config Response Example
table.RecordMode[0].Mode=0

General APIs 187


Set Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RecordMode[0].Mode=0
Set Config Response Example
OK

4.10.4 [Config] Media Global


Config Data Params
Name Type R/O Description Example
MediaGlobal object O Media global configuration
+PacketType uint8 O package type 0
0- by time
1-by file length
+PacketLengt uint8 O record package time length 60
h in minutes
1~255
DA

+PacketSize uint O record package size,unit:KB 1024


HU

+LogRecord bool O record log false


A_

+LogEncode bool O Record encoding exception logs false


HT

+SnapFormat char[16] O The range is {"MainFormat", "MainFormat"


TP

As "ExtraFormat", "Extra2Format",
_

"Extra3Format"}
AP
I_

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific examples
V3

are as follows :
.3
7

Get Config Request Example


fo

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=MediaGlobal
rV

Get Config Response Example


el

table.MediaGlobal.OverWrite=true,
se
n

table.MediaGlobal.PacketType=0,
gS

table.MediaGlobal.PacketLength=60,
dn

table.MediaGlobal.PacketSize=1024,
Bh

table.MediaGlobal.LogRecord=false,
d

table.MediaGlobal.LogEncode=false,
table.MediaGlobal.SnapFormatAs=MainFormat

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&MediaGlobal.SnapFormatAs=MainFormat
Set Config Response Example
OK

4.10.5 Find Media Files


Create a media files finder.

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=factory.create

General APIs 188


Method GET
Request Params ( none )
Request Example
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=factory.create

Response Params ( key=value format in body )


Name Type R/O Description Sample
result string R objectId; use it to search for 08137
media files
Response Example
result=08137

Start to find media files satisfied the conditions with the finder.

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile


Method GET
Request Params ( key=value format in URL )
DA

Name Type R/O Description Sample


HU

object string R Search object of the media files; 08137


A_

Create the object in the previous


HT

command, and then search for the


TP

object.
_

condition object R user id 101


AP

+Channel int R Channel number; starting from 1 1


I_
V3

+StartTime string O Start time "2010-05-25 12:05:00"


+EndTime string O End time "2010-05-25 12:10:00"
.3
7

+Dirs string[] O The directory where the recordings ["/mnt/dvr/sda0", "/mnt


fo

are saved; array; /dvr/sda1"]


rV

If this parameter does not exist, the


el

system will search for all directories.


se
n

+Types string[] O The type of file that is being searched ["dav"]


gS

for; array; the index starts from 0;


dn

optional values: {"dav", "jpg", "mp4"}


Bh

If this parameter does not exist, the


d

system will search for all file types.


+Flags string[] O Search parameter; array; the index ["Timing"]
starts from 0; optional values:
{"Timing", "Manual", "Marker",
"Event", "Mosaic", "Cutout"}
If this parameter does not exist, the
system will search for all files.
+Events string[] O Events related to the recordings; ["AlarmLocal"]
array; the index starts from 0;
optional values: {"AlarmLocal",
"VideoMotion", "VideoLoss",
"VideoBlind", "Traffic*", …}
If this parameter does not exist, the
system will search for all files.

General APIs 189


+VideoStream string O Stream type; optional values: {"Main", Main
"Extra1", "Extra2", "Extra3"}.
If this parameter does not exist, the
system will search for all stream
types.
+StartTimeRea string O Indicates the UTC time of log start, in "2010-05-
lUTC the format: yyyy-mm-ddThh:mm:ssZ. 25T04:05:00Z"
And (StartTime, EndTime) are
mutually exclusive; If both exist, use
RealUTC time first.
+EndTimeReal string O Indicates the UTC time of log end, in "2010-05-
UTC the format: yyyy-mm-ddThh:mm:ssZ. 25T04:10:00Z"
And (StartTime, EndTime) are
mutually exclusive; If both exist, use
RealUTC time first.
Request Example
DA

http://192.168.1.108/cgi-
HU

bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Channel=1&condition.Dirs[0]=/mnt/dv
A_

r/sda0&condition.Types[0]=dav&condition.Events[0]=AlarmLocal&condition.Events[1]=VideoMotion&c
HT

ondition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-
TP

10%2012:00:00&condition.VideoStream=Main
_
AP
I_

Response Params ( OK in body )


V3

Response Example
.3

OK
7
fo

Get the media file information found by the finder.


rV
el

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile


se

Method GET
n gS

Request Params ( key=value format in URL )


dn

Name Type R/O Description Sample


object string R The search object of the media files; 08137
Bh

Create the object in the previous


d

command, and then search for the


object.
count int R Get the number of files that have been 100
found, and the maximum number is
100.
Request Example
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=100

Response Params ( key=value format in body )


Name Type R/O Description Sample
found int O The returned number of files that 1
have been found.
0 means no file has been found.

General APIs 190


items object[] O List of file information
+Channel int O Channel number; integer; the video 1
channel number starts from 0.
+StartTime string O Start time of the recording 2011-1-1 12:00:00
+EndTime string O End time of the recording 2011-1-1 13:00:00
+Type string O File type dav
+Events string[] O Type of events that are related to the [“AlarmLocal”]
recordings
+VideoStream string O Stream type Main
+FilePath string O /mnt/dvr/sda0/2010/8/
File path
11/dav/15:40:50.jpg
+Length int O The file length within a specified 792
period
+Duration int O File length 3600
Response Example
found=1
DA

items[0].Channel=1
HU

items[0].StartTime=2011-1-1 12:00:00
A_

items[0].EndTime=2011-1-1 13:00:00
HT

items[0].Type=dav
TP

items[0].Events[0]=AlarmLocal
_

items[0].VideoStream=Main
AP

items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
I_

items[0].Length=790
V3

items[0].Duration=3600
.3
7
fo

Close the finder.


rV

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=close


el

Method GET
se
n

Request Params ( key=value format in URL )


gS

Name Type R/O Description Sample


dn

object string R The search object of the media files; 08137


Bh

Create the object in the previous


d

command, and then search for the


object.
Request Example
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=close&object=08137

Response Params ( OK in body )


Response Example
OK

Destroy the finder.

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=destroy


Method GET
Request Params ( key=value format in URL )

General APIs 191


Name Type R/O Description Sample
object string R The search object of the media files; 08137
Create the object in the previous
command, and then search for the
object.
Request Example
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=destroy&object=08137

Response Params ( OK in body )


Response Example
OK

4.10.6 Find media files with FaceDetection info


Create a media files finder.
DA

This API is the same as the API in "4.10.5 Find Media Files".
HU

Start to find media files satisfied the common conditions and FaceDetection condition with
A_

the finder.
HT
TP

Start to find media files satisfied the common conditions and FaceDetection conditions with the finder.
_

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile


AP

Method GET
I_
V3

Request Params ( key=value format in URL )


.3

Name Type R/O Description Sample


7

object string R Search object of the media files; 08137


fo

Create the object in the previous


rV

command, and then search for the


el
se

object.
n

condition object R user id 101


gS

+Channel int R Channel number; starting from 1 1


dn

+StartTime string R Start time "2010-05-25 12:05:00"


Bh

+EndTime string R End time "2010-05-25 12:10:00"


d

+Dirs string[] O The directory where the recordings ["/mnt/dvr/sda0", "/mnt


are saved; array; /dvr/sda1"]
If this parameter does not exist, the
system will search for all directories.
+Types string[] O Search file types, should be "jpg" ["jpg"]
+Flags string[] O Search flags, can be : "Timing", ["Timing", "Event"]
"Manual", "Marker", "Event", "Mosaic",
"Cutout"
should include “Event”
+Events string[] O Search event list, must be one string : ["FaceDetection "]
"FaceDetection"
+DB object R DB filter object
++FaceDetecti
object R DB filter for FaceDetection
onRecordFilter

General APIs 192


Picture type, if omit, means search all "GlobalSence"
type.
"GlobalSence": means big picture of
+++ImageType string O
the full sence,
"Small" : means small picture of the
people face.
Sex, it can be "Man", "Woman", if omit, "Man"
+++Sex string O
search all
+++Age int[] O Age range, ex:[25, 40] 25
Glasses Status, 0: all, 1: not wear, 2: 1
+++Glasses int O
wear
Mask Status, 0: all, 1: not wearing 1
+++Mask int O
mask, 2: wearing mask
Beard Status, 0: all, 1: no beard, 2: 0
+++Beard int O
has beard
Request Example
DA

http://192.168.1.108/cgi-
HU

bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Channel=1&condition.StartTime=201
A_

4-1-1%2012:00:00&condition.EndTime=2015-1-
HT

10%2012:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.Events[0]=FaceDetecti
TP

on&condition.DB.FaceDetectionRecordFilter.ImageType=GlobalSence&condition.DB.FaceDetection
_

RecordFilter.Sex=Man&condition.DB.FaceDetectionRecordFilter.Age[0]=25&condition.DB.FaceDetec
AP

tionRecordFilter.Age[1]=40&condition.DB.FaceDetectionRecordFilter.Glasses=1
I_
V3

Response Params ( OK in body )


.3
7

Response Example
fo

OK
rV
el
se

Get the media file information found by the finder


ngS

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile


dn

Method GET
Bh

Request Params ( key=value format in URL )


d

Name Type R/O Description Sample


object string R The search object of the media files; 08137
Create the object in the previous
command, and then search for the
object.
count int R Get the number of files that have been 100
found, and the maximum number is
100.
Request Example
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=100

Response Params ( key=value format in body )


Name Type R/O Description Sample

General APIs 193


found int O The returned number of files that 1
have been found.
0 means no file has been found.
items object[] O List of file information
+Channel int O Channel number; integer; the video 1
channel number starts from 0.
+StartTime string O Start time of the recording 2011-1-1 12:00:00
+EndTime string O End time of the recording 2011-1-1 13:00:00
+Type string O File type dav
+Events string[] O Type of events that are related to the [“FaceDetection”]
recordings
+FilePath string O /mnt/dvr/sda0/2010/8/
File path
11/dav/15:40:50.jpg
O File length that cut between start time
+CutLength int
and end time
+Length int O The file length within a specified 792
DA

period
HU

+SummaryNew object[] R DB record object


A_

DB record name, should be "FaceDetectionRecord


++Key string R
HT

"FaceDetectionRecord" "
TP

++Value object R DB record value


_

Picture type. It can be: GlobalSence


AP

+++ImageType string O
"GlobalSence" , "Small"
I_

+++TimeStamp object O Picture timestamp


V3

++++UTC int O UTC seconds 134652732


.3
7

++++UTCMS int O UTC miliseconds 134


fo

Sex, it can be "Man", "Woman", "Man"


rV

+++Sex string O
"Unknown"
el

+++Age int O Age 30


se
n

Glasses Status, 0: unknown, 1: not 1


gS

+++Glasses int O
wear, 2: wear
dn

Mask Status, 0: unknown, 1: not 2


+++Mask int O
Bh

wearing mask, 2: wearing mask


d

Beard Status, 0: unknown, 1: no 1


+++Beard int O
beard, 2: has beard
Response Example
found=100
items[0].Channel=1
items[0].StartTime=2011-1-1 12:00:00
items[0].EndTime=2011-1-1 13:00:00
items[0].Type=jpg
items[0].Events[0]=FaceDetection
items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
items[0].CutLength=79000
items[0].SummaryNew[0].Key=FaceDetectionRecord
items[0].SummaryNew[0].Value.ImageType=GlobalSence
items[0].SummaryNew[0].Value.TimeStamp.UTC=134652732

General APIs 194


items[0].SummaryNew[0].Value.TimeStamp.UTCMS=134
items[0].SummaryNew[0].Value.Sex=Man
items[0].SummaryNew[0].Value.Age=30
items[0].SummaryNew[0].Value.Glasses=1
items[0].SummaryNew[0].Value.Mask=2
items[0].SummaryNew[0].Value.Beard=1

Close the finder.

This API is the same as the API in "4.10.5 Find Media Files".

Destroy the finder.

This API is the same as the API in "4.10.5 Find Media Files".

4.10.7 Find media files with FaceRecognition info


DA

Create a media files finder.


HU

This API is the same as the API in "4.10.5 Find Media Files".
A_
HT

Start to find media files satisfied the common conditions and FaceRecognition conditions
TP

with the finder.


_AP
I_

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile


V3

Method GET
.3

Request Params ( key=value format in URL )


7

Name Type R/O Description Sample


fo
rV

object char[] R Search object of the media files; 08137


el

Create the object in the previous


se

command, and then search for the


ngS

object.
condition object R user id 101
dn

+Channel int R Channel number; starting from 1 1


Bh

+StartTime char[] R Start time "2010-05-25 12:05:00"


d

+EndTime char[] R End time "2010-05-25 12:10:00"


+Dirs char[][] O The directory where the recordings ["/mnt/dvr/sda0", "/mnt
are saved; array; /dvr/sda1"]
If this parameter does not exist, the
system will search for all directories.
Each dir path max string length is
259.
+Types char[][] O Search file types, should be "jpg" ["jpg"]
+Flags char[][] O Search flags, can be : "Timing", ["Timing", "Event"]
"Manual", "Marker", "Event", "Mosaic",
"Cutout"
should include “Event”
+Events char[][] O Search event list, must be one string : ["FaceRecognition"]
"FaceRecognition"

General APIs 195


+DB object R DB filter object
++FaceRecog object R DB filter for FaceRecognition
nitionRecordFil
ter
+++MachineA char[] O Machine address
ddress
+++StartTime char[] R Start time to search, ex: "2010-05-25 "2010-05-25 12:05:00"
12:05:00"
+++EndTime char[] R End time to search, ex: "2010-06-25 "2010-06-25 12:05:00"
12:05:00"
+++Person object O Search condition of history person
and the similar face group person
candidates
++++Name char[] O Person's name, max string length is
15
++++Sex char[] O Sex, can be "Male", "Female", if omit,
DA

search all
HU

++++Birthday char[] O Birthday, max string length is 11, ex:


A_

1990-5-1
HT

++++Country char[] O Country, ISO 3166, string length


TP

should be 2
_

++++Province char[] O Province, max string length is 63


AP

++++City char[] O City, max string length is 63


I_

++++Certificat char[] O Certificate Type. It can be: "IC', "Passport"


V3

eType "Passport", "Unknown"


.3
7

++++ID char[] O Person ID of CertificateType, max


fo

string length is 31
rV

++++GroupID char[] O The identity of the Face Group that


el

this Person in. max string length is 63


se
n

++++Age int[2] O Age range, ex:[25, 40] 30


gS

++++Glasses int O Glasses Status, 0: all, 1: not wear, 2:


dn

wear
Bh

++++Mask int O Mask Status, 0: all, 1: not wearing 1


d

mask, 2: wearing mask


++++Beard int O Beard Status, 0: all, 1: no beard, 2: 2
has beard
+++GroupID char[][] O GroupID list
+++SimilaryRa int[2] O Similary Range, ex: [40, 100] 100
nge
Request Example
http://192.168.1.108/cgi-
bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Channel=1&condition.StartTime=201
4-1-1%2012:00:00&condition.EndTime=2015-1-
10%2012:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.Events[0]=FaceRecogn
ition&condition.DB.FaceRecognitionRecordFilter.RegType=RecSuccess&condition.DB.FaceRecogniti
onRecordFilter.StartTime=2014-1-
1%2012:00:00&condition.DB.FaceRecognitionRecordFilter.EndTime=2015-1-

General APIs 196


10%2012:00:00&condition.DB.FaceRecognitionRecordFilter.Person.Sex=Male&condition.DB.FaceRe
cognitionRecordFilter.Person.Country=CN&condition.DB.FaceRecognitionRecordFilter.Person.Age[0]
=25&condition.DB.FaceRecognitionRecordFilter.Person.Age[1]=40&condition.DB.FaceRecognitionR
ecordFilter.Person.Glasses=1&condition.DB.FaceRecognitionRecordFilter.GroupID[0]=10001&conditi
on.DB.FaceRecognitionRecordFilter.GroupID[1]=10003&condition.DB.FaceRecognitionRecordFilter.
GroupID[2]=10005&condition.DB.FaceRecognitionRecordFilter.SimilaryRange[0]=40&condition.DB.F
aceRecognitionRecordFilter.SimilaryRange[1]=100

Response Params ( OK in body )


Response Example
OK

Get the media file information found by the finder

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile


Method GET
Request Params ( key=value format in URL )
DA

Name Type R/O Description Sample


HU

object string R The search object of the media files; 08137


A_

Create the object in the previous


HT

command, and then search for the


TP

object.
_

count int R Get the number of files that have been 100
AP

found, and the maximum number is


I_

100.
V3

Request Example
.3
7

http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=100
fo
rV

Response Params ( key=value format in body )


el

Name Type R/O Description Sample


se
n

found int O The returned number of files that 1


gS

have been found.


dn

0 means no file has been found.


Bh

items object[] O List of file information


d

+Channel int O Channel number; integer; the video 1


channel number starts from 0.
+StartTime string O Start time of the recording 2011-1-1 12:00:00
+EndTime string O End time of the recording 2011-1-1 13:00:00
+Type string O File type dav
+Events string[] O Type of events that are related to the [“FaceDetection”]
recordings
+FilePath string O /mnt/dvr/sda0/2010/8/
File path
11/dav/15:40:50.jpg
O File length that cut between start time
+CutLength int
and end time
+Length int O The file length within a specified 792
period
+SummaryNew object[] R DB record object

General APIs 197


DB record name, should be
++Key string R
"FaceRecognitionRecord"
++Value object R DB record value
Recognition result, 0 means
recognition failed, no candidates. 1
+++RecResult int O
means recognition success, has
candidates.
+++MachineAdd Machine address, string max length is
string O
ress 259
+++IsGlobalSce
bool O Is the global scene picture or not
ne
+++ImageInfo object O Big picture info
++++Length int O The length of the picture
The file path of the picture, max string
++++FilePath string O
length is 259
+++Object object O The target face info
DA

Sex, it can be "Man", "Woman",


HU

++++Sex string O
"Unknown"
A_

++++Age int O Age


HT

Glasses Status, 0: unknown, 1: not


++++Glasses int O
TP

wear, 2: wear
_

Eye status, 0: not detected, 1: close


AP

++++Eye int O
eye, 2: open eye
I_

Mouth status, 0: not detected, 1: close


V3

++++Mouth int O
mouth, 2: open mouth
.3
7

Mask status, 0: not detected, 1: not


fo

++++Mask int O
wearing mask, 2: wearing mask
rV

Beard status, 0: not detected, 1: no


el

++++Beard int O
beard, 2: has beard
se
n

The info of candidates face from face


gS

+++Candidates object[] O
group.
dn

++++Similarity int O Similarity


Bh

++++Person object O person info


d

+++++Name string O Person Name, max string length is 63


Sex, it can be "Male", "Female",
+++++Sex string O
"Unknown"
The person's birthday, ex: "1980-01-
+++++Birthday string O
01"
Country name, length must be 2, value
+++++Country string O
should be according to ISO3166
Province name, max string length is
+++++Province string O
63
+++++City string O City name, max string length is 63
+++++Certificat Certificate Type. It can be: "IC',
string O
eType "Passport", "Unknown"
Person ID of CertificateType, max
+++++ID string O
string length is 31

General APIs 198


+++++FeatureSt Feature State, 0:Unknown, 1:Failed,
int O
ate 2:OK
Response Example
found=100
items[0].Channel=1
items[0].StartTime=2011-1-1 12:00:00
items[0].EndTime=2011-1-1 13:00:00
items[0].Type=jpg
items[0].Events[0]=FaceRecognition
items[0].FilePath =/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
items[0].Length =790
items[0].SummaryNew[0].Key=FaceRecognitionRecord
items[0].SummaryNew[0].Value.RecResult=1
items[0].SummaryNew[0].Value.MachineAddress=AAA
items[0].SummaryNew[0].Value.IsGlobalScene=true
items[0].SummaryNew[0].Value.ImageInfo.Length=123
DA

items[0].SummaryNew[0].Value.ImageInfo.FilePath=/tmp/1.jpg
HU

items[0].SummaryNew[0].Value.Object.Sex=Man
A_

items[0].SummaryNew[0].Value.Object.Age=40
HT

items[0].SummaryNew[0].Value.Object.Glasses=1
TP

items[0].SummaryNew[0].Value.Object.Eye=2
_

items[0].SummaryNew[0].Value.Object.Mouth=1
AP

items[0].SummaryNew[0].Value.Candidates[0].Similarity=50
I_

items[0].SummaryNew[0].Value.Candidates[0].Person.Name=ZhangSan
V3

items[0].SummaryNew[0].Value.Candidates[0].Person.Birthday=1980-01-01
.3
7

items[0].SummaryNew[0].Value.Candidates[0].Person.Sex=Male
fo

items[0].SummaryNew[0].Value.Candidates[0].Person.Country=CN
rV

items[0].SummaryNew[0].Value.Candidates[0].Person.Province=XXX
el

items[0].SummaryNew[0].Value.Candidates[0].Person.City=YYY
se

items[0].SummaryNew[0].Value.Candidates[0].Person.CertificateType=IC
ngS

items[0].SummaryNew[0].Value.Candidates[0].Person.ID=1234567890
dn

items[0].SummaryNew[0].Value.Candidates[0].Person.FeatureState=0
Bh


d

Close the finder.

This API is the same as the API in "4.10.5 Find Media Files".

Destroy the finder.

This API is the same as the API in "4.10.5 Find Media Files".

4.10.8 Find media files with HumanTrait info


Create a media files finder.

This API is the same as the API in "4.10.5 Find Media Files".

Start to find media files satisfied the common conditions and HumanTrait conditions with
the finder

General APIs 199


Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Sample
object char[] R Search object of the media files; 08137
Create the object in the previous
command, and then search for the
object.
condition object R user id 101
+Channel int R Channel number; starting from 1 1
+StartTime char[] R Start time "2010-05-25 12:05:00"
+EndTime char[] R End time "2010-05-25 12:10:00"
+Dirs char[][] O The directory where the recordings ["/mnt/dvr/sda0", "/mnt
are saved; array; /dvr/sda1"]
If this parameter does not exist, the
system will search for all directories.
DA

Each dir path max string length is


HU

259.
A_

+Types char[][] O Search file types, should be "jpg" ["jpg"]


HT

+Flags char[][] O Search flags, can be : "Timing", ["Timing", "Event"]


TP

"Manual", "Marker", "Event", "Mosaic",


_

"Cutout"
AP

should include "Event"


I_

+Events char[][] O Search event list, must be one string : ["HumanTrait"]


V3

" HumanTrait"
.3
7

+DB object R DB filter object


fo

++HumanTrait
rV

object R DB filter for HumanTrait


RecordFilter
el

+++HumanAttr
se

object R Human attributes


n

ibutes
gS

Coat color, refer to CoatColor in


++++CoatColo array<strin
dn

O 16.1.3.5 [Event] HumanTrait for


r g>
Bh

available values, max array size is 4


d

Coat type, refer to CoatType in


++++CoatType array<int> O 16.1.3.5 [Event] HumanTrait for
available values, max array size is 2
Trousers color, refer to TrousersColor
++++Trousers array<strin
O in 16.1.3.5 [Event] HumanTrait for
Color g>
available values, max array size is 4
Trousers type, refer to TrousersType
++++Trousers
array<int> O in 16.1.3.5 [Event] HumanTrait for
Type
available values, max array size is 2
Has hat or not, 0: all, 1: not has hat, 2:
++++HasHat int O
has hat
Has bag or not, 0: all, 1: not has bag,
++++HasBag int O
2: has bag

General APIs 200


Sex, can be "Man", "Woman", if omit,
++++Sex string O
search all
++++Age array<int> O Age range, ex:[25, 40]
Hair style, 0: all, 1: long hair, 2: short
++++HairStyle int O
hair, 3: ponytail, 4: updo, 5: hiddened
Request Example
http://192.168.1.108/cgi-
bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Channel=1&condition.StartTime=201
4-1-1%2012:00:00&condition.EndTime=2015-1-
10%2012:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.Events[0]=HumanTrait&
condition.DB.HumanTraitRecordFilter.HumanAttributes.CoatColor[0]=White&condition.DB.HumanTrai
tRecordFilter.HumanAttributes.CoatColor[1]=Yellow&condition.DB.HumanTraitRecordFilter.HumanAtt
ributes.CoatType=1&condition.DB.HumanTraitRecordFilter.HumanAttributes.HasHat=2&condition.DB
.HumanTraitRecordFilter.HumanAttributes.Sex=Man&condition.DB.HumanTraitRecordFilter.HumanAt
tributes.Age[0]=30&condition.DB.HumanTraitRecordFilter.HumanAttributes.Age[1]=50&condition.DB.
HumanTraitRecordFilter.HumanAttributes.HairStyle=1
DA
HU

Response Params ( OK in body )


A_

Response Example
HT

OK
TP

Get the media file information found by the finder


_
AP
I_

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile


V3

Method GET
.3
7

Request Params ( key=value format in URL )


fo

Name Type R/O Description Sample


rV

object string R The search object of the media files; 08137


el

Create the object in the previous


se
n

command, and then search for the


gS

object.
dn

count int R Get the number of files that have been 100
Bh

found, and the maximum number is


d

100.
Request Example
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=100

Response Params ( key=value format in body )


Name Type R/O Description Sample
found int O The returned number of files that 1
have been found.
0 means no file has been found.
items object[] O List of file information
+Channel int O Channel number; integer; the video 1
channel number starts from 0.
+StartTime string O Start time of the recording 2011-1-1 12:00:00
+EndTime string O End time of the recording 2011-1-1 13:00:00

General APIs 201


+Type string O File type dav
+Events string[] O Type of events that are related to the [“HumanTrait”]
recordings
+FilePath string O /mnt/dvr/sda0/2010/8/
File path
11/dav/15:40:50.jpg
O File length that cut between start time
+CutLength int
and end time
+Length int O The file length within a specified 792
period
+SummaryNew object R Face info
DB record name, should be "HumanTraitRecord"
++Key string R
"HumanTraitRecord"
++Value object R DB record value
+++HumanAttrib
object O Human attributes
utes
Coat color, refer to CoatColor in
DA

++++CoatColor string O 16.1.3.5 [Event] HumanTrait for


HU

available values,
A_

Coat type, refer to CoatType in


HT

++++CoatType int O 16.1.3.5 [Event] HumanTrait for


TP

available values,
_

Trousers color, refer to TrousersColor


AP

++++TrousersC
string O in 16.1.3.5 [Event] HumanTrait for
I_

olor
available values,
V3

Trousers type, refer to TrousersType


.3

++++TrousersTy
7

int O in 16.1.3.5 [Event] HumanTrait for


fo

pe
available values,
rV

Has hat or not, 0: unknown, 1: not has 1


el

++++HasHat int O
hat, 2: has hat
se
n

Has bag or not, 0: unknown, 1: not has 2


gS

++++HasBag int O
bag, 2: has bag
dn

Sex, can be "Man", "Woman", "Woman"


++++Sex string O
Bh

"Unknown"
d

++++Age int O Age 34


Hair style, 0: unknown, 1: long hair, 2: 3
++++HairStyle int O short hair, 3: ponytail, 4: updo, 5:
hiddened
++++HasUmbrel Has umbrella or not, 0: unknown, 1: 1
int O
la not has umbrella, 2: has umbrella
Bag type, 0: unknown, 1: handbag, 2: 2
++++Bag int O shoulder bag, 3: knapsack, 4: draw-
bar box
Cap style, 0: unknown, 1: normal cap, 1
++++Cap int O
2: helmet
+++FaceAttribut
object O Face attributes
es

General APIs 202


Sex, can be "Man", "Woman", "Woman"
++++Sex string O
"Unknown"
++++Age int O Age
Mask status, 0: not detected, 1: not
++++Mask int O
wearing mask, 2: wearing mask
Beard status, 0: not detected, 1: no 1
++++Beard int O
beard, 2: has beard
Glasses Status, 0: unknown, 1: not 2
++++Glass Int O wearing, 2: normal Glasses, 3: sun
glasses, 4: black frame glasses
Emotion info. It can be: "Unknown", "Unknown"
"Smile", "Anger", "Sadness",
++++Emotion string O "Disgust", "Fear", "Surprise",
"Neutral", "Laugh", "Happy",
"Confused", "Scream", "Lookaside"
Face picture path, max string length is /mnt/2010/8/11/dav/15
DA

+++FacePath string O
259 :40:50.jpg
HU

+++FaceScene Face scene picture path, max string /mnt/2010/8/11/dav/15


string O
A_

Path length is 259 :40:51.jpg


HT

Human picture path, max string length


+++HumanPath string O
TP

is 259
_

+++HumanScen Human scene picture path, max string


AP

string O
ePath length is 259
I_

Response Example
V3

found=100
.3
7

items[0].Channel=1
fo

items[0].StartTime=2011-1-1 12:00:00
rV

items[0].EndTime=2011-1-1 13:00:00
el

items[0].Type=jpg
se
n

items[0].Events[0]=HumanTrait
gS

items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
dn

items[0].Length=790
Bh

items[0].SummaryNew.Key=HumanTraitRecord
d

items[0].SummaryNew.Value.HumanAttributes.CoatColor=White
items[0].SummaryNew.Value.HumanAttributes.CoatType=1
items[0].SummaryNew.Value.HumanAttributes.TrousersColor=Black
items[0].SummaryNew.Value.HumanAttributes.TrousersType=1
items[0].SummaryNew.Value.HumanAttributes.HasHat=2
items[0].SummaryNew.Value.HumanAttributes.HasBag=1
items[0].SummaryNew.Value.HumanAttributes.Sex=Man
items[0].SummaryNew.Value.HumanAttributes.Age=30
items[0].SummaryNew.Value.HumanAttributes.HairStyle=2
items[0].SummaryNew.Value.HumanAttributes.HasUmbrella=1
items[0].SummaryNew.Value.HumanAttributes.Bag=0
items[0].SummaryNew.Value.HumanAttributes.Cap=2
items[0].SummaryNew.Value.FaceAttributes.Sex=Man
items[0].SummaryNew.Value.FaceAttributes.Age=35

General APIs 203


items[0].SummaryNew.Value.FaceAttributes.Mask=0
items[0].SummaryNew.Value.FaceAttributes.Beard=1
items[0].SummaryNew.Value.FaceAttributes.Glass=2
items[0].SummaryNew.Value.FaceAttributes.Emotion=Smile
items[0].SummaryNew.Value.FacePath=/mnt/2010/8/11/dav/15:40:50.jpg
items[0].SummaryNew.Value.FaceScenePath=/mnt/2010/8/11/dav/15:40:51.jpg

Close the finder.

This API is the same as the API in "4.10.5 Find Media Files".

Destroy the finder.

This API is the same as the API in "4.10.5 Find Media Files".

4.10.9 Find media files with TrafficCar info


DA
HU

Create a media files finder.


A_

This API is the same as the API in "4.10.5 Find Media Files".
HT
TP

Start to find media files satisfied the common conditions and TrafficCar conditions with the
_

finder
AP
I_
V3

Start to find media files satisfied the common conditions and TrafficCar conditions with the finder.
.3

Note: some request params can use compare condition, it's value is an array, first item is a string of
7

compare condition type, and the following items are compare values.
fo
rV

Compare condition type can be:


el

"==": means equal, followed with one param, if param type is string, then param value can contain some
se

“*” to match any string.


n

"||": means equal one of the params, followed with one or more params.
gS

"<>": means inside range, followed by two integer param,


dn

"><": means outside range, followed by two integer param,


Bh

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile


d

Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Sample
object string R Search object of the media files; 08137
Create the object in the previous
command, and then search for the
object.
condition object R user id 101
+Channel int R Channel number; starting from 1 1
+StartTime string R Start time "2010-05-25 12:05:00"
+EndTime string R End time "2010-05-25 12:10:00"
+Dirs string[] O The directory where the recordings ["/mnt/dvr/sda0", "/mnt
are saved; array; /dvr/sda1"]

General APIs 204


If this parameter does not exist, the
system will search for all directories.
+Types string[] O Search file types, should be "jpg" ["jpg"]
+Flags string[] O Search flags, can be : "Timing", ["Timing", "Event"]
"Manual", "Marker", "Event", "Mosaic",
"Cutout"
+Events string[] O Search event list
Ignored, use Event under DB param.
+DB object R DB object
++TrafficCar object R DB filter for TrafficCar
+++PlateNumb <compare PlateNumber condition, use compare [ "==", "*888" ]
O
er condition> condition format, ex: [ "==", "*888" ]
<compare Event condition, ex: [ "||",
[ "||", "TrafficGate",
+++Event O
condition> "TrafficGate", "Alarm*" ] "Alarm*" ]
<compare [ "<>", 40, 80 ]
+++Speed O Speed condition, ex: [ "<>", 40, 80 ]
condition>
DA

<compare Plate type condition, use compare ["==", "Armed"]


HU

+++PlateType O
condition> condition format, ex: ["==", "Armed"],
A_

<compare Plate color condition, use compare ["==", "Blue"]


+++PlateColor O
HT

condition> condition format, ex: ["==", "Blue"],


TP

+++VehicleCol <compare Vehicle color condition, use compare ["==", "White"]


O
_

or condition> condition format, ex: ["==", "White"],


AP

Request Example
I_

http://192.168.1.108/cgi-
V3

bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Channel=1&condition.StartTime=201
.3
7

4-1-1%2012:00:00&condition.EndTime=2015-1-
fo

10%2012:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.DB.TrafficCar.PlateNu
rV

mber[0]=%3d%3d&condition.DB.TrafficCar.PlateNumber[1]=%2a888&condition.DB.TrafficCar.Speed[
el

0]=%3c%3e&condition.DB.TrafficCar.Speed[1]=40&condition.DB.TrafficCar.Speed[2]=80&condition.D
se
n

B.TrafficCar.VehicleColor[0]=%3d%3d&condition.DB.TrafficCar.VehicleColor[1]=White
gS
dn

Response Params ( OK in body )


Bh

Response Example
d

OK

Get the media file information found by the finder

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Sample
object string R The search object of the media files; 08137
Create the object in the previous
command, and then search for the
object.

General APIs 205


count int R Get the number of files that have been 100
found, and the maximum number is
100.
Request Example
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=100

Response Params ( key=value format in body )


Name Type R/O Description Sample
found int O The returned number of files that 1
have been found.
0 means no file has been found.
items object[] O List of file information
+Channel int O Channel number; integer; the video 1
channel number starts from 0.
+StartTime string O Start time of the recording 2011-1-1 12:00:00
+EndTime string O End time of the recording 2011-1-1 13:00:00
DA

+Type string O File type dav


HU

+Events string[] O Type of events that are related to the [“TrafficJunction”]


A_

recordings
HT

+FilePath string O /mnt/dvr/sda0/2010/8/


File path
TP

11/dav/15:40:50.jpg
_

O File length that cut between start time


AP

+CutLength int
and end time
I_
V3

+Length int O The file length within a specified 792


period
.3
7

+Summary object R DB record object


fo

++TrafficCar object R TrafficCar record info


rV

+++PlateNumbe A08888
el

string R Car plate number


r
se
n

+++PlateType string O Plate type, Unknown


gS

+++PlateColor string O Plate color, ex: "Yellow", "Blue", … etc Blue


dn

Vehicle color, ex: "Yellow", "Blue", … White


+++VehicleColor string O
Bh

etc
d

+++Country string O Country info. max string length is 19 China


+++Speed int O Vehicle speed, unit is km/hour 70
+++Event string O The event info, ex: “TrafficJunction” TrafficJunction
Response Example
found=100
items[0].Channel=1
items[0].StartTime=2011-1-1 12:00:00
items[0].EndTime=2011-1-1 13:00:00
items[0].Type=jpg
items[0].Events[0]=TrafficJunction
items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
items[0].Length=790
items[0].Summary.TrafficCar.PlateNumber=A08888
items[0].Summary.TrafficCar.PlateType=Unknown

General APIs 206


items[0].Summary.TrafficCar.PlateColor=Blue
items[0].Summary.TrafficCar.VehicleColor=White
items[0].Summary.TrafficCar.Country=China
items[0].Summary.TrafficCar.Speed=70
items[0].Summary.TrafficCar.Event=TrafficJunction

Close the finder.

This API is the same as the API in "4.10.5 Find Media Files".

Destroy the finder.

This API is the same as the API in "4.10.5 Find Media Files".

4.10.10 Find media files with IVS info


DA

Create a media files finder.


HU

This API is the same as the API in "4.10.5 Find Media Files".
A_
HT

Start to find media files satisfied the common conditions and IVS conditions with the finder
TP
_AP

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile


I_

Method GET
V3

Request Params ( key=value format in URL )


.3

Name Type R/O Description Sample


7

object string R Search object of the media files; 08137


fo
rV

Create the object in the previous


el

command, and then search for the


se

object.
n gS

condition object R user id 101


+Channel int R Channel number; starting from 1 1
dn

+StartTime string R Start time "2010-05-25 12:05:00"


Bh

+EndTime string R End time "2010-05-25 12:10:00"


d

+Dirs string[] O The directory where the recordings ["/mnt/dvr/sda0", "/mnt


are saved; array; /dvr/sda1"]
If this parameter does not exist, the
system will search for all directories.
+Types string[] O Search file types ["jpg"]
+Flags string[] O Search flags, can be : "Timing", ["Timing", "Event"]
"Manual", "Marker", "Event", "Mosaic",
"Cutout"
+Events string[] O Search event list
+DB object R DB object
++IVS object R DB filter for IVS
IVS rule condition. It can be: "Cros CrossLineDetection
+++Rule string O
sLineDetection" , "CrossRegionDete

General APIs 207


ction" , "LeftDetection" , "Wander
Detection"
"MoveDetection" , "RioterDetection"
, "CrossFenceDetection" , "TakenA
wayDetection" , "PasteDetection" , "
Preservation" , "StayDetection" , "T
ailDetection"
IVS action. It can be: "Appear" , "Disappear"
+++Action string O
"Disappear" , "Inside" , "Cross"
IVS object type, item in array can be: ["Human", "Vehicle",
+++ObjectTyp array<strin
O "Unknown" , "Human" , "Vehicle" , "NonMotor"]
e g>
"NonMotor"
Request Example
http://192.168.1.108/cgi-
bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Channel=1&condition.StartTime=201
4-1-1%2012:00:00&condition.EndTime=2015-1-
DA

10%2012:00:00&condition.Types[0]=jpg&condition.DB.IVS.Rule=CrossLineDetection&condition.DB.I
HU

VS.Action=Cross&condition.DB.IVS.ObjectType[0]=Human&condition.DB.IVS.ObjectType[1]=NonMot
A_

or
HT
TP

Response Params ( OK in body )


_

Response Example
AP

OK
I_
V3

Get the media file information found by the finder


.3
7

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile


fo

Method GET
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Sample


se
n

object string R The search object of the media files; 08137


gS

Create the object in the previous


dn

command, and then search for the


Bh

object.
d

count int R Get the number of files that have been 100
found, and the maximum number is
100.
Request Example
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=100

Response Params ( key=value format in body )


Name Type R/O Description Sample
found int O The returned number of files that 1
have been found.
0 means no file has been found.
items object[] O List of file information
+Channel int O Channel number; integer; the video 1
channel number starts from 0.

General APIs 208


+StartTime string O Start time of the recording 2011-1-1 12:00:00
+EndTime string O End time of the recording 2011-1-1 13:00:00
+Type string O File type dav
+Events string[] O Type of events that are related to the [“CrossLineDetection”]
recordings
+FilePath string O /mnt/dvr/sda0/2010/8/
File path
11/dav/15:40:50.jpg
O File length that cut between start time
+CutLength int
and end time
+Length int O The file length within a specified 792
period
+Summary object R DB record object
++IVS object R IVS record info
+++Rule string R IVS rule, see above for valid value CrossLineDetection
+++Action string O IVS action, see above for valid value Cross
IVS object type, see above for valid Human
DA

+++ObjectType string O
value
HU

Response Example
A_

found=100
HT

items[0].Channel=1
TP

items[0].StartTime=2011-1-1 12:00:00
_

items[0].EndTime=2011-1-1 13:00:00
AP

items[0].Type=jpg
I_

items[0].Events[0]=CrossLineDetection
V3

items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
.3
7

items[0].Length=790
fo

items[0].Summary.IVS.Rule=CrossLineDetection
rV

items[0].Summary.IVS.Action=Cross
el

items[0].Summary.IVS.ObjectType=Human
se
n


gS

Close the finder.


dn
Bh

This API is the same as the API in "4.10.5 Find Media Files".
d

Destroy the finder.

This API is the same as the API in "4.10.5 Find Media Files".

4.10.11 Find media files with NonMotor info


Create a media files finder.

This API is the same as the API in "4.10.5 Find Media Files".

Start to find media files satisfied the common conditions and NonMotor conditions with the
finder

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile

General APIs 209


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Sample
object string R Search object of the media files; 08137
Create the object in the previous
command, and then search for the
object.
condition object R user id 101
+Channel int R Channel number; starting from 1 1
+StartTime string R Start time "2010-05-25 12:05:00"
+EndTime string R End time "2010-05-25 12:10:00"
+Dirs string[] O The directory where the recordings ["/mnt/dvr/sda0", "/mnt
are saved; array; /dvr/sda1"]
If this parameter does not exist, the
system will search for all directories.
+Types string[] O Search file types ["jpg"]
DA

+Flags string[] O Search flags, can be : "Timing", ["Timing", "Event"]


HU

"Manual", "Marker", "Event", "Mosaic",


A_

"Cutout"
HT

+Events string[] O Search event list


TP

+DB object R DB object


_

++NonMotorR
AP

object R DB filter for NonMotor


ecordFilter
I_

+++NumOfCyc Number of people that cycling, valu 2


V3

int O
ling e can be 1 ~ 3
.3
7

NonMotor color, can be "White" "Brown"


fo

"Orange" "Pink" "Black" "Red"


rV

"Yellow" "Gray" "Blue" "Green"


el

"Purple" "Brown" "Sliver" "Darkviolet"


se
n

"Maroon" "Dimgray" "Whitesmoke"


gS

+++Color string O
"Darkorange" "Mistyrose" "Tomato"
dn

"Olive" "Gold" "Darkolivegreen"


Bh

"Chartreuse" "Greenyellow"
d

"Forestgreen" "Seagreen"
"Deepskyblue" "Cyan" "Other"
NonMotor type, can be : "Non-Motor" "Non-Motor"
"Bicycle" "Tricycle" "Motorcycle"
"DualTriWheelMotorcycle"
"LightMotorcycle"
+++Category string O "EmbassyMotorcycle"
"MarginalMotorcycle"
"AreaoutMotorcycle"
"ForeignMotorcycle" "TrialMotorcycle"
"CoachMotorcycle"
Helmet status, 0 : unknown, 1 : without 1
+++Helmet int O
helmet, 2 : with helmet
Request Example

General APIs 210


GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Chann
el=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-10%2012:00:00&condi
tion.Types[0]=jpg&condition.DB.NonMotorRecordFilter.NumOfCycling=2&condition.DB.NonMotorRec
ordFilter.Color=White&condition.DB.NonMotorRecordFilter.Category=Bicycle&condition.DB.NonMoto
rRecordFilter.Helmet=1

Response Params ( OK in body )


Response Example
OK

Get the media file information found by the finder

Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Sample
DA

object string R The search object of the media files; 08137


HU

Create the object in the previous


A_

command, and then search for the


HT

object.
TP

count int R Get the number of files that have been 100
_

found, and the maximum number is


AP

100.
I_

Request Example
V3

http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=100
.3
7
fo

Response Params ( key=value format in body )


rV

Name Type R/O Description Sample


el

found int O The returned number of files that 1


se
n

have been found.


gS

0 means no file has been found.


dn

items object[] O List of file information


Bh

+Channel int O Channel number; integer; the video 1


d

channel number starts from 0.


+StartTime string O Start time of the recording 2011-1-1 12:00:00
+EndTime string O End time of the recording 2011-1-1 13:00:00
+Type string O File type dav
+Events string[] O Type of events that are related to the [“NonMotorDetect”]
recordings
+FilePath string O /mnt/dvr/sda0/2010/8/
File path
11/dav/15:40:50.jpg
O File length that cut between start time
+CutLength int
and end time
+Length int O The file length within a specified 792
period
+SummaryNew object R DB record object

General APIs 211


DB record name, should be
++Key string R
"NonMotorRecordFilter"
++Value object R DB record value
+++NumOfCycli Number of people that cycling, valu 2
int O
ng e can be 1 ~ 3
NonMotor color, can be "White" White
"Orange" "Pink" "Black" "Red"
"Yellow" "Gray" "Blue" "Green"
"Purple" "Brown" "Sliver" "Darkviolet"
"Maroon" "Dimgray" "Whitesmoke"
+++Color string O
"Darkorange" "Mistyrose" "Tomato"
"Olive" "Gold" "Darkolivegreen"
"Chartreuse" "Greenyellow"
"Forestgreen" "Seagreen"
"Deepskyblue" "Cyan" "Other"
NonMotor type, can be : "Non-Motor" Bicycle
DA

"Bicycle" "Tricycle" "Motorcycle"


HU

"DualTriWheelMotorcycle"
A_

"LightMotorcycle"
HT

+++Category string O "EmbassyMotorcycle"


TP

"MarginalMotorcycle"
_

"AreaoutMotorcycle"
AP

"ForeignMotorcycle" "TrialMotorcycle"
I_

"CoachMotorcycle"
V3

Helmet status, 0 : unknown, 1 : without 1


.3

+++Helmet int O
7

helmet, 2 : with helmet


fo

Response Example
rV

found=100
el

items[0].Channel=1
se
n

items[0].StartTime=2011-1-1 12:00:00
gS

items[0].EndTime=2011-1-1 13:00:00
dn

items[0].Type=jpg
Bh

items[0].Events[0]=NonMotorDetect
d

items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
items[0].Length=790
items[0].SummaryNew.Key=NonMotorRecordFilter
items[0].SummaryNew.Value.NumOfCycling=2
items[0].SummaryNew.Value.Color=White
items[0].SummaryNew.Value.Category=Bicycle
items[0].SummaryNew.Value.Helmet=1

Close the finder.

This API is the same as the API in "4.10.5 Find Media Files".

Destroy the finder.

General APIs 212


This API is the same as the API in "4.10.5 Find Media Files".

4.10.12 Searching for Media Files According to WorkClothesDetection


Create a media files finder.

This API is the same as the API in "4.10.5 Find Media Files".
Start to find media files satisfied the common conditions and NonMotor conditions with
the finder
Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
Method GET
Request Params ( key=value format at URL)
Name Type R/O Description Example
object int32 R Search object of the media files 08137
condition object R Search condition
+Channel int32 R Video channel number; integer; the 1
DA

video channel number starts from


HU

1.
A_

+StartTime string R Start time of the search. "2010-05-25 12:05:00"


HT

+EndTime string R End time of the search. "2010-06-25 12:05:00"


TP

+Types array<st O Type of search file. It should be jpg. ["jpg"]


_

ring>
AP

+Flags array<st O Search condition, including Timing, ["Event"]


I_
V3

ring> Manual, Marker, Event, Mosaic,


.3

and Cutout.
7

It should be Event.
fo

+Events array<st R Search event list. It must be ["WorkClothesDetection"


rV

ring> WorkClothesDetection. ]
el
se

+Dirs array<st O Search directory list. If it does not ["/mnt/dvr/sda0",


n

ring> exist, searches for all directories. "/mnt/dvr/sda1"]


gS

+DB object R The filtering condition object of


dn

database.
Bh

++WorkClothesDet object R The filtering condition object of


d

ection database for


WorkClothesDetection.
+++Helmet object O Safety helmet attribute. If this field
does not exist, it means to search
for attributes of all helmets.
++++HasHelmet enumint R Wearing safety helmet. [1,2]
8[6] enumint8[]{
0: Unknown
1: No
2: Yes
}
++++HelmetColor array<st R Safety helmet color. ["Red","Orange"]
ring> For value range, see the following
ColorEnum.

General APIs 213


++++IsCompliant int32 O Safety helmet alarm mode. 1: 1
Mismatch attributes alarm; 2: Match
attributes alarm.
+++Clothes object O Work uniform attribute. If this field
does not exist, it means to search
for attributes of all wok uniforms. It
is optional.
++++HasClothes enumint R Wearing work uniform. [1, 2]
8[] enumint8[]{
0: Unknown
1: No
2: Yes
}
++++ClothesColor array<st R Work uniform color. ["Red", "Orange"]
ring> For value range, see the following
ColorEnum.
DA

++++HasLegalCloth int32 O Work uniform alarm mode. 1: 1


HU

es Mismatch attributes alarm; 2: Match


A_

attributes alarm.
HT

++++TriggerMode string O Detection mode. Attribute detection: "TypeDetect"


TP

TypeDetect; Registered database:


_

CompareDetect.
AP

+++Mask object O Face mask attribute. If this field


I_
V3

does not exist, it means to search


.3

for attributes of all face masks.


7

++++HasMask int32 O Wearing face mask. 1: No. 2: Yes. 1


fo

+++Type string R Wear type: Safety Helmet: Helmet. "Helmet"


rV

Work uniform: Clothes.


el
se

Normal hat: NormalHat.


n

Face mask: mask.


gS

+++NormalHat object O Normal hat attribute. If this field


dn

does not exist, it means to search


Bh

for attributes of all normal hats.


d

++++HasNormalHat enumint O enumint8[]{ [1,2]


8[256] 0: Unknown
1: Not wearing normal hat
2: Wearing normal hat
}
+++Glasses object O Glasses attribute. If this field does
not exist, it means to search for
attributes of all glasses.
++++HasGlasses int32 O Wearing glasses alarm mode. 0: 0
Triggers an alarm when the target
wears glasses. 1: Triggers an alarm
when the target does not wear
glasses.
Request Example

General APIs 214


GET http://192.168.1.108/cgi-
bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Channel=1&condition.StartTime=2014-
1-1%2012:00:00&condition.EndTime=2015-1-
10%2012:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.Events[0]=WorkClothesDe
tection&condition.DB.WorkClothesDetection.Helmet.HasHelmet[0]=1&condition.DB.WorkClothesDetecti
on.Helmet.HelmetColor[0]=Red&condition.DB.WorkClothesDetection.Type=Helmet

Response Params ( OK in body)


Name Type R/O Description Example
Response Example
OK

Get the media file information found by the finder


Request URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
Method GET
Request Params ( key=value format at URL)
DA

Name Type R/O Description Example


HU

object int32 R Search object of the media files 08137


A_

count int32 R The number of acquired results. It should 15


HT

be less than 100.


TP

Request Example
_
AP

GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=15
I_
V3

Response Params ( key=value format in body)


.3

Name Type R/O Description Example


7
fo

found int32 R The number of searched results. 100


rV

items object[] R Searched result array.


el

+Channel int32 O Video channel number; integer; the video 0


se

channel number starts from 0.


n
gS

+StartTime string R Start time of recording. "2010-05-25 12:05:00"


dn

+EndTime string R End time of recording. "2010-06-25 12:05:00"


+Type string O File type. It should be jpg. jpg
Bh

+Events array<stri O Events related to the recordings. ["WorkClothesDetectio


d

ng> n"]
+FilePath string O File path. It cannot exceed 259 characters. "/mnt/2010/8/11/dav/15
:40:50.jpg"
+CutLength int32 O The file length within a specified period. 79000
+Length int32 O The whole file length. 5536
+SummaryN object[] R Database record object.
ew
++Key string R Database record name. It should be "WorkClothesDetection
WorkClothesDetection. "
++Value object O Database record value.
+++Helmet object O Safety helmet attribute. Required.
++++HasHel enumint8 R Wearing safety helmet 2
met enumint8{

General APIs 215


0: Unknown
1: No
2: Yes
}
++++Helmet string R Safety helmet color. Red
Color For value range, see the following
ColorEnum.
+++Clothes object O Safety helmet attribute.
++++HasClo enumint8 R Wearing work uniform. 2
thes enumint8{
0: Unknown
1: No
2: Yes
}
++++Clothes string R Work uniform color. "Red"
Color For value range, see the following
DA

ColorEnum.
HU

+++HumanP string R Person thumbnail path. "/picid/1.jpg"


A_

ath
HT

+++HumanI uint32 R Image size. Unit: Byte 123


TP

mageLength
_

+++HumanS string R Panoramic image path corresponding to "/picid/1.jpg"


AP

ceneImage the person thumbnail.


I_
V3

+++HumanS uint32 R Image size. Unit: Byte. 123


.3

ceneImageL
7

ength
fo

+++HumanB Rect R Person enclosure box. [ 24, 16, 8152, 8144 ]


rV

oundingBox Rectangular information.


el
se

+++Glasses object O Glasses attribute.


n

++++Glasse enumint R Alarm type for glasses detection. 1


gS

sType enumint{
dn

0: No glasses
Bh

1. Sunglasses
d

2: Black-rimmed glasses
3: Half-frame glasses
4: Rimless glasses
5: Ordinary glasses
6: Industrial goggles
}
++++HasGla int32 R Glasses detection results. 0
sses 0: Compliant
1: Non-compliance
2: Unknown.
Response Example
found=100
items[0].Channel=1
items[0].StartTime=2011-1-1 12:00:00

General APIs 216


items[0].EndTime=2011-1-1 13:00:00
items[0].Type=jpg
items[0].Events[0]=WorkClothesDetection
items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
items[0].CutLength=79000
items[0].Length=5536
items[0].SummaryNew[0].Key=WorkClothesDetection
items[0].SummaryNew[0].Value.Helmet.HasHelmet=2
items[0].SummaryNew[0].Value.Helmet.HelmetColor=Red
items[0].SummaryNew[0].Value.HumanPath=/picid/1.jpg
items[0].SummaryNew[0].Value.HumanImageLength=123
items[0].SummaryNew[0].Value.HumanSceneImage=/picid/1.jpg
items[0].SummaryNew[0].Value.HumanSceneImageLength=123
items[0].SummaryNew[0].Value.HumanBoundingBox[0]=24
items[0].SummaryNew[0].Value.HumanBoundingBox[1]=16
items[0].SummaryNew[0].Value.HumanBoundingBox[2]=8152
DA

items[0].SummaryNew[0].Value.HumanBoundingBox[3]=8144
HU

Close the finder.


A_

This API is the same as the API in "4.10.5 Find Media Files".
HT

Destroy the finder.


TP
_

This API is the same as the API in "4.10.5 Find Media Files".
AP

Appendix:
I_
V3

Name ColorEnum
.3

Type char[16]
7

Parameter Description Remarks


fo
rV

"Other" Unrecognized (unknown color) (254,254,254)


The value of 254 for R or G is dedicated
el
se

to special colors, so be careful to use it


n

separately.
gS

"Unknown" Unknown color (no detection, or it is (254,254,252)


dn

not in the known color range).


Bh

"Black" Black 0,0,0


d

"Silver" Silver 192,192,192


"Gray" Gray 128,128,128
"White" White 255,255,255
"Maroon" Chestnut 128,0,0
"Red" Red 255,0,0
"Purple" Purple 128,0,128
"Fuchsia" Magenta (not supported) 255,0,255
"Green" Green (the RGB value used by the 0,128,0
algorithm for Green is 0, 255, 0).
"Lime" Green (the algorithm names RGB 0,255,0
value (0, 255, 0) as Green, and the
standard name is Lime, so Lime

General APIs 217


can be treated as green in actual
use).
"Olive" Olive 128,128,0
"Yellow" Yellow 255,255,0
"Navy" Navy (not supported) 0,0,128
"Blue" Blue 0,0,255
"Teal" Navy (not supported) 0,128,128
"Aqua" Aqua (not supported) 0,255,255
"Orange" Orange (not supported) 255,165,0
"Pink" Pink 255,192,203
"Brown" Brown 165,42,42
"Darkviolet" Dark violet 148,0,211
"Dimgray" Dark gray 105,105,105
"Whitesmoke" White smoke 245,245,245
"Darkorange" Dark orange 255,140,0
DA

"Mistyrose" Light rosy 255,228,225


"Tomato" Tomato red 255,99,71
HU

"Gold" Gold 255,215,0


A_

"Darkolivegreen" Dark olive green 85,107,47


HT

"Chartreuse" Yellow green 127,255,0


TP

"Greenyellow" Green yellow 173,255,47


_ AP

"Forestgreen" Forest green 34,139,34


I_

"Seagreen" Ocean green 46,139,87


V3

"Deepskyblue" Deep sky blue 0,191,255


.3

"Cyan" Cyan 0,255,255


7
fo

"Lightgreen" Light Green 144,238,144


rV

"Orangered" Orange red (not supported) 255,69,0


el
se
ngS

4.10.13 Download Media File with the File Name


dn
Bh

Download a file by filename. The <Filename> in URL is got by chapter file finding.
d

Request URL http://<server>/cgi-bin/RPC_Loadfile/<Filename>


Method GET
Request Params ( none)
Request Example
http://192.168.1.108/cgi-bin/RPC_Loadfile/mnt/sd/2015-01-08/001/dav/19/19.57.12-
19.58.25[M][0@0][0].dav

Response Params (binary data in body )


<binary data>: Binary data pack
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: Application/octet-stream
Content-Length: xxxx

General APIs 218


<file data>

4.10.14 Download Media File between Times


Download the media data between start time and end time.
Request URL http://<server>/cgi-bin/loadfile.cgi?action=startLoad
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R Channel number; starting from 1 1
startTime string O Start time of the recording in the “2010-05-25 12:05:00”
format of: yyyy-mm-dd hh:mm:ss
Choose between the start and end
times and the standard UTC time.
endTime string O End time of the recording in the “2010-05-25 12:10:00”
DA

format of: yyyy-mm-dd hh:mm:ss


HU

Choose between the start and end


A_

times and the standard UTC time.


HT

startTimeRealUT char[] O UTC time of the recording start. In the "2010-05-


TP

C format of: yyyy-mm-ddThh:mm:ssZ 25T04:05:00Z"


_ AP

And (startTime, endTime) are


mutually exclusive; If both exist, use
I_
V3

RealUTC time first.


.3

endTimeRealUT char[] O UTC time of the recording end. In the "2010-05-


7

C format of: yyyy-mm-ddThh:mm:ssZ 25T04:10:00Z"


fo

And (startTime, endTime) are


rV

mutually exclusive; If both exist, use


el
se

RealUTC time first.


n

subtype int O Stream type. 0


gS

If the parameter does not exist, the


dn

default value is 0.
Bh

0: Main stream
d

1: Sub stream 1
2: Sub stream 2
Types string O The type of files that are being “dav”
searched for
Request Example
http://192.168.1.108/cgi-bin/loadfile.cgi?action=startLoad&channel=1&startTime=2012-10-
8%2013:00:01&endTime=2012-10-8%2014:00:01&subtype=0&Types=dav

Response Params (binary data in body )


<binary data>: Binary data pack
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: Application/octet-stream

General APIs 219


Content-Length: xxxx

<file data>

4.10.15 Encrypted Download Media File with the File Name


Request URL http://<server>/cgi-bin/RecordStreamInterleaved.cgi?action=attachStream
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
/mnt/sd/2019-07-
name of media files which would be
path char[] R 01/001/dav/12/12.36.16-
downloaded.
12.36.26[F][0@0][0].dav
password for encrypting media file "xxxxxxxx"
password char[] O data. if not set password, then use the
preset password
DA

Request Example
HU

http://172.29.2.241/cgi-bin/RecordStreamInterleaved.cgi?action=attachStream&path=/mnt/sd/2019-0
A_

7-01/001/dav/12/12.36.16-12.36.26[F][0@0][0].dav
HT
TP

Response Params ( binary in body )


_

Name Type R/O Description Example


AP

Response Example
I_

HTTP Code: 200 OK


V3

Content-Type: Application/octet-stream
.3
7

Content-Length: <fileLength>
fo

Body:
rV

<data>
el

<data>
se
n gS
dn

4.10.16 Query Total Number of Alarms


Bh
d

Request URL http://<server>/cgi-bin/api/mediaFileFind/getCount


Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
object int32 R The finder object id 08137
Request Example
{
"object": 08137
}

Response Params ( JSON format in body )


Name Type R/O Description Example
count uint32 R total number 100
Response Example

General APIs 220


{
"count": 100
}

4.11 Log

4.11.1 Find Logs


1. Whether or not found logs satisfied the conditions
Request URL http://<server>/cgi-bin/log.cgi?action=startFind
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
condition object O query condition
DA

+StartTime char[20] O the start time of log. Format is: yyyy- "2010-04-01 00:00:00"
HU

mm-dd hh:mm:ss.
A_

+EndTime char[20] O the end time of log. Format is: yyyy- "2010-04-08 00:00:00"
HT

mm-dd hh:mm:ss.
+Type char[] O log type. The range is { "System", "System"
TP
_

"Config", "Event", "Storage",


AP

"Account", "Data", "File",


I_

"CourseRecord" }.
V3

+StartTimeRe char[32] O Indicates the UTC time of log start, in "2010-05-25T04:05:00Z"


.3

alUTC the format: yyyy-mm-ddThh:mm:ssZ.


7
fo

And (StartTimeRealUTC,
rV

EndTimeRealUTC) are mutually


el

exclusive; If both exist, use RealUTC


se

time first.
n
gS

+EndTimeRea char[32] O Indicates the UTC time of log end, in "2010-05-25T04:10:00Z"


dn

lUTC the format: yyyy-mm-ddThh:mm:ssZ.


And (StartTimeRealUTC,
Bh

EndTimeRealUTC) are mutually


d

exclusive; If both exist, use RealUTC


time first.
Request Example
http://192.168.1.108/cgi-bin/log.cgi?action=startFind&condition.StartTime=2011-1-
1%2012:00:00&condition.EndTime=2011-1-10%2012:00:00&condition.StartTimeRealUTC=2011-01-
01T04:00:00Z&condition.EndTimeRealUTC=2011-01-10T04:00:00Z

Response Params (key=value format in body )


Name Type R/O Description Example
token uint O Retrieved query token 1
If the token is greater than 0, it
indicates that the log was found,

General APIs 221


otherwise it indicates that the log was
not found.
count uint O The logcount for the search condition. 100
Response Example
token=1
count=100

2. Get the particular number of logs


Request URL http://<server>/cgi-bin/log.cgi?action=doFind
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
token uint R query token 46878
count uint O the count of logs for this query. 2
Request Example
DA

http://192.168.1.108/cgi-bin/log.cgi?action=doFind&token=1&count=100
HU
A_

Response Params (key=value format in body )


HT

Name Type R/O Description Example


TP

found uint O Count of found log, found is 0 if no log 2


_

is found.
AP

items object[] O items


I_

+RecNo uint O Log number. 789


V3

+Time char[32] O Time of this log. 2011-05-20 11:59:21


.3
7

+TimeRealUTC char[32] O the UTC time of log, in the format: 2011-05-20T03:59:21Z


fo

yyyy-mm-ddThh:mm:ssZ
rV

+Type char[] O Log type. "Account.Login"


el

+User char[] O User name. System


se
n

+Detail object O Log details.


gS

++Compression char[] O compression H.264->MJPG


dn

++Data char[] O data Encode


Bh

Response Example
d

found=2
items[0].RecNo=789
items[0].Time=2011-05-20 11:59:10
items[0].Type=ClearLog
items[0].User=admin
items[1].Detail.Compression=H.264->MJPG
items[1].Detail.Data=Encode
items[1].RecNo=790
items[1].Time=2011-05-20 11:59:21
items[1].TimeRealUTC=2011-05-20T03:59:21Z
items[1].Type=SaveConfig
items[1].User=System

3. Stop query logs

General APIs 222


Request URL http://<server>/cgi-bin/log.cgi?action=stopFind
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
token uint R query token 1
Request Example
http://192.168.1.108/cgi-bin/log.cgi?action=stopFind&token=1

Response Params ( OK in body )


Response Example
OK

4.11.2 Clear All the Logs


Request URL http://<server>/cgi-bin/log.cgi?action=clear
Method GET
DA

Request Params ( none)


HU

Name Type R/O Description Example


A_

Request Example
HT

http://192.168.1.108/cgi-bin/log.cgi?action=clear
TP
_

Response Params ( OK in body )


AP

Response Example
I_
V3

OK
.3
7
fo

4.11.3 Backup Logs


rV
el
se

Request URL http://<server>/cgi-bin/Log.backup?action=All


n

Method GET
gS

Request Params ( key=value format in URL )


dn

Name Type R/O Description Example


Bh

condition object O
d

the start time of log. 24 hour Format, 2014-8-25 00:02:32


+StartTime char[] O
as: yyyy-mm-dd hh:mm:ss.
the end time of log. 24 hour Format, 2014-8-25 01:02:32
+EndTime char[] O
as: yyyy-mm-dd hh:mm:ss.
Request Example
http://192.168.1.108/cgi-bin/Log.backup?action=All&condition.StartTime=2014-8-25%2000:02:32&co
ndition.EndTime=2020-8-25%2001:02:32

Response Params ( binary in body )


Name Type R/O Description Example
Response Example
HTTP/1.1 200 OK
CONTENT-LENGTH: 743087
CONNECTION: close

General APIs 223


Content-type: application/binarytet-stream; charset=utf-8

&w_User: default
&Time: 2014-09-01 15:20:45
&Type: VideoLoss
&Content: EventType: VideoLoss
channel: <8>
StartTime: 2014-09-01 15:20:45

4.11.4 Seek Find Logs


Request URL http://<server>/cgi-bin/Log.cgi?action=doSeekFind
Method GET
DA

Request Params (key=value format in URL )


HU

Name Type R/O Description Example


A_

token uint R query token 1


HT

offset uint R offset 2


TP

count uint O the count of logs for this query. 100


_ AP

Request Example
http://192.168.1.108/cgi-bin/Log.cgi?action=doFind&token=1&count=100
I_
V3
.3

Response Params ( key=value format in body )


7

Name Type R/O Description Example


fo
rV

found uint O Count of found log, found is 0 if no log 2


is found.
el
se

items object[] O items


n

+RecNo uint O Log number. 789


gS

+Time char[32] O Time of this log. 2011-05-20 11:59:21


dn

+TimeRealUTC char[32] O the UTC time of log, in the format: 2011-05-20T03:59:21Z


Bh

yyyy-mm-ddThh:mm:ssZ
d

+Type char[] O Log type. "Account.Login"


+User char[] O User name. System
+Detail object O Log details.
++Compression char[] O compression H.264->MJPG
++Data char[] O data Encode
Response Example
found=2
items[0].RecNo=789
items[0].Time=2011-05-20 11:59:10
items[0].Type=ClearLog
items[0].User=admin
items[1].Detail.Compression=H.264->MJPG
items[1].Detail.Data=Encode
items[1].RecNo=790

General APIs 224


items[1].Time=2011-05-20 11:59:21
items[1].TimeRealUTC=2011-05-20T03:59:21Z
items[1].Type=SaveConfig
items[1].User=System

4.11.5 Export Encryped Log


The binary data should be saved as .zip format.
Request URL http://<server>/cgi-bin/Log.exportEncrypedLog?action=All
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
condition object O
the start time when log info built. 24 2014-8-25 00:02:32
DA

+StartTime char[] O hour Format, as: yyyy-mm-dd


HU

hh:mm:ss
2014-8-25 01:02:32
A_

the end time when log info built. 24


+EndTime char[] O hour Format, as: yyyy-mm-dd
HT

hh:mm:ss
TP

the input parameter for encrypted log 12345


_

+Password char[] R
AP

in zip format.
I_

Request Example
V3

http://192.168.1.108/cgi-bin/Log.exportEncrypedLog?action=All&condition.StartTime=2014-8-25%20
.3

00:02:32&condition.EndTime=2020-8-25%2001:02:32&condition.Password=12345
7
fo
rV

Response Params ( binary in body )


el

Name Type R/O Description Example


se

Response Example
n
gS

HTTP/1.1 200 OK
dn

Transfer-Encoding: chunked
CONNECTION: keep_alive
Bh

Content-type: application/binarytet-stream; charset=utf-8


d

The binary data of encrypted log in zip format

4.11.6 [Config] Serial Port Log Redirection


Config Data Params
Name Type R/O Description Example
O The configuration of serial port log
DebugInfoRedir object
redirection.
O logs which need to be redirected. 4
(default is 4)
+SerialPortLogLevel uint8
0:Fatal error; 1: Normal ; 2:
Warning;3:Info,4:The invoke path

General APIs 225


and data flow tracking in debug level 1 ;
5:The key logic tracking in debug level
2; 6:Other detail information in debug
level 3; 7:Debug info for legacy
compatible)
O log type which need to be redirected. 0
+SerialPortLogType uint8 (0:main chip logs;1:main chip +
sub-chip logs)

Please refer to "4.2.1 Get and Set Configure”for more info about the get/set operation
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&name=DebugInfoRedir
Get Config Response Example
table.DebugInfoRedir.SerialPortLogLevel=3
table.DebugInfoRedir.SerialPortLogType=1
DA

Set Config Request Example


HU

http://192.168.1.108/cgi-
A_

bin/configManager.cgi?action=setConfig&DebugInfoRedir.SerialPortLogLevel=6&DebugInfoRedir.Ser
HT

ialPortLogType=1
TP

Set Config Response Example


_

OK
AP
I_
V3

4.12 Upgrader
.3
7
fo
rV

4.12.1 Strat to Upgrade


el
se

Use this message to upload the firmware, and when the device receiving all the data successfully, it will
ngS

start to upgrade the device, and then use the getState method to get the state.
dn

Request URL http://<server>/cgi-bin/upgrader.cgi?action=uploadFirmware


Bh

Method POST
d

Request Params ( form-data in body )


Name Type R/O Description Example
Request Example
POST /cgi-bin/upgrader.cgi?action=uploadFirmware HTTP/1.1
Host: 192.168.1.108
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------8655433224198
Content-Length: xxxxxxxxx

-----------------------------8655433224198
Content-Disposition:form-data;name="upgrade"; filename= "xxxxxx.bin"
Content-Type: application/octet-stream

Firmware data….

General APIs 226


-----------------------------8655433224198--

Response Params ( OK in body )


Name Type R/O Description Example
Response Example
OK

4.12.2 Get Upgrade State


Request URL http://<server>/cgi-bin/upgrader.cgi?action=getState
Method GET
Request Params ( none )
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/upgrader.cgi?action=getState
DA
HU

Response Params (key=value format in body )


A_

Name Type R/O Description Example


HT

state object O state info


TP

+State char[] O the state of the upgrade, it can be Preparing


_

Preparing, Downloading,
AP

DownloadFailed, Upgrading, Invalid,


I_
V3

Failed, Succeeded, Cancelled,


NotEnoughMemory.
.3
7

+Progress uint O the progress of the upgrade. 0~100 20


fo

Response Example
rV

state.State=Upgrading
el

state.Progress=45
se
ngS

4.12.3 Set upgrader url


dn
Bh

Request URL http://<server>/cgi-bin/upgrader.cgi?action=updateFirmwareByUrl


d

Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Url char[] R Upgrade package address, also https://aaa/bbb/ccc/licen
support ftp address se.bin
checkType int O check method 0
enumint8{
0: MD5
}
checkSum char[] O Upgrade package checksum f38ad920
Request Example
http://<server>/cgi-
bin/upgrader.cgi?action=updateFirmwareByUrl=https://aaa/bbb/ccc/license.bin&checkType=0&checkSu
m=f38ad920

General APIs 227


Response Params ( OK in body )
Name Type R/O Description Example
Response Example
OK

4.12.4 Cancel Upgrade


Request URL http://<server>/cgi-bin/upgrader.cgi?action=cancel
Method GET
Request Params ( none )
Name Type R/O Description Example
Request Example
http://<server>/cgi-bin/upgrader.cgi?action=cancel
DA
HU

Response Params ( OK in body )


Name Type R/O Description Example
A_

Response Example
HT

OK
TP
_ AP
I_

4.12.5 Checking Cloud Update Version


V3
.3
7

Check cloud update version


fo

Request URL http://<server>/cgi-bin/api/CloudUpgrader/check


rV

Method POST
el
se

Request Params ( JSON format in body )


n

Name Type R/O Description Example


gS

way int32 R Checking methods. 0


dn

enumint8{ 0: Updating by
Bh

updating server through direct


d

connection. 1: Checking
through proxy server. 2:
Detecting by acquiring cached
test results. }
proxy object O Proxy server address, valid
when way==1 (optional).
+IP char[40] R Network address "10.1.2.3"
+Port int32 O Port 8080
Request Example
{
"way" : 0,
"proxy" : {
"IP" : "10.1.2.3",
"Port" : 8080

General APIs 228


}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
info object O Check results
+State enumchar[ R Update status. "None"
12] enumchar[12]{
"None": No update is detected
"Regular": Regular update (It
requires user confirmation, and can
only be updated to a later version).
"Emergency": Mandatory update
(The device automatically performs
detection and update, and it can
also degrade to an earlier version).
DA

“Automatic": Automatic update (The


HU

device automatically updates when


A_

a new version is available. It is


HT

currently for custom use and needs


TP

to be enabled)
_

}
AP

+PackageType enumchar[ O Update package type of new "all"


I_
V3

32] version. When State is not None,


.3

return
7

enumchar[32]{
fo

"all": All package.


rV

"ptz": PTZ main control package.


el
se

"web"
n

"logo"
gS

"custom"
dn

"gui"
Bh

"pd"
d

"data"
"ptz_power": PTZ power.
"ptz_light": PTZ light.
"ptz_heater": PTZ heater.
}
+OldVersion char[64] O Old version, which needs to be "0000"
returned when State is not None.
+NewVersion char[64] O New version, which needs to be "0004"
returned when State is not None.
+Attention char[2048] O Updated content of the new update "What is new"
package.
+PackageUrl char[256] O Download address of update "https://example.com/
package (required for agent 1.zip"
upgrade).

General APIs 229


+PackageId char[64] O Update package ID "1d2ee7"
+CheckSum char[64] O SHA-256 checksum of the update "F3D288AB"
package
+BuildTime char[24] O Build time of update package "08-10-2018 01:01:02"
Response Example
{
"info" : {
"State" : "None",
"PackageType" : "all",
"OldVersion" : "0000",
"NewVersion" : "0004",
"Attention" : "What is new",
"PackageUrl" : "https://example.com/1.zip",
"PackageId" : "1d2ee7",
"CheckSum" : "F3D288AB"
"BuildTime" : "08-10-2018 01:01:02"
DA

}
HU

}
A_
HT
TP

4.12.6 Performing Online Update


_ AP
I_

Perform online update


V3

Request URL http://<server>/cgi-bin/api/CloudUpgrader/execute


.3

Method POST
7
fo

Request Params ( JSON format in body )


rV

Name Type R/O Description Example


el

NewVersion char[64] O If the cloud version is "2.42.00.001"


se

newer than the new


ngS

version obtained in the


dn

last check, the update


Bh

fails.
d

way enumint8 R Update method 0


enumint8{
0: Updating by updating
server through direct
connection.
1: Updating by proxy
server
}.
proxy object O Proxy server address,
which is valid when
way=1 (optional).
+IP char[40] O Network address "10.1.2.3"
+Port uint16 O Port 8080

General APIs 230


info object O Update package
information, which is
needed when way==1
(optional).
+PackageUrl char[256] O Download address of the "https://example.com/1.zip"
update package (required
for agent upgrade).
+PackageId char[64] O Update package ID "1d2ee7"
+CheckSum char[64] O SHA-256 checksum of "F3D288AB"
the update package
Request Example
{
"NewVersion" : "2.42.00.001",
"way" : 0,
"proxy" : {
"IP" : "10.1.2.3",
DA

"Port" : 8080
HU

},
A_

"info" : {
HT

"PackageUrl" : "https://example.com/1.zip",
TP

"PackageId" : "1d2ee7",
_

"CheckSum" : "F3D288AB"
AP

}
I_
V3

}
.3
7

Response Params ( JSON format in body )


fo

Name Type R/O Description Example


rV

Response Example
el
se

{}
n gS
dn

4.12.7 Canceling Online Update


Bh
d

Cancel the online update during the download process. If you have already started writing Flash,
you cannot cancel the update.
Request URL http://<server>/cgi-bin/api/CloudUpgrader/cancel
Method POST
Request Params (JSON format in body)
Name Type R/O Description Example
Request Example
{}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

General APIs 231


4.13 Http Uploading

4.13.1 [Config] Active Image and Event Uploading


Configure the device to upload images and events to the specified address. Before configuration,
the client should monitor in the specified address. Once the configuration is complete, the device would
upload images and event data to this address using the command described in chapter " 4.13.2 Active
Image and Event Uploading ".
The parameters for uploading image and event are as follows:
Config Data Params
Name Type R/O Description Example
R The parameters for uploading
PictureHttpUpload object
image and event
DA

+Enable bool R Enable or not true


HU

O Authentication "digest”
A_

"basic”: HTTP Basic Authentic


HT

+Type char[16] ation


TP

"digest": HTTP Digest Authent


_

ication
AP

O The list of servers that receives


I_

+UploadServerList object[]
V3

uploaded information
.3

O IP address or domain name of 192.168.1.208


++Address char[128]
7

the server
fo

++Port int O Server port 80


rV

++UserName char[32] O Username "abc”


el

++Password char[128] O Password "123”


se
n

++Uploadpath char[128] O Upload path "/example/handlepic.php”


gS

O Code list for uploaded event ["CrossLineDetection","F


dn

++EventType char[][32]
aceDetection"]
Bh

++HttpsEnable bool O https enable true


d

++AuthEnable bool O authentication enable true


Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=PictureHttpUpload
Get Config Response Example
table.PictureHttpUpload.Enable=true
table.PictureHttpUpload.Type=digest
table.PictureHttpUpload.UploadServerList[0].Address=192.168.1.208
table.PictureHttpUpload.UploadServerList[0].Port=80
table.PictureHttpUpload.UploadServerList[0].UserName=abc
table.PictureHttpUpload.UploadServerList[0].Password=123
table.PictureHttpUpload.UploadServerList[0].Uploadpath=/example/handlepic.php

General APIs 232


table.PictureHttpUpload.UploadServerList[0].EventType[0]=CrossLineDetection
table.PictureHttpUpload.UploadServerList[0].EventType[1]=FaceDetection

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&PictureHttpUpload.Enable=true&PictureHttpUpload.Type=di
gest&PictureHttpUpload.UploadServerList[0].Address=192.168.1.208&PictureHttpUpload.UploadSer
verList[0].Port=80&PictureHttpUpload.UploadServerList[0].UserName=abc&PictureHttpUpload.Uploa
dServerList[0].Password=123&PictureHttpUpload.UploadServerList[0].Uploadpath=/example/handlep
ic.php&PictureHttpUpload.UploadServerList[0].EventType[0]=CrossLineDetection&PictureHttpUpload
.UploadServerList[0].EventType[1]=FaceDetection
Set Config Response Example
OK

4.13.2 Active Image and Event Uploading


DA

The device uploads images and event data to the specified address based on the client
HU

configuration. For details on the parameters for each event, please refer to the corresponding [Event]
A_

chapters. The IP address, port and URL of the uploaded target server is specified by the
HT

PictureHttpUpload. Each set of images and events are sent within one separate HTTP request, in which
TP

multiple of images and events are contained. It is uploaded through multipart.


_AP

Request URL http://<Address>:<Port>/<Uploadpath_of_PictureHttpUpload>


Method POST
I_
V3

Request Params ( multipart ; JSON in body; binary data in body )


.3

Name Type R/O Description Example


7

Channel int R video channel, which start from 0 0


fo
rV

Time char[32 R "2022-03-30


Snap picture time
] 15:40:01"
el
se

Events object[] R Event Information list


n

+Code char[32 R "FaceRecognition"


gS

Event Code
]
dn

+Action char[16 R Event action, with the values of "Start", "Pulse”


Bh

] "Stop" "Pulse".
d

+Index int R Event channel number, starting from 0. 0


+Data object R For specific parameters of each event,
please refer to the corresponding chapters
for reference.
Request Example
POST http://192.168.1.208/example/handlepic.php HTTP/1.1
User-Agent: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: application/json
Content-Length: <data length>

General APIs 233


{
"Channel" : 0,
"TIme" : "2022-03-30 15:40:01"
"Events" : [ {
"Code" : "FaceRecognition",
"Action" : "Pulse",
"Index" : 0
"Data" : {
"UTC" : 123456789,
……
}
}, …, { } ]
}
--<boundary>
Content-Type: image/jpeg
Content-Length: <data length>
DA
HU

<jpeg data>
A_

--<boundary>
HT


TP

--<boundary>--
_ AP
I_

Response Params ( OK in body )


V3

Response Example
.3

OK
7
fo
rV

4.13.3 [Config] Active Event Uploading


el
se

Configure the device to upload event (without image) to the specified address. Before
n gS

configuration, the client should monitor in the specified IP address. Once the configuration is complete,
the device would upload event data to this address using the command described in chapter " 4.13.4
dn

Active Event Uploading ".


Bh
d

The parameters for uploading event are as follows:


Config Data Params
Name Type R/O Description Example
R Parameters for uploading
EventHttpUpload object
event
R Whether to enable the true
+Enable bool
function
O Authentication Type "digest”
"basic":HTTP Basic Authenti
+Type char[32] cation
"digest" :HTTP Digest Authe
ntication
+UploadServerLis O The server list that receives
object[]
t uploaded information

General APIs 234


O IP address or domain name of 192.168.1.208
++Address char[128]
the server
++Port int O Server port 80
++UserName char[32] O Username "abc"
++Password char[128] O Password 123"
++Uploadpath char[128] O Upload path "/example/handleevt.php"
++EventType char[128][4 O event types to be ["CrossLineDetection","Fa
0] uploaded(Only applicable to ceDetection"]
cameras)
++HttpsEnable bool O https enable true
++AuthEnable bool O authentication enable true
Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific
examples are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=EventHttpUpload
DA

Get Config Response Example


HU

table.EventHttpUpload.Enable=true
table.EventHttpUpload.Type=digest
A_

table.EventHttpUpload.UploadServerList[0].Address=192.168.1.208
HT

table.EventHttpUpload.UploadServerList[0].Port=80
TP

table.EventHttpUpload.UploadServerList[0].UserName=abc
_AP

table.EventHttpUpload.UploadServerList[0].Password=123
I_

table.EventHttpUpload.UploadServerList[0].Uploadpath=/example/handleevt.php
V3

table.EventHttpUpload.UploadServerList[0].EventType[0]=CrossLineDetection
.3

table.EventHttpUpload.UploadServerList[0].EventType[1]=FaceDetection
7
fo
rV

Set Config Request Example


el

http://192.168.1.108/cgi-
se

bin/configManager.cgi?action=setConfig&EventHttpUpload.Enable=true&EventHttpUpload.Type=dige
n gS

st&EventHttpUpload.UploadServerList[0].Address=192.168.1.208&EventHttpUpload.UploadServerLi
dn

st[0].Port=80&EventHttpUpload.UploadServerList[0].UserName=abc&EventHttpUpload.UploadServer
List[0].Password=123&EventHttpUpload.UploadServerList[0].Uploadpath=/example/handleevt.php&E
Bh

ventHttpUpload.UploadServerList[0].EventType[0]=CrossLineDetection&EventHttpUpload.UploadSer
d

verList[0].EventType[1]=faceDetection
Set Config Response Example
OK

4.13.4 Active Event Uploading


The device upload event data (without image) to the specified address based on the configuration
of the client. For the specific parameter of each event, please refer to the corresponding [Event]
chapters. The IP address, port and URL of the upload target server is specified by EventHttpUpload.
Each event is sent within one separate HTTP request.
Request URL http://<Address>:<Port>/<Uploadpath_of_EventHttpUpload>
Method POST
Request Params ( JSON in body )

General APIs 235


Name Type R/O Description Example
Code char[32 R "FaceRecognition”
Event code
]
Action char[16 R "Event action, with the values of "Start", "Pulse”
] "Stop""Pulse".
Index int R Event channel number, starting from 0 0
Data object R For the specific parameters for each event,
please refer to the corresponding chapters.
Request Example
Request Example
User-Agent: Device/1.0
Content-Type: application/json
Content-Length: <data length>

{
"Code" : "FaceRecognition",
DA

"Action" : "Pulse",
HU

"Index" : 0
A_

Data
HT

"UTC" : 123456789,
TP

...
_

}
AP

}
I_
V3
.3

Response Params ( OK in body )


7
fo

Response Example
rV

OK
el
se

4.13.5 [Config] Active Report Data Uploading


ngS
dn

Configure the device to upload report data to the specified address. Before configuration, the client
should monitor in the specified IP address. Once the configuration is complete, the device would upload
Bh

report data to this address using the command described in chapters 4.13.6 ~ 4.13.11.
d

The parameters for uploading image are as follows:


Config Data Params
Name Type R/O Description Example
ReportHttpUpload object R parameters for uploading event
+Enable bool R Whether to enable the function true
O Authentication Type "digest”
"basic" :HTTP basic
+Type char[16] authentication
"digest" :HTTP digest
authentication
+Period int R Upload period (unit: hour) 1
O The server list that receives
+UploadServerList object[]
uploaded information

General APIs 236


O IP address or domain name of 192.168.1.208
++Address char[128]
the server
++Port int O Server port 80
++UserName char[32] O Username "abc”
++Password char[128] O Password 123’’
++Uploadpath char[128] O Upload path "/example/handleevt.php”
O For the uploaded report data ["NumberStat","ObjectDe
list, specific report data name, tect"]
++ReportType char[ ][40] please refer to the
corresponding command
reporting chapter description.
++HttpsEnable bool O https enable true
++AuthEnable bool O authentication enable true

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
DA

Get Config Request Example


HU

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ReportHttpUpload
A_

Get Config Response Example


HT

table.ReportHttpUpload.Enable=true
TP

table.ReportHttpUpload.Type=digest
_

table.ReportHttpUpload.Period=1
AP

table.ReportHttpUpload.UploadServerList[0].Address=192.168.1.208
I_

table.ReportHttpUpload.UploadServerList[0].Port=80
V3

table.ReportHttpUpload.UploadServerList[0].UserName=abc
.3
7

table.ReportHttpUpload.UploadServerList[0].Password=123
fo

table.ReportHttpUpload.UploadServerList[0].Uploadpath=/example/handlerpt.php
rV

table.ReportHttpUpload.UploadServerList[0].ReportType[0]=NumberStat
el

table.ReportHttpUpload.UploadServerList[0].ReportType[1]=ObjectDetect
se
n gS

Set Config Request Example


dn

http://192.168.1.108/cgi-
Bh

bin/configManager.cgi?action=setConfig&ReportHttpUpload.Enable=true&ReportHttpUpload.Type=di
d

gest&ReportHttpUpload.Period=1&ReportHttpUpload.UploadServerList[0].Address=192.168.1.208&
ReportHttpUpload.UploadServerList[0].Port=80&ReportHttpUpload.UploadServerList[0].UserName=a
bc&ReportHttpUpload.UploadServerList[0].Password=123&ReportHttpUpload.UploadServerList[0].U
ploadpath=/example/handlerpt.php&ReportHttpUpload.UploadServerList[0].ReportType[0]=NumberSt
at&ReportHttpUpload.UploadServerList[0].ReportType[1]=ObjectDetect
Set Config Response Example
OK

4.13.6 People Counting Report Data Uploading


If the client subscribes to the Numberstat (Number Statistics) report data through the
ReportHttpUpload configuration, the device will use this command to upload the data to the specified
address. The IP address, port and URL of the target server is specified by ReportHttpUpload. Each
people counting report data is sent within one separate HTTP request.

General APIs 237


Request URL http://<Address>:<Port>/<Uploadpath_of_ReportHttpUpload>
Method POST
Request Params ( JSON in body )
Name Type R/O Description Example
NumberStat Object[] R NumberStat: each dimension is a channel.
+SN char[32 R Device serial number "1C03E08YAZ00020
] ”
+PeopleCount Object[] O Humber statistics, the number of arrays is
that of the cycles. If the period is an hour,
then the number of array is one. If the
period is three hours, then the number of
array is three.
++StartTime char[20 O Start time "2012-03-14
] 00:00:00"
EndTime: char[20 O End time "2012-03-14
] 23:59:59"
DA

++EnteredSubt uint O Subtotal of entered flow 56


HU

otal
A_

++ExitedSubto uint O Subtotal of exit flow 56


HT

tal
TP

++AreaID uint16 O Area ID. 1


_

++Channel int O Channel No. 0


AP

+ManNumDet object[] O Statistics of the number of the people in the


I_

ection region. The number of arrays equals to that


V3

of the period. If the time of period is an


.3
7

hour, then the number of array is one. If the


fo

time of the period is three hours, then the


rV

number of array is three.


el

++StartTime char[20 O Start time "2012-03-14


se
n

] 00:00:00"
gS

++EndTime char[20 O End time "2012-03-14


dn

] 23:59:59"
Bh

++InsideSubtot uint O Used with 56


d

al ManNumDetection,QueueDetection, the
subtotal of number of people in the region
++AreaID uint16 O Area ID. 1
++AverageSta uint O Average regional retention time 10
yTime
++Channel int O Channel No. 0
+QueueDetecti object[] O Queuing Management Data. The number
on of arrays equals to that of the period. If the
time of period is an hour, then the number
of array is one. If the time of the period is
three hours, then the number of array is
three.
++StartTime char[20 O Start time "2012-03-14
] 00:00:00"

General APIs 238


++EndTime char[20 O Statistics end time "2012-03-14
] 23:59:59"
++InsideSubtot uint O Subtotal people in the area when 56
al ManNumDetection and QueueDetection
are used
++AreaID uint16 O Area ID 1
++AverageSta uint O Average stranding time in area 10
yTime
++Channel int O Channel No. 0
Request Example
POST http://192.168.1.208:80/example/handlerpt.php HTTP/1.1
User-Agent: Device/1.0
Content-Type: application/json
Content-Length: <data length>

{
DA

"NumberStat" : [ {
HU

"SN" : "6M053FDYAQ00003"
A_

"ManNumDetection" : [ {
HT

"Channel" : 0,
TP

"EndTime" : "2021-03-11 17:59:59",


_

"EnteredSubtotal" : 0,
AP

"ExitedSubtotal" : 0,
I_

"StartTime" : "2021-03-11 17:00:00"


V3

}, {
.3
7

"Channel" : 0,
fo

"EndTime" : "2021-03-11 6:59:59 PM",


rV

"EnteredSubtotal" : 0,
el

"ExitedSubtotal" : 0,
se
n

"StartTime" : "2021-03-11 6:00:00 PM"


gS

}, …, { } ],
dn

"PeopleCount" : [ {
Bh

"Channel" : 0,
d

"EndTime" : "2021-03-11 5:59:59 PM",


"EnteredSubtotal" : 0,
"ExitedSubtotal" : 0,
"StartTime" : "2021-03-11 5:00:00 PM"
}, {
"Channel" : 0,
"EndTime" : "2021-03-11 6:59:59 PM",
"EnteredSubtotal" : 0,
"ExitedSubtotal" : 0,
"StartTime" : "2021-03-11 6:00:00 PM"
}, …, { } ],
"QueueDetection" : [ {
"Channel" : 0,
"EndTime" : "2021-03-11 5:59:59 PM",

General APIs 239


"EnteredSubtotal" : 0,
"ExitedSubtotal" : 0,
"StartTime" : "2021-03-11 5:00:00 PM"
}, {
"Channel" : 0,
"EndTime" : "2021-03-11 6:59:59 PM",
"EnteredSubtotal" : 0,
"ExitedSubtotal" : 0,
"StartTime" : "2021-03-11 6:00:00 PM"
}, …, { } ]
}
}

Response Params ( OK in body )


Response Example
DA

OK
HU

4.13.7 Video Structuring Report Data Upload


A_
HT

When the client subscribes ObjectDetect (video Structuring) dashboard, the device will upload
TP

video structuring dashboard to the specified address. The target service address and port, URL are
_ AP

designated by ReportHttpUpload. Each video structuring report data is sent within one separate HTTP
I_

request.
V3

Request URL http://<Address>:<Port>/<Uploadpath_of_ReportHttpUpload>


.3
7

Method POST
fo

Request Params ( JSON in body )


rV

Name Type R/O Description Example


el

ObjectDetect Object[] R Video structured data, the first dimension


se

[] is channel, the second dimension is cycle


n
gS

count, the cycle is an hour, the array is 1,


dn

the cycle is 3 hours and the array is 3.


Bh

+SN char[32] R Device SN "1C03E08YAZ00020"


d

+UTC uint O The end time of statistical Cycle (local 1608508800


UTC time)
+UTCMS uint O Milliseconds 0
+Period int O Statistical cycle (unit: minute) 60
+PeriodBySec int O Statistical cycle (unit: second) 60
onds
+MotoVehicles int O Traffic volume of motorized vehicle such 45
as motorbike and tricycles
+Vehicles int O Total count of motorized and non- 0
motorized vehicle
+Direction char[32] O Target motion direction: “0”
Null: No data
'0': No direction
'1': From left to right

General APIs 240


'2': From right to left
+RoadwayDire int O Lane direction (direction of vehicle): 10
ction 0: South to North
1: Southwest to Northeast
2: West to East
3: Northwest to Southeast
4: North to South
5: Northeast to Southwest
6: East to West
7: Southeast to Northwest
8: Ignore
9: Customize
10: No direction
11: A ->B direction
12: B ->A direction
+LocalTime char[20] O Local time at the end of the statistical "2016-03-23 15:08:00"
DA

cycle
HU

+VehicleTypeF object O Statistical data on the traffic volume


A_

low based on vehicle type


HT

++PasserbyVe int O Pedestrian traffic flow 0


TP

hicles
_

Request Example
AP

POST http://192.168.1.208:80/example/handlerpt.php HTTP/1.1


I_

User-Agent: Device/1.0
V3

Content-Type: application/json
.3
7

Content-Length: <data length>


fo
rV

{
el

"ObjectDetect" : [ [ {
se
n

"MotoVehicles" : 8,
gS

"Period" : 60,
dn

"PeriodBySeconds" : 0,
Bh

"SN" : "6J0CB81YAG10101",
d

"UTC" : 1615492800,
"UTCMS" : 0,
"VehicleTypeFlow" : {
"PasserbyVehicles" : 6
},
"Vehicles" : 17
}, …, { } ], …, [ ] ]
}

Response Params ( OK in body )


Response Example
OK

General APIs 241


4.13.8 People Flow Heat Map Report Data Upload
When the client subscribes HeatMap (customer flow heat map report data, the device will upload
video structuring data to the specified address. The target service address and port, URL are
designated by ReportHttpUpload. Each people flow heat map report data is sent within one separate
HTTP request.
Request URL http://<Address>:<Port>/<Uploadpath_of_ReportHttpUpload>
Method POST
Request Params ( JSON in body )
Name Type R/O Description Example
HeatMap Object[] R Heatmap is presneted in binary format.
Each dimension is a channel.
+Channel int O Channel 0
+SN char[32] R Device SN "1C03E08YAZ00020"
+StartTime char[20] O Statistics start Time "2012-03-14 00:00:00"
DA

+EndTime char[20] O Statistics end time "2012-03-14 23:59:59"


HU

+width uint O Image width 200


A_

+height uint O Image height 100


HT

+EncodeData char[] O base64 encoding of Heat map data "abcd="


TP

Request Example
_

POST http://192.168.1.208:80/example/handlerpt.php HTTP/1.1


AP

User-Agent: Device/1.0
I_

Content-Type: application/json
V3

Content-Length: <data length>


.3
7
fo

{
rV

"HeatMap" : [ {
el

"Channel" : 0,
se

"SN" : "66:66:66:56:78:9a",
n gS

"StartTime" : "2021-03-12 14:00:00",


dn

"EndTime" : "2021-03-12 15:00:00",


Bh

"height" : 64,
"width" : 64
d

"EncodeData" : "abcd=",
}, …, {} ]
}

Response Params ( OK in body )


Response Example
OK

4.13.9 ANPR Report Data Upload


When the client subscribes RoadFlowStat (road monitoring) report data, the device will upload
video structuring datato the specified address. The target service address and port, URL are designated
by ReportHttpUpload. Each ANPR report data is sent within one separate HTTP request.

General APIs 242


Request URL http://<Address>:<Port>/<Uploadpath_of_ReportHttpUpload>
Method POST
Request Params ( JSON in body )
Name Type R/O Description Example
RoadFlowStat Object[] R Road monitoring data, the first dimension
[] is channel, the second dimension is cycle
count. The cycle is an hour and the array
is 1. The cycle is 3 hours and the array is
3.
+SN char[32] O Device SN "1C03E08YAZ00020"
+UTC uint O End time of statistical cycle 1608508800
+UTCMS uint O Milliseconds 0
+Lane int O User defined lane number 1
+PresetID int O PTZ preset, which must greater than 0. 1
+Period int O Statistical cycle (unit: minute) 60
+PeriodBySec int O Statistical cycle (unit: second) 60
DA

onds
HU

+MotoVehicles int O Traffic flow of non-motorized vehicles 45


A_

such as motorbike and tricycles.


HT

+Direction char[32] O Target motion direction: “0”


TP

Null: No data
_

'0': No direction
AP

'1': From left to right


I_

'2': From right to left


V3

+RoadwayDire int O Lane direction (direction of vehicle): 10


.3
7

ction 0: South to North


fo

1: Southwest to Northeast
rV

2: West to East
el

3: Northwest to Southeast
se
n

4: North to South
gS
dn

5: Northeast to Southwest
Bh

6: East to West
d

7: Southeast to Northwest
8: Ignore
9: Customize
10: No direction
11: A ->B direction
12: B ->A direction
+LocalTime char[20] O Local time at the end of the statistical "2016-03-23 15:08:00"
cycle
+Vehicles int O Total count of motorized and non- 0
motorized vehicle
+VehicleTypeF object O Statistical data on the traffic volume
low based on vehicle type
++PasserbyVe int O Pedestrian traffic flow 0
hicles

General APIs 243


Request Example
POST http://192.168.1.208:80/example/handlerpt.php HTTP/1.1
User-Agent: Device/1.0
Content-Type: application/json
Content-Length: <data length>

{
"RoadFlowStat" : [ [ {
"SN" : "6J0CB81YAG10101",
"UTC" : 1615485600,
"UTCMS" : 0,
"Lane" : 1,
"PresetID" : 0,
"Period" : 60,
"PeriodBySeconds" : 0,
"MotoVehicles" : 0,
DA

"Vehicles" : 26506
HU

"VehicleTypeFlow" : {
A_

"PasserbyVehicles" : 0
HT

},
TP

}, …, { } ], … , [ ] ]
_

}
AP
I_

Response Params ( OK in body )


V3

Response Example
.3
7

OK
fo
rV

4.13.10 Crowd Distribution Report Data upload


el
se
n

When the client subscribes CrowdDistriMap (Crowd Distribution) report data, the device will upload
gS

video structuring data to the specified address. The target service address and port, URL are
dn

designated by ReportHttpUpload. Each crowd distribution report data is sent within one separate HTTP
Bh

request.
d

Request URL http://<Address>:<Port>/<Uploadpath_of_ReportHttpUpload>


Method POST
Request Params ( JSON in body )
Name Type R/O Description Example
CrowdDistriMap Object[] R Data statistics on crowd distribution.
Each dimension is the data of a
channel.
+SN char[32] O Device SN "1C03E08YAZ00020"
+CrowdDistriMap object O Report Data on Crowd Distribution
Map
++DataList object[64 O Return Crowd Distribution Map data 1
] list. The array size is 64 at most.
+++UTC uint32 O UTC time (local UTC time) when the 6555478
data is recorded

General APIs 244


+++AreaName char[32] O Statistics Area name "CMD-5"
+++PeopleNum int O The number of people in statistics 60
area
Request Example
POST http://192.168.1.208:80/example/handlerpt.php HTTP/1.1
User-Agent: Device/1.0
Content-Type: application/json
Content-Length: <data length>

{
"CrowdDistriMap" : [ {
"CrowdDistriMap" : {
"DataList" : [ {
"AreaName" : "CDM-1",
"PeopleNum" : 0,
"UTC" : 1617375600
DA

}, {
HU

"AreaName" : "CDM-1",
A_

"PeopleNum" : 0,
HT

"UTC" : 1617379200
TP

}]
_

},
AP

"SN" : "7B0606BYAQ00010"
I_

}, … , { } ]
V3

}
.3
7
fo
rV

Response Params ( OK in body )


el

Response Example
se

OK
n gS

4.13.11 Vehicle Density Report Data Upload


dn
Bh

When the client subscribes VehiclesDistri vehicle density) report data, the device will upload video
d

structuring data to the specified address. The target service address and port, URL are designated by
ReportHttpUpload. Each vehicle density report data is sent within one separate HTTP request.
Request URL http://<Address>:<Port>/<Uploadpath_of_ReportHttpUpload>
Method POST
Request Params ( JSON in body )
Name Type R/O Description Example
VehiclesDistri Object[] R Data statistics on vehicle density
distribution. Each dimension is the
data of a channel.
+SN char[32] O Device SN "1C03E08YAZ00020"
+CongestionDete object O The data report of vehicle density 0
ction congestion rules.

General APIs 245


++DataNum uint32 O Number of returned entires on 60
vehicle congestion rules.
++DataList object[] O The data list of vehicle congestion
rules. The array size equal to
DataNum and the element is 64 at
most.
+++UTC uint32 O UTC time (local UTC time) when the 3665789
data is recorded
+++RuleName char[32] O Rule name "VD-1"
+++VehiclesNum int O The number of vehicles 32
+VehicleLimitDete object O The report data of traffic flow limit 0
ction detection rules
++DataNum uint32 O Returned data entries on the traffic 1
flow limit rules
++DataList object[] O The data list of traffic flow limit
detection rules. 64 elements at most.
DA

+++UTC uint32 O UTC time when the data is recorded 3665789


HU

+++RuleName char[32] O Rule name


A_

+++VehiclesNum int O The number of vehicles 40


HT

Request Example
TP

POST http://192.168.1.208:80/example/handlerpt.php HTTP/1.1


_

User-Agent: Device/1.0
AP

Content-Type: application/json
I_

Content-Length: <data length>


V3
.3
7

{
fo

"VehiclesDistri" : [ {
rV

"CongestionDetection" : {
el

"DataList" : [ {
se
n

"RuleName" : "VD-1",
gS

"UTC" : 1617375600,
dn

"VehiclesNum" : 0
Bh

}, {
d

"RuleName" : "VD-1",
"UTC" : 1617379200,
"VehiclesNum" : 0
} ],
"DataNum" : 2
},
"SN" : "7B0606BYAQ00010",
"VehicleLimitDetection" : {
"DataNum" : 0
}
}, … , { } ]
}

General APIs 246


Response Params ( OK in body )
Response Example
OK

4.13.12 FaceAnalysis Report Data Upload


When the client subscribes FaceAnalysis report data, the device will upload video structuring data to
the specified address. The target service address and port, URL are designated by ReportHttpUpload.
Each vehicle density report data is sent within one separate HTTP request.
Request URL http://<Address>:<Port>/<Uploadpath_of_ReportHttpUpload>
Method POST
Request Params ( JSON in body )
Name Type R/O Description Example
FaceAnalysis Object[] R Data statistics on FaceAnalysis.
Each dimension is the data of a
DA

channel.
+SN char[32] R Device SN "8J0751AYAQ00004"
HU

+Channel uint O Channel 0


A_

+Info Object[] O Data statistics on FaceAnalysis.


HT

The number of arrays is the


TP

number of cycles. The cycle is one


_ AP

hour, the number of arrays is 1.


I_

The cycle is 3 hours, and the


V3

number of arrays is 3.
.3

++StartTime systemtime O StartTime "2022-12-21 11:00:00"


7
fo

++EndTime systemtime O EndTime "2022-12-21 11:59:59"


rV

++RepeatCoun uint32 O Repeat Count 0


el

t
se

++FaceDetect uint32 O Statistics of face detection times 102


n gS

Count after duplicate removal


dn

++FaceAnalysi uint32 O Statistics of face analysis times 92


sCount after duplicate removal
Bh

Request Example
d

POST http://192.168.1.208:80/example/handlerpt.php HTTP/1.1


User-Agent: Device/1.0
Content-Type: application/json
Content-Length: <data length>

{
"FaceAnalysis": [
{
"Channel": 0,
"SN": "8J0751AYAQ00004",
"Info": [{
"EndTime": "2022-12-21 11:59:59",
"FaceAnalysisCount": 92,

General APIs 247


"FaceDetectCount": 109,
"RepeatCount": 0,
"StartTime": "2022-12-21 11:00:00"
}, …,{ }]
}]
}

Response Params ( OK in body )


Response Example
OK
DA
HU
A_
HT
TP
_ AP
I_
V3
.3
7
fo
rV
el
se
n
gS
dn
Bh
d

General APIs 248


5 Camera APIs

5.1 Image

5.1.1 [Config] Brightness, Contrast and Saturation


Config Data Params
Name Type R/O Description Example
VideoColor object[][] O video colour configuration
A two-dimensional array with multiple
color configurations corresponding to
each video input channel
DA

The first dimension corresponds to the


HU

channel number, and the second


A_

dimension corresponds to the lighting


HT

scene. For compatibility, the front


TP

element is fixed to represent day, night,


_

and normal.
AP

+Name char[16] O name "Day"


I_

+Brightness uint8 O Brightness, range is [0—100] 50


V3

+Contrast uint8 O Contrast, range is [0—100] 50


.3
7

+Saturation uint8 O Saturation, range is [0—100] 50


fo

+Hue uint8 O Hue 50


rV

0~100
el

+Gamma uint8 O Gamma 50


se
n

0~100
gS

+ChromaSupp uint8 O Suppress 50


dn

ress range: 0~100


Bh

+Style char[16] O colour style "Standard"


d

range : [Gentle,Standard,Flamboyant]
+TimeSection char[20] O time section "1 00:00:00-24:00:00"

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor
Get Config Response Example
table.VideoColor[0][0].Name=Day,
table.VideoColor[0][0].Brightness=50,
table.VideoColor[0][0].Contrast=50,
table.VideoColor[0][0].Saturation=50,
table.VideoColor[0][0].Hue=50,
table.VideoColor[0][0].Gamma=50,

Camera APIs 249


table.VideoColor[0][0].ChromaSuppress=50,
table.VideoColor[0][0].Style=Standard,
table.VideoColor[0][0].TimeSection=1 00:00:00-24:00:00

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoColor[0][0].Brightness=50
Set Config Response Example
OK

5.1.2 [Config] Sharpness


Config Data Params
Name Type R/O Description Example
VideoInSharp object[][] O Sharpness
ness A two-dimensional array with multiple
DA

color configurations corresponding to


HU

each video input channel


A_

The first dimension corresponds to


HT

the channel number, and the second


TP

dimension corresponds to the lighting


_
AP

scene. For compatibility, the front


element is fixed to represent day,
I_
V3

night, and normal.


.3

+Sharpness int O Range is 0—100 50


7

+Level int O Range is 0—100 20


fo
rV

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
el
se

are as follows :
n

Get Config Request Example


gS

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoInSharpness
dn

Get Config Response Example


Bh

table.VideoInSharpness [0][0].Level=4
d

table.VideoInSharpness [0][0].Sharpness=8

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInSharpness[0][0].Level=10&VideoInSharpness[0][0].Mo
de=1&VideoInSharpness[0][0].Sharpness=0
Set Config Response Example
OK

5.1.3 [Config] Flip, Mirror and Rotate90


Config Data Params

Camera APIs 250


Name Type R/O Description Example
VideoImageC object[] O array index starts from 0, which
ontrol means video channel (equals to
video channel index -1, and so 0
means channel 1).
+Mirror bool O true: enable video mirror function false
false: disable video mirror function
+Flip bool O true: enable video flip function false
false: disable video flip function
+Rotate90 int O Range is {0,1,2} 0
Video rotation:
0: No rotate
1: clockwise rotate 90°
2: anticlockwise rotate 90°

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
DA

are as follows :
HU

Get Config Request Example


A_

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoImageControl
HT

Get Config Response Example


TP

table.VideoImageControl[0].Flip=true
_

table.VideoImageControl[0].Mirror=false
AP

table.VideoImageControl[0].Rotate90=0
I_
V3

Set Config Request Example


.3
7

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoImageControl[0].Flip=true
fo

Set Config Response Example


rV

OK
el
se
n gS

5.2 Exposure
dn
Bh

5.2.1 [Config] Exposure Config


d

Config Data Params


Name Type R/O Description Example
VideoInExpos object[][] O A two-dimensional array with multiple
ure color configurations corresponding to
each video input channel
The first dimension corresponds to
the channel number, and the second
dimension corresponds to the lighting
scene. For compatibility, the front
element is fixed to represent day,
night, and normal.
+Mode uint8 O 0: Auto by default 0

Camera APIs 251


1: Low noise
2: Anti-smear
4: Manual (range)
5: Aperture priority
6: Manual (fixed)
7: Gain priority
8: Shutter priority
9: Flash light matching mode
+AntiFlicker enumint8 O Range is {0,1,2} 0
AntiFlicker mode:
0: Outdoor
1: 50 Hz AntiFlicker
2: 60 Hz AntiFlicker
+Gain uint8 O Range is [0—100] 1
If GainAuto is true, it's upper limit of
auto gain, else it's the fixed gain adjust
DA

value.
HU

+GainMin uint8 O Range is 0–100; the value must be 10


A_

smaller than GainMax.


HT

+GainMax uint8 O Range is 0–100; the value must be 50


TP

greater than GainMin.


_

+Value1 double O Range is [0-1000], unit is millisecond 0.1


AP

If ExposureSpeed is 0(AutoExposure
I_

enable), it's lower limit of


V3

AutoExposure time, otherwise it's time


.3
7

of manualExposure
fo

+Value2 double O Range is [0-1000], unit is millisecond 80


rV

Upper limit of AutoExposure time,


el

should be bigger than


se
n

ExposureValue1
gS

+Iris uint8 O Manual Iris setting. Range is 0– 10


dn

100.
Bh

+IrisAuto bool O Enable Iris automatically. false


d

true: IrisAuto
false: No IrisAuto

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoInExposure
Get Config Response Example
table.VideoInExposure[0][0].AntiFlicker=0
table.VideoInExposure[0][0].Gain=50
table.VideoInExposure[0][0].GainMax=50
table.VideoInExposure[0][0].GainMin=0
table.VideoInExposure[0][0].Iris=50
table.VideoInExposure[0][0].IrisAuto=false

Camera APIs 252


table.VideoInExposure[0][0].Mode=0
table.VideoInExposure[0][0].Value1=40
table.VideoInExposure[0][0].Value2=40

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInExposure[0][0].Iris=50
Set Config Response Example
OK

5.3 Backlight

5.3.1 [Config] Backlight Config


Config Data Params
DA

Name Type R/O Description Example


HU

VideoInBackli object[][] O Light environment configuration.


A_

ght Adjustments in various scenarios,


HT

including backlight, strong light, etcA


two-dimensional array with multiple
TP
_

color configurations corresponding to


AP

each video input channel


I_

The first dimension corresponds to the


V3

channel number, and the second


.3

dimension corresponds to the lighting


7
fo

scene. For compatibility, the front


rV

element is fixed to represent day, night,


el

and normal.
se

+Mode char[32] O Off: Switched off "Off"


ngS

Backlight: Backlight compensation


dn

GlareInhibition: HLC
WideDynamic: WDR
Bh

SSA: Scene adaptation


d

+WideDynami uint8 O Range is 1–100. 0


cRange
+GlareInhibitio uint8 O Range is 1–100. 50
n

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoInBacklight
Get Config Response Example
table.VideoInBacklight[0][0].GlareInhibition=50
table.VideoInBacklight[0][0].Mode=Off
table.VideoInBacklight[0][0].WideDynamicRange=50

Camera APIs 253


Set Config Request Example
http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInBacklight[0][0].GlareInhibition=50
Set Config Response Example
OK

5.4 White Balance

5.4.1 [Config] White Balance Config


Config Data Params
Name Type R/O Description Example
VideoInWhite object[][] O two-dimensional array with multiple
Balance color configurations corresponding to
DA

each video input channel


The first dimension corresponds to the
HU

channel number, and the second


A_

dimension corresponds to the lighting


HT

scene. For compatibility, the front


TP

element is fixed to represent day, night,


_
AP

and normal.
I_

+Mode char[16] O Auto; Indoor; Outdoor; ATW; Manual; "Auto"


V3

Sodium; Natural; StreetLamp;


.3

ManualDatum
7

+GainRed int O 80
fo

Range is [0—100]
rV

Gain for red value, Value is effective


el

when WhiteBalance is "Custom."


se

+GainBlue int O Range is [0—100] 80


n gS

Gain for blue value, Value is effective


when WhiteBalance is "Custom."
dn
Bh

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
d

are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoInWhiteBalance
Get Config Response Example
VideoInWhiteBalance[0][0].GainBlue=50
VideoInWhiteBalance[0][0].GainRed=50
VideoInWhiteBalance[0][0].Mode=Auto

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInWhiteBalance[0][0].GainBlue=50
Set Config Response Example
OK

Camera APIs 254


5.5 Day-Night

5.5.1 [Config] Day-Night Config


Config Data Params
Name Type R/O Description Example
VideoInDayNi object[][] O two-dimensional array with multiple
ght color configurations corresponding to
each video input channel
The first dimension corresponds to the
channel number, and the second
dimension corresponds to the lighting
scene. For compatibility, the front
element is fixed to represent day, night,
and normal.
DA

+Type char[16] O The range is {"Electron", "Mechanism", "Mechanism"


HU

"NightICR", "Auto" }, the way of ICR


A_

switching.
HT

+Mode char[16] O The range is {"Color", "Brightness", "Brightness"


TP

"BlackWhite, "Photoresistor", "Gain",


_

"Timing"}.
AP

"Color": Always "color"


I_

"Brightness": Day/Night Auto


V3

"BlackWhite": Always black-and-white


.3
7

"Photoresistor": Switch according to


fo

photoresistor,
rV

"Gain": Switch according to gain


el

"Timing": Switch according to time


se
n

+Sensitivity int O Range is [1-3]. Sensitivity of switching 1


gS

mode
dn

+Delay int O Range is [2-10]. 10


Bh

Delay seconds when switching mode.


d

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoInDayNight
Get Config Response Example
VideoInDayNight[0][0].Delay=10
VideoInDayNight[0][0].Mode=Brightness
VideoInDayNight[0][0].Sensitivity=2
VideoInDayNight[0][0].Type=Mechanism

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInDayNight[0][0].Mode=BlackWhite

Camera APIs 255


Set Config Response Example
OK

5.6 Zoom and Focus


To get the capability set of video input, refer to 4.5.12. For instance, you can use the following URL:
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCaps&channel=1
If ElectricFocus or SyncFocus of the return value is true, use 5.6.1 ~ 5.6.4; Otherwise, use 5.6.5 ~
5.6.6 .

5.6.1 Adjust Focus


Adjust magnification and focus.
Request URL http://<server>/cgi-bin/devVideoInput.cgi?action=adjustFocus
Method GET
DA

Request Params ( key=value format in URL )


HU

Name Type R/O Description Example


A_

channel int O The video channel number which starts 1


HT

from 1, and the default value is 1.


TP

focus double O Relative stepping position of the vari- 0.5


_

focal motor; range: [0–1].


AP

-1 means resetting.
I_

zoom double O Relative stepping position of the zoom -0.5


V3

motor; range: [0–1].


.3
7

-1 means resetting.
fo

Request Example
rV

http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.5&zoom=-0.5
el
se
ngS

Response Params ( OK in body )


Response Example
dn

OK
Bh
d

5.6.2 Adjust Focus Continuously


Continuously adjust magnification and focus. Firstly, send a "non-zero" value to start zooming and
adjusting the focal length to drive the motor to move, and then send “0” to stop the motor from moving.
If only one of the operations is required, set the value of the other operation as -1.
Request URL http://<server>/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int O The video channel number which starts 1
from 1, and the default value is 1.
focus double O Relative focusing rate; range: [-1,1]. 0.02
-1: No operation

Camera APIs 256


0: Stop
Positive number: Moving forward
Negative number: Moving backward
zoom double O Relative zooming rate; range: [-1,1]. -1
-1: No operation
0: Stop
Request Example
http://192.168.1.108/cgi-
bin/devVideoInput.cgi?action=adjustFocusContinuously&channel=1&focus=0.02&zoom=-1

Response Params ( OK in body )


Response Example
OK

5.6.3 Auto Focus


DA

Auto focus.
HU

Request URL http://<server>/cgi-bin/devVideoInput.cgi?action=autoFocus


A_

Method GET
HT

Request Params ( key=value format in URL )


TP

Name Type R/O Description Example


_
AP

channel int O The video channel number which starts 1


I_

from 1, and the default value is 1.


V3

Request Example
.3

http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=autoFocus&channel=1
7
fo
rV

Response Params ( OK in body )


Response Example
el
se

OK
ngS

5.6.4 Get Focus Status


dn
Bh

Get the focusing status.


d

Request URL http://<server>/cgi-bin/devVideoInput.cgi?action=getFocusStatus


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int O The video channel number which starts 1
from 1, and the default value is 1.
Request Example
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getFocusStatus&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
status object R Return the status information

Camera APIs 257


Relative stepping position of the 0.8
+Focus double R
focusing motor; range: [0,1]
Relative stepping position of the 0.3
+Zoom double R
zooming motor; range: [0,1]
Focusing status "Normal"
char[16
+Status R "Normal": Normal
]
"Autofocus": Auto focusing
Response Example
status.Focus=0.8
status.Zoom=0.3
status.Status=Normal

5.6.5 setFocus

Request URL http://<server>/cgi-bin /api /devVideoInput/setFocus


DA

Method POST
HU

Request Params ( JSON format in body )


A_

Name Type R/O Description Example


HT

Channel uint O Video channel number, 0


TP

starting from 0, defaults


_

to 0
AP

FocusType uint R Focus type 1


I_
V3

1. Self learning focus


.3

The default value is 0,


7

and there is no actual


fo

effect when the input


rV

parameter is 0
el
se

Request Example
n

{
gS

"Channel ": 0,
dn

“FocusType”:1
Bh

}
d

Response Params ( JSON format in body )


Response Example
{}

5.6.6 [Config] Zoom Config


Zooming configuration parameter:
Config Data Params
Name Type R/O Description Example
VideoInZoom object[][] R Zooming configuration parameter;
two-dimensional array.

Camera APIs 258


The first dimension represents the
video channel which starts from 1,
and the second dimension
represents the lighting scene. The
beginning three elements constantly
represent day, night and general
scene.
+Name char[16] O Scene name "Day"
+Speed int O Zooming speed; range: [0–100] 8
+DigitalZoom bool O Whether to enable digital zoom true

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInZoom
Get Config Response Example
DA

table.VideoInZoom[0][0].Name=Day
HU

table.VideoInZoom[0][0].Speed=8
A_

table.VideoInZoom[0][0].DigitalZoom=true
HT


TP
_

Set Config Request Example


AP

http://192.168.1.108/cgi-
I_

bin/configManager.cgi?action=setConfig&VideoInZoom[0][0].DigitalZoom=false&VideoInZoom[0][0].S
V3

peed=8
.3
7

Set Config Response Example


fo

OK
rV
el

5.6.7 [Config] Focus Config


se
ngS

Vari-focal configuration parameter:


dn

Config Data Params


Bh

Name Type R/O Description Example


d

VideoInFocus object[][] R Vari-focal configuration parameter; two-


dimensional array.
The first dimension represents the video
channel which starts from 1, and the
second dimension represents the lighting
scene. The beginning three elements
constantly represent day, night and
general scene.
+Name char[16] O Scene name "Day"
+Mode int O Focus mode 2
2: Auto focus
3: Semi Auto (Customizable, uses auto
focus first, and then locks the focusing
module. Auto focus is not available at the

Camera APIs 259


time, and you have to manually adjust the
focal length.)
4: Manual focus
+FocusLimit int O Recommended limit value of near-field 2000
focusing; unit: mm.
The value range depends on the device
capability.
+FocusFarLimit int O Recommended limit value of far-field 5000
focusing; unit: mm.
The value range depends on the device
capability.
+AutoFocusTrace int O Vari-focal tracking 1
0: Close
1: Open
+IRCorrection int O IR light focusing and correction 1
0: No correction
DA

1: Manual correction
HU

2: Auto correction
A_

+Sensitivity int O Focusing sensitivity 1


HT

0: High
TP

1: Default
_

2: Low
AP

+FocusLimitSelec char[16] O Focuings limit mode (The distance limit for "Auto"
I_

tMode near-field focusing)


V3

"Manual"
.3
7

"Auto"
fo
rV

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
el

are as follows :
se
n

Get Config Request Example


gS

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInFocus
dn

Get Config Response Example


Bh

table.VideoInFocus[0][0].Name=Day
d

table.VideoInFocus[0][0].Mode=0
table.VideoInFocus[0][0].Sensitivity=1
table.VideoInFocus[0][0].FocusLimitSelectMode=Manual,
table.VideoInFocus[0][0].FocusLimit=2000
table.VideoInFocus[0][0].FocusFarLimit=5000
table.VideoInFocus[0][0].AutoFocusTrace=0
table.VideoInFocus[0][0].IRCorrection=0

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInFocus[0][0].FocusLimit=2000&VideoInFocus[0][0].F
ocusFarLimit=5000&VideoInFocus[0][0].Sensitivity=1
Set Config Response Example

Camera APIs 260


OK

5.7 Lighting

5.7.1 [Config] Lighting Config


Config Data Params
Name Type R/O Description Example
Lighting object[][] O two-dimensional array.
The first dimension represents the
video channel which starts from 1, and
the second dimension represents the
lighting scene. The beginning three
elements constantly represent day,
night and general scene.
DA

+Mode char[32] O Light mode. "ZoomPrio"


The range is {"Manual", "Auto", "Off",
HU

"ZoomPrio"}.
A_

The following are special for composite


HT

lamps.
TP

The range is { "Timing" , "SmartLight" ,


_
AP

"ExclusiveManual" }
I_

+Correction int O Light compensation. 2


V3

The range is [0—100], effective in


.3

ZoomPrio mode.
7

+NearLight object[] O near light.


fo
rV

++Light int O Range is [0—100]. 0


el

The luminance of near light.


se

++Angle int O Laser lamp angle normalized value 50


ngS

0~100
+MiddleLight object[] O middle light.
dn

++Light int O Range is [0—100]. 0


Bh

The luminance of middle light.


d

++Angle int O Laser lamp angle normalized value 50


0~100
+FarLight object[] O far light.
++Light int O Range is [0—100]. 0
The luminance of far light.
++Angle int O Laser lamp angle normalized value 50
0~100

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Lighting
Get Config Response Example

Camera APIs 261


table.Lighting[0][0].Correction=50
table.Lighting[0][0].FarLight[0].Angle=0
table.Lighting[0][0].FarLight[0].Light=0
table.Lighting[0][0].Mode=ZoomPrio
table.Lighting[0][0].NearLight[0].Angle=0
table.Lighting[0][0].NearLight[0].Light=0
table.Lighting[0][0].MiddleLight[0].Angle=50
table.Lighting[0][0].MiddleLight[0].Light=50
table.Lighting[0][1].Correction=50

Set Config Request Example


Turn on light:
http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&Lighting[0][0].FarLight[0].Light=10&Lighting[0][0].NearLight[
0].Light=90&Lighting[0][0].Mode=Manual
DA
HU

Shift the light to ZoomPrio mode:


A_

http://192.168.1.108/cgi-
HT

bin/configManager.cgi?action=setConfig&Lighting[0][0].Correction=50&Lighting[0][0].Mode=ZoomPrio
TP

Set Config Response Example


_

OK
AP
I_
V3

5.8 Video in Options


.3
7
fo
rV

5.8.1 Change binocular camera's splice mode


el
se

Request URL http://<server>/cgi-bin/api/MultiVideo/changeSpliceMode


ngS

Method POST
dn

Request Params ( JSON format in body )


Name Type R/O Description Example
Bh

R Splicing state 0
d

State int32
1: Switch to splice mode
(Binocular camera's monocular
mode)
0: Switch to non-splicing mode
(Binocular camera's original
mode)
Request Example
{
"State": 0
}

Response Params ( JSON format in body )


Name Type R/O Description Example

Camera APIs 262


Response Example
{}

5.8.2 [Config] Video in Options Config


It’s not recommended to use the CGI command from “ video in options ” ; It’s now recommended to
use the commands in 5.1 – 5.7.
Config Data Params
Name Type R/O Description Example
VideoInOption object[] O Video Input Options
s A one-dimensional array, with each
video input channel corresponding to a
configuration, and channel numbers
starting from 0.
+Backlight int O Range is [0—n] 0
DA

n depends on capability in
HU

GetVideoInputCaps
A_

0: backlight closed.
HT

1: backlight grade 1
TP

...
_AP

n - backlight grade n
+DayNightCol int O Range is {0,1,2} 0
I_
V3

or 0: always multicolor
.3

1: autoswitch along with brightness,


7

2: always monochrome,
fo

+WhiteBalanc char[32] O White balance Mode. "Disable"


rV

e Range is {Disable, Auto, Custom, Sunny,


el
se

Cloudy, Home, Office, Night}


n

Some IPC supports common modes:


gS

"Disable", "Auto", "Sunny", "Night",


dn

"Outdoor", "Custom"
Bh

Sometimes the device support other


d

advanced modes:
"CustomColorTemperature", "Indoor",
"ATW", "Manual", "AutoOutdoor",
"ManualDatum" and so on.
+Mirror bool O true: enable video mirror function false
false: disable video mirror function
+Flip bool O true: enable video flip function false
false: disable video flip function
+IrisAuto bool O true: IrisAuto false
false: No IrisAuto
+GainRed uint8 O Range is [0—100] 50
Gain for red value, Value is effective
when WhiteBalance is "Custom."
+GainBlue uint8 O Range is [0—100] 50

Camera APIs 263


Gain for blue value, Value is effective
when WhiteBalance is "Custom."
+GainGreen uint8 O Range is [0—100] 50
Gain for green value, Value is effective
when WhiteBalance is "Custom."
+ExposureVal double O Range is [0.1—80], unit is millisecond 0.1
ue1 If ExposureSpeed is 0(AutoExposure
enable), it's lower limit of AutoExposure
time, otherwise it's time of
manualExposure
+ExposureVal double O Range is [0.1-80], unit is millisecond 80
ue2 Upper limit of AutoExposure time, should
be bigger than ExposureValue1
+Gain uint8 O Range is [0—100] 50
If GainAuto is true, it's upper limit of
auto gain, else it's the fixed gain adjust
DA

value.
HU

+GainAuto bool O true: GainAuto true


A_

false: No GainAuto
HT

+SignalFormat enumchar[ O Range is {Inside, BT656, 720p, 1080p, "BT656"


TP

16] 1080i, 1080sF}


_

Input Signal Mode


AP

+Rotate90 uint8 O Range is {0,1,2} 0


I_

Video rotation:
V3

0: No rotate
.3
7

1: clockwise rotate 90°


fo

2: anticlockwise rotate 90°


rV

+ExternalSync float O Range is [0°—360°] 12.6


el

Phase External Synchronous Signal Phase


se
n

+ExternalSync uint8 O Range is {0,1} 0


gS

External Synchronous
dn

0: Internal Synchronization
Bh

1: External Synchronous
d

+AntiFlicker int O Range is {0,1,2} 0


AntiFlicker mode:
0: Outdoor
1: 50 Hz AntiFlicker
2: 60 Hz AntiFlicker
+ExposureSpe int O Range is [0 — n+1] 0
ed n depends on capability in
GetVideoInputCaps
0: AutoExposure
1-n-1: manual Exposure grade
n: AutoExposure with time limit.
n+1: manualExposure with user-defined
time

Camera APIs 264


(n is supported maximum exposure
grade )
+ExposureMo enumint O refer to VideoInExposure 0
de
+SmartIRExpo bool O true: enable, false: disable true
sure
+FlashControl object O flash control
++Mode int O Range is {0,1,2} 0
0: forbid flash
1: always flash
2: auto flash
++Value int O Range is [0—15] 0
Flashlight time-unit:
0: 0us,
1: 64us,
2: 128us,
DA

3: 192us
HU


A_

15 - 960us
HT

++PreValue int O Range is [0—100] 50


TP

It is threshold of brightness value: if


_

brightness is less than this value, flash


AP

light will begin to work.


I_

++Pole enumint O Range is {0,1, 2, 3} 0


V3

Trigger mode:
.3
7

0: low level
fo

1: high level
rV

2: rising-edge
el

3: falling-edge
se
n

+GlareInhibitio int O Range is [0—100] 1


gS

n GlareInhibition:
dn

0: Close GlareInhibition.
Bh

+NightOptions object O Special configuration options at night,


d

automatically switching to night


configuration parameters when the light
is dim at night.
See VideoInOptions, only parameter
"ExternalSyncPhase" is valid.
+NormalOptio object O refer to VideoInOptions
ns

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions
Get Config Response Example
head.Backlight=0

Camera APIs 265


table.VideoInOptions[0].DayNightColor=false
table.VideoInOptions[0].ExposureSpeed=0
table.VideoInOptions[0].ExposureValue1=0.100000
table.VideoInOptions[0].ExposureValue2=80.000000
table.VideoInOptions[0].ExternalSync=0
table.VideoInOptions[0].ExternalSyncPhase=0
table.VideoInOptions[0].FlashControl.Mode=0
table.VideoInOptions[0].FlashControl.Pole=0
table.VideoInOptions[0].FlashControl.Value=0
table.VideoInOptions[0].FlashControl.PreValue=0
table.VideoInOptions[0].Flip=false
table.VideoInOptions[0].Gain=50
table.VideoInOptions[0].GainAuto=true
table.VideoInOptions[0].IrisAuto=false
table.VideoInOptions[0].Mirror=false
table.VideoInOptions[0].NightOptions.AntiFlicker=0
DA

table.VideoInOptions[0].NightOptions.Backlight=0
HU

table.VideoInOptions[0].NightOptions.BacklightRegion[0]=3096
A_

table.VideoInOptions[0].NightOptions.BacklightRegion[1]=3096
HT

table.VideoInOptions[0].NightOptions.BacklightRegion[2]=5096
TP

table.VideoInOptions[0].NightOptions.BacklightRegion[3]=5096
_

table.VideoInOptions[0].NightOptions.BrightnessThreshold=50
AP

table.VideoInOptions[0].NightOptions.DayNightColor=2
I_

table.VideoInOptions[0].NightOptions.ExposureMode=0
V3

table.VideoInOptions[0].NightOptions.ExposureSpeed=0
.3
7

table.VideoInOptions[0].NightOptions.ExposureValue1=0
fo

table.VideoInOptions[0].NightOptions.ExposureValue2=40
rV

table.VideoInOptions[0].NightOptions.ExternalSyncPhase=125
el

table.VideoInOptions[0].NightOptions.Flip=false
se

table.VideoInOptions[0].NightOptions.Gain=50
n gS

table.VideoInOptions[0].NightOptions.GainAuto=true
dn

table.VideoInOptions[0].NightOptions.GainBlue=50
Bh

table.VideoInOptions[0].NightOptions.GainGreen=50
d

table.VideoInOptions[0].NightOptions.GainMax=50
table.VideoInOptions[0].NightOptions.GainMin=0
table.VideoInOptions[0].NightOptions.GainRed=50
table.VideoInOptions[0].NightOptions.GlareInhibition=0
table.VideoInOptions[0].NightOptions.IrisAuto=true
table.VideoInOptions[0].NightOptions.Mirror=false
table.VideoInOptions[0].NightOptions.Profile=3
table.VideoInOptions[0].NightOptions.ReferenceLevel=50
table.VideoInOptions[0].NightOptions.Rotate90=0
table.VideoInOptions[0].NightOptions.SunriseHour=0
table.VideoInOptions[0].NightOptions.SunriseMinute=0
table.VideoInOptions[0].NightOptions.SunriseSecond=0
table.VideoInOptions[0].NightOptions.SunsetHour=23
table.VideoInOptions[0].NightOptions.SunsetMinute=59

Camera APIs 266


table.VideoInOptions[0].NightOptions.SunsetSecond=59
table.VideoInOptions[0].NightOptions.SwitchMode=4
table.VideoInOptions[0].NightOptions.WhiteBalance=Auto
table.VideoInOptions[0].NightOptions.WideDynamicRange=0
table.VideoInOptions[0].NightOptions.WideDynamicRangeMode=0
table.VideoInOptions[0].NormalOptions.AntiFlicker=0
table.VideoInOptions[0].NormalOptions.Backlight=0
table.VideoInOptions[0].NormalOptions.BacklightRegion[0]=3096
table.VideoInOptions[0].NormalOptions.BacklightRegion[1]=3096
table.VideoInOptions[0].NormalOptions.BacklightRegion[2]=5096
table.VideoInOptions[0].NormalOptions.BacklightRegion[3]=5096
table.VideoInOptions[0].NormalOptions.BrightnessThreshold=50
table.VideoInOptions[0].NormalOptions.DayNightColor=1
table.VideoInOptions[0].NormalOptions.ExposureMode=0
table.VideoInOptions[0].NormalOptions.ExposureSpeed=0
table.VideoInOptions[0].NormalOptions.ExposureValue1=0
DA

table.VideoInOptions[0].NormalOptions.ExposureValue2=40
HU

table.VideoInOptions[0].NormalOptions.ExternalSyncPhase=125
A_

table.VideoInOptions[0].NormalOptions.Flip=false
HT

table.VideoInOptions[0].NormalOptions.Gain=50
TP

table.VideoInOptions[0].NormalOptions.GainAuto=true
_

table.VideoInOptions[0].NormalOptions.GainBlue=50
AP

table.VideoInOptions[0].NormalOptions.GainGreen=50
I_

table.VideoInOptions[0].NormalOptions.GainMax=50
V3

table.VideoInOptions[0].NormalOptions.GainMin=0
.3
7

table.VideoInOptions[0].NormalOptions.GainRed=50
fo

table.VideoInOptions[0].NormalOptions.GlareInhibition=0
rV

table.VideoInOptions[0].NormalOptions.IrisAuto=true
el

table.VideoInOptions[0].NormalOptions.Mirror=false
se

table.VideoInOptions[0].NormalOptions.Profile=0
ngS

table.VideoInOptions[0].NormalOptions.ReferenceLevel=50
dn

table.VideoInOptions[0].NormalOptions.Rotate90=0
Bh

table.VideoInOptions[0].NormalOptions.SunriseHour=0
d

table.VideoInOptions[0].NormalOptions.SunriseMinute=0
table.VideoInOptions[0].NormalOptions.SunriseSecond=0
table.VideoInOptions[0].NormalOptions.SunsetHour=23
table.VideoInOptions[0].NormalOptions.SunsetMinute=59
table.VideoInOptions[0].NormalOptions.SunsetSecond=59
table.VideoInOptions[0].NormalOptions.SwitchMode=0
table.VideoInOptions[0].ReferenceLevel=50
table.VideoInOptions[0].ReferenceLevelEnable=false
table.VideoInOptions[0].Rotate90=0
table.VideoInOptions[0].SignalFormat=BT656
table.VideoInOptions[0].WhiteBalance=Disable

Set Config Request Example

Camera APIs 267


Set Auto Exposure:
http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode=0&VideoInOptions[0].Expo
sureSpeed=0

Set Low Noise:


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode=1&VideoInOptions[0].Expo
sureSpeed=0&VideoInOptions[0].GainMin=0&VideoInOptions[0].GainMax=60

Set Low Motion Blur:


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode=2&VideoInOptions[0].Expo
sureSpeed=0&VideoInOptions[0].GainMin=0&VideoInOptions[0].GainMax=50&VideoInOptions[0].Expos
ureValue1=0&VideoInOptions[0].ExposureValue2=20
DA

Set Manual:
HU

http://192.168.1.108/cgi-
A_

bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode=4&VideoInOptions[0].Expo
HT

sureSpeed=32&VideoInOptions[0].GainMin=0&VideoInOptions[0].GainMax=50&VideoInOptions[0].Expo
TP

sureValue1=40&VideoInOptions[0].ExposureValue2=40
_ AP

Set SmartIRExposure:
I_

http://192.168.1.108/cgi-
V3

bin/configManager.cgi?action=setConfig&VideoInOptions[0].SmartIRExposure=true
.3
7
fo

Set Video Rotate:


rV

Filp:
el

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].Flip=true
se

Mirror:
n gS

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].Mirror=true
dn

Or turn 90°:
Bh

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].Rotate90=1
d

Set White Balance:


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInOptions[0].WhiteBalance=Night
Or
http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInOptions[0].WhiteBalance=Custom&VideoInOptions[0].
GainRed=50&VideoInOptions[0].GainBlue=50&VideoInOptions[0].GainGreen=50
(Sometimes you should set mode first before set GainRed or GainBlue:
http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoInOptions[0].WhiteBalance=Custom )
Set Config Response Example
OK

Camera APIs 268


6 Storage APIs

6.1 Storage Devices

6.1.1 Get Hard Disk Information


Get the hard disk information.
Request URL http://<server>/cgi-bin/storageDevice.cgi?action=factory.getPortInfo
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Request Example
DA

http://192.168.1.108/cgi-bin/storageDevice.cgi?action=factory.getPortInfo
HU
A_

Response Params ( key=value format in body )


HT

Name Type R/O Description Example


TP

into object R Return the hard disk information


_
AP

+Total uint O The number of ports of the bus, including 2


the expansion bus.
I_
V3

+Plug uint O The number of the mounted IDE (damaged 1


.3

IDEs are excluded)


7

+Mask uint64 O Indicates whether there is an IDE 1


fo

(including damaged IDE) mounted on the


rV

bus channel.
el
se

Each bit represents the main IDE or the


n

sub IDE of the bus channel.


gS

If the bit is set to "1", there is a mounted


dn

IDE. If the bit is set to "0", there is no


Bh

mounted IDE. For example, bit 0


d

represents the main IDE of IDE0, bit1


represents the sub IDE of IDE0, bit2
represents the main IDE of IDE1, bit3
represents the sub IDE of IDE1, and more.
+Bad uint O Indicates whether there is a damaged IDE 0
mounted on each channel.
Each bit represents the main or sub IDE of
each channel. If the bit is set to "1", there
is a damaged IDE. If the bit is set to "0",
there is no damaged IDE. See Mask for the
corresponding relationship.
+IDE uint O The number of mounted IDE 1
+Esata uint O The total port number of the eSATA 4
Response Example

Storage APIs 269


info.Total=2
info.Plug=1
info.Mask=1
info.Bad=0
info.IDE=1
info.Esata=4

6.1.2 Get the Name of All Storage Devices


Get the name of all storage devices.
Request URL http://<server>/cgi-bin/storageDevice.cgi?action=factory.getCollect
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/storageDevice.cgi?action=factory.getCollect
DA
HU

Response Params ( key=value format in body )


A_

Name Type R/O Description Example


HT

list char[][64] R Return the name of the storage [ "/dev/sda0",


TP

device "/dev/sda1", "/dev/sg1"]


_ AP

Response Example
I_

list[0]=/dev/sda0
V3

list[1]=/dev/sda1
.3

list[2]=/dev/sg1
7
fo

6.1.3 Get Storage Device Information


rV
el
se

Get all the storage device information .


ngS

Request URL http://<server>/cgi-bin/storageDevice.cgi?action=getDeviceAllInfo


dn

Method GET
Request Params ( key=value format in URL )
Bh

Name Type R/O Description Example


d

Request Example
http://192.168.1.108/cgi-bin/storageDevice.cgi?action=getDeviceAllInfo

Response Params ( key=value format in body )


Name Type R/O Description Example
list object R Return object
Object array of the storage device
+info object[] R
information
++Detail object[] O Partition information
+++IsError bool O Whether the partition is abnormal false
+++Pointer uint O Partition operation handle 27023434
+++TotalBytes double O Total partition space; unit: Byte 0

Storage APIs 270


Partition type "ReadWrite"
char[16
+++Type O "ReadWrite": Read and write partition
]
"ReadOnly": Read only partition
char[12 "/mnt/dvr/sda0"
+++Path O Partition name
8]
+++UsedBytes double O Occupied partition space; unit: Byte
char[32 "/dev/sda"
++Name R Device name
]
Device status "Success"
"Error": Failed to get the device status
++State char[4] R "Initializing": Getting the device status
"Success": Successfully get the device
status
Response Example
list.info[0].Detail[0].IsError=false
list.info[0].Detail[0].Pointer=27023434
DA

list.info[0].Detail[0].TotalBytes=0
HU

list.info[0].Detail[0].Type=ReadWrite
A_

list.info[0].Detail[0].Path=/mnt/dvr/sda0
HT

list.info[0].Detail[0].UsedBytes=0
TP

list.info[0].Name=/dev/sda
_

list.info[0].State=Success
AP
I_

6.1.4 Get Storage Capability


V3
.3
7

Request URL http://<server>/cgi-bin/storage.cgi?action=getCaps


fo

Method GET
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Example


se
n

Request Example
gS

http://192.168.1.108/cgi-bin/storage.cgi?action=getCaps
dn
Bh

Response Params ( key=value format in body )


d

Name Type R/O Description Example


caps object R Storage Capabilities
+RedundantDisk object O redundant 2
++Support bool O does support false
+SupportRemote bool O does support remote storage limit false
Limit default false
Response Example
caps.RedundantDisk.Support=false
caps.SupportRemoteLimit=true

6.1.5 Format Camera SD-Card


Request URL http://<server>/cgi-bin/storageDevice.cgi?action=setDevice

Storage APIs 271


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
operation FormatPatition
type char[] R
FormatPatition: format partition
The value is got from cgi API "Get /dev/sda&
storage device information" (/cgi-
path char[] O
bin/storageDevice.cgi?action=getDevic
eAllInfo).
formattype object[] O disk part information
+fs char[] R file system type fat32
Request Example
http://192.168.1.108/cgi-
bin/storageDevice.cgi?action=setDevice&type=FormatPatition&path=/dev/sda&formattype[0].fs=fat32

Response Params ( OK in body )


DA

Response Example
HU

OK
A_
HT
TP

6.1.6 [Config] Hard Disk Recording Type


_
AP
I_

Config Data Params


V3

Name Type R/O Description Example


.3

SupportDiskRe O Supported disk recording type info.


7

object
cordType
fo
rV

+DiskRecordT char[32] O Disk recording mode "SMR"


el

ype "SMR", "CMR"


se
ngS

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
dn

Get Config Request Example


Bh

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=SupportDiskRecordType
d

Get Config Response Example


table.SupportDiskType.DiskRecordType =SMR

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&SupportDiskRecordType.DiskRecordType=SMR
Set Config Response Example
OK

6.1.7 Getting Disk Information


Request URL http://<server>/cgi-bin/api/StorageDeviceManager/getDeviceInfos

Storage APIs 272


Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
volume char[32] R Volume type "PhysicalVolume"
enumchar[32]{
"PhysicalVolume": physical volume
(includes physical disk in RAID and VG,
and includes USB flash drive).
"InvidualPhysicalVolume": Individual
physical volume (does not participate in
RAID, virtual, and clone groups).
"RaidVolume": Raid volume
"InvidualRaidVolume": individual RAID
volume (does not participate in virtual and
other groups)
"VolumeGroup": VG virtual volume group
DA

"iSCSI": iSCSI volume


HU

"GlobalSpareVolume": global hot standby


A_

volume
HT

"NAS": NAS volume (Includes FTP,


TP

SAMBA, NFS)
_

}
AP

Keep consistent with the definition of


I_

Device Information
V3

Volume type value is "”, get the


.3
7

information of all volumes, including


fo
rV

InvidualPhysical、InvidualRaid、
el

VolumeGroup
se
n

Request Example
gS

{
dn

"volume": "PhysicalVolume"
Bh

}
d

Response Params ( JSON format in body )


Name Type R/O Description Example
device object[256] O Disk Information [ , …, ]
+Name char[32] O Device name "/dev/sda"
+Media char[] O Media type "CDROM"
"CDROM": disk
"DISK": hard drive
"FLASH": SD card
"FROCK": frock
"UNKNOWN": unknown
+BUS char[8] O Bus type, supporting "ATA", "SATA", "ATA"
"USB", "SDIO", "SCSI", "SAS” and
more.

Storage APIs 273


+PhysicNo uint O Physical number of the similar device 1
storage port, starting from 1.
+LogicNo uint O Logic number of the similar device 0
storage port
+Capacity double O Total capacity, Unit: Byte 314537952
+Volume enumchar[ O Volume type enumchar[32]{ "RaidVolume"
32] "PhysicalVolume": independent
physical volume/global hot standby
"RaidVolume": Raid volume (Includes
sub-disk of the soft Raid and local hot
standby)
"VolumeGroup": VG virtual volume
group (once VG is composed of single
disk or Raid, then the result will be
VG)
"iSCSI": iSCSI volume
DA

+State enumchar[ O Physical hard disk status information "Running"


HU

32] enumchar[32]{
A_

"Error": general faults. Some partition


HT

still can be used.


TP

"Fatal": serious faults, all of the


_

partitions cannot be used (new DVR


AP

fault type)
I_

"Offline": offline status of physical


V3

disks (not used)


.3
7

"Running": the operating status of the


fo

physical disk
rV

"RaidSub": the disk now is a single


el

disk and it was a Raid sub disk before.


se
n

It is likely to automatically add Raid


gS

after the device is restarted.


dn

/*( the four status are used in single


Bh

disk)*/
d

"Active": RAID active


"Sync": RAID sync
"Spare": RAID hot standby (local)
"Faulty": RAID invalid
"Rebuilding": RAID rebuild
"Removed": RAID removed (not used)
"WriteError": RAID write error
"WantReplacement": RAID need to be
replaces
"Replacement": RAID is replacement
/*(the 9 status are used in RAID sub
disk)*/
"GlobalSpare": global hot standby
/*(the status is used in global hot

Storage APIs 274


standby disk)*/
"SnapshotParent": snapshot parent
"SnapshotChild": snapshot child
"VolumeCloneParent": volume clone
parent
"VolumeCloneChild": volume clone
child
/*(the 4 status are used in
snapshot/volume clone disk)*/
}
+Parent char[32] O Name of the storage physical device "/dev/md0"
or name of the parent storage group of
the virtual device. It might be VG or
RAID.
+Type enumchar[ O Disk feature (read and write, read- "ReadWrite"
32] only)
DA

enumchar[32]{
HU

"ReadWrite"
A_

"ReadOnly"
HT

}
TP

+Module char[32] O Device module "HCT7210SLA360"


_

+SerialNo char[32] O Device serial number "STH607MGAS"


AP

+Temperature float O Single disk temperature (unit: °C) 38.5


I_

+Firmware char[32] O Firmware version "ST6OA31E"


V3

+Partitions object[] O Partition information


.3
7

Each partition has a WorkDirectory.


fo

When the disk has fault or is not


rV

formatted, the field does not exist.


el

++Name char[32] O Partition name "/dev/sda0"


se
n

++Start double O Start to offset. Unit: Byte 0


gS

++Total double O Total capacity. Unit: Byte 2000000000


dn

++Remain double O The remained capacity. Unit: Byte 1000000000


Bh

++MountOn char[256] O Mount point. The App use this "/mnt/dvr/idea0"


d

directory name to access files.


++FileSystem char[16] O File system, such as "DHFS", "EXT3", "VFAT"
"EXT4", "XFS", "VFAT", "UNKNOWN”
and more. Empty means it is not
formatted.
++IsSupportFs bool O Whether the device supports the "ture"
current file system.
++Status enumchar[ O Partition status information "LvAvailable"
32] enumchar[32]{
"LvAvailable": LV available status
"LvNotAvailable": LV unavailable
status
++Group char[32] O Partition working group "ReadWrite2"

Storage APIs 275


++IsError bool O Whether the file system of the working false
directory fails
+Raid object O RAID information, and it is only valid to
RAID volume.
++Members char[][16] O RAID member, including sub disk and ["/dev/sda",
local hot standby disk. "/dev/sdb",
"/dev/sdc"]
++MemberInfos object[] O RAID member information
one-dimensional array, and the index
is corresponding to Members.
+++ID uint16 O Disk number, and it is used to describe 1
the slot of the disk on the disk cabinet.
+++Spare bool O Whether it is local hot standby. true
True: local hot standby
False: RAID sub disk
++Level uint8 O RAID Level 5
DA

++RaidDevices uint16 O Number of RAID devices 3


HU

++TotalDevices uint16 O Total number of RAID devices



A_
HT

++State char[][16] O RAID status, and it is a combination of ["Active",


TP

various status. RAID sub disk status is "Degraded"]


_

achieved by State. Supports status


AP

"Active" "Inactive" "Clean" "Failed"


I_

"Degraded" "Recovering" "Resyncing"


V3

"Reshaping" "Checking" "NotStarted"


.3
7

"Readonly" "DataCorrupt" "CreatVG"


fo

RAID disk is being created to VG


rV

++ActiveDevices uint16 O Number of active devices 3


el

++WorkingDevice uint16 O Number of working devices 3


se
n

s
gS

++FailedDevices uint16 O Number of failed devices 3


dn

++SpareDevices uint16 O Number of hot standby devices 3


Bh

++RecoverPercen double O Recover percent. Its is valid when 12.3


d

t “Recovering” or “Resyncing” is in
RAID status. Value: [0, 100]
++RecoverMBps double O Recover speed. Its is valid when 29.531
“Recovering” or “Resyncing” is in
RAID status. Unit: Mbps
++RecoverTimeR double O Remaining time. When in RAID status, 30.0
emain “Recovering” or “Resyncing” is valid.
Unit: Minute (s)
++AliasName char[24] O RAID alias, UTF-8 code. "Image storage
RAID"
++Sync enumint8 O Sync mode. I/O resources distributing 0
strategy enumint8{
0: Self-adaptive (The default value is )
1: I / O is prioritized to RAID

Storage APIs 276


synchronization.
2: I / O is prioritized to hard drive to
write data.
3: Balance
}
+ISCSI object O ISCSI information. It is only valid for
ISCSI disk.
++Name char[16] O iSCSI name. It is the same with the "iSCSIA"
Name in NAS configuration.
+Tank object O Information of the expansion drawer
where the disk in (Note: it refers to
Dahua expansion drawer, not the disk
cabinet)
You can get the information of the
through storage.getTankInfo
++Level int O Control module is level 0. 1
DA

++Slot uint16 O Board number on the related cabinet. 0


HU

(starting from 0). Each cabinet can be


A_

inserted on many expansion boards


HT

and each expansion drawer (such as


TP

Raid card) can cascade many


_

cabinets.
AP

++TankNo uint16 O Expansion port number of the 1


I_

expansion drawer at the same level


V3

(starting from 0). There may have


.3
7

many ports on the expansion board


fo

(such as SAS)
rV

+Slot int O Slot of the disk. 0


el

+PowerMode enumchar[ O Hard drive power status "StandBy"


se
n

32] enumchar[32]{
gS

"None": unknown status


dn

"Active": active status


Bh

"StandBy": standby status


d

"Idle": idle status


}
+PreDiskCheck enumchar[ O Hard drive pre-check status (EVS "Good"
32] optional field, and uses with disk pre-
check function)
enumchar[32]{
"Good": read speed of the hard drive
can be up to 120, and there are few
mistakes in smart information. Nothing
else is wrong.
"Warn": there are several mistake
records in cmd information and there
are mistake records in smart
information.

Storage APIs 277


"Error": there are several mistake
records in cmd information and there
are mistake records in smart
information. There are records of bad
sectors.
"Willfail": hard drive speed is low,
under 64 M. There are several mistake
records in cmd information and there
are mistake records in smart
information. There are records of bad
sectors.
"Fail": the hard drive failed to return.
"None": unknown status
"Becheck": checking status
"Checkfail": failed to check
}
DA

+OpState enumint O enumint{ 0


HU

0: Normal working status


A_

1: Standby status
HT

2: Waiting to be formatted
TP

3: Formatting…
_

4: Waiting to be fragmentated
AP

5: Fragmenting...
I_

6: Waiting to create RAID


V3

7: Creating RAID...
.3
7

8: Waiting to delete RAID


fo

9: Deleting RAID...
rV

10: Waiting to fix file system


el

11: Fixing...
se

12: Waiting to pre-check


ngS

13: Pre-checking...
dn

14: Configuring hot standby disk...


Bh

15: Create storage pool


d

16: Delete storage pool


}
+ManuFactory enumchar[ O Hard drive device manufacturer "WD"
32] enumchar[32]{
"Unknown"
"WD": WD
"SG" : Seagate
}
+PosLedState enumint8 O Status of the hard dive GPS indicator 0
enumint8{
0: The hard dive GPS indicator is off
1: The hard dive GPS indicator is on
}

Storage APIs 278


+CmrSize uint32 O It refers to CMR hard drive, and the 0
unit is sector (513 bytes)
Otherwise, the field is 0.
+MRType enumint O Disk recording method 0
enumint{
0: CMR
1: PMR
2: SMR
}
+MediaType char[32] O Disk media type "SSD"
+DRTypeMixState enumchar[ O Hard drive recording method "Mix"
32] enumchar[32]{
"Single": single record method,
"Mix": mixed record method.
}
Example
DA

{
HU

"device": {
A_

"Name" : "/dev/sda",
HT

"Media" : "CDROM",
TP

"BUS" : "ATA",
_

"PhysicNo" : 1,
AP

"LogicNo" : 0,
I_

"Capacity" : 314537952,
V3

"Volume": "RaidVolume",
.3
7

"State": "Running",
fo

"Parent" : "/dev/md0",
rV

"Type" : "ReadWrite",
el

"Module" : "HCT7210SLA360",
se
n

"SerialNo" : "STH607MGAS",
gS

"Temperature" : 38.5,
dn

"Firmware" : "ST6OA31E",
Bh

"Partitions" : [ {
d

"Name" : "/dev/sda0",
"Start" : 0,
"Total" : 2000000000,
"Remain" : 1000000000,
"MountOn" : "/mnt/dvr/idea0",
"FileSystem" : "VFAT",
"IsSupportFs" : "ture",
"Status" : "LvAvailable",
"Group" : "ReadWrite2",
"IsError" : false
},…,{}],
"Raid" : {
"Members" : ["/dev/sda", "/dev/sdb", "/dev/sdc"],
"MemberInfos" : [{

Storage APIs 279


"ID" : 1,
"Spare" : true,
}, …, {}],
"Level" : 5,
"RaidDevices" : 3,
"TotalDevices" : 4,
"State" : ["Active", "Degraded"],
"ActiveDevices" : 3,
"WorkingDevices" : 3,
"FailedDevices" : 3,
"SpareDevices" : 3,
"RecoverPercent" : 12.3,
"RecoverMBps" : 29.531,
"RecoverTimeRemain" : 30.0,
"AliasName" : "image storage RAID"
"Sync" : 0
DA

},//end of Raid
HU

"ISCSI" : {
A_

"Name" : "iSCSIA"
HT

}, // end of ISCSI
TP

"Tank" : {
_

"Level" : 1,
AP

"Slot" : 0,
I_

"TankNo" : 1
V3

}, // end of Tank
.3
7

"Slot" : 0,
fo

"PowerMode" : "StandBy",
rV

"PreDiskCheck" : "Good",
el

"OpState" : 0
se

"ManuFactory": "WD",
n
gS

"PosLedState": 0,
dn

"CmrSize": 0,
Bh

"MRType": 0,
d

"MediaType": "SSD",
"DRTypeMixState": "Mix"
}
}

6.2 NAS

6.2.1 [Config] NAS Information


Config Data Params
Name Type R/O Description Example
NAS object[] O
+Name char[128] O NAS name "NFS1"

Storage APIs 280


+Enable bool O Enable/Disable the NAS. true
+Protocol enumchar[ O The range is { "NFS"
32] "FTP",
"SFTP"
"NFS"
"SMB"
"ISCSI"
"Cloud"
}
+CloudProtoc enumchar[ O The range is { "EFS"
ol 32] "Baidu"
"Dropbox"
"Kuaipan"
"SkyDrive"
"EFS"
}
DA

+Address char[128] O The IP address or host name. "www. tech.com"


HU

+Port uint16 O NAS port. 21


A_

+UserName char[32] O NAS username. "anonymity"


HT

+Password char[32] O NAS password. "none"


TP

+Directory char[64] O Directory name. "share"


_
AP

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
I_

are as follows :
V3

Get Config Request Example


.3
7

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=NAS
fo

Get Config Response Example


rV

table.NAS[0].Name=FTP1
el

table.NAS[0].Enable = true
se
n

table.NAS[0].Protocol =FTP"
gS

table.NAS[0].Address =www.ttt.com
dn

table.NAS[0].Port =21
Bh

table.NAS[0].UserName =anonymity
d

table.NAS[0].Password =none
table.NAS[0].Directory =share

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&NAS[0].Name=nas01&NAS[0].Enable=true
Set Config Response Example
OK

Storage APIs 281


6.3 Storage Point

6.3.1 [Config] Record Storage Point


Config Data Params
Name Type R/O Description Example
RecordStorag object[] O array index starts from 0, which means
ePoint video channel(equals to video channel
index -1, and so 0 means channel 1).
+TimingRecor object O Timed recording storage points, each
d type of recording or capture may have
multiple storage points
++Local int/bool O Local directory number, count from 1. For 1
some reason, The front-end devices use
Boolean type. True for SD card, false for
DA

no SD card.
HU

++Redundant char[64] O Redundant directory name. "Redundant"


A_

++Remote char[64] O Remote directory name. "FTP-FTP1"


HT

++AutoSync bool O When remote directory recovers, auto false


TP

synchronize local directory to remote


_

directory or not.
AP

++AutoSyncR int O From the remote directory recovering 0


I_

ange
V3

time, how long the data needs to be


.3

synchronized. The unit is hour. If it is 0,


7

all the data needs to be synchronized.


fo

++LocalForEm bool O When the remote directory is unusable, false


rV

ergency save the data the local directory or not.


el

++CompressB int O 15
se

The days' data which will be compressed.


n

efore
gS

+ManualRecor object O refer to "TimingRecord"


dn

d
Bh

+VideoDetect object O refer to "TimingRecord"


d

Record
+AlarmRecord object O refer to "TimingRecord"
+EventRecord object O refer to "TimingRecord"
+TimingSnapS object O refer to "TimingRecord"
hot
+ManualSnap object O refer to "TimingRecord"
Shot
+VideoDetect object O refer to "TimingRecord"
SnapShot
+AlarmSnapS object O refer to "TimingRecord"
hot
+EventSnapS object O refer to "TimingRecord"
hot

Storage APIs 282


Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=RecordStoragePoint
Get Config Response Example
table.RecordStoragePoint [0].TimingRecord.Local=1
table.RecordStoragePoint [0].TimingRecord. Redundant =Redundant
table.RecordStoragePoint [0].TimingRecord. Remote =FTP
table.RecordStoragePoint [0].TimingRecord. AutoSync= false
table.RecordStoragePoint [0].TimingRecord. AutoSyncRange =0
table.RecordStoragePoint [0].TimingRecord. LocalForEmergency =false
table.RecordStoragePoint [0].TimingRecord. CompressBefore =15

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&RecordStoragePoint[0].TimingRecord.Local=local
DA

Set Config Response Example


HU

OK
A_
HT
TP

6.3.2 [Config] Storage Group


_
AP

Config Data Params


I_
V3

Name Type R/O Description Example


.3

StorageGroup object[] O storage group


7

+Name char[32] O Storage group name. "ReadWrite"


fo
rV

+Memo char[256] O "For Reading Writing


Storage group memo.
Files"
el
se

+FileHoldTime int O How many days the file will hold. 0


n

+OverWrite bool O true


gS

Over write or not when there is not


enough storage.
dn

+Channels object[] O
Bh

++MaxPicture uint32 O The max pictures beyond which the 10000


d

s old pictures will be over written. If it


is 0, the old pictures will be not over
written.
++Path char[16] O The channel path. "00"
+RecordPathR char[64] O record path naming rule "%y-%M-%d/%c/dav/%e/
ule %h
/%h.%m.%s-%h.%m.%s.
%t"
+PicturePathR char[256] O picture path naming rule "%y-%M-%d/%c/jpg/%h/%
ule m/%s.jpg"

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example

Storage APIs 283


http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup
Get Config Response Example
table.StorageGroup[0].Channels[0].MaxPictures=0
table.StorageGroup[0].FileHoldTime=0
table.StorageGroup[0].Memo=For Reading & Writing Files
table.StorageGroup[0].Name=ReadWrite
table.StorageGroup[0].OverWrite=true
table.StorageGroup[0].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S][%R].jpg
table.StorageGroup[0].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.%s[%E][%O@%S
][%R].dav
table.StorageGroup[1].Channels[0].MaxPictures=0
table.StorageGroup[1].FileHoldTime=0
table.StorageGroup[1].Memo=For FTP Files
table.StorageGroup[1].Name=Remote
table.StorageGroup[1].OverWrite=true
table.StorageGroup[1].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S][%R].jpg
DA

table.StorageGroup[1].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.%s[%E][%O@%S
HU

][%R].da
A_
HT

Set Config Request Example


TP

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageGroup[0].Name=main
_

Set Config Response Example


AP

OK
I_
V3
.3
7

6.4 SDEncrypt
fo
rV
el

6.4.1 Encrypt SD Card


se
ngS

Request URL http://<server>/cgi-bin/SDEncrypt.cgi?action=encrypt


dn

Method GET
Bh

Request Params ( key=value format in URL )


Name Type R/O Description Example
d

The device name is got from cgi API Get /dev/mmc0


storage device information (cgi-
deviceName char[] R
bin/storageDevice.cgi?action=getDevic
eAllInfo).
password char[] O password 123456
Request Example
http://192.168.1.108/cgi-
bin/SDEncrypt.cgi?action=encrypt&deviceName=/dev/mmc0&password=123456

Response Params ( OK in body )


Response Example
OK

Storage APIs 284


6.4.2 Decrypt SD Card
Request URL http://<server>/cgi-bin/SDEncrypt.cgi?action=decrypt
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
The device name is got from cgi API Get /dev/mmc0
storage device information (cgi-
deviceName char[] R
bin/storageDevice.cgi?action=getDevic
eAllInfo).
password char[] O password 123456
Request Example
http://192.168.1.108/cgi-
bin/SDEncrypt.cgi?action=decrypt&deviceName=/dev/mmc0&password=123456
DA

Response Params ( OK in body )


HU

Response Example
OK
A_
HT
TP

6.4.3 Clear SD Card Password


_ AP
I_

Request URL http://<server>/cgi-bin/SDEncrypt.cgi?action=clearPassword


V3

Method GET
.3
7

Request Params ( key=value format in URL )


fo

Name Type R/O Description Example


rV

The device name is got from cgi API Get /dev/mmc0


el

storage device information (cgi-


se

deviceName char[] R
bin/storageDevice.cgi?action=getDeviceAl
ngS

lInfo).
dn

password char[] O password 123456


Bh

Request Example
d

http://192.168.1.108/cgi-
bin/SDEncrypt.cgi?action=clearPassword&deviceName=/dev/mmc0&password=123456

Response Params ( OK in body )


Response Example
OK

6.4.4 Modify SD Card Password


Request URL http://<server>/cgi-bin/SDEncrypt.cgi?action=modifyPassword
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example

Storage APIs 285


The device name is got from cgi API Get /dev/mmc0
storage device information (cgi-
deviceName char[] R
bin/storageDevice.cgi?action=getDeviceAl
lInfo).
password char[] O new password 123456
oldPassword char[] O old password 654321
Request Example
http://192.168.1.108/cgi-
bin/SDEncrypt.cgi?action=clearPassword&deviceName=/dev/mmc0&password=123456&oldPasswor
d=654321

Response Params ( OK in body )


Response Example
OK
DA

6.4.5 Get SD Card Operate Error Policy


HU
A_

Request URL http://<server>/cgi-bin/SDEncrypt.cgi?action=getOperateErrorPolicy


HT

Method GET
TP

Request Params ( key=value format in URL )


_AP

Name Type R/O Description Example


I_

The device name is got from cgi API Get /dev/mmc0


V3

storage device information (cgi-


deviceName char[] R
.3

bin/storageDevice.cgi?action=getDeviceAl
7

lInfo).
fo
rV

operation, range{ decrypt, decrypt


operate char[] R
modifyPassword, clearPassword}
el
se

Request Example
ngS

http://192.168.1.108/cgi-
bin/SDEncrypt.cgi?action=getOperateErrorPolicy&deviceName=/dev/mmc0&operate=decrypt
dn
Bh

Response Params ( key=value format in body )


d

Name Type R/O Description Example


policy object R policy info
+leftTimes uint O remain operate times, max is 5 5
+lockSeconds uint O lock operate time, unit is seconds, max is 30 30
Response Example
policy.leftTimes=5
policy.lockSeconds=30

6.4.6 [Config] Storage Health Alarm Settings


Config Data Params
Name Type R/O Description Example
StorageHealthAlar object O SD card health alarm
m

Storage APIs 286


+Enable bool R enable/disable true
+LowerLimit int O SD card remaining life, alarm 10
below this value: 0~99
+EventHandler EventHandler O Setting of EventHandler is
described in SetEventHandler.

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific
examples are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=StorageHealthAlarm
Get Config Response Example
table.StorageHealthAlarm.Enable=true
table.StorageHealthAlarm.LowerLimit=10
table.StorageHealthAlarm.EventHandler= …(output of EventHandler is described in GetEventHandler)

Set Config Request Example


DA

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageHealthAlarm.Enable=true
HU

Set Config Response Example


A_

OK
HT
TP
_ AP
I_
V3
.3
7
fo
rV
el
se
ngS
dn
Bh
d

Storage APIs 287


7 Display APIs

7.1 GUI

7.1.1 [Config] GUISet


Config Data Params
Name Type R/O Description Example
GUISet object[] O array index starts from 0, which
means video channel(equals to video
channel index -1, and so 0 means
channel 1).
DA

+WindowAlph uint8 O Diaphaneity of the window 128


HU

a background.
A_

+TimeTitleEna bool O true


Show the time title or not.
HT

ble
TP

+TimeTitlePos uint[4] O The position of the time title.


_

+MenuShowO enumint O 0: Show the directory. 0


AP

ption 1: Hide the directory.


I_
V3

2: Timing-hide the directory.


+MenuAutoHi uint8 O 3
.3

How many seconds to hide the


7

deTime directory.
fo

+ScreenSave uint8 O Screen saver time,in minutes 10


rV

Time 0~120,0 for disable screen saver


el

+AutoLogout uint8 O How many minutes to auto logout. The 10


se
n

range is [0-120]. 0 expresses not


gS

logout.
dn

+ChannelTitle bool O true


Show the channel title or not.
Bh

ShowEnable
d

+ChannelTitle uint[4] O
The position of the channel title.
Pos
+AutoGuideEn bool O true
Auto guide or not when startup.
able

Please refer to “4.2.1 Get and Set Configure” for configuration getting and setting. Specific
examples are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=GUISet
Get Config Response Example
table.GUISet[0].WindowAlpha =128
table.GUISet[0].TimeTitleEnable =true
table.GUISet[0].TimeTitlePos[0]=0
table.GUISet[0].TimeTitlePos[1]=0

Display APIs 288


table.GUISet[0].TimeTitlePos[2]=8191
table.GUISet[0].TimeTitlePos[3]=8191
table.GUISet[0].MenuShowOption=0
table.GUISet[0].MenuAutoHideTime=10
table.GUISet[0].AutoLogout=10
table.GUISet[0].ChannelTitleShowEnable=true
table.GUISet[0].ChannelTitlePos[0]=0
table.GUISet[0].ChannelTitlePos[1]=0
table.GUISet[0].ChannelTitlePos[2]=8191
table.GUISet[0].ChannelTitlePos[3]=8191
table.GUISet[0].AutoGuideEnable=true

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&GUISet[0].WindowAlpha=192&GUISet[0].TimeTitleEnable=fal
DA

se&GUISet[0].MenuShowOption=1
HU

Set Config Response Example


A_

OK
HT
TP
_

7.2 Split Screen


AP
I_
V3

7.2.1 Split Screen Mode


.3
7
fo

 Get split screen mode


rV

Request URL http://<server>/cgi-bin/split.cgi?action=getMode


el

Method GET
se
n

Request Params ( key=value format in URL )


gS

Name Type R/O Description Example


dn

channel uint R the display screen No. Start from 1 and 1


Bh

<= 2.
d

Request Example
http://192.168.1.108/cgi-bin/storage.cgi?action=getCaps

Response Params ( key=value format in body )


Name Type R/O Description Example
mode char[] R mode, range{split1,split2,split4,split6,s split1
plit8,split9,split12,split16,split20,split25,
split36,split64,split144,pip1,pip3, "Free
", "CompositeSplit1" / "FitDisplayUnit
1", "CompositeSplit1" / "FitDisplayUni
t4"};
group uint R the No. of a group which contains 4
certain number channels. For example,
if 16 video channels display in split4

Display APIs 289


Mode which contains 4 video channels
on Screen, then there are 4 groups and
each group contains 4 video channels.
Response Example
mode=split1
group=4

 Set split screen mode


Request URL http://<server>/cgi-bin/split.cgi?action=setMode
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel uint R the display screen No. Start from 1 and 1
<= 2.
mode char[] R mode, range{split1,split2,split4,split6,split split1
DA

8,split9,split12,split16,split20,split25,split3
HU

6,split64,split144,pip1,pip3, "Free", "Com


A_

positeSplit1" / "FitDisplayUnit1", "Compo


HT

siteSplit1" / "FitDisplayUnit4"};
TP

group uint R the No. of a group which contains certain 4


_

number channels. For example, if 16 video


AP

channels display in split4 Mode which


I_

contains 4 video channels on Screen, then


V3

there are 4 groups and each group


.3
7

contains 4 video channels.


fo

Request Example
rV

http://192.168.1.108/cgi-bin/split.cgi?action=setMode&channel=1&mode=split4&group=1
el
se

Response Params ( OK in body )


n gS

Response Example
dn

OK
Bh

7.3 Moniter Tour


d

7.3.1 [Config] Moniter Tour


Config Data Params
Name Type R/O Description Example
MonitorTour object[] O array index starts from 0, which means
display screen No. (equals to display
screen No. -1, and so 0 means display
screen No.1).
+Enable bool O MonitorTour or not. true
+Interval uint O MonitorTour interval. 5
+Mask object O
++Split1 char[] O Channel array for split1 "0, 1, 3"

Display APIs 290


++Split8 char[] O Channel array for split8 "0, 1, 3"
+Collections char[][32] O ["Favortite1",
Split collections
"Split4.Favortite2"]

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=MonitorTour
Get Config Response Example
table.MonitorTour[0].Enable=true
table.MonitorTour[0].Interval=128
table.MonitorTour[0].Mask.Split1=0,1,5
table.MonitorTour[0].Mask.Split8=0,1,5
table.MonitorTour[0].Collections=Favortite1, Favortite2…

Set Config Request Example


DA

http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MonitorTour[0].Enable=true
HU

Set Config Response Example


A_

OK
HT
TP
_

7.3.2 Enable Tour


AP
I_
V3

Request URL http://<server>/cgi-bin/split.cgi?action=enableTour


.3

Method GET
7

Request Params ( key=value format in URL )


fo
rV

Name Type R/O Description Example


el

the display screen No. Start from 1 and <= 1


channel uint R
se

2.
n

bool R true
gS

enable true or false


Request Example
dn

http://192.168.1.108/cgi-bin/split.cgi?action=enableTour&channel=1&enable=true
Bh
d

Response Params ( OK in body )


Response Example
OK

7.3.3 [Config] Monitor Collection


Config Data Params
Name Type R/O Description Example
MonitorCollection object O monitor collection
+<collectionname> object O Favorite objects, describing
them with scenes
Each collection corresponds to a
configuration, and the name of

Display APIs 291


the collection object can be
specified by the user
collectionname is a variable
field name
++Mode char[] O The range is the same as Split1
SetSplitMode.
++Windows object[] O windows
+++Enable bool O Enable the window or not. true
+++Device char O The device Id. device1
+++VideoChannel uint O The video channel. 5
+++VideoStream char[] O The range is {"Main", "Extra1", Main
"Extra2", "Extra3", "Auto"}.
+++AudioChannel uint O The audio channel. 5
+++AudioStream char[] O The range is {"Main", "Extra1", Main
"Extra2", "Extra3", "Auto"}.
DA

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
HU

are as follows :
A_

Get Config Request Example


HT

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=MonitorCollection
TP

Get Config Response Example


_

table.MonitorCollection.collectionname. Mode=Split1
AP

table.MonitorCollection.collectionname.Windows[0].Enable= true
I_
V3

table.MonitorCollection.collectionname.Windows[0].Device=device1
.3

table.MonitorCollection.collectionname.Windows[0].VideoChannel=5
7

table.MonitorCollection.collectionname.Windows[0].VideoStream=Main
fo

table.MonitorCollection.collectionname.Windows[0].AudioChannel=5
rV

table.MonitorCollection.collectionname.Windows[0].AudioStream=Main
el


se
ngS

Set Config Request Example


dn

http://192.168.1.108/cgi-
Bh

bin/configManager.cgi?action=setConfig&MonitorCollection.Favorite1.Mode=split4&MonitorCollection.F
d

avorite1.Windows[1].Enable=true&MonitorCollection.Favorite1.Windows[1].VideoChannel=2
Set Config Response Example
OK

Display APIs 292


8 Comm APIs

8.1 PTZ

8.1.1 [Config] PTZ Config


Config Data Params
Name Type R/O Description Example
Ptz object[] O
+ProtocolNam char[32] O PTZ protocol name depends on PTZ "DH_SD"
e capability.
Refer to GetProtocolList to get the
DA

protocol list.
HU

+Address int O Range is [0—255]. 8


A_

Device address, if there are more


HT

than one device connected to this


TP

port, distinguish them by this


_

address.
AP

+Attribute multiTypeA O Serial Port Properties [115200, 8, "Even", "1"]


I_
V3

rray The first value represents the baud


.3

rate, Range is {1200, 2400, 4800,


7

9600, 19200, 38400, 57600, 115200}.


fo

The second value represents the data


rV

bit, Range is {4, 5, 6, 7, 8}.


el
se

The third value represents the parity


n

bit, Range is {Even, Mark, None, Odd,


gS

Space}.
dn

The fourth value represents the stop


Bh

bit, Range is {1, 1.5, 2}.


d

+ControlPriorit enumchar[ O PTZ control priority,the range is "RS485"


y 32] "RS485", "Net".
default : "Net"
+ControlDelay uint O PTZ control delay time, unit: second 10
Time
+Homing int[2] O The first value represents the preset [0, 30]
point corresponding to automatic
homing, with a value range of {-1,0-
255},
-1: Indicates that automatic homing is
not supported
[0-255]: Preset point
The second value represents the
automatic homing time, which is in

Comm APIs 293


seconds when there is no operation
for a period of time. The value range
is [0-65535]

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Ptz
Get Config Response Example
table.Ptz[0].Address=8
table.Ptz[0].Attribute[0]=115200
table.Ptz[0].Attribute[1]=8
table.Ptz[0].Attribute[2]=Even
table.Ptz[0].Attribute[3]=1
table.Ptz[0].Homing[0]=0
table.Ptz[0].Homing[1]=30
DA

table.Ptz[0].NumberInMatrixs=0
HU

table.Ptz[0].ProtocolName=NONE
A_
HT

Set Config Request Example


TP

http://192.168.1.108/cgi-
_

bin/configManager.cgi?action=setConfig&Ptz[0].Address=192.168.0.1&Ptz[0].Attribute[0]=9600
AP

Set Config Response Example


I_

OK
V3
.3
7
fo

8.1.2 Get PTZ Protocol List


rV
el
se

Request URL http://<server>/cgi-bin/ptz.cgi?action=getProtocolList


n

Method GET
gS

Request Params ( key=value format in URL )


dn

Name Type R/O Description Example


Bh

channel int O video channel index which starts from 1. 1


d

Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=getProtocolList&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
into object R the protocol list that PTZ can support
+RS char[][] O RS485 ["Pelco", "DH-SD1"]
+Coaxial char[][] O Coaxial ["HD-CVI", "HD-
CVI2.0"]
Response Example
info.RS[0]=Pelco
info.RS[1]=DH-SD1
info.Coaxial[0]=HD-CVI
info.Coaxial[1]=HD-CVI2.0

Comm APIs 294


8.1.3 Get PTZ Capability of Current Protocol
Request URL http://<server>/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int O video channel index which starts from 1. 1
Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=getProtocolList&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
caps object R capabilities
+AlarmLen uint O Alarm length in protocol. 4
+AuxMax int O Maximum number for auxiliary 255
DA

functions.
HU

+AuxMin int O Minimum number for auxiliary functions. 1


+CamAddrMax int O Maximum channel address. 255
A_

+CamAddrMin int O Minimum channel address. 1


HT

+Flip bool O True or false, support picture flip or not. false


TP

+Focus bool O True or false, support focus or not. true


_ AP

+Iris bool O True or false, support Iris adjusts or not. true


I_

+Menu bool O True or false, support internal menu of true


V3

the PTZ or not.


.3

+MonAddrMax uint O Maximum monitor address. 255


7
fo

+MonAddrMin uint O Minimum monitor address. 1


rV

+Name char[] O Name of the operation protocol. "DH-SD"


el

+Pan bool O True or false, support pan or not.


se

+PanSpeedMax uint O Maximum pan speed. 255


ngS

+PanSpeedMin uint O Minimum pan speed. 0


dn

+PatternMax uint O Maximum pattern path number. 8


+PatternMin uint O Minimum pattern path number. 1
Bh

+PresetMax uint O Maximum preset point number. 255


d

+PresetMin uint O Minimum preset point number. 1


+Tile bool O True or false, support tilt or not. true
+Zoom bool O True or false, support zoom or not. true
+TileSpeedMin uint O Maximum tile speed. 2
+TileSpeedMax uint O Minimum tile speed. 25
+TourMin uint O Maximum tour path number. 1
+TourMax uint O Minimum tour path number. 255
+Type uint O Type of PTZ protocol. 0
+ object O range
PtzMotionRange
++HorizontalAngl uint[2] O Horizontal angle range,[0] for minimum [0, 360]
e angle,[1] for maximum angle
it only when Pan was true

Comm APIs 295


++VerticalAngle int[2] O Vertical angle range,[0] for minimum [-20, 90]
angle,[1] for maximum angle
it only when Tile was true
+ZoomMax uint O Maximum Zoom. 20
it only when Zoom was true
+ZoomMin uint O Minimum Zoom 1
it only when Zoom was true
Response Example
caps.AlarmLen=0
caps.AuxMax=8
caps.AuxMin=1
caps.CamAddrMax=255
caps.CamAddrMin=1
caps.Flip=false
caps.Focus=false
caps.Interval=200
DA

caps.Iris=false
HU

caps.Menu=false
A_

caps.MonAddrMax=255
HT

caps.MonAddrMin=0
TP

caps.Name=DH-SD1
_

caps.Pan=false
AP

caps.PanSpeedMax=255
I_

caps.PanSpeedMin=1
V3

caps.PatternMax=5
.3
7

caps.PatternMin=1
fo

caps.PresetMax=80
rV

caps.PresetMin=1
el

caps.Tile=false
se
n

caps.TileSpeedMax=255
gS

caps.TileSpeedMin=1
dn

caps.TourMax=7
Bh

caps.TourMin=0
d

caps.Type=1
caps.Zoom=false
caps.PtzMotionRange.HorizontalAngle[0]=0
caps.PtzMotionRange.HorizontalAngle[1]=360
caps.PtzMotionRange.VerticalAngle[0]=-20
caps.PtzMotionRange.VerticalAngle[1]=90
caps.ZoomMax=30
caps.ZoomMin=1

8.1.4 Get PTZ Status


Request URL http://<server>/cgi-bin/ptz.cgi?action=getStatus
Method GET
Request Params ( key=value format in URL )

Comm APIs 296


Name Type R/O Description Example
channel int O video channel index which starts from 1. 1
Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=getProtocolList&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
status object R ptz status
+UTC uint O UTC 6538920
MoveStatus char[8] O range{"Idle" ,"Moving" ,"Unknown" } "Idle"
ZoomStatus char[8] O Zoom status "Idle"
range{ "Idle" ,"Zooming" ,"Unknown" }
PresetID int O preset id 10
Postion double[ O Comma separated numeric string [0.0, 0.0, 1.0]
3] The first element represents the
horizontal angle, Normalize values to -
DA

1~1
HU

The first element represents the


A_

vertical angle, Normalize values to -


HT

1~1
TP

The first element represents the


_

magnificationNormalize values to 0~1


AP

Response Example
I_

status.UTC=6538920
V3

status.MoveStatus=Idle
.3
7

status.ZoomStatus=Idle
fo

status.PresetID=10
rV

status.Position[0]=0.0
el

status.Position[1]=0.0
se
n

status.Position[2]=1.0
gS
dn

8.1.5 PTZ Control


Bh
d

 PTZ Basic Movement


Start moving the PTZ.
Request URL http://<server>/cgi-bin/ptz.cgi?action=start
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R The PTZ channel index; starting from 1 1
code char[16 R See the following table for the operation "Up"
] codes for PTZ movement.
arg1 int O Operation parameter 1: See the following 0
table for the meaning of the operation
code.

Comm APIs 297


arg2 int O Operation parameter 2: See the following 1
table for the meaning of the operation
code.
arg3 int O Operation parameter 3: See the following 0
table for the meaning of the operation
code.
Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Up&arg1=0&arg2=1&arg3=0

Response Params ( OK in body )


Response Example
OK
Stop moving the PTZ.
Request URL http://<server>/cgi-bin/ptz.cgi?action=stop
Method GET
DA

Request Params ( key=value format in URL )


HU

Name Type R/O Description Example


A_

channel int R The PTZ channel index; starting from 1 1


HT

code char[16 R See the following table for the operation "Up"
TP

] codes for PTZ movement.


_

arg1 int O Operation Parameter 1, reserved. 0


AP

arg2 int O Operation Parameter 2, reserved. 0


I_
V3

arg3 int O Operation Parameter 3, reserved. 0


.3

Request Example
7

http://192.168.1.108/cgi-bin/ptz.cgi?action=stop&code=Up&channel=1&arg1=0&arg2=0&arg3=0
fo
rV
el

Response Params ( OK in body )


se

Response Example
n
gS

OK
dn

Appendix: Operation codes for PTZ movement and the parameters.


Bh
d

Code Code description arg1 arg2 arg3


Vertical motion speed;
Up Move up 0 0
range: [1–8]
Vertical motion speed;
Down Move down 0 0
range: [1–8]
Horizontal motion speed;
Left Move left 0 0
range: [1–8]
Horizontal motion speed;
Right Move right 0 0
range: [1–8]
Move in an upper-left Vertical motion speed; Horizontal motion speed;
LeftUp 0
direction range: [1–8] range: [1–8]
Move in an upper- Vertical motion speed; Horizontal motion speed;
RightUp 0
right direction range: [1–8] range: [1–8]

Comm APIs 298


Code Code description arg1 arg2 arg3
Move in an lower-left Vertical motion speed; Horizontal motion speed;
LeftDown 0
direction range: [1–8] range: [1–8]
Move in an lower-right Vertical motion speed; Horizontal motion speed;
RightDown 0
direction range: [1–8] range: [1–8]
ZoomWide Zoom in 0 0 0
ZoomTele Zoom out 0 0 0
FocusNear Focus (near-field) 0 0 0
FocusFar Focus (far-field) 0 0 0
IrisLarge Increase the aperture 0 0 0
Decrease the
IrisSmall 0 0 0
aperture
 PTZ Continuously Moving
Start continuously moving the PTZ
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=Continuously
DA

Method GET
HU

Request Params ( key=value format in URL )


A_

Name Type R/O Description Example


HT

channel int R The PTZ channel index; starting from 1 1


TP

code char[16 R PTZ continuously moving operation code, "Continuously"


_

] must be "Continuously".
AP

arg1 int O See the table below for the motion 5


I_
V3

direction and step length.


.3

arg2 int O See the table below for the motion 5


7

direction and step length.


fo

arg3 int O Zooming speed; range: [-100–100] 5


rV

arg4 int O Overtime period; unit: s (maximum 3600 60


el
se

s).
n

If the PTZ does not receive the stop


gS

command before the preset overtime


dn

period, it will stop moving automatically.


Bh

Request Example
d

http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&code=Continuously&channel=1&arg1=5&arg2=5&arg3=5&arg4=60

Response Params ( OK in body )


Response Example
OK

Appendix: Direction of the continuous movement of the PTZ and the step length parameters.

Move description arg1 arg2


Continuously move left < -4 0
Continuously move right >4 0
Continuously move up 0 >4
Continuously move down 0 < -4

Comm APIs 299


Move description arg1 arg2
Continuously move in an
< -4 >4
upper-left direction
Continuously move in an
>4 >4
upper-right direction
Continuously move in a
< -4 < -4
lower-left direction
Continuously move in a
>4 < -4
lower-right direction
Stop continuously moving the PTZ
Request URL http://<server>/cgi-bin/ptz.cgi?action=stop&code=Continuously
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R The PTZ channel index; starting from 1 1
DA

code char[16 R PTZ continuously moving operation code, "Continuously"


HU

] must be "Continuously".
A_

arg1 int O Operation Parameter 1, reserved. 0


HT

arg2 int O Operation Parameter 2, reserved. 0


arg3 int O Operation Parameter 3, reserved. 0
TP
_

arg4 int O Operation Parameter 4, reserved. 0


AP

Request Example
I_

http://192.168.1.108/cgi-
V3

bin/ptz.cgi?action=stop&code=Continuously&channel=1&arg1=0&arg2=0&arg3=0&arg4=0
.3
7
fo
rV

Response Params ( OK in body )


el

Response Example
se

OK
ngS

 3D Positioning
dn

The PTZ moves to the specified position [startX, startY], [endX, endY] on the screen through 3D
Bh

positioning .
d

Request URL http://<server>/cgi-bin/ptzBase.cgi?action=moveDirectly


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R The PTZ channel index; starting from 1 1
startPoint int[2] R The start point of the target matrix [startX, [7253,2275]
startY]; relative coordinate; the value of X
and Y is normalized to a number between
0 and 8192.
endpoint int[2] R The end point of the target matrix [startX, [7893,3034]
startY]; relative coordinate; the value of X
and Y is normalized to a number between
0 and 8192.
Request Example

Comm APIs 300


http://192.168.1.108/cgi-
bin/ptzBase.cgi?action=moveDirectly&channel=1&startPoint[0]=7253&startPoint[1]=2275&endPoint[0
]=7893&endPoint[1]=3034

Response Params ( OK in body )


Response Example
OK
 Relative PTZ Movement
Relative PTZ movement
Request URL http://<server>/cgi-bin/ptz.cgi?action=moveRelatively
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R The PTZ channel index; starting from 1 1
arg1 double O Relative horizontal motion; normalized to [-1, 0.1
DA

1]
HU

arg2 double O Relative vertical motion; normalized to [-1, 1] 0.1


A_

arg3 double O Relative zoom; normalized to [-1, 1] 0.5


HT

Request Example
TP

http://192.168.1.108/cgi-
_

bin/ptz.cgi?action=moveRelatively&channel=1&arg1=0.1&arg2=0.1&arg3=0.5
AP
I_

Response Params ( OK in body )


V3

Response Example
.3
7

OK
fo

Accurate PTZ Positioning


rV


el

Accurate PTZ positioning; the actual parameter range depends on the device. For capability
se

details, execute the command mentioned in "8.1.3 Get PTZ Capability of Current Protocol".
n gS

Request URL http://<server>/cgi-bin/ptz.cgi?action=moveAbsolutely


dn

Method GET
Bh

Request Params ( key=value format in URL )


d

Name Type R/O Description Example


channel int R The PTZ channel index; starting from 1 1
arg1 double O Relative horizontal position; normalized to -0.8
[-1, 1];
arg1 < 0: Angle = 180.0 × arg1 + 360.0,
and the actual range is [180.0, 360.0];
arg1 ≥ 0: Angle = 180.0 × arg1, and the
actual range is [0, 180.0]
arg2 double O Absolute vertical position; normalized to [- 0.3
1, 1];
Angle = -180.0 × arg2 , the actual range
is [-180.0, 180.0]
arg3 double O Absolute zoom; normalized to [-1, 1] 0.5
Request Example

Comm APIs 301


http://192.168.1.108/cgi-bin/ptz.cgi?action=moveAbsolutely&channel=1&arg1=-
0.8&arg2=0.3&arg3=0.5

Response Params ( OK in body )


Response Example
OK

8.1.6 Preset
 Getting Preset Information
Get the preset information
Request URL http://<server>/cgi-bin/ptz.cgi?action=getPresets
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
DA

channel int O Video channel number, starting from 1; 1


HU

the default value is 1.


Request Example
A_

http://192.168.1.108/cgi-bin/ptz.cgi?action=getPresets&channel=1
HT
TP

Response Params ( key=value format in body )


_ AP

Name Type R/O Description Example


I_

presets object[] R List of preset information


V3

+Index int R The preset number; starting from 1 1


.3

+Name char[256] O The preset name "preset1"


7
fo

Preset type 0
rV

0: Normal preset
+Type int O
el

1: Preset configured with smart rules


se

2: Special preset
ngS

Function List of the Special Presets "VideoBlack"


dn

"VideoBlack": Day/Night Mode (B/W)


+PresetFunction char[16] O "VideoColor": Day/Night Mode (Color)
Bh

"VideoBrightness": Day/Night Mode


d

(Auto)
The coordinate of the preset and [900, -900, 5]
zoom; three integers
The first parameter is the horizontal
coordinate; range: [0,3599], referring
to 0° to 359.9° (the number of degree
+Position int[3] O
is expanded by 10 times).
The second parameter is the vertical
coordinate; range: [-1800,1800],
referring to -180° to 180° (the number
of degree is expanded by 10 times).

Comm APIs 302


The third parameter is the expansion
parameter; range: [0,128], referring to
the zoom range.
Response Example
presets[0].Index=1
presets[0].Name=Preset 1
presets[0].Type=0
presets[0].PresetFunction="VideoBlack"
presets[0].Position=[900, -900, 5]

 Moving to the Preset
Move to the preset.
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=GotoPreset
Method GET
Request Params ( key=value format in URL )
DA

Name Type R/O Description Example


HU

channel int R The PTZ channel index; starting from 1 1


A_

arg1 int O Ignore 0


HT

arg2 int R The preset number; starting from 1 1


TP

arg3 int O Ignore 0


_

Request Example
AP

http://192.168.1.108/cgi-
I_

bin/ptz.cgi?action=start&code=GotoPreset&channel=1&arg1=0&arg2=1&arg3=0
V3
.3
7

Response Params ( OK in body )


fo

Response Example
rV

OK
el
se
n

 Configuring Preset
gS

Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=SetPreset


dn

Method GET
Bh

Request Params ( key=value format in URL )


d

Name Type R/O Description Example


channel int R The PTZ channel index; starting from 1 1
arg1 int O Ignore 0
arg2 int R The preset number; starting from 1 1
arg3 int O Ignore 0
Request Example
http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&code=SetPreset&channel=1&arg1=0&arg2=2&arg3=0

Response Params ( OK in body )


Response Example
OK
 Configuring Preset Name

Comm APIs 303


Configure a name for the preset.
Request URL http://<server>/cgi-bin/ptz.cgi?action=setPreset
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R The PTZ channel index; starting from 1 1
arg1 int R The preset number; starting from 1 2
arg2 char[256] R The preset name "preset2"
Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=setPreset&channel=1&arg1=2&arg2=preset2

Response Params ( OK in body )


Response Example
OK
 Deleting Preset
DA

Delete a preset.
HU

Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=ClearPreset


A_

Method GET
HT

Request Params ( key=value format in URL )


TP

Name Type R/O Description Example


_

channel int R The PTZ channel index; starting from 1 1


AP

arg1 int O Ignore 0


I_
V3

arg2 int R The preset number; starting from 1 2


.3

arg3 int O Ignore 0


7

Request Example
fo

http://192.168.1.108/cgi-
rV

bin/ptz.cgi?action=start&code=ClearPreset&channel=1&arg1=0&arg2=2&arg3=0
el
se
n

Response Params ( OK in body )


gS

Response Example
dn

OK
Bh
d

8.1.7 Tour
 Start the tour
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=StartTour
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R the number of tour route 1
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example

Comm APIs 304


http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&channel=1&code=StartTour&arg1=1&arg2=0&arg3=0

Response Params ( OK in body )


Response Example
OK
 Stop the tour
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=StopTour
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R the number of tour route 1
arg2 int R Ignore 0
DA

arg3 int R Ignore 0


HU

Request Example
http://192.168.1.108/cgi-
A_

bin/ptz.cgi?action=start&channel=1&code=StopTour&arg1=1&arg2=0&arg3=0
HT
TP

Response Params ( OK in body )


_ AP

Response Example
I_

OK
V3

Add tour group


.3


7

Request URL http://<server>/cgi-bin/ptz.cgi?action=setTour


fo

Method GET
rV

Request Params ( key=value format in URL )


el
se

Name Type R/O Description Example


n

channel int R PTZ channel index which starts from 1. 1


gS

Range is [1 — n].
dn

arg1 int R the number of tour route 1


Bh

arg2 int R tour name 1


d

Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=setTour&channel=1&arg1=1&arg2=1

Response Params ( OK in body )


Response Example
OK
 Delete tour group
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=ClearTour
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].

Comm APIs 305


arg1 int R the number of tour group 1
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&channel=1&code=ClearTour&arg1=1&arg2=0&arg3=0

Response Params ( OK in body )


Response Example
OK
 Add tour preset
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=AddTour
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
DA

channel int R PTZ channel index which starts from 1. 1


HU

Range is [1 — n].
arg1 int R the number of tour route 1
A_

arg2 int R the number of preset 2


HT

arg3 int R Ignore 0


TP

Request Example
_
AP

http://192.168.1.108/cgi-
I_

bin/ptz.cgi?action=start&channel=1&code=AddTour&arg1=1&arg2=2&arg3=0
V3
.3

Response Params ( OK in body )


7
fo

Response Example
rV

OK
el
se
n

 Delete tour preset


gS
dn

Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=DelTour


Method GET
Bh

Request Params ( key=value format in URL )


d

Name Type R/O Description Example


channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R the number of tour route 1
arg2 int R the number of preset 2
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=DelTour&arg1=1&arg2=2&arg3=0

Response Params ( OK in body )


Response Example
OK

Comm APIs 306


8.1.8 Scan
 Set left boundary
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=SetLeftLimit
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R the scan number 1
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&channel=1&code=SetLeftLimit&arg1=1&arg2=0&arg3=0
DA
HU

Response Params ( OK in body )


A_

Response Example
HT

OK
TP
_

Set right boundary


AP


I_

Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=SetRightLimit


V3

Method GET
.3

Request Params ( key=value format in URL )


7

Name Type R/O Description Example


fo
rV

channel int R PTZ channel index which starts from 1. 1


el

Range is [1 — n].
se

arg1 int R the scan number 1


n

arg2 int R Ignore 0


gS

arg3 int R Ignore 0


dn

Request Example
Bh

http://192.168.1.108/cgi-
d

bin/ptz.cgi?action=start&channel=1&code=SetRightLimit&arg1=1&arg2=0&arg3=0

Response Params ( OK in body )


Response Example
OK

 Start scan
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=AutoScanOn
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].

Comm APIs 307


arg1 int R the scan number 1
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&channel=1&code=AutoScanOn&arg1=1&arg2=0&arg3=0

Response Params ( OK in body )


Response Example
OK

 Stop scan
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=AutoScanOff
Method GET
Request Params ( key=value format in URL )
DA

Name Type R/O Description Example


HU

channel int R PTZ channel index which starts from 1. 1


Range is [1 — n].
A_

arg1 int R the scan number 1


HT

arg2 int R Ignore 0


TP

arg3 int R Ignore 0


_
AP

Request Example
I_

http://192.168.1.108/cgi-
V3

bin/ptz.cgi?action=start&channel=1&code=AutoScanOff&arg1=1&arg2=0&arg3=0
.3
7
fo

Response Params ( OK in body )


rV

Response Example
el

OK
se
ngS

8.1.9 Pattern
dn

Start pattern record


Bh


d

Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=SetPatternBegin


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R pattern number 1
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&channel=1&code=SetPatternBegin&arg1=1&arg2=0&arg3=0

Response Params ( OK in body )

Comm APIs 308


Response Example
OK
 Stop pattern record
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=SetPatternEnd
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R pattern number 1
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&channel=1&code=SetPatternEnd&arg1=1&arg2=0&arg3=0
DA
HU

Response Params ( OK in body )


Response Example
A_

OK
HT
TP

 Start pattern
_

Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=StartPattern


AP

Method GET
I_
V3

Request Params ( key=value format in URL )


.3

Name Type R/O Description Example


7

channel int R PTZ channel index which starts from 1. 1


fo

Range is [1 — n].
rV

arg1 int R pattern number 1


el
se

arg2 int R Ignore 0


n

arg3 int R Ignore 0


gS

Request Example
dn

http://192.168.1.108/cgi-
Bh

bin/ptz.cgi?action=start&channel=1&code=StartPattern&arg1=1&arg2=0&arg3=0
d

Response Params ( OK in body )


Response Example
OK

 Stop pattern
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=StopPattern
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R pattern number 1

Comm APIs 309


arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&channel=1&code=StopPattern&arg1=1&arg2=0&arg3=0

Response Params ( OK in body )


Response Example
OK

8.1.10 Pan
 Start pan
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=AutoPanOn
DA

Method GET
HU

Request Params ( key=value format in URL )


Name Type R/O Description Example
A_

channel int R PTZ channel index which starts from 1. 1


HT

Range is [1 — n].
TP

arg1 int R Ignore 0


_ AP

arg2 int R Ignore 0


I_

arg3 int R Ignore 0


V3

Request Example
.3

http://192.168.1.108/cgi-
7
fo

bin/ptz.cgi?action=start&channel=1&code=AutoPanOn&arg1=0&arg2=0&arg3=0
rV
el

Response Params ( OK in body )


se

Response Example
ngS

OK
dn
Bh

 Stop pan
d

Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=AutoPanOff


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R Ignore 0
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&channel=1&code=AutoPanOff&arg1=0&arg2=0&arg3=0

Comm APIs 310


Response Params ( OK in body )
Response Example
OK

8.1.11 [Config] PTZ Auto Movement


Config Data Params
Name Type R/O Description Example
PtzAutoMove object[][] O A two-dimensional array, the first
ment dimension represents the channel of the
ptz, and the second dimension
represents the task configuration of the
channel.
+Enable bool O Enable/Disable PtzAutoMovement true
+TimeSection TimeSched O The time range during which the PTZ [["0 00:00:00-
DA

ule timed action takes effect, for example: 23:59:59","0


HU

00:00:00-23:59:59","0
A_

TimeSchedule[week][section]=1 00:00:00-23:59:59","0
HT

10:00:00-11:00:00 00:00:00-23:59:59""0
TP

00:00:00-23:59:59","0
_
AP

week: represents the day of the week, 00:00:00-23:59:59"]]


with values ranging from 0 to 6. 0
I_
V3

corresponds to Sunday, 1 corresponds


.3

to Monday, and so on.


7
fo

section: represents the time period, with


rV

a maximum of 6
el
se

+Function enumchar[ O enumchar[32]{ "Scan"


n

32] Scan
gS

Preset
dn

Pattern
Bh

Tour
d

None
}
+ScanId int O Scan Id, start from 1 1
+PresetId int O Preset Id, start from 1 1
+PatternId int O Pattern Id, start from 1 1
+TourId int O Tour Id, start from 1 1
+AutoHoming object O auto homing
++Enable bool O enable/disable true
++Time uint O Recover time, unit is second. 300
+SnapshotEna bool O Enable/Disable Snap, when "Fuction" is false
ble "Preset".
+SnapshotDel int O Delay time of snap, when "Fuction" is 30
ayTime "Preset".

Comm APIs 311


Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=PtzAutoMovement
Get Config Response Example
table.PtzAutoMovement[0][0].AutoHoming.Time=30
table.PtzAutoMovement[0][0].Enable=false
table.PtzAutoMovement[0][0].Function=None
table.PtzAutoMovement[0][0].PatternId=0
table.PtzAutoMovement[0][0].PresetId=0
table.PtzAutoMovement[0][0].ScanId=0
table.PtzAutoMovement[0][0].SnapshotDelayTime=30
table.PtzAutoMovement[0][0].SnapshotEnable=false
table.PtzAutoMovement[0][0].TimeSection[0][0]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[0][1]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[0][2]=0 00:00:00-23:59:59
DA

table.PtzAutoMovement[0][0].TimeSection[0][3]=0 00:00:00-23:59:59
HU

table.PtzAutoMovement[0][0].TimeSection[0][4]=0 00:00:00-23:59:59
A_

table.PtzAutoMovement[0][0].TimeSection[0][5]=0 00:00:00-23:59:59
HT

table.PtzAutoMovement[0][0].TimeSection[1][0]=0 00:00:00-23:59:59
TP

table.PtzAutoMovement[0][0].TimeSection[1][1]=0 00:00:00-23:59:59
_

table.PtzAutoMovement[0][0].TimeSection[1][2]=0 00:00:00-23:59:59
AP

table.PtzAutoMovement[0][0].TimeSection[1][3]=0 00:00:00-23:59:59
I_

table.PtzAutoMovement[0][0].TimeSection[1][4]=0 00:00:00-23:59:59
V3

table.PtzAutoMovement[0][0].TimeSection[1][5]=0 00:00:00-23:59:59
.3
7

table.PtzAutoMovement[0][0].TimeSection[2][0]=0 00:00:00-23:59:59
fo

table.PtzAutoMovement[0][0].TimeSection[2][1]=0 00:00:00-23:59:59
rV

table.PtzAutoMovement[0][0].TimeSection[2][2]=0 00:00:00-23:59:59
el

table.PtzAutoMovement[0][0].TimeSection[2][3]=0 00:00:00-23:59:59
se

table.PtzAutoMovement[0][0].TimeSection[2][4]=0 00:00:00-23:59:59
ngS

table.PtzAutoMovement[0][0].TimeSection[2][5]=0 00:00:00-23:59:59
dn

table.PtzAutoMovement[0][0].TimeSection[3][0]=0 00:00:00-23:59:59
Bh

table.PtzAutoMovement[0][0].TimeSection[3][1]=0 00:00:00-23:59:59
d

table.PtzAutoMovement[0][0].TimeSection[3][2]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[3][3]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[3][4]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[3][5]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[4][0]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[4][1]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[4][2]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[4][3]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[4][4]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[4][5]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[5][0]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[5][1]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[5][2]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[5][3]=0 00:00:00-23:59:59

Comm APIs 312


table.PtzAutoMovement[0][0].TimeSection[5][4]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[5][5]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[6][0]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[6][1]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[6][2]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[6][3]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[6][4]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TimeSection[6][5]=0 00:00:00-23:59:59
table.PtzAutoMovement[0][0].TourId=0

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&PtzAutoMovement[0][0].Function=Preset&PtzAutoMovement[
0][0].PresetId=1
Set Config Response Example
DA

OK
HU
A_
HT

8.1.12 PTZ Restart


TP
_AP

Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=Restart


Method GET
I_
V3

Request Params ( key=value format in URL )


.3

Name Type R/O Description Example


7

channel int R PTZ channel index which starts from 1. 1


fo
rV

Range is [1 — n].
arg1 int R Ignore 0
el
se

arg2 int R Ignore 0


n

arg3 int R Ignore 0


gS

Request Example
dn

http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Restart&arg1=0&arg2=0&arg3=0
Bh
d

Response Params ( OK in body )


Response Example
OK

8.1.13 PTZ Reset


Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=Reset
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].

Comm APIs 313


arg1 int R Ignore 0
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Reset&arg1=0&arg2=0&arg3=0

Response Params ( OK in body )


Response Example
OK

8.1.14 OSD Menu


 Enter the menu
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=Menu
DA

Method GET
HU

Request Params ( key=value format in URL )


Name Type R/O Description Example
A_

channel int R PTZ channel index which starts from 1. 1


HT

Range is [1 — n].
TP

arg1 int R Ignore 0


_ AP

arg2 int R Ignore 0


I_

arg3 int R Ignore 0


V3

Request Example
.3

http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Menu&arg1=0&arg2=0&arg3=0
7
fo
rV

Response Params ( OK in body )


el

Response Example
se

OK
ngS
dn

 Exit the menu


Bh

Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=Exit


d

Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R Ignore 0
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Exit&arg1=0&arg2=0&arg3=0

Response Params ( OK in body )


Response Example

Comm APIs 314


OK

 Confirm
Request URL http://<server>/cgi-bin/ptz.cgi?action=start&code=Enter
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R PTZ channel index which starts from 1. 1
Range is [1 — n].
arg1 int R Ignore 0
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Enter&arg1=0&arg2=0&arg3=0
DA

Response Params ( OK in body )


HU

Response Example
A_

OK
HT
TP

 Start the basic operation of menu


_AP

Request URL http://<server>/cgi-bin/ptz.cgi?action=start


I_

Method GET
V3

Request Params ( key=value format in URL )


.3
7

Name Type R/O Description Example


fo

code char[] R range: { MenuUp


rV

MenuUp
el

MenuDown
se

MenuLeft
n gS

MenuRight
dn

}
Bh

channel int R PTZ channel index which starts from 1. 1


d

Range is [1 — n].
arg1 int R Ignore 0
arg2 int R Ignore 0
arg3 int R Ignore 0
Request Example
http://192.168.1.108/cgi-
bin/ptz.cgi?action=start&channel=1&code=MenuUp&arg1=0&arg2=0&arg3=0

Response Params ( OK in body )


Response Exa0mple
OK

Comm APIs 315


8.1.15 [Config] Electronic PTZ
Config Data Params
Name Type R/O Description Example
EptzLink object[] O A one-dimensional array with element
subscripts representing channel
numbers.
+Enable bool O Whether to enable the electronic PTZ true
function in this channel.
Channel indicates the channel number
+DisplayMode char[32] O Display mode, used to select the "Original"
number of channels to track;
Options are:
"original" - normal mode;
"Oneplusone" - 1 + 1 mode;
DA

"Oneplusthree" - 1 + 3 mode;
"Oneplusfive" - 1 + 5 mode
HU

+TrackEnable bool O Whether to start linkage tracking; true


A_

True - on,
HT

False close
TP

+TrackTime char[32] O Tracking duration options, including full- "Manual"


_
AP

time tracking and manual configuration


I_

of tracking duration. "Fulltimetrack": full-


V3

time tracking, indicating that the tracking


.3

duration lasts until the target disappears;


7

"Manual": customize the tracking


fo
rV

duration. If this mode is selected, it will


el

be tracked according to the user


se

configured tracking duration.


n gS

+ManualTrack uint16[2] O If tracktime is in "manual" mode, it will be [5,300]


Time tracked according to the tracking
dn

duration range configured by the user in


Bh

this field ([minimum tracking time,


d

maximum tracking time]), which can be


configured for 5-300 seconds. The
maximum duration of tracking is the
disappearance time of the target. For
example, if the tracking duration is set to
50 seconds and the target disappears in
30 seconds, the tracking will stop). ‘I’
represents the index of the array, and ‘i’
can take 0 or 1
+TrackRect uint[8][8][4] O The coordinate information of the
tracking target frame represents one of
the points. The first dimension
represents the display mode, the second
dimension represents the number of

Comm APIs 316


frames, and the third dimension is the
bounding box of the rectangular frame,
which is normalized to the 8192
coordinate system.

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=EptzLink
Get Config Response Example
table.EptzLink[0].Enable=true
table.EptzLink[0].DisplayMode=Original

Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&EptzLink[0].Enable=true
Set Config Response Example
DA

OK
HU
A_
HT

8.1.16 Get View Range Status


TP
_

Request URL http://<server>/cgi-bin/api/ptz/getViewRangeStatus


AP

Method POST
I_
V3

Request Params ( JSON format in body )


Name Type R/O Description Example
.3
7

Channel int32 R Video channel number, starting 0


fo

from 0
rV

Request Example
el

{
se
n

"Channel": 0
gS

}
dn
Bh

Response Params ( JSON format in body )


d

Name Type R/O Description Example


status object O view range status
+Distance double O Visual distance in meters 20.0
+AngelH double O Horizontal viewing angle 30.5
Unit: degrees
+AzimuthH double O Horizontal azimuth angle 0.5
(The angle between the central axis of
the included angle projected by the
visual field on the horizontal plane and
the reference axis on the horizontal
plane)
Expressed in radians, normalized to -
1~1.

Comm APIs 317


Turn counterclockwise for positive
direction
+AngelV double O Vertical viewing angle 30.5
Unit: degrees
+AzimuthV double O Vertical azimuth angle 0.5
(The angle between the central axis of
the included angle projected by the
visual field on the vertical plane and
the angle of the reference axis on the
vertical plane)
Expressed in radians, normalized to -
1~1.
+InclinationH double O Horizontal inclination angle 0.5
(The included angle between the
equipment horizontal datum plane and
the horizontal plane)
DA

Unit: degrees
HU

Normalized to - 1~1.
A_

Response Example
HT

{
TP

"status" : {
_

"Distance" : 20.0,
AP

"AngelH" : 30.5,
I_

"AzimuthH" : 0.5,
V3

"AngelV" : 30.5,
.3
7

"AzimuthV" : 0.5,
fo

"InclinationH" : 0.5
rV

}
el

}
se
ngS
dn

8.2 Wiper
Bh
d

8.2.1 Move Continuously


Make the wiper continuously move until you call the stopMove function to stop it.
Request URL http://<server>/cgi-bin/rainBrush.cgi?action=moveContinuously
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int O Video channel number, starting from 1; 1
the default value is 1
interval int R Interval for the motion of the wiper; unit: 5
second
Request Example
http://192.168.1.108/cgi-bin/rainBrush.cgi?action=moveContinuously&channel=1&interval=5

Comm APIs 318


Response Params ( OK in body )
Response Example
OK

8.2.2 Stop Move


Stop the motion of the wiper.
Request URL http://<server>/cgi-bin/rainBrush.cgi?action=stopMove
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int O Video channel number, starting from 1; the 1
default value is 1
Request Example
http://192.168.1.108/cgi-bin/rainBrush.cgi?action=stopMove&channel=1
DA
HU

Response Params ( OK in body )


A_

Response Example
HT

OK
TP
_

8.2.3 Move Once


AP
I_
V3

Control the wiper to move once.


.3

Request URL http://<server>/cgi-bin/rainBrush.cgi?action=moveOnce


7
fo

Method GET
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Example


se

channel int O video channel index which starts from 1, 1


ngS

default 1 if not specified.


dn

Request Example
http://192.168.1.108/cgi-bin/rainBrush.cgi?action=moveOnce&channel=1
Bh
d

Response Params ( OK in body )


Response Example
OK

8.3 Illuminator
The following commands are applicable to non-intelligent illuminators.

8.3.1 [Config] Visible-light Illuminator


Config Data Params
Name Type R/O Description Example

Comm APIs 319


SignLight object[] R A one-dimensional array with element 1
subscripts representing channel numbers
+onCycle uint32 R Range[0-100] 30

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=SignLight
Get Config Response Example
table.SignLight[0].onCycle=30
table.SignLight[1].onCycle=35

Set Config Request Example


http:// 10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&SignLight[0].onCycle=30
Set Config Response Example
DA

OK
HU
A_
HT

8.3.2 [Config]Configuring Lighting


TP
_ AP

Illuminator configuration is used by IPC/SD production line. The illumination effect depends on the
I_

type of installed illuminator. Usage constraint: The illuminator type of the device is unique, only IR light,
V3

white light or other types of lights. If there are many different types of lights, only the Mode field of this
.3

configuration is used, and other fields are not used. In June, 2017, schedule control requirements were
7

added to the white light. The second dimensional lighting configuration was expanded from one
fo
rV

element to four elements. The 0 element of the second dimension indicates the configuration that takes
effect immediately. If the 0 element is modified, it needs to respond immediately. When the
el
se

SupportByTime of LightingControl capability is true, it means that schedule setting is supported.


n

Elements 1, 2 and 3 in the second dimension represent day, night, and normal respectively.
gS

Compatibility rule: If Lighting [0] is modified, it will take effect immediately (compatible with the usage
dn

without schedule function). If Lighting [0] is not modified, it means that the lights are controlled by
Bh

schedule, and the configuration of [1]/[2]/[3] take effect. Subscripts 0 and 123 are not synchronized with
d

each other. Doorbell products of intelligent building production line use Mode field to control the switch
of illuminators, and only "SmartLight" and "Off" modes are used.
Config Data Params
Name Type R/O Description Example
Lighting object[][] O 2D array. The first dimension corresponds to
video input channels, and each video
channel has several configurations.
+Mode char[32] O Light mode. "ZoomPrio"
"Manual": Manually control the brightness
and angle (the following settings are valid
only when this field is available).
"Auto": No need to set the brightness and
angle.
"Off": Turn off the light.

Comm APIs 320


"ZoomPrio": Zoom Priority. If
LightTypeComplex of LightingControl takes
effect, the corresponding LightingZoomPrio
configuration in this mode takes effect.
Otherwise, the LightingZoomPrio
configuration will not take effect.
The following modes are dedicated to
composite lights.
"Timing": schedule mode, which corresponds
to the configuration of LightingSchedule.
"SmartLight": Smart light mode (used by PTZ
cameras). If this mode is selected, the newly
added SmartLighting configuration is used.
Doorbells of intelligent production line also
use this mode, but do not use SmartLighting
configuration.
DA

"ExclusiveManual": Multiple lights are


HU

supported, but only one light is used in


A_

manual mode, and only ManualLighting


HT

configuration is used.
TP

The LightingLink configuration in


_

EventHandler takes effect in any illuminator


AP

modes.
I_

"ForceOn": Turn on the light forcibly


V3

(devvideoinput. forceinraredlight cannot be


.3
7

used because the light status needs to be


fo

kept).
rV

+Correction int O Light compensation, only valid in zoom 2


el

priority mode.
se

Two ranges: 0–4; 0–100. There is no


n gS

capability differences. Recommended range:


dn

0–100.
Bh

+Sensitive int O Light sensitivity, only valid in zoom priority 3


d

mode.
Range: 0–5.
3 by default.
+Times int O Turn-on time, only valid in auto mode. 30
Unit: Second (required by turnstiles with face
recognition function)
+NearLight object[] O Near light group.
The number of arrays is controlled by the
LightingControl capability set.
++Light int O Percentage of light brightness (1–100). 0
0: Turn off.
++Angle int O Normalized angle of laser light. 50
Range: 0–100
+MiddleLight object[] O Medium light group.

Comm APIs 321


The number of arrays is controlled by the
LightingControl capability set.
++Enable bool O Switch. true
Light field is used.
++Light int O Percentage of light brightness (1–100). 0
0: Turn off.
++Angle int O Normalized angle of laser light 50
Range: 0–100
+FarLight object[] O Far light.
The number of arrays is controlled by the
LightingControl capability set.
++Light int O Percentage of light brightness (1–100). 0
0: Turn off.
++Angle int O Normalized angle of laser light 50
Range: 0–100
DA

See the following examples to read and modify configurations.


HU

Get Config Request Example


A_

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Lighting
HT

Get Config Response Example


TP

table.Lighting[0][0].Correction=50
_

table.Lighting[0][0].FarLight[0].Angle=50
AP

table.Lighting[0][0].FarLight[0].Light=50
I_

table.Lighting[0][0].Mode=ZoomPrio
V3

table.Lighting[0][0].NearLight[0].Angle=50
.3
7

table.Lighting[0][0].NearLight[0].Light=50
fo

table.Lighting[0][0].Sensitive=3
rV
el

Set Config Request Example


se
n

http:// 10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&Lighting[0][0].Mode=Manual
gS

Set Config Response Example


dn

OK
Bh
d

8.3.3 [Config]Configuring Lighting V2


Config Data Params
Name Type R/O Description Example
Lighting_V2 object[][][] O
3D array. The first dimension corresponds
to video input channels, and each video
channel has several configurations. The
second dimension array represents the
corresponding configuration of day and
night. From element 0, it represents day,
night, normal, front light, general
backlight, strong backlight, low

Comm APIs 322


illuminance, and custom. The third
dimension indicates the type of light (IR
light, white light, and laser light).
+LightType enumchar[ O Light type. When the device controls the "InfraredLight"
32] light, it is uniformly controlled by the light
type.
enumchar[32]{
/* The capability is determined by the
LightTypeComplex field in LightingControl
*/
"InfraredLight": IR light.
"WhiteLight": White light.
"LaserLight": Laser light.
"AIMixLight": Intelligent mixing light, which
can switch between IR and white lights
according to intelligent ID.
DA

"PilotLight": Indicator.
HU

}
A_

+Mode enumchar[ O Light mode. "ZoomPrio"


HT

32] enumchar[32]{
TP

"Manual": Manually control the brightness


_

and angle (the following settings are valid


AP

only when this field is available).


I_

"ZoomPrio": Zoom priority.


V3

"Auto": No need to set the brightness and


.3
7

angle.
fo

"Off": Turn off the light.


rV

"DuskToDawn": Photosensitive mode,


el

which directly judges whether to turn on


se

the light according to the value transmitted


ngS

by the photosensitive device. The


dn

configuration is saved only for application,


Bh

and does not synchronized to the system


d

settings.
"ForceOn": Turn on the light forcibly.
}
+Correction int O Light compensation, only valid in zoom 2
priority mode.
Range: 0–100.
+PercentOfMa uint8 O The percentage of the upper limit 100
xBrightness brightness of the current white light
relative to the maximum brightness of the
general white light.
Range: 0–100. The device calculates the
actual limit value according to the
percentage of the maximum brightness
value of the general white light.

Comm APIs 323


+Sensitive int O Light sensitivity, only valid in zoom priority 3
mode (the protocol description has no limit
on mode, and it can be configured
according to capability).
Range: 0–5.
The default value is 3.
0–1: Low
2–3: Medium
4–5: High
+LightSwitchD int O Delay time of illuminator switch. 4
elay Range: 2–120 seconds.
4 by default.
+NearLight object[] O Near light group.
The number of arrays is controlled by the
LightingControl capability set.
++Light int O Percentage of light brightness (1–100). 0
DA

0: Turn off.
HU

++Angle int O Normalized angle of laser light 50


A_

Range: 0–100.
HT

++ColorTempe int O Color temperature of light. 0


TP

rature 0: Unknown. It is used for compatibility


_

with previous fields.


AP

1: Cold light.
I_

2 : Warm light.
V3

+MiddleLight object[] O Medium light group.


.3
7

The number of arrays is controlled by the


fo

LightingControl capability set.


rV

++Light int O Percentage of light brightness (1–100). 0


el

0: Turn off.
se
n

++Angle int O Normalized angle of laser light 50


gS

Range: 0–100.
dn

++ColorTempe int O Color temperature of light. 0


Bh

rature 0: Unknown. It is used for compatibility


d

with previous fields.


1: Cold light.
2: Warm light.
+FarLight object[] O Far light.
The number of arrays is controlled by the
LightingControl capability set.
++Light int O Percentage of light brightness (1–100). 0
0: Turn off.
++Angle int O Normalized angle of laser light 50
Range: 0–100.
++ColorTempe int O Color temperature of light. 0
rature 0: Unknown. It is used for compatibility
with previous fields.
1: Cold light.

Comm APIs 324


2: Warm light.
+AIMixLightS int O It takes effect under the intelligent 30
witchDelay illumination scheme, indicating the delay
time when switching between IR and
white lights to prevent the frequent
switching from affecting the service life of
light and user’s experience. Range: 0–300
seconds. 30 seconds by default.
+State char[32] O Light status: "On"
Off; flicker; on.
+Color char[32] O Light color: Blue
Blue
Red
Green
+TimeSection char[7][24][ O Configure the solid-on time of the light. [["1 00:00:00-
24] The first dimension indicates Sunday to 24:00:00",…],…[]]
DA

Saturday, corresponding to the index 0–6.


HU

The second dimension represents period


A_

list of the day, with a maximum of 24.


HT

The third dimension represents the


TP

interval of each time period,


_

and the format is "Enable Hour: Minute:


AP

Second-Hour: Minute: Second", and a


I_

space is used between enable and time


V3

information. 1 indicates that the period is


.3
7

valid, and 0 indicates invalid. The first


fo

Hour: Minute: Second is the start time,


rV

and the second one is the end time.The


el

end time can be 24:00:00.


se
n

+TimeSection bool O Enable the period for solid on of the light. true
gS

Enable TimeSection will not take effect until the


dn

light is turned on.


Bh

+GlobalLight object[] O Global illumination. It uses the internal


d

light of the device to perform


illumination.The number of lights is
controlled by the LightingControl capability
set.
++Light int O Percentage of light brightness (1–100). 50
0: Turn off.
+CenterLight object[] O Central illumination. It uses the external
light of the device to perform
illumination.The number of lights is
controlled by the LightingControl capability
set.
++Light int O Percentage of light brightness (1–100). 50
0: Turn off.

Comm APIs 325


+ManualLighti object O Manually configure the light.
ng
++Mode uint32 O 0: Flashes. 0
1: Solid on.
++LightOnDur uint32 O Duration when the light is turned on the 180
ation manually. Unit: Second. 0 means that the
light will not turn off automatically and
needs to be turned off manually.
++LightOffDur uint32 O Duration when the light is turned off the 0
ation manually. Unit: Second. 0 means that the
light will immediately restore to the status
before manual operation.

See the following examples to read and modify configurations.


Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=Lighting_V2
DA

Get Config Response Example


HU

table.Lighting_V2[0][0][0].Correction=50
A_

table.Lighting_V2[0][0][0].LightType=InfraredLight
HT

table.Lighting_V2[0][0][0].MiddleLight[0].Angle=50
TP

table.Lighting_V2[0][0][0].MiddleLight[0].Light=50
_

table.Lighting_V2[0][0][0].Mode=Auto
AP

table.Lighting_V2[0][0][0].PercentOfMaxBrightness=100
I_

table.Lighting_V2[0][0][0].Sensitive=3
V3
.3
7

Set Config Request Example


fo

http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&Lighting_V2[0][0][0].Correction=50
rV

Set Config Response Example


el

OK
se
n gS
dn

8.3.4 [Config]Configuring Light Schemes


Bh
d

Config Data Params


Name Type R/O Description Example
LightingSche object[][] O Light scheme.
me 2D array. The first dimension corresponds
to video input channels, and each video
channel has several configurations. The
second dimension array represents day,
night, and general configurations. From
element 0, it represents day, night,
normal, front light, general backlight,
strong backlight, low illuminance, and
custom, which correspond to the second
dimension of Lighting_V2.

Comm APIs 326


+LightingMode enumchar[ O Light scheme. "MixMode"
16] Enumchar[16]{
"MixMode": Mixed light scheme.
"WhiteMode": White light scheme.
"NormalMode": Soft and dual lights are
not supported.
"InfraredMode": IR scheme.
"AIMode": AI scheme.
"Off": Night vision is disabled.
}
+SchemeSche object O The lighting scheme is switched by period,
dule and only when the corresponding camera
attribute configuration (day, night, normal,
etc.) takes effect, the lighting scheme
schedule based on this configuration
takes effect.
DA

++Enable bool O It takes effect or not (after it takes effect true


HU

according to the schedule, the original


A_

LightingMode will no longer take effect).


HT

True: takes effect. False: do nit take


TP

effect.
_

++TimeSectio char[7][6][3 O Effective time period. For example, [["05:40:00-18:20:00


AP

nByWeek 6] "05:40:00-18:20:00 WhiteMode" means WhiteMode", ...]]


I_

that the white light scheme takes effect


V3

from 5: 40 to 18: 20. WhiteMode is the


.3
7

name of lighting scheme, which is a


fo

variable string (corresponding to the


rV

optional field of LightingMode). 2D array.


el

The first dimension represents 7 days of a


se

week (array subscript 0 corresponds to


n gS

Sunday, followed by Monday to Saturday).


dn

The second dimension represents the


Bh

periods of a day, with a maximum of 6


d

periods. All time periods in a day cannot


overlap with each other, and the total must
be 24 hours.

See the following examples to read and modify configurations.


Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=LightingScheme
Get Config Response Example
table.LightingScheme[0][0].LightingMode=AIMode

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&LightingScheme[0][0].LightingMode=InfraredMode
Set Config Response Example

Comm APIs 327


OK

8.4 Flashlight

8.4.1 [Config] Flashlight Config


Configuration parameters of the flashing light (Not recommended).
Config Data Params
Name Type R/O Description Example
R Configuration parameters of the
FlashLight object
flashing light
+Enable bool R Whether to enable the flashing light true
+Brightness int R Brightness; range [0, 100] 50
R Two-dimensional array in strings. [ [ "1 00:00:00-
DA

The first dimension of the array is the 23:59:59", "0 00:00:0


day of the week; range: [0-6] 0-
HU

(Sunday–Saturday). 23:59:59","0 00:00:0


A_

The second dimension is the period 0-


HT

index. One day is divided into multiple 23:59:59", "0 00:00:0


TP

periods, and the range is [0–23]. 0-23:59:59", … ] ]


_ AP

Each period is set as a string in the


I_

format of
V3

mask hh: mm: ss-hh: mm: ss


.3

Mask: Value range: [0, 1]


7

char[7][24]
+TimeSection hh: Hour; range: [0–24]
fo

[32]
rV

mm: Minute; range: [0–59]


el

ss: Second; range: [0–59]


se

Mask value:
n gS

0: Disable the parameter in the period


1: Enable the parameter in the period
dn

For example:
Bh

TimeSection[1][0]=1 12:00:00—
d

18:00:00
Meaning the flashing light works from
12:00:00 through 18:00:00 on
Monday.
For getting and setting the configurations, see 4.2.1 Get and Set Configure”.
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=FlashLight
Get Config Response Example
table.FlashLight.Enable=true
table.FlashLight.Brightness=50
table.FlashLight.TimeSection[0][0]=1 00:00:00-23:59:59
table.FlashLight.TimeSection[0][1]=0 00:00:00-23:59:59

Comm APIs 328


table.FlashLight.TimeSection[6][5]=0 00:00:00-23:59:59

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&FlashLight.Enable=true&FlashLight.Brightness=50&FlashLi
ght.TimeSection[1][0]=1%2012:00:00-18:00:00
Set Config Response Example
OK

8.5 Coaxial Control IO

8.5.1 Control White Light or Speaker


Send commands for controlling the white light and speaker
DA

Request URL http://<server>/cgi-bin/coaxialControlIO.cgi?action=control


HU

Method GET
A_

Request Params ( key=value format in URL )


HT

Name Type R/O Description Example


channel int O It is the video channel number for the 1
TP
_

white light, and the audio output channel


AP

for the speaker. The default value is 0.


I_

info object[] R Operation details


V3

+Type int R Operation type 1


.3
7

1: White light
fo

2: Speaker
rV

+IO int R Switch 1


el

1: On
se

2: Off
n gS

+TriggerMode int R Trigger Mode 2


dn

1: Linked trigger
Bh

2: Manual trigger
d

Request Example
http://192.168.1.108/cgi-
bin/coaxialControlIO.cgi?action=control&channel=1&info[0].Type=1&info[0].IO=1&info[0].TriggerMode
=2

Response Params ( OK in body )


Response Example
OK

8.5.2 Get White Light and Speaker Status


Get the status of the white light and the speaker.
Request URL http://<server>/cgi-bin/coaxialControlIO.cgi?action=getstatus
Method GET

Comm APIs 329


Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int O The video channel number which starts 1
from 1, and the default value is 1.
Request Example
http://192.168.1.108/cgi-bin/coaxialControlIO.cgi?action=getstatus&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
status object R Return status information
+whitelight char[4] R White light status, "on" or "off" "on"
+speaker char[4] R Speaker status, "on" or "off" "on"
Response Example
status.whitelight=on
status.speaker=on
DA

8.6 Pir Alarm


HU
A_

8.6.1 [Config] Pir Parameter


HT
TP

 Get pir parameter


_ AP

Request URL http://<server>/cgi-bin/pirAlarm.cgi?action=getPirParam


I_

Method GET
V3

Request Params ( key=value format in URL )


.3
7

Name Type R/O Description Example


fo

channel int O video channel index, starts from 1, default 1


rV

1
el

Request Example
se

http://192.168.1.108/cgi-bin/pirAlarm.cgi?action=getPirParam&channel=1
n gS
dn

Response Params ( key=value format in body )


Bh

Name Type R/O Description Example


d

configEx object[] R PIR


O Enable/Disable motion detect feature in a true
+Enable bool
channel.
O WinNum
object[
+DetectWindo Index of detect window, there are 4 detect
WinNu
w windows at present. Each window is
m]
divided into 18 lines and 22 blocks/line.
O Range is [1—6]. 1
Sensitivity of pir
++Level int
1: lowest sensitivity.
6: highest sensitivity.
++Id int O It is the Id of a detect window. 1
++Name string O It is the name of a detect window. xxx
++Sensitive int O Range is [0—100]. 2

Comm APIs 330


It presents more sensitive if the value is
larger.
O Range is [0—100]. 2
++Threshold int It presents the threshold value when
trigger motion detect.
O LineNum [4194303, 0, 3]
Index of region, region is divided into lines
and each line has several blocks, a line is
described by a 32 bit integer, a bit for a
block.
0=Line 1
1=Line 2

Currently, region is divided into 18 lines


DA

int[Line
++Region and 22 blocks/line.
Num]
HU

A bit describes a block in the line.


A_

Bit = 1: motion in this block is monitored.


HT

Example:
TP

MotionDetect[0].Region[0] = 4194303
_

(0x3FFFFF):: motion in channel 0 line 0's


AP

22 blocks is monitored.
I_

MotionDetect[0].Region[1] =0: motion in


V3

line 1's 22 blocks is not monitored.


.3
7

MotionDetect[0].Region[17] = 3: in the last


fo

line of channel 0, motion in the left two


rV

blocks is monitored.
el

O wd (week day) range is [0—6] (Sunday - [["1 00:00:00-


se

Staurday) 24:00:00","1
n gS

ts (time section) range is [0 — 23], 00:00:00-


dn

timesection table index. 24:00:00","1


Bh

00:00:00-
d

Format: mask hh:mm:ss-hh:mm:ss 24:00:00","1


char[wd
+TimeSection Mask: [0—65535], hh: [0—24], mm: [0— 00:00:00-
][ts][]
59], ss: [0—59] 24:00:00","1
Mask indicates record type by bits: 00:00:00-
Bit0: regular record 24:00:00","1
Bit1: motion detection record 00:00:00-24:00:00"]]
Bit2: alarm record
Bit3: card record
+PirLink object O pir linkage
O Range is {0, 1} [0,1,0]
++RecordCha
int[] 0 – do not record on video channel ch
nnels
1 – record on video channel ch
++RecordEnab O true
bool Enable/Disable record function.
le

Comm APIs 331


O Range is [10—300]. 10
++RecordLatc
int Unit is seconds, indicates the time to
h
record after input alarm is cleared.
O Range is {0, 1}, ch is alarm out channel [0,0,1]
index.
++AlarmOutCh
int[] 0 — do not output alarm at alarm out
annels
channel ch
1 — output alarm at alarm out channel ch
++AlarmOutEn O true
bool Enable/Disable alarm out function.
able
O Range is [10—300]. 15
++AlarmOutLa
Int Unit is seconds, indicates the time to
tch
output alarm after input alarm is cleared.
O Range is {0, 1} [0,0,1]
++SnapshotCh
int[] 0 — do not snapshot on video channel ch
annels
1 — snapshot on video channel ch
DA

++SnapshotEn O true
bool Enable/Disable snapshot function.
HU

able
A_

O Range is [0—255]. 10
HT

++Dejitter int Alarm signal dejitter seconds. Alarm signal


TP

change during this period is ignored.


_

++MailEnable bool O Enable/Disable mail send for alarm. true


AP

++AlarmBellEn O true
I_

bool Enable/Disable mail send for alarm.


able
V3

++AlarmBellLa O Range is [10, 300] 10


.3

int
7

tch Unit is seconds


fo

++LogEnable bool O Enable/Disable log for alarm. true


rV

Response Example
el

configEx[0].Enable=true
se
n

configEx[0].PirLink.LightingLink.Enable=true
gS

configEx[0].PirLink.LightingLink.LightLinkType=Filcker
dn

configEx[0].PirLink.LightingLink.FilckerIntevalTime=5
Bh

configEx[0].PirLink.LightingLink.LightDuration=10
d

configEx[0].PirLink.LightingLink.WhiteLightTimeSection=TimeSection
configEx[0].PirLink.TimeSection[0][0]=1 00:00:00-24:00:00
configEx[0].PirLink.TimeSection[0][1]=0 02:00:00-24:00:00
configEx[0].PirLink.TimeSection[0][2]=0 03:00:00-24:00:00
configEx[0].PirLink.TimeSection[0][3]=0 04:00:00-24:00:00
configEx[0].PirLink.TimeSection[0][4]=0 05:00:00-24:00:00
configEx[0].PirLink.TimeSection[0][5]=0 06:00:00-24:00:00
configEx[0].RecordEnable=true
configEx[0].RecordChannels=[0, 1, 2]
configEx[0].RecordLatch=10
configEx[0].AlarmOutEnable=true
configEx[0].AlarmOutChannels=[1, 4]
configEx[0].AlarmOutLatch=10
configEx[0].SnapshotEnable=true

Comm APIs 332


configEx[0].SnapshotChannels=[2, 4]
configEx[0].MailEnable=true
configEx[0].AlarmBellEnable=true
configEx[0].AlarmBellLatch=10
configEx[0].Dejitter=0
configEx[0].LogEnable=true
configEx[0].DetectWindow[0].Level=3
configEx[0].DetectWindow[0].Id=0
configEx[0].DetectWindow[0].Name=Region0
configEx[0].DetectWindow[0].Sensitive=58
configEx[0].DetectWindow[0].Threshold=4
configEx[0].DetectWindow[0].Region[0]=3932160
configEx[0].DetectWindow[0].Region[1]=3932160


configEx[0]. DetectWindow [1]…
DA
HU

 set pir parameter


A_

Request URL http://<server>/cgi-bin/pirAlarm.cgi?action=setPirParam


HT

Method GET
TP

Request Params ( key=value format in URL )


_ AP

Name Type R/O Description Example


I_

channel int O video channel index, starts from 1, default 1


V3

1
.3

configEx object[] O PIR config


7
fo

O Enable/Disable motion detect feature in a true


+Enable bool
rV

channel.
el

+… other params refer getPirParam


se

Request Example
ngS

http://192.168.1.108/cgi-
dn

bin/pirAlarm.cgi?action=setPirParam&channel=1&configEx[1].Enable=true&configEx[1].PirLink.Lighti
ngLink.Enable=true&...
Bh
d

Response Params ( OK in body )


Response Example
OK

8.7 SCADA

8.7.1 Searching for SCADA Attributes


Request URL http://<server>/cgi-bin/api/SCADA/getAttribute
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example

Comm APIs 333


condition object R
+DeviceId char[32] R Device ID "01001010111"
+ID char[][] No An array of corresponding monitoring ["01001010111",
point ID. "01001010112",…]
If there is no node, return all IDs under
DeviceId.
Request Example
{
"condition": {
"DeviceId": "01001010111",
"ID": ["01001010111", "01001010112",…]
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
DA

info object[] R
HU

+SignalName char[128] R Point name “Environment


A_

temperature”
HT

+Unit char[20] R Unit


"℃"
TP
_

+Type char[20] R Type of signal point "YC"


AP

YC: remote metering; analog input.


I_
V3

YX: remote signaling; digital input.


.3

YT: remote regulation; analog output.


7

YK: remote control; digital output.


fo

+ID char[32] R Signal point ID "01001010111"


rV

+StartDelay uint O Start delay of alarms, unit: second 120


el
se

+StopDelay uint O End delay of alarms, unit: second 20


n

+Period uint O Storing and reporting period, unit: 180


gS

second
dn

+Threshold float O Alarm threshold 40.0


Bh

+AlarmWaveV float O Alarm hysteresis. Only when the 2


d

al hysteresis range is exceeded, the alarm


can be restored. Alarm recovery and
alarm delay do not take effect at the
same time.
+AbsoluteVal float O Absolute threshold. Stores and reports 0.2
continuous data points (AI, AO).
+RelativeVal float O Percentage threshold. Stores and 0
reports continuous data points (AI, AO).
It is used when the absolute threshold is
disabled or is "0".
+Status uint R Data status of signal point 0
0: normal
1: Level-1 alarm
2: Level-2 alarm

Comm APIs 334


3: Level-3 alarm
4: Level-4 alarm
5: Operation event
6: Invalid data
+DisplayOptio uint O Displays data: 0x00000000
ns BIT0: Displays the switch. 0: No; 1: Yes.
BIT1: Displays the switch when scrolling.
0: No; 1: Yes.
+Valid bool R Invalid signal point true
true: Yes
false: No
+Delay uint32 O Alarm delay time. When an alarm is 120
triggered, the device response such as
reporting and linkage is delayed. Unit:
Second.
+Describe char[] O Point description. For example, “Environment
DA

0&Normal; 1&Alarm. Supports up to 120 temperature”


HU

characters.
A_

+IECCode char[] O Power 104 protocol point number. "12345"


HT

Supports up to 16 characters.
TP

+HJCode char[] O Environment 212 protocol point number. "a01001"


_

Supports up to 16 characters.
AP

Response Example
I_
V3

{
.3

"info": [{
7

"SignalName": "Environment temperature",


fo
rV

"Unit": "℃",
el

"Type": "YC",
se
n

"ID": "01001010111",
gS

"StartDelay": 120,
dn

"StopDelay": 20,
Bh

"Period": 180,
d

"Threshold": 40.0,
"AlarmWaveVal": 2,
"AbsoluteVal": 0.2,
"RelativeVal": 0,
"Status": 0,
"DisplayOptions": 0x00000000,
"Valid": true,
"Delay": 120,
"Describe": "Environment temperature",
"IECCode": "12345",
"HJCode": "a01001"
},…{}]
}

Comm APIs 335


8.7.2 Configuring SCADA Attributes
You can use this method to disable or enable the point of SCADA devices.
Request URL http://<server>/cgi-bin/api/SCADA/setAttribute
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
DeviceId char[32] R Detector "01001010111"
points object[] R
+ID char[32] R "01001010110"
+SignalName char[128] O Point name “Environment
temperature”
+StartDelay uint O Start delay of alarms, unit: second 120
+StopDelay uint O End delay of alarms, unit: second 20
+Period uint O Storing and reporting period, unit: 180
DA

second
HU

+Threshold float O Alarm threshold 40.0


+AlarmWaveV float O Alarm hysteresis. Only when the 2
A_

al hysteresis range is exceeded, the alarm


HT

can be restored. Alarm recovery and


TP

alarm delay do not take effect at the


_
AP

same .
I_

+AbsoluteVal float O Absolute threshold. Stores and reports 0.2


V3

continuous data points (AI, AO).


.3

+RelativeVal float O Percentage threshold. Stores and 0


7
fo

reports continuous data points (AI, AO).


rV

It is used when the absolute threshold is


el

disabled or is "0".
se

+Status enumint O Data status of signal point 0


n gS

enumint{
dn

0: normal
1: Level-1 alarm
Bh

2: Level-2 alarm
d

3: Level-3 alarm
4: Level-4 alarm
5: Operation event
6: Invalid data
}
+DisplayOptio uint O Displays data: 0x00000000
ns BIT0: Displays the switch or not. 0: No;
1: Yes.
BIT1: Displays the switch when scrolling.
0: No; 1: Yes.
+Valid bool R Valid signal point. true: Valid. true
false: Invalid.
Request Example

Comm APIs 336


{
"DeviceId": "01001010111",
"points": [{
"ID": "01001010110",
"SignalName": "Environment temperature",
"StartDelay": 120,
"StopDelay": 20,
"Period": 180,
"Threshold": 40.0,
"AlarmWaveVal": 2,
"AbsoluteVal": 0.2,
"RelativeVal": 0,
"Status": 0,
"DisplayOptions": 0x00000000,
"Valid": true
},…{}]
DA

}
HU
A_

Response Params ( JSON format in body )


HT

Name Type R/O Description Example


TP

state object O
_

+Success char[][] O The list with successful IDs [ "01001010111"]


AP

+Fail char[][] O The list with failed IDs ["01001010122"]


I_
V3

Response Example
.3

{
7

"state": {
fo

"Success": [ "01001010111"],
rV

"Fail": ["01001010122"]
el

}
se
n

}
gS
dn

8.7.3 Obtaining Real-time Data of Monitoring Points


Bh
d

Request URL http://<server>/cgi-bin/api/SCADA/get


Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
condition object R
+DeviceId char[16] R Detector ID "01001010111"
+ID char[][] O An array of corresponding monitoring ["01001010111",
point ID "01001010112",…]
If there is no node, return all IDs under
the DeviceId.
+IsHandle bool O The returned data is processed (such false
as filtering invalid data). "false": No,
"true": Yes.
Default: false.

Comm APIs 337


Request Example
{
"condition": {
"DeviceId": "01001010111",
"ID": ["01001010111", "01001010112",…],
"IsHandle": false
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
info object[] R
+Type enumchar[ O Point type "YC"
32] enumchar[32]{
YC: Remote metering; analog input.
YX: Remote signaling; digital input.
DA

YT: Remote regulation; analog output.


HU

YK: Remote control; digital output.


A_

}
HT

+ID char[32] R Point "01001010111"


TP

+PointName char[32] O Matches the point table name. "aaa"


_

+MeasuredVal float R The actual measured value. You can 213.1


AP

change the type.


I_
V3

YX: Integer
.3

YC: Floating-point number


7

+SetupVal float O The configured value. You can change 123.0


fo

the type.
rV

YK: Integer
el

YT: Floating-point number


se
n

+Status enumint O Data status 0


gS

enumint{
dn

0: Normal
Bh

1: Level-1 alarm
d

2: Level-2 alarm
3: Level-3 alarm
4: Level-4 alarm
5: Operation Event
6: Invalid data
}
+RecordTime char[20] O Collection time "2015-1-3 10:10:45"
Response Example
{
"info": [{
"Type": "YC",
"ID": "01001010111",
"PointName": "aaa",
"MeasuredVal": 213.1,

Comm APIs 338


"SetupVal": 123.0,
"Status": 0,
"RecordTime": "2015-1-3 10:10:45"
},…{}]
}

8.7.4 Configuring Monitoring Points


Request URL http://<server>/cgi-bin/api/SCADA/set
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
DeviceId char[32] R Detector "01001010111"
points object[] R
+Type char[32] O Point type "YT"
YK YT
DA

+ID char[64] R Point number "01001010111"


HU

+SetupVal float R The configured value 12.3


A_

YT: Floating-point number


HT

YK: Integer
TP

Request Example
_

{
AP

"DeviceId": "01001010111",
I_
V3

"points": [{
.3

"Type": "YT",
7

"ID": "01001010111",
fo

"SetupVal": 12.3
rV

},…{}]
el
se

}
n gS

Response Params ( JSON format in body )


dn

Name Type R/O Description Example


Bh

state object O
d

+Success char[][] O The list with successfully controlled ["01001010111"]


and adjusted IDs
+Fail char[][] O The list with unsuccessfully controlled ["01001010122"]
and adjusted IDs
Response Example
{
"state": {
"Success": ["01001010111"],
"Fail": ["01001010122"]
}
}

Comm APIs 339


8.7.5 Starting Searching for Historical Data
Start searching for historical data based on device ID and time, and get search token.
Request URL http://<server>/cgi-bin/api/SCADA/startFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
condition object R Search conditions
+StartTime char[20] R Start time "2015-1-2 10:10:45"
+EndTime char[20] O End time "2015-1-3 10:10:45"
If you don't enter content is this field, it
means up to now.
+DeviceId char[32] R Device ID "01001010111"
+ID char[32] O ID of corresponding monitoring point "01001010111"
Request Example
DA

{
HU

"condition": {
"StartTime": "2015-1-2 10:10:45",
A_

"EndTime": "2015-1-3 10:10:45",


HT

"DeviceId": "01001010111",
TP

"ID": "01001010111"
_
AP

}
I_

}
V3
.3

Response Params ( JSON format in body )


7
fo

Name Type R/O Description Example


rV

token int R Obtained search token 46878


el

totalCount int O Total number of qualified results 3333


se

Response Example
n
gS

{
dn

"token": 46878,
"totalCount": 3333
Bh

}
d

8.7.6 Obtaining Historical Data


Obtain historical data based on search token.
Request URL http://<server>/cgi-bin/api/SCADA/doFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
token int R Search token 46878
beginNumber int R Start number of the search. The search 0
starts from the “beginNumber” records,
and returns predefined number of
records.

Comm APIs 340


0<=beginNumber<=totalCount-1
count int R Number of traffic statistics for each 24
search
Request Example
{
"token": 46878,
"beginNumber": 0,
"count": 24
}

Response Params ( JSON format in body )


Name Type R/O Description Example
found int R Number of searched entries 12
info object[] R Traffic statistics
It is an array and each element
represents a traffic record that satisfies
DA

the condition.
HU

+Type char[32] R Point type "YC"


A_

enumchar[32]{
HT

YC: remote metering; analog input


TP

YX: Remote signaling; digital input:


_

YT: Remote regulation; analog output


AP

YK: Remote control; digital output


I_
V3

}
.3

+ID char[32] R Monitoring point ID "01001010111"


7

+MeasuredVal float R Value You can change this filed type, 213.1
fo

which is relevant to Type filed.


rV

When Type is YC, this value is floating


el
se

point number; When Type is YX, this


n

value is integer.
gS

+SetupVal float R Configured value You can change this 123.0


dn

filed type, which is relevant to Type


Bh

filed.
d

When Type is YC, this value is floating


point number; When Type is YX, this
value is integer.
+Status int R Point status 0
+RecordTime char[20] R Record time "2015-1-3 10:10:45"
Response Example
{
"found": 12,
"info": [{
"Type": "YC",
"ID": "01001010111",
"MeasuredVal": 213.1,
"SetupVal": 123.0,
"Status": 0,

Comm APIs 341


"RecordTime": "2015-1-3 10:10:45"
},…{}]
}

8.7.7 Stopping Searching for Historical Data


Request URL http://<server>/cgi-bin/api/SCADA/stopFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
token int R Search token 46878
Request Example
{
"token": 46878
}
DA

Response Params ( JSON format in body )


HU

Name Type R/O Description Example


A_

Response Example
HT

{}
TP
_

8.7.8 Obtaining IDs of External Devices Connected to the Host


AP
I_
V3

Request URL http://<server>/cgi-bin/api/SCADA/getDeviceList


.3

Method POST
7

Request Params ( JSON format in body )


fo

Name Type R/O Description Example


rV

Request Example
el
se

{}
n
gS

Response Params ( JSON format in body )


dn

Name Type R/O Description Example


Bh

devices object[] R Device ID array


d

+DeviceId char[32] R Device ID "0101012345"


+DevName char[32] O Device name "UPS1"
+DevCode char[8] O Device model "1801"
+Slot int O Virtual slot number In general, 0 means 0
analog channel and 1 means digital
channel. If it is greater than 1, it means
RS-485, RS-232, or network channel.
The actual channel number = virtual
slot number – 2.
+Level int O The detector address configured by the 1
environment surveillance server. A slot
lot can be connected to multiple
detectors, and different detectors are
distinguished by address.

Comm APIs 342


Response Example
{
"devices": [{
"DeviceId": "0101012345",
"DevName": "UPS1",
"DevCode": "1801",
"Slot": 0,
"Level": 1
},…{}]
}

8.8 Gyro

8.8.1 get gyroscope info


DA
HU

Request URL http://<server>/cgi-bin/api/Gyro/getData


A_

Method POST
HT

Request Params ( JSON format in body )


TP

Name Type R/O Description Example


_ AP

Request Example
I_

{}
V3
.3

Response Params ( JSON format in body )


7
fo

Name Type R/O Description Example


rV

detail object R
el

+AccelX double R Gravitational acceleration in X 15,3


se

direction, unit m/s2


n
gS

+AccelY double R Gravitational acceleration in Y 20.7


direction, unit m/s2
dn

+AccelZ double R Gravitational acceleration in Z 10.5


Bh

direction, unit m/s2


d

+Pitch double O Pitch angle, in degrees 1.3


range[-90, 90]
+Roll double O roll angle, in degrees 23.6
range[-180, 180]
+Yaw double O yaw angle, in degrees 120.2
range[-180, 180]
+AngularSpeedX double R X-direction angular velocity(rad/s) 2.5
+AngularSpeedY double R Y-direction angular velocity(rad/s) 3.3
+AngularSpeedZ double R Z-direction angular velocity(rad/s) 3.6
Response Example
{
"detail": {
"AccelX": 15,3,

Comm APIs 343


"AccelY": 20.7,
"AccelZ": 10.5,
"Pitch": 1.3,
"Roll": 23.6,
"Yaw": 120.2,
"AngularSpeedX": 2.5,
"AngularSpeedY": 3.3,
"AngularSpeedZ": 3.6
}
}

8.9 Other

8.9.1 [Config]Day/Night Settings of PTZ Module


DA

Config Data Params


HU

Name Type R/O Description Example


A_

VideoInDayNi object[][] O Configuring Day/Night Settings of


HT

ght PTZ Module


TP

object[][]
_
AP

2D array. The first dimension


I_

corresponds to the channel number


V3

and the second dimension


.3

corresponds to the lighting scene. For


7

compatibility, the first three


fo
rV

dimensions relatively represent day,


el

night, and general scenes. The


se

number of objects in the second array


n

is not fixed, so how many lighting


gS

scenes are determined by PD


dn

capability VideoInSceneLink.
Bh

+Name char[16] O Scene name. "Day"


d

For details on lighting scene name,


see PD protocol VideoInSceneLink.
+Type char[16] O ICR switching mode: "Mechanism"
Electron, Mechanism, NightICR, and
Auto.
+Mode char[16] O Color/B&W mode: "Brightness"
"Color”: Alway color.
"Brightness”: Auto switches the mode
according to brightness.
"BlackWhite”: Always blackwhite.
"Photoresistor”: Photoresistor.
"Gain”: Switches the mode
according to the gain.

Comm APIs 344


"Timing”: Auto switches the mode
according to the time (the specific
switching time is determined by the
TimeSchedule field).
+Sensitivity int O Color/B&W Sensitivity. 1
Range: 1–3. In the case of supporting
sensitivity expansion, the sensitivity
range can be expanded according to
the capacity. See PD
VideoIndayNight.
SupportSensitivitiyrange for the range
of values.
+Delay int O Delay time of switching day/night 10
mode.
Range: 3–30 seconds.
+PreValue int O Brightness preset value. The IR filter 50
DA

switches the brightness. Below a


HU

brightness, use a filter, and use


A_

another filter when it higher than one


HT

brightness.
TP

When IRCUTMode is Auto, the value


_

range is 0–100.
AP

+IRPlateMode char[16] O IR license plate mode. "BlackWhite"


I_

"BlackWhite”: : Black&white mode.


V3

"Color”: Color mode.


.3
7

+TimeSchedul TimeSched O Switch schedule. It is required in [ [ "1 00:00:00-


fo

e ule timing mode. 23:59:59", … ], …,


rV

The type is TimeSection[7][6], which […]]


el

is set in 7 days a week, and 6 periods


se
n

can be set in one day, each of which


gS

is in the following format:


dn

"1 00:00:00-23:59:59”. 1: Enable.


Bh

00:00:00: Start time (hours, minutes


d

and seconds). 23:59:59: End time


(hours, minutes and seconds).
+Snapshot object O Configure snapshot of double
shutters.
Note: When testing the production
line clarity of the three-lens stereo
analysis devices, you can switch
color/B&W mode of the left and right
shutters by the Mode field under
Snapshot when double shutters are
used.
++Type char[16] O Configure color/B&W mode for "Mechanism"
snapshot of double shutters.
ICR switching mode:

Comm APIs 345


Electron, Mechanism, NightICR, and
Auto.
++Mode char[16] O Configure color/B&W mode for "Brightness"
snapshot of double shutters.
"Color”: Alway color.
"Brightness”: Auto switches the mode
according to brightness.
"BlackWhite”: Always blackwhite.
"Photoresistor”: Photoresistor.
"Gain”: Switches the mode
according to the gain.
"Timing”: Auto switches the mode
according to the time (the specific
switching time is determined by the
TimeSchedule field).
++Sensitivity int32 O Configure color/B&W sensitivity for 1
DA

snapshot of double shutters.


HU

Range: 1–3. In the case of supporting


A_

sensitivity expansion, the sensitivity


HT

range can be expanded according to


TP

the capacity. See PD


_

VideoIndayNight.
AP

SupportSensitivitiyrange for the range


I_

of values.
V3

++Delay int32 O Configure the delay time of day/night 10


.3
7

mode for snapshot of double


fo

shutters.
rV

Range: 3–30 seconds.


el
se
n

See the following examples to read and modify configurations.


gS

Get Config Request Example


dn

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoInDayNight
Bh

Get Config Response Example


d

table.VideoInDayNight[0][0].Delay=6
table.VideoInDayNight[0][0].Mode=Brightness
table.VideoInDayNight[0][0].Name=Day
table.VideoInDayNight[0][0].Sensitivity=2
table.VideoInDayNight[0][0].Type=Mechanism

Set Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&VideoInDayNight[0][0].Mode=BlackWhite
Set Config Response Example
OK

Comm APIs 346


9 Video Analyse APIs

9.1 Video Analyse Event

9.1.1 [Event] LeftDetection


Event Code LeftDetection
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
+Object object R The object that left.
DA

The detected object bounding [2992,1136,4960,5192


HU

box, 4 interge, refer to x's value ]


A_

of left — top point, y's value of


HT

++BoundingBox uint16[4] R left—top point, x's value of right—


TP

bottom point, y's value of right—


_

bottom point. Coordinate remap


AP

to 0 — 8192.
I_
V3

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
.3
7

4.4.3 snap subscription )


fo

--<boundary>
rV

Content-Type: text/plain
el

Content-Length: <length>
se
n gS

Events[0].EventBaseInfo.Code=LeftDetection
dn

Events[0].EventBaseInfo.Action=Start
Bh

Events[0].EventBaseInfo.Index=0
d

Events[0].Object.BoundingBox[0]= 4392
Events[0].Object.BoundingBox[1]=4136
Events[0].Object.BoundingBox[2]=6960
Events[0].Object.BoundingBox[3]=6512
……
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>

<Jpeg image data>


--<boundary>

Video Analyse APIs 347


9.1.2 [Event] TakenAwayDetection
When detect some object was taken away, send this event.
Event Code TakenAwayDetection
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
+Object object R The object that was taken away.
The detected object bounding [2992,1136,4960,5192
box, 4 interge, refer to x's value ]
of left — top point, y's value of
++BoundingBox uint16[4] R left—top point, x's value of right—
bottom point, y's value of right—
bottom point. Coordinate remap
DA

to 0 — 8192.
HU
A_

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
HT

4.4.3 snap subscription )


--<boundary>
TP
_

Content-Type: text/plain
AP

Content-Length: <length>
I_
V3

Events[0].EventBaseInfo.Code=TakenAwayDetection
.3

Events[0].EventBaseInfo.Action=Start
7
fo

Events[0].EventBaseInfo.Index=0
rV

Events[0].Object.BoundingBox[0]= 4392
el

Events[0].Object.BoundingBox[1]=4136
se

Events[0].Object.BoundingBox[2]=6960
n gS

Events[0].Object.BoundingBox[3]=6512
dn

……
--<boundary>
Bh

Content-Type: image/jpeg
d

Content-Length: <image size>

<Jpeg image data>


--<boundary>

9.1.3 [Event] WanderDetection


When detect some object was wandering, send this event
Event Code WanderDetection
Event action Start/Stop
Event index 0
Event Data

Video Analyse APIs 348


Name Type R/O Description Example
+Objects object[] R The objects that was wandering.
The detected object bounding box, 4 [2992,1136,4960,5
interge, refer to x's value of left—top 192]
point, y's value of left—top point, x's
++BoundingBox uint16[4] R
value of right—bottom point, y's value
of right — bottom point. Coordinate
remap to 0 — 8192.
The object wandering tracks, array of
polyline, one polyline for one object,
polyline is array of points, point is
+Tracks int[][20][2] O
array of two int, x's value and y's
value. Coordinate remap to 0 —
8192.
The detection region, the first array is
point list, max item is 20, the second
DA

+DetectRegion int[20][2] R array is point, must be two int, means


HU

x and y value, coordinate remap to 0


A_

— 8192.
HT
TP

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
_

4.4.3 snap subscription )


AP

--<boundary>
I_

Content-Type: text/plain
V3

Content-Length: <length>
.3
7
fo

Events[0].EventBaseInfo.Code=WanderDetection
rV

Events[0].EventBaseInfo.Action=Start
el

Events[0].EventBaseInfo.Index=0
se
n

Events[0].Objects[0].BoundingBox[0]= 4392
gS

Events[0].Objects[0].BoundingBox[1]=4136
dn

Events[0].Objects[0].BoundingBox[2]=6960
Bh

Events[0].Objects[0].BoundingBox[3]=6512
d

Events[0].Tracks[0][0][0]=23
Events[0].Tracks[0][0][1]=23
Events[0].Tracks[0][1][0]=500
Events[0].Tracks[0][1][1]=401
Events[0].Tracks[0][2][0]=1003
Events[0].Tracks[0][2][1]=192

Events[0].DetectRegion[0][0]=192
Events[0].DetectRegion[0][1]=192
Events[0].DetectRegion[1][0]=562
Events[0].DetectRegion[1][1]=552
Events[0].DetectRegion[2][0]=600
Events[0].DetectRegion[2][1]=733
Events[0].DetectRegion[3][0]=200

Video Analyse APIs 349


Events[0].DetectRegion[3][1]=270

--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>

<Jpeg image data>


--<boundary>

9.1.4 [Event] StayDetection


When detect some object was stay, send this event
Event Code StayDetection
Event action Start/Stop
Event index 0
Event Data
DA

Name Type R/O Description Example


HU

+Object object R The object that was stay.


A_

The detected object bounding box, 4 [2992,1136,4960,5


HT

interge, refer to x's value of left—top 192]


TP

point, y's value of left—top point, x's


_

++BoundingBox uint16[4] R
AP

value of right—bottom point, y's value


of right — bottom point. Coordinate
I_
V3

remap to 0 — 8192.
.3

+Objects object[] If detect several object, store in this


R
7

array.
fo

The detected object bounding box, 4 [2992,1136,4960,5


rV

interge, refer to x's value of left—top 192]


el
se

point, y's value of left—top point, x's


++BoundingBox uint16[4] R
n

value of right—bottom point, y's value


gS

of right — bottom point. Coordinate


dn

remap to 0 — 8192.
Bh

The detection region, the first array is


d

point list, max item is 20, the second


+DetectRegion int[20][2] R array is point, must be two int, means
x and y value, coordinate remap to 0
— 8192.
The area id, begin from 1, if omit, 2
+AreaID int O
means single area.
The preset id, if omit, means preset is 1
+PresetID int O
unknown.

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Video Analyse APIs 350


Events[0].EventBaseInfo.Code=StayDetection
Events[0].EventBaseInfo.Action=Start
Events[0].EventBaseInfo.Index=0
Events[0].Object.BoundingBox[0]= 4392
Events[0].Object.BoundingBox[1]=4136
Events[0].Object.BoundingBox[2]=6960
Events[0].Object.BoundingBox[3]=6512
Events[0].Objects[0].BoundingBox[0]= 4392
Events[0].Objects[0].BoundingBox[1]=4136
Events[0].Objects[0].BoundingBox[2]=6960
Events[0].Objects[0].BoundingBox[3]=6512
Events[0].DetectRegion[0][0]=192
Events[0].DetectRegion[0][1]=192
Events[0].DetectRegion[1][0]=562
Events[0].DetectRegion[1][1]=552
DA

Events[0].DetectRegion[2][0]=600
HU

Events[0].DetectRegion[2][1]=733
A_

Events[0].DetectRegion[3][0]=200
HT

Events[0].DetectRegion[3][1]=270
TP


_

Events[0].AreaID=2
AP

Events[0].PresetID=1
I_

--<boundary>
V3

Content-Type: image/jpeg
.3
7

Content-Length: <image size>


fo
rV

<Jpeg image data>


el

--<boundary>
se
n gS
dn

9.1.5 [Event] HumanTrait


Bh
d

When detect a human trait, send this event.


Event Code HumanTrait
Event action Pulse
Event index The channel index relate to this event, start from 0.
Event Data
Name Type R/O Description Example
+HumanAttribut
object O The human attributes.
es

Video Analyse APIs 351


The detected human bounding
box, 4 interge, refer to x's value
of left-top point, y's value of left-
++BoundingBox Array<int> O top point, x's value of right-
bottom point, y's value of right-
bottom point. Coordinate remap
to 0 — 8192.
Sex, can be "Man", "Woman", "Woman"
++Sex string O
"Unknown".
++Age int O Age.
Angle, 0: unknown, 1: front, 2:
++Angle int O
side, 3: back.
Coat color, can be: "White", "White"
"Orange", "Pink", "Black", "Red",
"Yellow", "Gray", "Blue",
"Green", "Purple", "Brown",
DA

"Sliver", "Darkviolet", "Maroon",


HU

"Dimgray", "Whitesmoke",
++CoatColor char[] O
A_

"Darkorange", "Mistyrose",
HT

"Tomato", "Olive", "Gold",


TP

"Darkolivegreen", "Chartreuse",
_

"Greenyellow", "Forestgreen",
AP

"Seagreen", "Chartreuse",
I_
V3

"Deepskyblue", "Cyan", "Other".


.3

Coat type, 0: unknown, 1: long 2


++CoatType int O
7

sleeve, 2: short sleeve.


fo

++TrousersColo Trousers color, value can be that "White"


rV

char[] O
r of CoatColor.
el
se

Trousers type, 0: unknown, 1: 2


n

++TrousersType int O long pants, 2: short pants, 3:


gS

skirt.
dn

Has hat or not, 0: unknown, 1: 1


++HasHat int O
Bh

not has hat, 2: has hat.


d

Has bag or not, 0: unknown, 1: 1


++HasBag int O
not has bag, 2: has bag.
Has umbrella or not, 0: 1
++HasUmbrella int O unknown, 1: not has umbrella, 2:
has umbrella.
Bag type, 0: unknown, 1: 1
++Bag int O handbag, 2: shoulder bag, 3:
knapsack, 4: draw-bar box.
Upper clothes pattern, 0: 2
++UpperPattern int O unknown, 1: pure color, 2: stripe,
3: pattern, 4: gap, 5: grid.
Hair style, 0: unknown, 1: long 3
++HairStyle int O hair, 2: short hair, 3: ponytail, 4:
updo, 5: hiddened.

Video Analyse APIs 352


Cap style, 0: unknown, 1: 0
++Cap int O
normal cap, 2: helmet.
If the human's face can be
+FaceAttributes object O
detected, find it's attributes.
The detected face bounding
box, 4 interge, refer to x's value
of left-top point, y's value of left-
++BoundingBox int[4] O top point, x's value of right-
bottom point, y's value of right-
bottom point. Coordinate remap
to 0 — 8192.
Sex, it can be "Man", "Woman", "Woman"
++Sex string O
"Unknown".
++Age int O Age. 23
Face feature, can be some of ["Smile"]
the following : "WearGlasses",
DA

"SunGlasses", "NoGlasses",
HU

++Feature char[][] O "Smile", "Anger", "Sadness",


A_

"Disgust", "Fear", "Surprise",


HT

"Neutral", "Laugh", "Happy",


TP

"Confused", "Scream".
_

Eye status, 0: not detected, 1: 2


AP

++Eye int O
close eye, 2: open eye.
I_
V3

Mouth status, 0: not detected, 1: 1


++Mouth int O
.3

close mouth, 2: open mouth.


7

Mask status, 0: not detected, 1: 2


fo

++Mask int O not wearing mask, 2: wearing


rV

mask.
el
se

Beard status, 0: not detected, 1: 1


++Beard int O
n

no beard, 2: has beard.


gS

Glasses status, 0: unknown, 1: 1


dn

not wearing, 2: normal Glasses,


++Glass Int O
Bh

3: sun glasses, 4: black frame


d

glasses.

[ Example ]
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Events[0].EventBaseInfo.Code=HumanTrait
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].HumanAttributes.BoundingBox[0]=1341
Events[0].HumanAttributes.BoundingBox[1]=2451
Events[0].HumanAttributes.BoundingBox[2]=4513
Events[0].HumanAttributes.BoundingBox[3]=4135

Video Analyse APIs 353


Events[0].HumanAttributes.Sex=Man
Events[0].HumanAttributes.Age=30
Events[0].HumanAttributes.CoatColor=White
Events[0].HumanAttributes.CoatType=1
Events[0].HumanAttributes.TrousersColor=Black
Events[0].HumanAttributes.TrousersType=1
Events[0].HumanAttributes.HasHat=1
Events[0].HumanAttributes.HasBag=2
Events[0].FaceAttributes.BoundingBox[0]=1341
Events[0].FaceAttributes.BoundingBox[1]=2451
Events[0].FaceAttributes.BoundingBox[2]=4513
Events[0].FaceAttributes.BoundingBox[3]=4135
Events[0].FaceAttributes.Sex=Man
Events[0].FaceAttributes.Age=30
Events[0].FaceAttributes.Feature[0]=Smile
Events[0].FaceAttributes.Eye=2
DA

Events[0].FaceAttributes.Mouth=1
HU

Events[0].FaceAttributes.Glass=1
A_

--<boundary>
HT

Content-Type: image/jpeg
TP

Content-Length: <image size>


_ AP

<Jpeg image data>


I_

--<boundary>
V3
.3
7
fo

9.1.6 [Event] CrossLineDetection


rV
el
se

When detect some object cross the line, send this event.
n gS

Event Code CrossLineDetection


dn

Event action Start/Stop


Event index 0
Bh

Event Data
d

Name Type R/O Description Example


+Object object R The object that cross the line.
The detected object bounding [2992,1136,4960,5192]
box, 4 interge, refer to x's
value of left — top point, y's
value of left — top point, x's
++BoundingBox uint16[4] R
value of right—bottom point,
y's value of right-bottom point.
Coordinate remap to 0 —
8192.
+Objects object[] If detect several object, store
O
in this array.

Video Analyse APIs 354


The detected object bounding [2992,1136,4960,5192]
box, 4 interge, refer to x's
value of left — top point, y's
value of left — top point, x's
++BoundingBox uint16[4] R
value of right—bottom point,
y's value of right-bottom point.
Coordinate remap to 0 —
8192.
The detection line, the first
array is point list, max item is
20, the second array is point,
+DetectLine int[20][2] R
must be two int, means x and
y value, coordinate remap to 0
— 8192.
The crossline direction, can “LeftToRight”
+Direction string O be : “LeftToRight”,
DA

“RightToLeft”, “Any”.
HU
A_

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
HT

4.4.3 snap subscription )


TP

--<boundary>
_

Content-Type: text/plain
AP

Content-Length: <length>
I_
V3

Events[0].EventBaseInfo.Code=CrossLineDetection
.3
7

Events[0].EventBaseInfo.Action=Start
fo

Events[0].EventBaseInfo.Index=0
rV

Events[0].Object.BoundingBox[0]= 4392
el

Events[0].Object.BoundingBox[1]=4136
se
n

Events[0].Object.BoundingBox[2]=6960
gS

Events[0].Object.BoundingBox[3]=6512
dn

Events[0].Objects[0].BoundingBox[0]= 4392
Bh

Events[0].Objects[0].BoundingBox[1]=4136
d

Events[0].Objects[0].BoundingBox[2]=6960
Events[0].Objects[0].BoundingBox[3]=6512
Events[0].DetectLine[0][0]=192
Events[0].DetectLine[0][1]=192
Events[0].DetectLine[1][0]=562
Events[0].DetectLine[1][1]=552
Events[0].DetectLine[2][0]=600
Events[0].DetectLine[2][1]=733
Events[0].DetectLine[3][0]=200
Events[0].DetectLine[3][1]=270

Events[0].Direction=LeftToRight

--<boundary>

Video Analyse APIs 355


Content-Type: image/jpeg
Content-Length: <image size>

<Jpeg image data>


--<boundary>

9.1.7 [Event] CrossRegionDetection


When detect some object cross the region, send this event
Event Code CrossLineDetection
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
DA

+Object object R The object that cross the region.


HU

The detected object bounding [2992,1136,4960,5192]


box, 4 interge, refer to x's value of
A_

left—top point, y's value of left-top


HT

++BoundingBox uint16[4] R point, x's value of right—bottom


TP

point, y's value of right-bottom


_ AP

point. Coordinate remap to 0 —


I_

8192.
V3

+Objects object[] If detect several object, store in


.3

O
this array.
7
fo

The detected object bounding [2992,1136,4960,5192]


rV

box, 4 interge, refer to x's value of


el

left—top point, y's value of left—


se

++BoundingBox uint16[4] R top point, x's value of right —


n gS

bottom point, y's value of right-


dn

bottom point. Coordinate remap


to 0 — 8192.
Bh

The detection region, the first


d

array is point list, max item is 20,


+DetectRegion int[20][2] R the second array is point, must be
two int, means x and y value,
coordinate remap to 0 — 8192.
The cross action, can be : "Disappear"
+Action char[] R "Appear", "Disappear",
"Cross","Inside"
The cross direction, valid on if “LeftToRight”
+Direction char[] O the “Action” is “Cross”, can be :
"Enter", "Leave", "Both".

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )

Video Analyse APIs 356


--<boundary>
Content-Type: text/plain
Content-Length: <length>

Events[0].EventBaseInfo.Code=CrossLineDetection
Events[0].EventBaseInfo.Action=Start
Events[0].EventBaseInfo.Index=0
Events[0].Object.BoundingBox[0]= 4392
Events[0].Object.BoundingBox[1]=4136
Events[0].Object.BoundingBox[2]=6960
Events[0].Object.BoundingBox[3]=6512
Events[0].Objects[0].BoundingBox[0]= 4392
Events[0].Objects[0].BoundingBox[1]=4136
Events[0].Objects[0].BoundingBox[2]=6960
Events[0].Objects[0].BoundingBox[3]=6512
Events[0].DetectRegion[0][0]=192
DA

Events[0].DetectRegion[0][1]=192
HU

Events[0].DetectRegion[1][0]=562
A_

Events[0].DetectRegion[1][1]=552
HT

Events[0].DetectRegion[2][0]=600
TP

Events[0].DetectRegion[2][1]=733
_

Events[0].DetectRegion[3][0]=200
AP

Events[0].DetectRegion[3][1]=270
I_


V3

Events[0].Action=Disappear
.3
7

Events[0].Direction=LeftToRight
fo


rV

--<boundary>
el

Content-Type: image/jpeg
se

Content-Length: <image size>


n gS
dn

<Jpeg image data>


Bh

--<boundary>
d

9.1.8 [Event] QueueStayDetection


When detect the queue stay time too long, send this event
Event Code QueueStayDetection
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
+Object object O The object that was stay.
The detected object bounding box, [2992,1136,4960,5192
++BoundingBox uint16[4] O
4 interge, refer to x's value of left— ]

Video Analyse APIs 357


top point, y's value of left — top
point, x's value of right — bottom
point, y's value of right — bottom
point. Coordinate remap to 0 —
8192.
+Objects object[] If detect several object, store in this
O
array.
The detected object bounding box, [2992,1136,4960,5192
4 interge, refer to x's value of left— ]
top point, y's value of left — top
++BoundingBox uint16[4] O point, x's value of right — bottom
point, y's value of right — bottom
point. Coordinate remap to 0 —
8192.
The detection region, the first array
is point list, max item is 20, the
DA

+DetectRegion int[20][2] O second array is point, must be two


HU

int, means x and y value,


A_

coordinate remap to 0 — 8192.


HT

The area id, begin from 1, if omit, 2


+AreaID int O
TP

means single area.


_

The preset id, Valid ID starts from 1


AP

1; 0 means meaningless, not


I_

+PresetID int O
involved. if omit, means preset is
V3

unknown.
.3
7
fo

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
rV

4.4.3 snap subscription )


el

--<boundary>
se
n

Content-Type: text/plain
gS

Content-Length: <length>
dn
Bh

Events[0].EventBaseInfo.Code=QueueStayDetection
d

Events[0].EventBaseInfo.Action=Start
Events[0].EventBaseInfo.Index=0
Events[0].Object.BoundingBox[0]= 4392
Events[0].Object.BoundingBox[1]=4136
Events[0].Object.BoundingBox[2]=6960
Events[0].Object.BoundingBox[3]=6512
Events[0].Objects[0].BoundingBox[0]= 4392
Events[0].Objects[0].BoundingBox[1]=4136
Events[0].Objects[0].BoundingBox[2]=6960
Events[0].Objects[0].BoundingBox[3]=6512
Events[0].DetectRegion[0][0]=192
Events[0].DetectRegion[0][1]=192
Events[0].DetectRegion[1][0]=562
Events[0].DetectRegion[1][1]=552

Video Analyse APIs 358


Events[0].DetectRegion[2][0]=600
Events[0].DetectRegion[2][1]=733
Events[0].DetectRegion[3][0]=200
Events[0].DetectRegion[3][1]=270

Events[0].AreaID=2
Events[0].PresetID=1
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>

<Jpeg image data>


--<boundary>

9.1.9 [Event] QueueNumDetection


DA
HU

When detect the queue people number exceed limit, send this event
A_

Event Code QueueNumDetection


HT

Event action Pulse


TP

Event index 0
_ AP

Event Data
I_

Name Type R/O Description Example


V3

+ManList object[] O The people info list.


.3

The detected people bounding box, [2992,1136,4960,5192]


7
fo

4 interge, refer to x's value of left-


rV

top point, y's value of left-top point,


++BoundingBox uint16[4] O
el

x's value of right-bottom point, y's


se

value of right-bottom point.


n gS

Coordinate remap to 0 — 8192.


dn

++Stature int R The people's stature, unit is cm. 176


The area id, begin from 1, if omit, 2
Bh

+AreaID int O
means single area.
d

The preset id, Valid ID starts from 1


1; 0 means meaningless, not
+PresetID int O
involved. if omit, means preset is
unknown.

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Events[0].EventBaseInfo.Code=QueueNumDetection
Events[0].EventBaseInfo.Action=Pulse

Video Analyse APIs 359


Events[0].EventBaseInfo.Index=0
Events[0].ManList[0].BoundingBox[0]= 4392
Events[0].ManList[0].BoundingBox[1]=4136
Events[0].ManList[0].BoundingBox[2]=6960
Events[0].ManList[0].BoundingBox[3]=6512
Events[0].ManList[0].Stature =176
Events[0].ManList[1].BoundingBox[0]= 275

Events[0].AreaID=2
Events[0].PresetID=1
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>

<Jpeg image data>


--<boundary>
DA
HU
A_

9.1.10 [Event] WorkClothesDetection


HT
TP

PPE (safety helmet, work clothes, work pants and more) detection is used for construction sites or
_

safety production detection. Original images (images taken at the current preset) and human body
AP

cutouts can be reported when snapshots are taken.


I_
V3

Event Code WorkClothesDetection


.3

Event Action Start/Stop


7

Event Index Video Channel No.


fo

Event Data
rV

Name Type R/O Description Example


el
se

+Name char[128] R Event name. "WorkClothesDetection1"


n

+Class char[16] O Category of the intelligence event. "OperateMonitor" or


gS

"ProtectiveSuit"
dn

+Type char[16] O Alarm rule type. "Helmet"


Bh

"Helmet": Safety helmet.


d

"Clothes": Work clothes.


"WorkPants": Work pants.
"ProtectiveSuit": Protective clothes.
"ShoesCover": Shoe cover.
"SafetyRope": Safety rope.
"NormalHat": Normal hat.
"Mask": Face mask.
"Apron": Apron.
"Glove": Gloves.
"Boot": Boots.
"NoHat": No hat.
"Prohelmet": Protective mask.
"FireProofClothes": Fire-resistant
clothing.

Video Analyse APIs 360


"Uniform": Uniform.
"Multimeter": Multimeter.
"BreathingMask": Breathing mask.
"Glasses": Glasses.
"Vest": Reflective clothes.
"WristGuard": Wrist guard.
"SafetyShoes": Safety shoes.
+ObjectID uint R Object ID. Each ID represents a 12345
unique object. Different objects
cannot share the same ID, and the
used ID cannot be used again.
+UTC uint32 R The time when the event occurred. 1465389120
UTC time with time zone deviation,
in seconds.
+UTCMS uint32 R Event time in milliseconds. 123
+EventID uint32 O Event ID used to uniquely mark an 5864
DA

event.
HU

+RuleID uint R Rule ID indicating the rule that 1


A_

triggers the event. The value is the


HT

same as VideoAnalyseRule.Id.
TP

+SourceID char[32] O The ID linked to the event. When "022019030714003000001


_

different analysis is performed on "


AP

the same object or image, the


I_

SourceID of multiple events is the


V3

same.
.3
7

The default value is an empty


fo

string, indicating that this


rV

information is not available.


el

Format: Type + Time + Number, of


se
n

which type is 2 digits, time is 14


gS

digits, and number is 5 digits.


dn

Type: 02-image
Bh

Time: YYYYMMDhhmmss
d

Number: 00001
+GroupID int O Event group ID. Multiple human 123
bodies detected at a time have the
same GroupID.
+CountInGrou int O Number of snapshots in an event 1
p group.
+IndexInGrou int O Snapshot number in an event 1
p group, starting from 1.
+HumanImage object O Human body image information.
++IndexInData uint O The image number in the uploaded 0
image data.
++Offset uint O Offset in the binary data block. 0
++Length uint O Image size, in bytes. 100000
++Width uint O Image width. 1920

Video Analyse APIs 361


++Height uint O Image height. 1080
+SceneImage object O Panoramic wide-angle image.
++IndexInData uint O The image number in the uploaded 0
image data.
++Offset uint O Offset in the binary data block. 100000
++Length uint O Image size, in bytes. 52000
++Width uint O Image width. 1920
++Height uint O Image height. 1080
+Helmet object R The information on the status of
safety helmet attributes (required).
++HasHelmet enumint8 R Wear safety helmet or not. 2
enumint8{
0: Unknown.
1: Without safety helmet.
2: With safety helmet.
3: The safety helmet in the
DA

specified color does not exist.


HU

}
A_

Customized parameter.
HT

++HelmetColo ColorEnum O Safety helmet color. "Red"


TP

r The value range is the same as


_

CoatColor in HumanTrait.
AP

++HelmetFlag uint8 O Used for mobile device. 1


I_

Alarm type:
V3

1: Alarms that reach the trigger


.3
7

speed.
fo

2: Alarms that reach the reporting


rV

speed.
el

3: Alarms that reach the trigger and


se
n

reporting speed at the same time.


gS

++ReportFlag uint8 O Alarm upload ID. 1


dn

0: No alarm.
Bh

1: Alarm.
d

++HasLegalH enumin8 O Result of safety helmet detection. 0


at enumint8{
0: Compliant.
1: Not compliant.
2: Unknown.
}
+Clothes object O The information on the status
related to the work and service
attributes (optional).
++HasClothes enumint8 R Wear work clothes or not. 2
enumint8{
0: Unknown.
1: No
2: Yes

Video Analyse APIs 362


}
++HasLegalCl enumint8 R Wear required work clothes or not. 2
othes enumint8{
0: Unknown.
1: No
2: Yes
}
++ClothesCol ColorEnum O Work clothes color. "Red"
or The value range is the same as
CoatColor in HumanTrait.
++LinkGroupN char[128] O The name of the PPE detection "Group1"
ame database that triggers the alarm.
The array length must not exceed
128 characters.
++LinkGroupI char[128] O The ID of the PPE detection "1"
D database that triggers the alarm.
DA

The array length must not exceed


HU

128 characters.
A_

++CutoutPolic uint32 O Optimization scheme. 0


HT

y 0: Full body.
TP

1: Upper body.
_

++LinkGroupI object[16] O The information on the PPE


AP

nfo detection database linked to the


I_

alarm. Used when multiple


V3

databases trigger the alarm at the


.3
7

same time.
fo

+++GroupID char[128] O The ID of the PPE detection "123"


rV

database linked to the alarm.


el

+++FeatureNa char[128] O The name of the feature related to "feature_1"


se
n

me the linked alarm.


gS

+++Similarity uint8 O The similarity of the database 22


dn

linked to the alarm.


Bh

+++SampleAtt enumint O Sample attributes. 0


d

ributes Enumint{
0: Unknown.
1: Positive sample.
2: negative sample.
}
1 by default.
+++GroupNa char[128] O The name of the PPE detection "Group1"
me database linked to the alarm.
++TrousersCol ColorEnum O Work pants color. "Red"
or The value range is the same as
CoatColor in HumanTrait.
+WorkPants object O The information on the status
related to the work pants attributes.
Used for NVR customization

Video Analyse APIs 363


requests. This parameter is used
for the separate detection of work
clothes and work pants. If the work
pants and clothes are detected
together, work pants detection is
included in PPE detection
(optional).
++HasPants enumint8 R Wear work pants or not. 2
enumint8{
0: Unknown.
1: No
2: Yes
}
++PantsColor ColorEnum O Work pants color. "Red"
The value range is the same as
TrousersColor in HumanTrait.
DA

+AlarmType enumint8 O Non-compliance alarm type. 1


HU

enumint8{
A_

0: Unknown.
HT

1: The protective clothes are not


TP

compliant.
_

2: The work clothes are not


AP

compliant.
I_

3: The safety helmet are not


V3

compliant.
.3
7

4: The safety helmet and work


fo

clothes are not compliant.


rV

}
el

This parameter is used for


se

customization requests.
ngS

+SafetyRope object O The information on the status of


dn

the safety rope attributes


Bh

(optional).
d

++CompliantT enumint8 R Whether the safety rope is 1


ype compliant.
enumint8{
0: Noncompliant.
1: Compliant.
}
+Hardhat object O The information on the status of
helmet attributes.
++HasHat enumint8 R Wear a safety helmet or not. 2
enumint8{
0: Unknown.
1: No.
2: Yes.

Video Analyse APIs 364


3: The safety helmet in the
specified color does not exist.
}
++HatColor ColorEnum O Hat color. The value range is the "Red"
same as CoatColor in HumanTrait.
+Ushanka object O The information on the status of
winter hat attributes.
++HasHat enumint8 R Wear a winter hat or not. 2
enumint8{
0: Unknown.
1: No.
2: Yes.
3: The winter hat in the specified
color does not exist.
}
++HatColor ColorEnum O Hat color. The value range is the "Red"
DA

same as CoatColor in HumanTrait.


HU

+Prohelmet object O The information on the status of


A_

protective mask attributes.


HT

++HasHat enumint8 R Wear a protective mask or not. 2


TP

enumint8{
_

0: Unknown.
AP

1: No.
I_

2: Yes.
V3

3: The protective mask in the


.3
7

specified color does not exist.


fo

}
rV

++HatColor ColorEnum O Hat color. The value range is the "Red"


el

same as CoatColor in HumanTrait.


se
n

+NormalHat object O The information on the status of


gS

general hat attributes.


dn

++HasHat enumint8 O Wear a general hat or not. 0


Bh

enumint8{
d

0: Unknown.
1: No.
2: Yes.
}
++HasLegalH enumin8 O Hat detection results. 0
at enumint8{
0: Compliant.
1: Non-compliant.
2: Unknown.
}
+Mask object O The information on the status of
face mask attributes.
++HasMask enumint8 O Wear a face mask or not. 0
enumint8{

Video Analyse APIs 365


0: Unknown.
1: No.
2: Yes.
}
++HasLegalM enumint8 O Face mask detection results. 0
ask enumint8{
0: Compliant.
1: Non-compliant.
2: Unknown.
}
+Apron object O The information on the status of
apron attributes.
++HasApron enumint8 O Wear an apron or not. 0
enumint8{
0: Unknown.
1: No.
DA

2: Yes.
HU

}
A_

++HasLegalA enumint8 O Apron detection results. 0


HT

pron enumint8{
TP

0: Compliant.
_

1: Non-compliant.
AP

2: Unknown.
I_

}
V3

+Glove object O The information on the status of


.3
7

gloves attributes.
fo

++HasGlove enumint8 O Wear gloves or not. 0


rV

enumint8{
el

0: Unknown.
se
n

1: No.
gS

2: Yes.
dn

}
Bh

++HasLegalGl enumint8 O Gloves detection results. 0


d

ove enumint8{
0: Compliant.
1: Non-compliant.
2: Unknown.
}
+Boot object O The information on the status of
boots attributes.
++HasBoot enumint8 O Wear boots or not. 0
enumint8{
0: Unknown.
1: No.
2: Yes.
}

Video Analyse APIs 366


++HasLegalB enumint8 O Boots detection results. 0
oot enumint8{
0: Compliant.
1: Non-compliant.
2: Unknown.
}
+ShoesCover object O The information on the status of
shoe covers attributes.
++HasCover enumint8 O Wear shoe covers or not. 0
enumint8{
0: Unknown.
1: No.
2: Yes.
}
++HasLegalC enumint8 O Shoe covers detection results. 0
over enumint8{
DA

0: Compliant.
HU

1: Non-compliant.
A_

2: Unknown.
HT

}
TP

+NoHat object O No information on the status of hat


_

attributes.
AP

++HasHat enumint8 O Wear a hat or not. 0


I_

enumint8{
V3

0: Unknown.
.3
7

1: No.
fo

2: Yes.
rV

}
el

++HasLegalH enumint8 O No hat detection results. 0


se
n

at enumint8{
gS

0: Compliant.
dn

1: Non-compliant.
Bh

2: Unknown.
d

}
+PTS double O Timestamp of relative events, in 150.0
milliseconds.
+ProtectiveSui object O The information on the status of
t protection suit attributes.
++HasProtecti enumint8 O Wear protective suit or not. 2
veSuit enumint8{
0: Unknown.
1: No
2: Yes
3: The protective suit in the
specified color does not exist.
}

Video Analyse APIs 367


++ProtectiveS ColorEnum O Protective suit color. The value "Red"
uitColor range is the same as CoatColor in
HumanTrait.
+FireProofClot object O The information on the status of
hes flame-resistant clothing attributes.
++HasFirePro enumint O Wear flame-resistant clothing or 2
ofClothes not.
enumint8{
0: Unknown.
1: No.
2: Yes.
3: The flame-resistant clothing in
the specified color does not exist.
}
++FireProofCl ColorEnum O Color of the flame-resistant "Red"
othesColor clothing. The value range is the
DA

same as that in the HumanTrait


HU

CoatColor.
A_

+DetectRegio uint16[20][ O Detection area.


HT

n 2]
TP

+Objects VideoAnaly O Objects indicate the information on [,,... ]


_

seObject[1 the detected objects.


AP

00]
I_

+Uniform object O The information on the status of


V3

work uniform attributes.


.3
7

++HasUniform enumint8 O Wear work uniform or not. 1


fo

enumint8{
rV

0: Unknown.
el

1: No
se
n

2: Yes
gS

3: The specified color uniform does


dn

not exist.
Bh

}
d

++UniformCol ColorEnum O work uniform color. The value "Red"


or range is the same as CoatColor in
HumanTrait.
+Multimeter object O The information on the status of
multimeter attributes.
++HasMultime enumint8 O Take multimeter or not. 0
ter enumint8{
0: Unknown.
1: No.
2: Yes.
}
++HasLegalH HasLegalH O Multimeter detection results. 0
at at enumint8{
0: Compliant.

Video Analyse APIs 368


1: Non-compliant.
2: Unknown.
}
+BreathingMa object O The information on the status of
sk breathing mask attributes.
++HasBreathi enumint8 O Wear breathing mask or not. 0
ngMask enumint8{
0: Unknown.
1: No.
2: Yes.
}
++HasLegalBr enumint O Breathing mask detection results. 0
eathingMask enumint8{
0: Unknown.
1: Non-compliant.
2: Compliant.
DA

}
HU

+Glasses object O The information on the status of


A_

glasses attributes.
HT

++GlassesTyp enumint O Alarm type in glasses detection 0


TP

e rules.
_

enumint{
AP

0: No glasses.
I_

1: Sunglasses.
V3

2: Black-rimmed glasses.
.3
7

3: Half-rimmed glasses.
fo

4: Rimless glasses.
rV

5: General glasses.
el

6: Industrial goggles.
se
n

}
gS

++GlassesLeg int O Glasses detection results. 0


dn

alMask 0: Compliant.
Bh

1: Non-compliant.
d

2: Unknown.
+LegalAlarmT uint O Alarm method (0 by default). 0
ype 0: Alarms are triggered when there
are non-compliant items.
1: Alarms are triggered when all
items are compliant.
+SafeBelt object O The information on the status of
seatbelt attributes.
++HasSafeBel enumint8 O Wear seatbelt or not. 0
t enumint8{
0: Unknown.
1: No.
2: Yes.
}

Video Analyse APIs 369


++HasLegalS enumint8 O Seatbelt detection results. 0
afeBelt enumint8{
0: Compliant.
1: Non-compliant.
2: Unknown.
}
+Vest object O The information on the status of
safety vest attributes.
++HasVest enumint8 O Wear safety vest or not. 0
enumint8{
0: Unknown.
1: No.
2: Yes.
}
++HasLegalVe enumint8 O Safety vest detection results. 0
st enumint8{
DA

0: Compliant.
HU

1: Non-compliant.
A_

2: Unknown.
HT

}
TP

+SafetyShoes object O The information on the status of


_

safety shoes attributes.


AP

++HasSafetyS enumint8 O Wear safety shoes or not. 0


I_

hoes enumint8{
V3

0: Unknown.
.3
7

1: No.
fo

2: Yes.
rV

}
el

++HasLegalS enumint8 O Safety shoes detection results. 0


se
n

afetyShoes enumint8{
gS

0: Compliant.
dn

1: Non-compliant.
Bh

2: Unknown.
d

}
+WristGuard object O The information on the status of
wrist guard attributes.
++HasWristGu enumint8 O Wear wrist guard or not. 0
ard enumint8{
0: Unknown.
1: No.
2: Yes.
}
++HasLegalW enumint8 O Wrist guard detection results 0
ristGuard enumint8{
0: Compliant.
1: Non-compliant.
2: Unknown.

Video Analyse APIs 370


}
+Hood object O The information on the status of
head cover attributes.
++HasLegalH int32 O Head cover detection results. 0
ood enumint8{
0: Compliant.
1: Non-compliant.
2: Unknown.
}

Event Response Example (multipart, key=value format in body, binary data in body) (response to
4.4.3 snap subscription)
--<boundary>
Content-Type: text/plain
Content-Length: <length>
DA

Events[0].EventBaseInfo.Code=WorkClothesDetection
HU

Events[0].EventBaseInfo.Action=Start
A_

Events[0].EventBaseInfo.Index=0
HT

Events[0].Name=WorkClothesDetection1
TP

Events[0].Class=OperateMonitor or ProtectiveSuit
_

Events[0].Type=Helmet
AP

Events[0].ObjectID=12345
I_

Events[0].UTC=1465389120
V3

Events[0].UTCMS=123
.3
7

Events[0].EventID=5864
fo

Events[0].RuleID=1
rV

Events[0].SourceID=022019030714003000001
el

Events[0].GroupID=123
se
n

Events[0].CountInGroup=1
gS

Events[0].IndexInGroup=1
dn

Events[0].HumanImage.IndexInData=0
Bh

Events[0].HumanImage.Offset=0
d

Events[0].HumanImage.Length=100000
Events[0].HumanImage.Width=1920
Events[0].HumanImage.Height=1080
Events[0].SceneImage.IndexInData=0
Events[0].SceneImage.Offset=100000
Events[0].SceneImage.Length=52000
Events[0].SceneImage.Width=1920
Events[0].SceneImage.Height=1080
Events[0].Helmet.HasHelmet=2
Events[0].Helmet.HelmetColor=Red
Events[0].Helmet.HelmetFlag=1
Events[0].Helmet.ReportFlag=1
Events[0].Helmet.HasLegalHat=0
Events[0].Clothes.HasClothes=2

Video Analyse APIs 371


Events[0].Clothes.HasLegalClothes=2
Events[0].Clothes.ClothesColor=Red
Events[0].Clothes.LinkGroupName=Group1
Events[0].Clothes.LinkGroupID=1
Events[0].Clothes.CutoutPolicy=0
Events[0].Clothes.LinkGroupInfo[0].GroupID=123
Events[0].Clothes.LinkGroupInfo[0].FeatureName=feature_1
Events[0].Clothes.LinkGroupInfo[0].Similarity=22
Events[0].Clothes.LinkGroupInfo[0].SampleAttributes=0
Events[0].Clothes.LinkGroupInfo[0].GroupName=Group1

Events[0].Clothes.TrousersColor=Red
Events[0].WorkPants.HasPants=2
Events[0].WorkPants.PantsColor=Red
Events[0].AlarmType=1
Events[0].SafetyRope.CompliantType=1
DA

Events[0].Hardhat.HasHat=2
HU

Events[0].Hardhat.HatColor=Red
A_

Events[0].Ushanka.HasHat=2
HT

Events[0].Ushanka.HatColor=Red
TP

Events[0].Prohelmet.HasHat=2
_

Events[0].Prohelmet.HatColor=Red
AP

Events[0].NormalHat.HasHat=0
I_

Events[0].NormalHat.HasLegalHat=0
V3

Events[0].Mask.HasMask=0
.3
7

Events[0].Mask.HasLegalMask=0
fo

Events[0].Apron.HasApron=0
rV

Events[0].Apron.HasLegalApron=0
el

Events[0].Glove.HasGlove=0
se

Events[0].Glove.HasLegalGlove=0
n
gS

Events[0].Boot.HasBoot=0
dn

Events[0].Boot.HasLegalBoot=0
Bh

Events[0].ShoesCover.HasCover=0
d

Events[0].ShoesCover.HasLegalCover=0
Events[0].NoHat.HasHat=0
Events[0].NoHat.HasLegalHat=0
Events[0].PTS=150.0
Events[0].ProtectiveSuit.HasProtectiveSuit=2
Events[0].ProtectiveSuit.ProtectiveSuitColor=Red
Events[0].FireProofClothes.HasFireProofClothes=2
Events[0].FireProofClothes.FireProofClothesColor=Red
Events[0].DetectRegion[0][0]=

Events[0].Objects[0]=

Events[0].Uniform.HasUniform=1
Events[0].Uniform.UniformColor=Red

Video Analyse APIs 372


Events[0].Multimeter.HasMultimeter=0
Events[0].Multimeter.HasLegalHat=0
Events[0].BreathingMask.HasBreathingMask=0
Events[0].BreathingMask.HasLegalBreathingMask=0
Events[0].Glasses.GlassesType=0
Events[0].Glasses.GlassesLegalMask=0
Events[0].LegalAlarmType=0
Events[0].SafeBelt.HasSafeBelt=0
Events[0].SafeBelt.HasLegalSafeBelt=0
Events[0].Vest.HasVest=0
Events[0].Vest.HasLegalVest=0
Events[0].SafetyShoes.HasSafetyShoes=0
Events[0].SafetyShoes.HasLegalSafetyShoes=0
Events[0].WristGuard.HasWristGuard=0
Events[0].WristGuard.HasLegalWristGuard=0
Events[0].Hood.HasLegalHood=0
DA

--<boundary>
HU

Content-Type: image/jpeg
A_

Content-Length: <image size>


HT
TP

<Jpeg image data>


_

--<boundary>
AP
I_
V3
.3
7

9.2 FaceRecognitionServer
fo
rV
el

9.2.1 Create Face Group


se
ngS

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=createGroup


dn

Method GET
Request Params ( key=value format in URL )
Bh

Name Type R/O Description Example


d

groupName string R The face group name, max string Test1


length is 127.
groupDetail string O The description detail of the face ForTest1
group, max string length is 255.
Request Example
http://192.168.1.108/cgi-
bin/faceRecognitionServer.cgi?action=createGroup&groupName=Test1&groupDetail=ForTest1

Response Params ( key=value format in body)


Name Type R/O Description Example
groupID string R The identity of the created face 10000
group, max string length is 63.
Response Example

Video Analyse APIs 373


groupID=10000

9.2.2 Modify Face Group


Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=modifyGroup
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
groupID string R The identity of the face group, max 10000
string length is 63.
groupName string R The name of the the face group, max Test1
string length is 127.
groupDetail string O Description detail of the face group, ForTest1
max string length is 255.
Similarity uint8 O Similarity threshold range [0,100] 90
DA

Alive uint8 O Alive threshold [0,100] 0


HU

MaskSimilarity uint8 O Mask similarity threshold range 0


A_

[0,100]
HT

Request Example
TP

http://192.168.1.108/cgi-
_AP

bin/faceRecognitionServer.cgi?action=modifyGroup&groupID=10000&groupName=Test1&groupDetail=
I_

ForTest1
V3
.3

Response Params ( OK in body )


7

Response Example
fo
rV

OK
el
se
ngS

9.2.3 Delete Face Group


dn

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=deleteGroup


Bh

Method GET
d

Request Params ( key=value format in URL )


Name Type R/O Description Example
groupID string R The identity of the face group, max 10000
string length is 63.
Request Example
http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=deleteGroup&groupID=10000

Response Params ( OK in body )


Response Example
OK

Video Analyse APIs 374


9.2.4 Deploy Face Group
There are two ways to deploy the group. One is based on the group (putDisposition), and the
another one is based on the channel (setGroup).
 Put disposition to group
Deploy the face group to some video channels. If the video channel has been deployed already, it will
change the similary.
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=putDisposition
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
The identity of the face group, max 10000
groupID string R
string length is 63.
list object[] R List of disposition info.
DA

Video channel index which starts from 1


+channel int R
1.
HU

The threshold of the face similary, 0


A_

+similary int R
— 100.
HT

Request Example
TP

http://192.168.1.108/cgi-
_AP

bin/faceRecognitionServer.cgi?action=putDisposition&groupID=10000&list[0].channel=1&list[0].similary
I_

=80&list[1].channel=2&list[1].similary=70
V3
.3

Response Params ( key=value format in body)


7

Name Type R/O Description Example


fo
rV

Result of putting disposition for each [true, false]


report bool[] R
el

request channel.
se

Response Example
n

report[0]=true
gS

report[1]=false
dn
Bh
d

 Delete some disposition from group


Remove the deployment of face group from some video channels.
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=deleteDisposition
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
The identity of the face group, max 10000
groupID string R
string length is 63.
Video channel index which starts from [1,2]
channel int[] R
1.
Request Example
http://192.168.1.108/cgi-
bin/faceRecognitionServer.cgi?action=deleteDisposition&groupID=10000&channel[0]=1&channel[1]=2

Video Analyse APIs 375


Response Params ( key=value format in body)
Name Type R/O Description Example
Result of deleting disposition for each [true, false]
report bool[] R
request channel.
Response Example
report[0]=true
report[1]=false

 set disposition group to channel


Deploy some face groups to one video channel. If the video channel has been deployed already, it will
change the similary.
Note: This method will do an overwrite operation.
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=setGroup
DA

Method GET
HU

Request Params ( key=value format in URL )


Name Type R/O Description Example
A_

Video channel index which starts from [1,2]


HT

channel int[] R
1.
TP

List of disposition info, if not exist,


_

list object[] O
AP

remove all disposition from channel.


I_

The identity of the face group, max 10002


+groupID int R
V3

string length is 63.


.3

The threshold of the face similary, 0 80


7

+similary int R
fo

— 100.
rV

Request Example
el

http://192.168.1.108/cgi-
se

bin/faceRecognitionServer.cgi?action=setGroup&channel=1&list[0].groupID=10000&list[0].similary=80&l
ngS

ist[1].groupID=10002&list[1].similary=75
dn

Response Params ( OK in body )


Bh

Response Example
d

OK

 get disposition group from channel


Get the Deployment about the video channel.
Note: If the video channel does not deploy any group, then the response will be success with empty
http body.
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=getGroup
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which starts from [1,2]
channel int[] R
1.

Video Analyse APIs 376


Request Example
http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=getGroup&channel=1

Response Params ( key=value format in body)


Name Type R/O Description Example
The identity of the face group, max [10001, 10002,
groupID int[] R
string length is 63. 10003,…]
The threshold of the face similary, 0 [80,75,82,…]
similary int[] R
— 100.
Response Example
groupID[0]=10001
groupID[1]=10003
groupID[2]=10006
….
similary[0]=80
similary[1]=75
DA

similary[2]=85
HU

….
A_
HT
TP

9.2.5 Find Face Group


_ AP

Find the face group. If the groupID is not present in the URL, it will return all the groups.
I_
V3

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=findGroup


.3

Method GET
7
fo

Request Params ( key=value format in URL )


rV

Name Type R/O Description Example


el

groupID char[] O The identity of the face group, max 10000


se

string length is 63.


ngS

Request Example
dn

http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=findGroup
Bh

Response Params ( key=value format in body)


d

Name Type R/O Description Example


GroupList object[] R The face group information list.
char[] R The identity of the face group, max string 10000
+groupID
length is 63.
char[] R Name of the face group, max string test1
+groupName
length is 127.
char[] O Description detail of the face group, max fortest1
+groupDetail
string length is 255.
+groupSize int R The number of face in this face group. 30
+channels int[] O Video channel index which starts from 0.
+similarity int[] O The threshold of the face similary.
+groupType char[] O The type of face group BlackListDB
+TimeSection char[][][] O The time section of face group

Video Analyse APIs 377


Response Example
GroupList[0].groupID=00001
GroupList[0].groupName=Test1
GroupList[0].groupDetail=ForTest1
GroupList[0].groupSize=30
GroupList[0].channels[0]=1
GroupList[0].channels[1]=2

GroupList[0].similarity[0]=80
GroupList[0].similarity[1]=75

GroupList[0].groupType=BlackListDB
GroupList[0].TimeSection[0][0]=1 00:00:00-23:59:59
GroupList[0].TimeSection[0][1]=0 00:00:00-23:59:59
GroupList[0].TimeSection[0][2]=0 00:00:00-23:59:59
GroupList[0].TimeSection[0][3]=0 00:00:00-23:59:59
DA

GroupList[0].TimeSection[0][4]=0 00:00:00-23:59:59
HU

GroupList[0].TimeSection[0][5]=0 00:00:00-23:59:59
A_

GroupList[0].TimeSection[1][0]=1 00:00:00-23:59:59
HT

GroupList[0].TimeSection[1][1]=0 00:00:00-23:59:59
TP

GroupList[0].TimeSection[1][2]=0 00:00:00-23:59:59
_

GroupList[0].TimeSection[1][3]=0 00:00:00-23:59:59
AP

GroupList[0].TimeSection[1][4]=0 00:00:00-23:59:59
I_

GroupList[0].TimeSection[1][5]=0 00:00:00-23:59:59
V3

GroupList[0].TimeSection[2][0]=1 00:00:00-23:59:59
.3
7

GroupList[0].TimeSection[2][1]=0 00:00:00-23:59:59
fo

GroupList[0].TimeSection[2][2]=0 00:00:00-23:59:59
rV

GroupList[0].TimeSection[2][3]=0 00:00:00-23:59:59
el

GroupList[0].TimeSection[2][4]=0 00:00:00-23:59:59
se

GroupList[0].TimeSection[2][5]=0 00:00:00-23:59:59
n
gS

GroupList[0].TimeSection[3][0]=1 00:00:00-23:59:59
dn

GroupList[0].TimeSection[3][1]=0 00:00:00-23:59:59
Bh

GroupList[0].TimeSection[3][2]=0 00:00:00-23:59:59
d

GroupList[0].TimeSection[3][3]=0 00:00:00-23:59:59
GroupList[0].TimeSection[3][4]=0 00:00:00-23:59:59
GroupList[0].TimeSection[3][5]=0 00:00:00-23:59:59
GroupList[0].TimeSection[4][0]=1 00:00:00-23:59:59
GroupList[0].TimeSection[4][1]=0 00:00:00-23:59:59
GroupList[0].TimeSection[4][2]=0 00:00:00-23:59:59
GroupList[0].TimeSection[4][3]=0 00:00:00-23:59:59
GroupList[0].TimeSection[4][4]=0 00:00:00-23:59:59
GroupList[0].TimeSection[4][5]=0 00:00:00-23:59:59
GroupList[0].TimeSection[5][0]=1 00:00:00-23:59:59
GroupList[0].TimeSection[5][1]=0 00:00:00-23:59:59
GroupList[0].TimeSection[5][2]=0 00:00:00-23:59:59
GroupList[0].TimeSection[5][3]=0 00:00:00-23:59:59
GroupList[0].TimeSection[5][4]=0 00:00:00-23:59:59

Video Analyse APIs 378


GroupList[0].TimeSection[5][5]=0 00:00:00-23:59:59
GroupList[0].TimeSection[6][0]=1 00:00:00-23:59:59
GroupList[0].TimeSection[6][1]=0 00:00:00-23:59:59
GroupList[0].TimeSection[6][2]=0 00:00:00-23:59:59
GroupList[0].TimeSection[6][3]=0 00:00:00-23:59:59
GroupList[0].TimeSection[6][4]=0 00:00:00-23:59:59
GroupList[0].TimeSection[6][5]=0 00:00:00-23:59:59

GroupList[1].groupID=00003
GroupList[1].groupName=Test3
GroupList[1].groupDetail=ForTest3
GroupList[1].groupSize=50
GroupList[1].channels[0]=1
GroupList[1].channels[1]=2

GroupList[1].similarity[0]=70
DA

GroupList[1].similarity[1]=85
HU


A_
HT
TP

9.2.6 Re-Abstract Feature By Group


_
AP

Start ReAbstract
I_


V3

Abstract features for the groups.


.3
7

About the process of the re-extract, the device will use an event named "FaceFeatureAbstract" to
fo

report the process.


rV

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=groupReAbstract


el
se

Method GET
n

Request Params ( key=value format in URL )


gS

Name Type R/O Description Example


dn

The identity of the face group, max ["10000","10001"]


groupID char[][64] R
Bh

string length is 63.


d

Request Example
http://192.168.1.108/cgi-
bin/faceRecognitionServer.cgi?action=groupReAbstract&groupID[0]=10000&groupID[1]=10001

Response Params ( key=value format in body)


Name Type R/O Description Example
token int R The identity of this operation. 12345
Response Example
token=12345

 Stop ReAbstract
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopGroupReAbstract
Method GET

Video Analyse APIs 379


Request Params ( key=value format in URL )
Name Type R/O Description Example
token int R The identity of this operation. 12345
Request Example
http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=stopGroupReAbstract&token=12345

Response Params ( OK in body )


Response Example
OK

9.2.7 Add Person


Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=addPerson
Method POST
Request Params ( key=value format in URL , binary data in body)
DA

Name Type R/O Description Example


HU

The identity of the face group that this 10000


A_

groupID char[] R
person to add. Max string length is 63.
HT

The person name, max string length is ZhangSan


TP

name char[] R
63.
_AP

The person's birthday, ex: "1980-01- "1980-01-01"


birthday char[] O
I_

01".
V3

Sex, it can be "Male", "Female", Male


sex char[] O
.3

"Unknown".
7

The country name, length must be 2, CN


fo
rV

country char[] O and value should be according to


ISO3166.
el
se

The province name, max string length XXX


province char[] O
n

is 63.
gS

city char[] O The city name, max string length is 63. YYY
dn

The certificate type. It can be: "IC', IC


Bh

certificateType char[] O
"Passport", "Unknown".
d

The ID of certificate type, max string 3333333333333


id char[] O
length is 31.
Request Example
POST http://<server>/cgi-bin/faceRecognitionServer.cgi?action=addPerson&groupID=10000&name=Zh
angSan&birthday=1980-01-05&sex=Male&country=CN&province=XXX&city=YYY HTTP/1.1
Content-Type: image/jpeg
Content-Length: <image size>

<JPEG image data>

Response Params ( key=value format in body)


Name Type R/O Description Example
The id for this Person, max string "0005"
uid char[32] R
length is 31.

Video Analyse APIs 380


Response Example
uid=0005

9.2.8 Modify Person


Modify a person's info.
Note: If you do not want to change the image about the person, the request should not contain the image
data.
Note: You should provide at lease one optional param to update.
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=modifyPerson
Method POST
Request Params ( key=value format in URL , binary data in body)
Name Type R/O Description Example
char[] The identity of the Person, max string 0005
DA

uid R
length is 31.
HU

char[] The identity of the Face Group that this 10000


groupID R
A_

Person in. max string length is 63.


HT

char[] The person's name, max string length ZhangSan


name O
TP

is 63.
_

char[] The person's birthday, ex: "1980-01- "1980-01-01"


AP

birthday O
01".
I_

char[] Sex, it can be "Male", "Female", Male


V3

sex O
"Unknown".
.3
7

char[] The country name, length must be 2, CN


fo

country O and value should be according to


rV

ISO3166.
el

char[] The province name, max string length XXX


se

province O
is 63.
n gS

city char[] O The city name, max string length is 63. YYY
dn

char[] The certificate type. It can be: "IC', IC


certificateType O
Bh

"Passport", "Unknown".
d

char[] The ID of certificate type, max string 3333333333333


id O
length is 31.
Request Example
POST http://<server>/cgi-bin/faceRecognitionServer.cgi?action=modifyPerson&uid=0005&groupID=100
00&name=ZhangSan&birthday=1980-01-05&sex=Male&country=CN&province=XXX&city=YYY HTTP/
1.1
Content-Type: image/jpeg
Content-Length: <image size>

<JPEG image data>

Response Params ( OK in body )


Response Example
OK

Video Analyse APIs 381


9.2.9 Delete Person
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=deletePerson
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
char[] The identity of the person, max string 001
uid R
length is 31.
groupID char[] R The identity of the face group that this 10000
Person in. max string length is 63.
Request Example
http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=deletePerson&uid=001&groupID=10000

Response Params ( OK in body )


DA

Response Example
HU

OK
A_
HT
TP

9.2.10 Find Person


_ AP
I_

 Start to find
V3

Note: the returned token will be expired after 60 seconds without any doFind call.
.3
7

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFind


fo

Method GET
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Example


se

condition object R Search scope condition.


n gS

char[][] R The list of identity of the face ["10000","10001"]


dn

+GroupID group, max string length is


Bh

63.
d

person object O Person condition.


char[] O Person Name, max string xxx
+Name
length is 63.
char[] O Sex, it can be "Male", "Female"
+Sex
"Female", "Unknown".
char[] O Country name, length must CN
+Country be 2, and value should be
according to ISO3166.
char[] O Province name, max string
+Province
length is 63.
char[] O City name, max string length
+City
is 63.
char[] O Certificate Type. It can be: Passport
+CertificateType
"IC', "Passport", "Unknown".

Video Analyse APIs 382


char[] O Person ID of CertificateType,
+ID
max string length is 31.
int O Feature State, 0:Unknown, 1
+FeatureState
1:Failed, 2:OK.
Request Example
http://<server>/cgi-
bin/faceRecognitionServer.cgi?action=startFind&condition.GroupID[0]=10000&condition.GroupID[1]=10
003&person.Sex=Male&person.Country=CN&person.FeatureState=1

Response Params ( key=value format in body)


Name Type R/O Description Example
Token for this search, use this 123456789
token uint R token to get result and stop
search.
Result num, return -1 means 24
totalCount int R
still searching.
DA

Response Example
HU

token=123456789
A_

totalCount=24
HT
TP

 Get find result


_ AP

Note: the returned token will be expired after 60 seconds without any doFind call.
I_
V3

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFind


.3

Method GET
7

Request Params ( key=value format in URL )


fo

Name Type R/O Description Example


rV

Token for this search, use this 123456789


el
se

token uint R token to get result and stop


n

search.
gS

The index in search result, 0


dn

index uint R should between 0 and


Bh

totalCount –1.
d

Request Example
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFind&token=123456789&index=0

Response Params ( multipart, key=value format in body, binary in body)


Name Type R/O Description Example
person object R Person condition.
string R The identity of the person, max string 0005
+UID
length is 31.
string R The identity of the face group that this 10000
+GroupID
Person in. max string length is 63.
string R The person name, max string length xxx
+Name
is 63.
string O Sex, it can be "Male", "Female", Female
+Sex
"Unknown".

Video Analyse APIs 383


string O The person's birthday, ex: "1980-01- "1980-01-01"
+Birthday
01".
string O Country name, length must be 2, and CN
+Country value should be according to
ISO3166.
string O Province name, max string length is
+Province
63.
+City string O City name, max string length is 63.
+CertificateTy string O Certificate Type, can be: "IC', Passport
pe "Passport", "Unknown".
string O Person ID of CertificateType, max 1234567890
+ID
string length is 31.
int O Feature State, 0:Unknown, 1:Failed, 0
+FeatureState
2:OK.
Response Example
HTTP/1.1 200 OK
DA

Server: Device/1.0
HU

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


A_

Content-Length: <length>
HT
TP

--<boundary>
_

Content-Type: text/plain
AP

Content-Length: <length>
I_
V3

person.UID=0005
.3
7

person.GroupID=10000
fo

person.Name=ZhangSan
rV

person.Birthday=1980-01-01
el

person.Sex=Male
se
n

person.Country=CN
gS

person.Province=XXX
dn

person.City=YYY
Bh

person.CertificateType=IC
d

person.ID=1234567890
person.FeatureState=0
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>

< jpeg image data ... >


--<boundary>--

 Stop finding
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFind
Method GET
Request Params ( key=value format in URL )

Video Analyse APIs 384


Name Type R/O Description Example
The token for this search, use this token 123456789
token uint R
to get result and stop search.
Request Example
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFind&token=123456789

Response Params ( OK in body )


Response Example
OK

9.2.11 Re-Abstract Features By Person


 Start ReAbstract
About the process of the re-extract, the device will use an event named "FaceFeatureAbstract"to
DA

report the process.


HU

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=reAbstract


A_

Method GET
HT

Request Params ( key=value format in URL )


TP

Name Type R/O Description Example


_

The list of identity of person, max ["10000", "10001"]


AP

UID char[][31] O
string length is 31.
I_

Request Example
V3

http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=reAbstract&uid[0]=001&uid[1]=002
.3
7
fo

Response Params ( OK in body )


rV

Response Example
el

OK
se
ngS

Stop ReAbstract
dn


Bh

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopReAbstract


d

Method GET
Request Params ( none )
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=stopReAbstract

Response Params ( OK in body )


Response Example
OK

9.2.12 [Config] Face Recognition AlarmOut Setting


Config Data Params

Video Analyse APIs 385


Name Type R/O Description Example
FaceRecogniti Each face group has one config object
object[] R
onAlarm in this array.
char[] The face group ID, max string length is 0017
+GroupID R
63.
char[] The face group name, max string length wsd
+GroupName R
is 127.
+AlarmOutEna true
Bool R Enable AlarmOut or not.
ble
+AlarmChann Each AlarmOut channel has one config
object[] R
el object in this array.
Alarm rule mask. 0
++AlarmRule
Int R  Bit 0 : recognition success
Mask
 Bit 1 : recognition failed
++AlarmOutLa Alarm out delay, unit is second, value 5
Int R
tch between 1 anf 300.
DA
HU

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
A_

are as follows :
HT

Get Config Request Example


TP

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=FaceRecognitionAlarm
_

Get Config Response Example


AP

table.FaceRecognitionAlarm[0].GroupID=0017
I_

table.FaceRecognitionAlarm[0].GroupName=wsd
V3

table.FaceRecognitionAlarm[0].AlarmOutEnable=true
.3
7

table.FaceRecognitionAlarm[0].AlarmChannel[0].AlarmRuleMask=0
fo

table.FaceRecognitionAlarm[0].AlarmChannel[0].AlarmOutLatch=5
rV

table.FaceRecognitionAlarm[0].AlarmChannel[1].AlarmRuleMask=0
el

table.FaceRecognitionAlarm[0].AlarmChannel[1].AlarmOutLatch=8
se
n


gS

table.FaceRecognitionAlarm[1].GroupID=0018
dn

table.FaceRecognitionAlarm[1].GroupName=cst
Bh

table.FaceRecognitionAlarm[1].AlarmOutEnable=true
d

table.FaceRecognitionAlarm[1].AlarmChannel[0].AlarmRuleMask=0
table.FaceRecognitionAlarm[1].AlarmChannel[0].AlarmOutLatch=10
table.FaceRecognitionAlarm[1].AlarmChannel[1].AlarmRuleMask=0
table.FaceRecognitionAlarm[1].AlarmChannel[1].AlarmOutLatch=15

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&FaceRecognitionAlarm[0].GroupID=0017&FaceRecognition
Alarm[0].GroupName=wsd&FaceRecognitionAlarm[0].AlarmOutEnable=true&FaceRecognitionAlarm[
0].AlarmChannel[0].AlarmRuleMask=0&FaceRecognitionAlarm[0].AlarmChannel[0].AlarmOutLatch=5
Set Config Response Example
OK

Video Analyse APIs 386


9.2.13 Find Person by Picture
 Start to find
Start to find person in face groups by picture. The search may last for some time, so the response may
push at regular intervals until 100% Progress
Note: If you want to find person in face groups by person info, see above "Find Person"API.
Note: The returned token will be expired after 60 seconds without any doFind call.
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindByPic
Method POST
Request Params (multipart; key=value format in URL, binary in body )
Name Type R/O Description Example
Face groups to find, max ["10000","10001"]
GroupID char[][] R
string length is 63.
Similarity int R Similarity percent, 1 — 100. 80
DA

Max Candidate result 500


MaxCandidate int O
number.
HU

Request Example
A_

POST http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindByPic&GroupID[0]=00001&Gr
HT

oupID[1]=00003&Similarity=80&MaxCandidate=500
TP

Content-Type: image/jpeg
_ AP

Content-Length: <image size>


I_
V3

<JPEG data>
.3
7

Response Params ( multipart; json format in body )


fo
rV

Name Type R/O Description Example


el

The token of this search, use 123456789


se

token uint R this token to get result and


n

stop search.
gS

Search Progress, 100 means 20


dn

progress uint R
finished.
Bh

Result num, return -1 means -1


d

totalCount int R
still searching.
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: application/json
Content-Length: <length>

{ "token": 123456789,
"progress": 20
"totalCount": -1

Video Analyse APIs 387


}
--<boundary>
Content-Type: application/json
Content-Length: <length>

{ "token": 123456789,
"progress": 60
"totalCount": -1
}
--<boundary>
Content-Type: application/json
Content-Length: <length>

{ "token": 123456789,
"progress": 100
"totalCount": 350
DA

}
HU

--<boundary>--
A_
HT

 Get the find result


TP
_

Get the find result, reply using multipart format, first part is json string to describe all candidate person,
AP

then the following parts are the person's pictures, refer by UID and GroupID in part header Content-Info.
I_
V3

Note: the returned token will be expired after 60 seconds without any doFind call.
.3

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindByPic


7

Method GET
fo
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Example


se

The token of this search, use this 123456789


n

token uint R token to get result and stop


gS

search.
dn

The index in search result, 0


Bh

index uint R should between 0 and totalCount


d

–1.
Number of result to get, start 30
count uint R
from index.
Request Example
http://<server>/cgi-
bin/faceRecognitionServer.cgi?action=doFindByPic&token=123456789&index=0&count=10

Response Params ( multipart; json format in body, binary in body)


Name Type R/O Description Example
Number of result person that
Found int R
return.
Candidates object[] R Candidates Person.
+Person object R Person Info.

Video Analyse APIs 388


char[] System id for this Person, max 1234
++UID R
string length is 31.
char[] The identity of the Face Group 100001
++GroupID R that this Person in. max string
length is 63.
char[] Person Name, max string length xxx
++Name R
is 63.
++Birthday char[] O Birthday ex: "1980-01-01". "1980-01-01"
char[] Sex, it can be "Male", "Female", "Female"
++Sex O
"Unknown".
char[] Country name, length must be 2, CN
++Country O value should be according to
ISO3166.
char[] Province name, max string
++Province O
length is 63.
char[] City name, max string length is
DA

++City O
63.
HU

char[] Certificate Type. It can be "IC', Passport


++CertificateType O
A_

"Passport", or "Unknown".
HT

char[] Person ID of CertificateType, 1234567890


++ID O
TP

max string length is 31.


_

Feature State, 0:Unknown, 0


AP

++FeatureState int O
1:Failed, 2:OK.
I_

Home Address, ex: “binanRoad binanRoad NO1199


V3

++HomeAddress char[] O
NO1199”
.3
7

+Similarity int R Similarity. 85


fo

Response Example
rV

HTTP/1.1 200 OK
el

Server: Device/1.0
se
n

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


gS

Connection: closed
dn
Bh

--<boundary>
d

Content-Type: application/json
Content-Length: <length>

{ "Found" : 10,
"Candidates" : [
{
"person" : {
"UID" : "0001",
"GroupID" : "001",
"Name" : "ZhangSan",
"Birthday" : "1980-01-05",
"Sex" : "Male",
...
},

Video Analyse APIs 389


"Similarity" : 85
},
{
"person" : {
"UID" : "0002",
"GroupID" : "002",
"Name" : "LiSi",
"Birthday" : "1980-01-06",
"Sex" : "Male",
...
},
"Similarity" : 80
},
{ ... }, ...
]
}
DA

--<boundary>
HU

Content-Info: UID=0001&GroupID=001
A_

Content-Type: image/jpeg
HT

Content-Length: <length>
TP
_

< jpeg image data ... >


AP

--<boundary>
I_

Content-Info: UID=0002&GroupID=002
V3

Content-Type: image/jpeg
.3
7

Content-Length: <length>
fo
rV

< jpeg image data ... >


el

--<boundary>
se

...
n
gS
dn

 Stop finding
Bh
d

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindByPic


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Token for this search, use this token to 123456789
token uint R
get result and stop search.
Request Example
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindByPic&token=123456789

Response Params ( OK in body )


Response Example
OK

Video Analyse APIs 390


9.2.14 Find History Person by Picture
 Start to find
Start to find person in capture history by picture. The search may last for some time, so the response
may push at regular intervals until 100% Progress.
Note: If you want to find person in capture history by person info, please refer to "mediaFileFind"API.
Note: the returned token will be expired after 60 seconds without any doFind call.
Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindHistoryByPic
Method POST
Request Params (multipart; key=value format in URL, binary in body )
Name Type R/O Description Example
Video channel index which starts 0
Channel int R
from 0.
Start time to search, ex: 2018- 2018-01-13T00:00:00Z
StartTime string R
DA

01-13T00:00:00Z.
End time to search, ex: 2018-01- 2018-01-14T00:00:00Z
HU

EndTime string R
14T00:00:00Z.
A_

Similarity int R Similarity percent, 1 — 100. 80


HT

MaxCandidate int O Max Candidate result number. 200


TP

Request Example
_ AP

POST http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindHistoryByPic&Channel=0&Sta
I_

rtTime=2018-01-13T00:00:00Z&EndTime=2018-01-14T00:00:00Z&Type=All&Similarity=80&MaxCandid
V3

ate=500
.3

Content-Type: image/jpeg
7

Content-Length: <image size>


fo
rV

<JPEG data>
el
se
n

Response Params ( multipart; json format in body )


gS

Name Type R/O Description Example


dn

Token for this search, use this 123456789


Bh

token uint R token to get result and stop


d

search.
Search Progress, 100 means 20
progress uint R
finished.
Result num, return -1 means still -1
totalCount int R
searching.
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: application/json
Content-Length: <length>

Video Analyse APIs 391


{ "token": 123456789,
"progress": 20
"totalCount": -1
}
--<boundary>
Content-Type: application/json
Content-Length: <length>

{ "token": 123456789,
"progress": 60
"totalCount": -1
}
--<boundary>
Content-Type: application/json
Content-Length: <length>
DA
HU

{ "token": 123456789,
A_

"progress": 100
HT

"totalCount": 350
TP

}
_

--<boundary>--
AP
I_
V3

 Get find result


.3
7

Get the find result, reply by multipart, first part is json string to describe all candidate person, then the
fo

following part is the person's picture, refer by UID in part header Content-Info.
rV

Note: the returned token will be expired after 60 seconds without any doFind call.
el
se

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindByPic


n

Method GET
gS

Request Params ( key=value format in URL )


dn

Name Type R/O Description Example


Bh

Token for this search, use this 123456789


d

token uint R token to get result and stop


search.
The index in search result, should 0
index uint R
between 0 and totalCount –1.
Number of result person to get, 12
count uint R
start from Index.
Request Example
http://<server>/cgi-
bin/faceRecognitionServer.cgi?action=doFindHistoryByPic&token=123456789&index=0&count=12

Response Params ( multipart; json format in body, binary in body)


Name Type R/O Description Example
Number of result person that 12
Found int R
return.

Video Analyse APIs 392


Candidates object[] R Candidates Person.
+Person object R Person Info.
System id for this Person, max 0001
++UID string R
string length is 63.
Sex. It can be "Male", "Female" or Male
++Sex string O
"Unknown".
++Age int O Age. 26
Glasses Status, 0: all, 1: not wear, 0
++Glasses int O
2: wear.
+Similarity int R Similarity. 86
Appear time of the Person, format 2013-09-02 00:00:00
+Time string O
is "2013-09-02 00:00:00".
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
DA

Connection: closed
HU
A_

--<boundary>
HT

Content-Type: application/json
TP

Content-Length: <length>
_ AP

{
I_

"Found" : 12,
V3

"Candidates" : [
.3
7

{
fo

"person" : {
rV

"UID" : "0001",
el

"Sex" : "Male",
se
n

"Age" : 30,
gS

"Glasses": 1
dn

},
Bh

"Similarity" : 85
d

“Time”: “2013-09-02 00:00:00”


},
{
"person" : {
"UID" : "0002",
"Sex" : "Male",
"Age" : 50,
"Glasses": 2
},
"Similarity" : 80
“Time”: “2013-09-02 00:00:00”
},
{ ... }, ...
]

Video Analyse APIs 393


}
--<boundary>
Content-Info: UID=0001
Content-Type: image/jpeg
Content-Length: <length>

< jpeg image data ... >


--<boundary>
Content-Info: UID=0002
Content-Type: image/jpeg
Content-Length: <length>

< jpeg image data ... >


--<boundary>
...
DA
HU

 Stop finding
A_

Request URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindHistoryByPic


HT

Method GET
TP

Request Params ( key=value format in URL )


_

Name Type R/O Description Example


AP

Token for this search, use this 123456789


I_

token uint R token to get result and stop


V3

searching.
.3
7

Request Example
fo

http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindHistoryByPic&token=123456789
rV
el

Response Params ( OK in body )


se

Response Example
ngS

OK
dn
Bh
d

9.2.15 [Event] FaceDetection


When the video channel disposition with some face group, and the video channel detect a face, send
this event.
Event Code FaceDetection
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
+Faces object[] R The detected faces info.
The detected face bounding box, 4 [2992,136,6960,8192]
++BoundingBox int[4] R interge, refer to x's value of left—
top point, y's value of left — top

Video Analyse APIs 394


point, x's value of right — bottom
point, y's value of right — bottom
point. Coordinate remap to 0 —
8192.
++Sex char[] O Sex, it can be "Man", "Woman". "Man"
++Age int O Age. 40
++Feature char[][] O Face feature, can be some of the [ "WearGlasses",
following: "WearGlasses", "Smile"]
"SunGlasses", "NoGlasses",
"Smile", "Anger", "Sadness",
"Disgust", "Fear", "Surprise",
"Neutral", "Laugh", "Happy",
"Confused", "Scream".
++Eye int O Eye status, 0: not detected, 1: 2
close eye, 2: open eye.
++Mouth int O Mouth status, 0: not detected, 1: 1
DA

close mouth, 2: open mouth.


HU

++Mask int O Mask status, 0: not detected, 1: 1


A_

not wearing mask, 2: wearing


HT

mask.
TP

++Beard int O Beard status, 0: not detected, 1: 2


_

no beard, 2: has beard.


AP
I_

Event Response Example ( multipart , JSON format in body ) ( response to 4.9.17 event
V3

subscription )
.3
7

--<boundary>
fo

Content-Type: text/plain
rV

Content-Length: <length>
el
se
n

Code=FaceDetection;action=Start;index=0;data={
gS

"Faces": [ { "BoundingBox": [2992,136,6960,8192],


dn

"Sex": "Man",
Bh

"Age": 40,
d

"Feature": [ "WearGlasses", "Smile"],


"Eye": 2,
"Mouth": 1,
"Mask": 1,
"Beard": 2
}, {…}, … ]
}
--<boundary>

9.2.16 [Event] FaceRecognition


When the video channel disposition with some face group, and the video channel detect a face, after
recognize in the face groups, send this event.

Video Analyse APIs 395


Event Code FaceRecognition
Event action Pulse
Event index 0
Event Data
Name Type R/O Description Example
The identity of the Person, max
+UID String R
string length is 31.
+Candidates object[] O The Candidates person list.
The information of candidate
++Person object O
person.
The identity of the Person, max
+++UID string R
string length is 31.
The identity of the Face Group that
+++GroupID string R this Person in. max string length is
63.
Person Name, max string length is ZhangSan
DA

+++Name string O
63.
HU

+++Birthday string O Birthday ex: "1980-01-01". "2000-01-01"


A_

Sex, it can be "Male", "Female", "Man"


+++Sex string O
HT

"Unknown".
TP

Country name. The length must be


_

+++Country string O 2, and value should be according to


AP

ISO3166.
I_

Province name, max string length


V3

+++Province string O
is 63.
.3
7

+++City string O City name, max string length is 63.


fo

+++CertificateTy Certificate Type. It can be: "IC',


rV

string O
pe "Passport", "Unknown".
el

Person ID of CertificateType, max


se

+++ID string O
n

string length is 31.


gS

Similarity of the Candidates person 89


dn

++Similarity int O and the detected person, value


Bh

between 1 — 100.
d

+Face object O The attribute information of face.


++Sex string O Sex, it can be "Man", "Woman". "Man"
++Age int O Age. 23
Face feature, can be some of the ["WearGlasses",
following : "WearGlasses", "Anger"]
"SunGlasses", "NoGlasses",
++Feature string[] O "Smile", "Anger", "Sadness",
"Disgust", "Fear", "Surprise",
"Neutral", "Laugh", "Happy",
"Confused", "Scream".
Eye status, 0: not detected, 1: close 1
++Eye int O
eye, 2: open eye.
Mouth status, 0: not detected, 1: 1
++Mouth int O
close mouth, 2: open mouth.

Video Analyse APIs 396


Mask status, 0: not detected, 1: not 1
++Mask int O
wearing mask, 2: wearing mask.
Beard status, 0: not detected, 1: no 1
++Beard int O
beard, 2: has beard.

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Events[0].EventBaseInfo.Code=FaceRecognition
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].UID=00105
Events[0].Candidates[0].Person.UID=0012
DA

Events[0].Candidates[0].Person.GroupID=10000
HU

Events[0].Candidates[0].Person.Name=ZhangSan
A_

Events[0].Candidates[0].Person.Birthday=1980-01-02
HT

Events[0].Candidates[0].Person.Sex=Male
TP


_

Events[0].Candidates[0].Similarity=80
AP

Events[0].Candidates[1].Person.UID=0014
I_

Events[0].Candidates[1].Person.GroupID=10000
V3

Events[0].Candidates[1].Person.Name=Lisi
.3
7

Events[0].Candidates[1].Person.Birthday=1980-01-05
fo

Events[0].Candidates[1].Person.Sex=Male
rV


el

Events[0].Candidates[1].Similarity=75
se
n


gS

Events[0].Face.Sex=Man
dn

Events[0].Face.Age=20
Bh

Events[0].Face.Feature[0]=SunGlasses
d

Events[0].Face.Feature[1]=Smile
Events[0].Face.Eye=2
Events[0].Face.Mouth=1
Events[0].Face.Mask=1
Events[0].Face.Beard=2
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>

<Jpeg image data>


--<boundary>

Video Analyse APIs 397


9.2.17 [Event] FaceFeatureAbstract
When Re-Abstract Feature By Group or By Person, the abstract progress detail will send in this event.
Event Code FaceFeatureAbstract
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
Abstrace detail Info, max size is
+Infos object[100] R
100.
Abstract state, it can be : Progress
 "Success" : Abstract success,
++State String R
 "False" : Failed to abstract;
 "Process" : In Process;
++Process int O The abstract progress. 30
DA

The identity of the person, max 20005


++UID string O
HU

string length is 31.


A_

The identity of the face group, max 10000


++GroupID string O
HT

string length is 63.


TP
_

Event Response Example ( multipart , JSON format in body ) ( response to 4.9.17 event
AP

subscription )
I_

--<boundary>
V3

Content-Type: text/plain
.3
7

Content-Length: <length>
fo
rV

Code=FaceFeatureAbstract;action=Start;index=0;data={
el

"Infos": [ { "State": "Progress",


se

"Progress": 30,
n gS

"UID": "20005",
dn

"GroupID": "10000"
Bh

}, {…}, … ]
}
d

--<boundary>

9.2.18 [Config] Face Recognition Event Handler Setting


Config Data Params
Name Type R/O Description Example
FaceRecognition Each face group has one config
object[] R
EventHandler object in this array.
The face group ID, max string length
+GroupID char[] R 0017
is 63.
The face group name, max string
+GroupName char[] R wsd
length is 127.

Video Analyse APIs 398


Report event mask, 0 means not to
+EventEnableM report event.
int R 3
ask  Bit 0 : recognition success
 Bit 1 : recognition failed
Record media file mask., 0 means not
+RecordEnable to record.
int R 0
Mask  Bit 0 : recognition success
 Bit 1 : recognition failed

+RecordLatch int R Record latch time, unit is second. 10

Snap picture mask., 0 means not to


+SnapEnableMa snap picture
int R 3
sk  Bit 0 : recognition success
 Bit 1 : recognition failed
Send mail mask., 0 means not to
+MailEnableMas send mail.
DA

int R 0
k  Bit 0 : recognition success
HU

 Bit 1 : recognition failed


A_
HT

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
TP

are as follows :
_

Get Config Request Example


AP

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=FaceRecognitionEventHandler
I_

Get Config Response Example


V3

table.FaceRecognitionEventHandler[0].GroupID=0017
.3
7

table.FaceRecognitionEventHandler[0].GroupName=wsd
fo

table.FaceRecognitionEventHandler[0].EventEnableMask=3
rV

table.FaceRecognitionEventHandler[0].RecordEnableMask=0
el

table.FaceRecognitionEventHandler[0].RecordLatch=10
se
n

table.FaceRecognitionEventHandler[0].SnapEnableMask=3
gS

table.FaceRecognitionEventHandler[0].MailEnableMask=0
dn


Bh

table.FaceRecognitionEventHandler[1].GroupID=0018
d

table.FaceRecognitionEventHandler[1].GroupName=cst
table.FaceRecognitionEventHandler[1].EventEnableMask=3
table.FaceRecognitionEventHandler[1].RecordEnableMask=0
table.FaceRecognitionEventHandler[1].RecordLatch=10
table.FaceRecognitionEventHandler[1].SnapEnableMask=3
table.FaceRecognitionEventHandler[1].MailEnableMask=0

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&FaceRecognitionEventHandler[0].GroupID=0017&FaceRec
ognitionEventHandler[0].GroupName=wsd&FaceRecognitionEventHandler[0].EventEnableMask=3&
FaceRecognitionEventHandler[0].RecordEnableMask=0&FaceRecognitionEventHandler[0].RecordLa

Video Analyse APIs 399


tch=10&FaceRecognitionEventHandler[0].SnapEnableMask=3&FaceRecognitionEventHandler[0].Ma
ilEnableMask=0
Set Config Response Example
OK

9.2.19 [Config] Face-ID Recognition Threshold


Request URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
Method GET
Request Params (key=value format in URL)
Name Type R/O Description Example
CitizenPictureCo object R Citizen picture compare
mpareRule
+Threshold uint8 R Face-ID comparison threshold 60
[1, 100]
DA

Request Example
HU

http://192.168.1.108/cgi-
A_

bin/configManager.cgi?action=setConfig&CitizenPictureCompareRule.Threshold=60
HT
TP

Response Params (OK in body )


_

Name Type R/O Description Example


AP

Response Example
I_
V3

OK
.3
7
fo

9.2.20 Export Face Database


rV
el
se

The exported data is binary.


n gS

Request URL http://<server>/cgi-bin/api/FaceLibImExport/export


dn

Method POST
Request Params (JSON format in body)
Bh

Name Type R/O Description Example


d

groupID char[64] R Person group ID "10"


Password char[64] O Unzip password "abcd"
Request Example
{
"groupID": "10",
"password": "abcd"
}

Response Params (binary in body )


Name Type R/O Description Example
Response Example
HTTP/1.1 200 OK
NTP Server Device/1.0

Video Analyse APIs 400


Content-Type: application/octet-stream
Content-Length: <length>

< binary data>

9.2.21 Importing Face Database


The imported data is binary.
Request URL http://<server>/cgi-bin/api/FaceLibImExport/import
Method POST
Request Params (multipart in body)
Name Type R/O Description Example
password char[64] O Unzip password "abcd"
Request Example
POST http://<server>/cgi-bin/api/FaceLibImExport/import HTTP/1.1
DA

User-Agent: client/1.0
HU

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


A_

--<boundary>
HT

Content-Type: application/json
TP

Content-Length: 20
_ AP
I_

{
V3

"password": "abcd"
.3

}
7
fo

--<boundary>
rV

Content-Type: application/octet-stream
el

Content-Length: 800
se
n
gS

< binary data>


--<boundary>
dn
Bh

Response Params ( JSON format in body )


d

Name Type R/O Description Example


Response Example
{}

9.2.22 Remote Delete Person


Request URL http://<server>/cgi-bin/api/RemoteFaceRecognition/deletePerson
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
channel int R logical channel 0
person object O person info
+UID char[32] O The identity of the person. "120837"

Video Analyse APIs 401


+GroupID char[64] O The identity of the face "00001"
group that this Person in.
Specify both GroupID and
UID to delete.
Request Example
{
"channel": 0,
"person": {
"UID": "120837",
"GroupID": "00001"
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
DA

{}
HU
A_
HT

9.2.23 Add Face Lib Download Task


TP
_ AP

Request URL http://<server>/cgi-bin/api/NetFileTransfer/addFaceLibDownloadTask


Method POST
I_
V3

Request Params ( JSON format in body )


.3

Name Type R/O Description Example


7

FaceLibVersion char[32] R face lib version "xxxx"


fo
rV

PacketTotal uint R packet tatal num 10


PacketIndex uint R packet index, starts from 1 3
el
se

TaskInfo object[100] R task info


n

+URLList char[4][256] R resource list ["sftp://admin:[email protected]


gS

format as: .4.84:554/media/1.jpg",


dn

"sftp://username:password "xx"]
Bh

@ip:port/xxxx/1.jpg"
d

+ID char[32] R driver ID "123456789"


+FaceUUID char[32] R "xxxx"
GroupID char[64] O group ID "1"
Request Example
{
"FaceLibVersion": "xxxx",
"PacketTotal": 10,
"PacketIndex": 3,
"TaskInfo": [{
"URLList": ["sftp://admin:[email protected]:554/media/1.jpg", "xx"],
"ID": "123456789",
"FaceUUID": "xxxx"
},…{}],
"GroupID": "1"

Video Analyse APIs 402


}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

9.3 People Counting

9.3.1 Get Summary


Get summary information of people statistics in video.
Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=getSummary
Method GET
DA

Request Params ( key=value format in URL )


HU

Name Type R/O Description Example


A_

channel int O Video channel index which starts from 1, 1


HT

default is 1.
TP

Request Example
_

http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=getSummary&channel=1
AP
I_
V3

Response Params ( key=value format in body )


.3

Name Type R/O Description Example


7

Summary information of people statistics in


fo

summary object R
video .
rV

+Channel int R Video channel index which starts from 0. 1


el
se

Rule type, it can be: "NumberStat"


n

 "ManNumDetection": count the


gS

people num in region, and the detail


dn

stat is in "InsideSubtotal" param.


+RuleName string R
Bh

 "NumberStat": count the people


d

entering and leaving the region, and


the detail stat is in "EnteredSubtotal"
and "ExitedSubtotal"param.
+EnteredSubto
object O People enter stat.
tal
++Total int R Total enter num. 14
++Today int R Today enter num. 0
++Hour int R This hour enter num. 0
++TotalInTime 0
int O Today enter num after call clearSectionStat.
Section
+ExitedSubtot
object O People leave stat.
al
++Total int R Total leave num. 32
++Today int R Today leave num. 0

Video Analyse APIs 403


++Hour int R This hour leave num. 0
++TotalInTime 0
int O Today leave num after call clearSectionStat.
Section
+PassedSubto
object O People pass stat.
tal
++Total int R Total pass num. 32
++Today int R Today pass num. 0
++Hour int R This hour pass num. 0
++TotalInTime 0
int O Today pass num after call clearSectionStat
Section
+EnteredDupS
object O People duplicate enter stat.
ubtotal
++Total int R Total duplicate enter num. 14
++Today int R Today duplicate enter num. 0
++Hour int R This hour duplicate enter num. 0
++TotalInTime Today duplicate enter num after call 0
DA

int O
Section clearSectionStat
HU

+ExitedDupSu
object O People duplicate leave stat.
A_

btotal
HT

++Total int R Total duplicate leave num. 32


TP

++Today int R Today duplicate leave num. 0


_

++Hour int R This hour duplicate leave num. 0


AP

++TotalInTime Today duplicate leave num after call 0


I_

int O
V3

Section clearSectionStat
+InsideSubtota
.3

object O People inside region stat.


7

l
fo

++Total int R Today inside num. 65


rV

++ManStaySta The entering and leaving stat of people that


el

object[] O
t leaved.
se
n

2012-01-04
gS

+++EnterTime string O People enter time.


00:00:00
dn

2012-01-04
+++ExitTime string O People leave time.
Bh

00:00:45
d

Response Example
summary.Channel=0
summary.RuleName=NumberStat
summary.EnteredSubtotal.Today=0
summary.EnteredSubtotal.Total=14
summary.EnteredSubtotal.TotalInTimeSection=0
summary.ExitedSubtotal.Today=0
summary.ExitedSubtotal.Total=32
summary.ExitedSubtotal.TotalInTimeSection=0
summary.PassedSubtotal.Hour=0
summary.PassedSubtotal.Today=0
summary.PassedSubtotal.Total=142
summary.PassedSubtotal.TotalInTimeSection=0
summary.EnteredDupSubtotal.Hour=0

Video Analyse APIs 404


summary.EnteredDupSubtotal.Today=0
summary.EnteredDupSubtotal.Total=0
summary.EnteredDupSubtotal.TotalInTimeSection=0
summary.EnteredSubtotal.TotalInTimeSection=17
summary.ExitedDupSubtotal.Hour=0
summary.ExitedDupSubtotal.Today=0
summary.ExitedDupSubtotal.Total=0
summary.ExitedDupSubtotal.TotalInTimeSection=0
summary.InsideSubtotal.Total=65
summary.InsideSubtotal.ManStayStat[0].EnterTime=2012-01-04 00:00:00
summary.InsideSubtotal.ManStayStat[0].ExitTime=2012-01-04 00:00:45
summary.InsideSubtotal.ManStayStat[1].EnterTime=2012-01-04 00:00:00
summary.InsideSubtotal.ManStayStat[1].ExitTime=2012-01-04 00:00:45

9.3.2 Query the Count of People


DA

 Start to find
HU

Start to find video stat info, in response, there is a token for further info finding process, and there is
A_

a totalCount shows how many data count(s).


HT

Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=startFind


TP

Method GET
_ AP

Request Params ( key=value format in URL )


I_

Name Type R/O Description Example


V3

Video channel index which starts from 1, 1


.3

channel int O
default is 1.
7
fo

condition object R Find condition.


rV

2012-01-04
+StartTime string R Find time range start
el

00:00:00
se

2012-01-04
n

+EndTime string R Find time range end


gS

00:02:00
dn

The information granularity returned by the Hour


query requirements. The range is { Hour, Day,
Bh

+Granularity string R
Week, Month, Season, Year } (Note: Most
d

devices only support Hour, Day, Week.)


Rule type, it can be: NumberStat, NumberStat
+RuleType string O ManNumDetection. If omit, default is
NumberStat
Valid when ruleType is ManNumDetection, 20
+MinStayTime int O
report people stay over this minimal time.
+PlanID int O The plan id, only valid for dome camera. 2
The ptz preset index which starts from 1, only 1
+PtzPresetId int O valid for dome camera. Note: new device
should use PtzPresetId instead of PlanID.
Array<i The area id which starts from 1, max array [1,2]
+AreaID O
nt> size is 20.

Video Analyse APIs 405


The other search rule, can be : AverageStayTime
+OtherRule string O
AverageStayTime
Request Example
http://192.168.1.108/cgi-
bin/videoStatServer.cgi?action=startFind&channel=1&condition.StartTime=2011-01-
01%2012:00:00&condition.EndTime=2011-01-
10%2012:00:00&condition.Granularity=Hour&condition.RuleType=NumberStat&condition.MinStayTi
me=20&condition.AreaID[0]=2&condition.AreaID[1]=3

Response Params ( key=value format in body )


Name Type R/O Description Example
Token for this search, use this token to get 12345
token int R
result and stop search.
totalCount int R Number of find result. 56
Response Example
DA

token=12345
HU

totalCount=56
A_

 Get the find result


HT

Get the find result of Video Stat info with channel, token, begin Number and count.
TP

Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=doFind


_AP

Method GET
I_

Request Params ( key=value format in URL )


V3

Name Type R/O Description Example


.3

Video channel index which starts from 1, 1


7
fo

channel int O default is 1.


rV

NOTE: must be the same as startFind.


el

Token for this search, use this token to get 12345


token int R
se

result and stop searching.


n gS

The start count. It must be between 0 and 0


beginNumber int R
totalCount -1.
dn

count int R The count of info for this query. 20


Bh

Request Example
d

http://192.168.1.108/cgi-
bin/videoStatServer.cgi?action=doFind&channel=1&token=12345&beginNumber=0&count=20

Response Params ( key=value format in body )


Name Type R/O Description Example
found int R Number of result that return. 20
array<o
info R Result information of video Stat.
bject>
+Channel int R Video channel index which starts from 0. 0
+PlanID int O The plan id, only valid for dome camera. 2
The ptz preset index which starts from 1, 1
+PtzPresetId int O
only valid for dome camera.
+AreaID int O The area id which starts from 1. 3

Video Analyse APIs 406


The average stay time, only valid when 20
+AverageStayTim
int O startFind with OtherRule param’s value is
e
“AverageStayTime”.
Rule name, it can be: NumberStat
 "ManNumDetection": count people
num in region, detail stat is in
"InsideSubtotal"param
+RuleName string R
 "NumberStat": count people enter
and leave region, detail stat is in
"EnteredSubtotal"and
"ExitedSubtotal"param.
2012-01-04
+StartTime string O Find time range start
00:00:00
2012-01-04
+EndTime string O Find time range end
00:02:00
+EnteredSubtotal int O Total enter num. 14
DA

+ExitedSubtotal int O Total leave num. 5


HU

+InsideSubtotal int O Total inside num. 65


A_

+PassedSubtotal int O Total pass num. 14


HT

+EnteredDupSubt int O 14
Total duplicate entered num.
TP

otal
_

+ExitedDupSubto int O 5
AP

Total duplicate leave num.


tal
I_

Response Example
V3

found=20
.3
7

info[0].Channel=0
fo

info[0].AreaID=2
rV

info[0].RuleName=NumberStat
el

info[0].StartTime=2012-03-14 00:00:00
se
n

info[0].EndTime=2012-04-14 00:00:00
gS

info[0].EnteredSubtotal=14
dn

info[0].ExitedSubtotal=5
Bh

info[0].InsideSubtotal=65
d

info[0].PassedSubtotal=0
info[0].EnteredDupSubtotal=0
info[0].ExitedDupSubtotal=0
info[1].Channel=0
info[1].AreaID=3
info[1].RuleName=NumberStat
info[1].StartTime=2012-03-14 00:00:00
info[1].EndTime=2012-04-14 00:00:00
info[1].EnteredSubtotal=14
info[1].ExitedSubtotal=5
info[1].InsideSubtotal=65
info[1].PassedSubtotal=0
info[1].EnteredDupSubtotal=0
info[1].ExitedDupSubtotal=0

Video Analyse APIs 407



 Stop the searching session
Stop query video stat by channel and token.
Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=stopFind
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which starts from 1, 1
channel int O default is 1.
NOTE: must be the same as startFind.
Token for this search, use this token to get 12345
token int R
result and stop searching.
Request Example
GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=stopFind&channel=1&token=12345
DA
HU

Response Params ( OK in body )


A_

Response Example
HT

OK
TP

9.3.3 Clear the People Count Information


_ AP
I_

Clear the people count information.


V3
.3

Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=clearSectionStat


7

Method GET
fo

Request Params ( key=value format in URL )


rV

Name Type R/O Description Example


el
se

Video channel index which starts from 1, 1


channel int O
n

default is 1.
gS

Request Example
dn

GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=clearSectionStat&channel=1
Bh
d

Response Params ( OK in body )


Response Example
OK

9.3.4 Subscribe the People Count Information


Subscribe the people count information.
Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=attach
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which starts from 1
channel int O
1, default is 1.

Video Analyse APIs 408


Send heartbeat interval, range is [1, 5
60],unit is second. If the URL contains
this parameter, and the value is 5, it
means every 5 seconds the device
heartbeat int O
should send the heartbeat message to
the client, the heartbeat message is an
string "Heartbeat". If this parameter is
not present, its default value is 60.
Request Example
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=attach&channel=1&heartbeat=5

Response Params ( key=value format in body )


Name Type R/O Description Example
summary object R Summary information of video Stat.
Video channel index which starts from 0
+Channel int R
0.
DA

Rule type, it can be: NumberStat


HU

 "ManNumDetection": Count
A_

people num in region, detail stat is


HT

in "InsideSubtotal" param.
+RuleName string R
TP

 "NumberStat": Count people


_

entering and leaving region, detail


AP

stat is in "EnteredSubtotal" and


I_

"ExitedSubtotal" param.
V3

+EnteredSubto
.3

object O People enter stat.


7

tal
fo

++Total int R Total enter num. 14


rV

++Today int R Today enter num. 2


el

++Hour int R This hour enter num. 1


se
n

++TotalInTime Today enter num after call 0


gS

int O
Section clearSectionStat.
dn

+ExitedSubtot
object O People leave stat.
Bh

al
d

++Total int R Total leave num. 32


++Today int R Today leave num. 3
++Hour int R This hour leave num. 2
++TotalInTime Today leave num after call 0
int O
Section clearSectionStat.
+PassedSubto
object O People pass stat.
tal
++Total int R Total pass num. 32
++Today int R Today pass num. 0
++Hour int R This hour pass num. 0
++TotalInTime Today pass num after call 0
int O
Section clearSectionStat
+EnteredDupS
object O People duplicate enter stat.
ubtotal

Video Analyse APIs 409


++Total int R Total duplicate enter num. 14
++Today int R Today duplicate enter num. 0
++Hour int R This hour duplicate enter num. 0
++TotalInTime Today duplicate enter num after call 0
int O
Section clearSectionStat
+ExitedDupSu
object O People duplicate leave stat.
btotal
++Total int R Total duplicate leave num. 32
++Today int R Today duplicate leave num. 0
++Hour int R This hour duplicate leave num. 0
++TotalInTime Today duplicate leave num after call 0
int O
Section clearSectionStat
+InsideSubtota
object O People inside region stat.
l
++Total int R Today inside num. 65
++ManStaySta array<obj The entering and leaving stat of people
DA

O
t ect> that leaved.
HU

+++EnterTime string O People enter time 2012-01-04 00:00:00


A_

+++ExitTime string O People leave time 2012-01-04 00:00:45


HT

Response Example
TP

HTTP/1.1 200 OK
_

Server: Device/1.0
AP

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


I_
V3

Connection: closed
.3
7

--<boundary>
fo

Content-Type: text/plain
rV

Content-Length: <length>
el
se
n

summary.Channel=0
gS

summary.RuleName=NumberStat
dn

summary.EnteredSubtotal.Today=2
Bh

summary.EnteredSubtotal.Total=14
d

summary.EnteredSubtotal.TotalInTimeSection=1
summary.ExitedSubtotal.Today=3
summary.ExitedSubtotal.Total=32
summary.ExitedSubtotal.TotalInTimeSection=2
summary.PassedSubtotal.Hour=0
summary.PassedSubtotal.Today=0
summary.PassedSubtotal.Total=142
summary.PassedSubtotal.TotalInTimeSection=0
summary.EnteredDupSubtotal.Hour=0
summary.EnteredDupSubtotal.Today=0
summary.EnteredDupSubtotal.Total=0
summary.EnteredDupSubtotal.TotalInTimeSection=0
summary.EnteredSubtotal.TotalInTimeSection=17
summary.ExitedDupSubtotal.Hour=0

Video Analyse APIs 410


summary.ExitedDupSubtotal.Today=0
summary.ExitedDupSubtotal.Total=0
summary.ExitedDupSubtotal.TotalInTimeSection=0
summary.InsideSubtotal.Total=65
summary.InsideSubtotal.ManStayStat[0].EnterTime=2012-01-04 00:00:00
summary.InsideSubtotal.ManStayStat[0].ExitTime=2012-01-04 00:00:45
summary.InsideSubtotal.ManStayStat[1].EnterTime=2012-01-04 00:00:00
summary.InsideSubtotal.ManStayStat[1].ExitTime=2012-01-04 00:00:45
--<boundary>
Content-Type: text/plain
Content-Length: 11

Heartbeat
--<boundary>
Content-Type: text/plain
Content-Length: <length>
DA
HU

summary.Channel=0
A_

summary.RuleName=NumberStat
HT

summary.EnteredSubtotal.Today=2
TP

summary.EnteredSubtotal.Total=14
_


AP
I_

9.3.5 Clear statistics in time section


V3
.3
7

Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=clearSectionStat


fo

Method GET
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Example


se
n

Video channel index which starts from 1, 1


gS

channel int O
default is 1.
dn

The area index which starts from 1, valid 2


Bh

AreaID int O for multiple area device, if omit means


d

clear all area statistics.


PtzPresetId int O The ptz preset index which starts from 1. 1
Request Example
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=clearSectionStat&AreaID=2

Response Params ( OK in body )


Response Example
OK

9.3.6 [Config] Video Widget Number Status


People Counting Overlay OSD Configuration Parameters

Video Analyse APIs 411


Config Data Params
Name Type R/O Description Example
Array, one element for each
VideoWidgetNumber channel, and the array index is
object[] R
Stat the channel number, starting
from 0.
Whether to overlay it to the main true
+EncodeBlend bool R
stream video encoding
Whether to display the number of true
+ShowEnterNum bool R
people entering
Whether to display the number of true
+ShowExitNum bool R
people leaving
Text alignment mode: 0
+TextAlign int R 0: Left alignment
2: Right alignment
DA

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
HU

specific examples are as follows:


A_

Get Config Request Example


HT

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidgetNumberStat
TP

Get Config Response Example


_

table.VideoWidgetNumberStat[0].EncodeBlend=true
AP

table.VideoWidgetNumberStat[0].ShowEnterNum=true
I_

table.VideoWidgetNumberStat[0].ShowExitNum=true
V3

table.VideoWidgetNumberStat[0].TextAlign=0
.3
7


fo
rV

Set Config Request Example


el

http://192.168.1.108/cgi-
se
n

bin/configManager.cgi?action=setConfig&VideoWidgetNumberStat[0].EncodeBlend=true&VideoWidg
gS

etNumberStat[0].ShowEnterNum=true&VideoWidgetNumberStat[0].ShowExitNum=true&VideoWidget
dn

NumberStat[0].TextAlign=0
Bh

Set Config Response Example


d

OK

9.3.7 [Event] NumberStat


When people number triggers the rule, send this event.
Event Code NumberStat
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
+Number int R Total number in detect region.
+EnteredNumbe Total number that enter the detect 180
int R
r region.

Video Analyse APIs 412


Total number that leave the detect 60
+ExitedNumber int R
region.
+PassedNumber int O Total pass number in detect region. 60
+EnteredDupNu int O Total duplicate number that enter 180
mber the detect region.
+ExitedDupNum int O Total duplicate number that leave 60
ber the detect region.
Number overrun type, it can be: EnterOver
+Type char[] R "EnterOver", "ExitOver",
"InsideOver", “PassOver”.
The area id, begin from 1, if omit, 2
+AreaID int O
means single area.
The preset id, if omit, means preset 1
+PresetID int O
is unknown.

Event Response Example ( multipart , JSON format in body ) ( response to 4.9.17 event
DA

subscription )
HU

--<boundary>
A_

Content-Type: text/plain
HT

Content-Length: <length>
TP
_

Code=NumberStat;action=Start;index=0;data={
AP

"Number": 120,
I_

"EnteredNumber": 180,
V3

"ExitedNumber": 60,
.3
7

"PassedNumber": 60,
fo

"EnteredDupNumber": 180,
rV

"ExitedDupNumber": 60,
el

"Type": "EnterOver",
se
n

"Area": 2
gS

}
dn

--<boundary>
Bh
d

9.3.8 [Event] ManNumDetection


When people number triggers the rule, send this event.
Event Code ManNumDetection
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
+ManList object[] R The people info list.
The detected people bounding box, [2992,1136,4960,5192
++BoundingBox int[4] R 4 interge, refer to x's value of left- ]
top point, y's value of left-top point,

Video Analyse APIs 413


x's value of right-bottom point, y's
value of right-bottom point.
Coordinate remap to 0 — 8192.
++Stature int R The people's stature, unit is cm. 170
The area id, begin from 1, if omit, 2
+AreaID int O
means single area.
The preset id, if omit, means preset 1
+PresetID int O
is unknown.

Event Response Example ( multipart , JSON format in body ) ( response to 4.9.17 event
subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Code=ManNumDetection;action=pulse;index=0;data={
DA

"ManList": [ { "BoundingBox": [2992,1136,4960,5192], "Stature": 170 },


HU

{ "BoundingBox": [4392,4136,6960,6512], "Stature": 175 },


A_

{…}, … ],
HT

"AreaID" : 2
TP

}
_

--<boundary>
AP
I_
V3
.3

9.3.9 [Event] CrowdDetection


7
fo

When crowd density overrun, send this event.


rV
el

Event Code CrowdDetection


se

Event action Start/Stop


n gS

Event index 0
dn

Event Data
Name Type R/O Description Example
Bh

The global crowd density overrun


d

+CrowdList object[] O
list.
The center point, must be two int, [5734,2377]
++Center int[] R means x and y value, coordinate
remap to 0 — 8192.
++Radius int R The radius length. 10
+RegionList object[] O The people num overrun region list.
++RegionID int R The region index. 0
++PeopleNum int R The people count in region. 100

Event Response Example ( multipart , JSON format in body ) ( response to 4.9.17 event
subscription )
--<boundary>
Content-Type: text/plain

Video Analyse APIs 414


Content-Length: <length>

Code=CrowdDetection;action=start;index=0;data={
"CrowdList": [ { "Center" : [5734,2377],"Radius" : 10}, …{} ],
"RegionList" : [ { "RegionID" : 0, "PeopleNum" : 100 },…{} ]
}
--<boundary>

9.3.10 [Event] LeaveDetection


LeaveDetection is mainly used to detect the number of people who leave the post.
Event Code LeaveDetection
Event Action Pulse
Event Index
Event Data
DA

Name Type R/O Description Example


HU

+Name char[128] O Event name. "LeaveDetection"


A_

+Class char[16] O Category of the intelligence "Normal" or


HT

event. "FinanceRegulation" or
TP

"StereoBehavior"
_

+GroupID int O Event group ID. GroupID is the 123


AP

same during the capture


I_

process of the same object.


V3

+CountInGroup int O The number of snapshots in an 3


.3
7

event group.
fo

+IndexInGroup int O The snapshot number in an 1


rV

event group.
el

+PTS double O Time stamp of relative events, in 150.0


se
n

milliseconds.
gS

+UTC uint32 O The time of when the event 1465389120


dn

occurred. UTC time with time


Bh

zone deviation, in seconds.


d

+UTCMS uint32 O Event time in milliseconds. 123


+EventID uint32 O Event number, used to uniquely 5864
mark an event.
+Object VideoAnalys O Indicates pedestrian information.
eObject
+DetectRegion uint16[20][2] O Detection area.
+Count int O Total number of alarms. 100
+TriggerMode enumchar[1 O Trigger mode. "NoPerson"
6] enumchar[16]{
"NoPerson": No person.
"Leave": Leave.
"Static": Static (sleeping) (only
used for sleep detection in
prison scenarios)

Video Analyse APIs 415


"OutPersonLimit": Not within the
required number of people on
duty (abnormal number of
people on duty).
"NoMoving": No movement for a
long time.
"OnTable": Lie on the table for a
long time.
}
+State uint16 O Detection status (Optional. 0
customized for Multi-Sensor
Panoramic Network and PTZ
Camera). It indicates leaving
post when this field does not
exist.
0: Leave post.
DA

1:On duty.
HU

+PresetID uint16 O The ID of the preset that triggers 1


A_

the event, starting from 1.


HT

If this field is not specified, the


TP

preset is unknown (customized


_

for Multi-Sensor Panoramic


AP

Network and PTZ Camera,


I_

optional).
V3

+SceneImage object O Panoramic wide-angle image.


.3
7

++IndexInData uint O The image number in the 0


fo

uploaded image data.


rV

++Offset uint R Offset in the binary data block. 0


el

++Length uint R Image size, in bytes. 52000


se
n

++Width uint O Image width, in pixels. 100


gS

++Height uint O Image height, in pixels. 50


dn

++FilePath char[260] O Panoramic image path. "/var/local/1.jpg"


Bh

+UserName char[32] O Username. "admin"


d

Event Response Example ( multipart , JSON format in body ) ( response to 4.9.17 event
subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Code=LeaveDetection;action=Pulse;index=0;data={
"Name": "LeaveDetection",
"DetectRegion": [],
"Count": 100,
"TriggerMode": "NoPerson",

}

Video Analyse APIs 416


--<boundary>

9.4 Heat Map

9.4.1 Get Heat Map Information


Get heat map statistics by time
Request URL http://<server>/cgi-bin/heatMap.cgi?action=getPicByTime
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R Video channel number, starting from 1, 1
StartTime char[32 R Heat Map Start time, 24 h: yyyy-MM-dd "2015-08-20 00:00:00"
] HH:mm:ss.
DA

EndTime char[32 R Heat Map End time, 24 h: yyyy-MM-dd "2015-08-21 23:59:59"


HU

] HH:mm:ss.
PtzPresetId int O Preset, starting from 1 1
A_

Request Example
HT

http://192.168.1.108/cgi-bin/heatMap.cgi?action=getPicByTime&channel=1&StartTime=2015-08-
TP

20%2000:00:00&EndTime=2015-08-21%2023:59:59&PtzPresetId=1
_ AP
I_

Response Params ( binary data in body )


V3

Response Example
.3

HTTP/1.1 200 OK
7
fo

Server: Device/1.0
rV

Content-Type: application/octet-stream
el

Content-Length: <length>
se
n
gS

<heatmap data>
dn

Appendix: Format of the heat map


Bh

0 1 2 3 4 … 15 16 17 18 …
d

Width Height Reserved Data: every byte symbolize a pixel

9.4.2 Get People Heat Map Information


Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=getHeatMap
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which starts from 1, 1
channel int O
default is 1.
PlanID int O The plan id, only valid for dome camera. 2
StartTime string R The start time, ex: "2010-05-12 20:00:00" "2010-05-12 20:00:00"

Video Analyse APIs 417


EndTime string R The end time, ex: "2010-05-12 22:00:00" "2010-05-12 22:00:00"
The heat map type, it can be: AverageStayTime
"AverageStayTime": average stay time
heat map
HeatMapType string R
"HumanStatistics": human statistics heat
map
"HumanTrack” : human track heat map
Request Example
http://192.168.1.108/cgi-
bin/videoStatServer.cgi?action=getHeatMap&channel=1&PlanID=2&StartTime=2010-05-
12%2020:00:00&EndTime=2010-05-12%2022:00:00&HeatMapType=AverageStayTime

Response Params ( binary data in body )


Name Type R/O Description Example
Response Example
HTTP/1.1 200 OK
DA

Server: Device/1.0
HU

Content-Type: application/octet-stream
A_

Content-Length: <length>
HT
TP

<heat map binary data>


_ AP
I_

Appendix A: The heat map binary data format when HeatMapType is AverageStayTime.
V3

octet 0 1 2 3 4~7 8~11 12~15


.3
7

vers cha pres reserv


value total data length totol lines lines in this packet
fo

ion nnel et ed
rV

16~31
el

octet
se

reserved
n

value
gS
dn

octet 32~35 36~39 40~43 44~44+4*(N-1)


Bh

value line number data num in this line data 1 data N


d

44+4*(N-1)+1~
octet …… …… ……
44+4*(N-1)+4

value next line number data num in next line data 1 data N

Note: If “lines in this packet” is 0, then all data has been sent, and connection will be closed.
Appendix B: The heat map binary data format when HeatMapType is HumanStatistics.
octet 0 1 2 3 4~7 8~11 12~15
vers cha pres reserv
value total data length total lines lines in this packet
ion nnel et ed

octet 16~31

value reserved

Video Analyse APIs 418


octet 32~35 36~39 40~43 44~44+4*(N-1)

value line number data num in this line data 1 data N

44+4*(N-1)+1~
octet …… …… ……
44+4*(N-1)+4

value next line number data num in next line data 1 data N

Note: If “lines in this packet” is 0, then all data has been sent, and connection will be closed.
Appendix C: The heat map binary data format when HeatMapType is HumanTrack.
octet 0 1 2 3 4~7 8~11 12~15
vers chann pres reser tracks in this
value total data length total tracks
ion el et ved packet
octet 16~31

value reserved
DA
HU

octet 32~35 36~39 40~43 44~44+4*(N-1)


A_

track point num in


value Object ID track point 1 track point N
HT

this object
TP

44+4*(N-1)+1~
octet
_

…… …… ……
44+4*(N-1)+4
AP

track point num in


I_

value next object ID track point 1 track point N


V3

next object
.3

 Note: If “tracks in this packet” is 0, then all data has been sent, and connection will be closed.
7
fo
rV

9.4.3 Subscribe People Realtime Trace Information


el
se

Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=attachRealTraceProc


n
gS

Method GET
dn

Request Params ( key=value format in URL )


Name Type R/O Description Example
Bh

Video channel index which starts from 1, 1


d

channel int O
default is 1.
Send heartbeat interval, range is [1, 60],unit is 5
second. If the URL contains this parameter,
and the value is 5, it means every 5 seconds
heartbeat int O the device should send the heartbeat
message to the client, the heartbeat meaage
are "Heartbeat". If this parameter is not
present, its default value is 60.
Request Example
http://192.168.1.108/cgi-
bin/videoStatServer.cgi?action=attachRealTraceProc&channel=1&heartbeat=5

Response Params ( multipart; binary data in body )

Video Analyse APIs 419


Name Type R/O Description Example
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: application/octet-stream
Content-Length: <length>

<realtime trace binary data>


--<boundary>
Content-Type: text/plain
Content-Length: 11
DA

Heartbeat
HU

--<boundary>
A_

Content-Type: application/octet-stream
HT

Content-Length: <length>
TP
_

<realtime trace binary data>


AP

--<boundary>
I_


V3
.3
7
fo

 Appendix A: The realtime trace binary data format.


rV

octet 0 1 2 3 4~7 8~11 12~15


el

chan pres reser object num in this


se

value version total data length reserved


nel et ved packet
n gS

octet 16~31
dn
Bh

value reserved
d

octet 32~35 36~37 38~39 40~43 44~47

object object current


value object ID 1 reserved
coord x, coord y time in utc

octet 48~51 52~53 54~55 56~57 58~61

object object current


value object ID 2 reserved
coord x coord y time in utc

9.4.4 Get People Histroy Trace Information


Request URL http://<server>/cgi-bin/videoStatServer.cgi?action=getHistoryTrace
Method GET

Video Analyse APIs 420


Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which starts from 1, 1
channel int O
default is 1.
PlanID int O The plan id, only valid for dome camera. 5
StartTime string R The start time, ex: "2010-05-12 20:00:00" "2010-05-12 20:00:00"
EndTime string R The end time, ex: "2010-05-12 22:00:00" "2010-05-12 22:00:00"
Request Example
http://192.168.1.108/cgi-
bin/videoStatServer.cgi?action=getHistoryTrace&channel=1&PlanID=2&StartTime=2010-05-
12%2020:00:00&EndTime=2010-05-12%2022:00:00

Response Params ( multipart; binary data in body )


Name Type R/O Description Example
Response Example
HTTP/1.1 200 OK
DA

Server: Device/1.0
HU

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


A_

Connection: closed
HT
TP

--<boundary>
_

Content-Type: application/octet-stream
AP

Content-Length: <length>
I_
V3

<history trace binary data>


.3
7

--<boundary>
fo

Content-Type: application/octet-stream
rV

Content-Length: <length>
el
se
n

<history trace binary data>


gS

--<boundary>
dn


Bh
d

 Appendix A: The history trace binary data format.


octet 0 1 2 3 4~7 8~11 12~15
versi chann pres reserv total object object num in this
value total data length
on el et ed num packet
octet 16~31

value reserved

octet 32~35 36~37 38~39 40~43 44~47


object object current
value object ID 1 reserved
coord x coord y time in utc
octet 48~51 52~53 54~55 56~57 58~61
object object current
value object ID 2 reserved
coord x coord y time in utc

Video Analyse APIs 421


Note: If “object num in this packet” is 0, then all data has been sent, and connection will be closed.

9.4.5 Subscribe Heat Map Raw Data


Request URL http://<server>/cgi-bin/HeatMapManager.cgi?action=attachRaw
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which starts from 1, 1
channel int O
default is 1.
Send heartbeat interval, range is [1, 5
60],unit is second. If the URL contains
this parameter, and the value is 5, it
means every 5 seconds the device
heartbeat int O
should send the heartbeat message to
the client, the heartbeat meaage are
DA

"Heartbeat". If this parameter is not


HU

present, its default value is 60.


A_

Request Example
HT

http://192.168.1.108/cgi-bin/HeatMapManager.cgi?action=attachRaw&channel=1&heartbeat=5
TP
_

Response Params ( multipart; binary data in body )


AP

Name Type R/O Description Example


I_

Response Example
V3

HTTP/1.1 200 OK
.3
7

Server: Device/1.0
fo

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


rV

Connection: closed
el
se
n

--<boundary>
gS

Content-Type: application/octet-stream
dn

Content-Length: <length>
Bh
d

<heap map raw data>


--<boundary>
Content-Type: text/plain
Content-Length: 11

Heartbeat
-<boundary>
Content-Type: application/octet-stream
Content-Length: <length>

<heap map raw data>


--<boundary>

Video Analyse APIs 422


 Appendix A: The heap map raw data format.
octet 0 1 2 3 4 ~ 23
value width height StartTime, ex: “2012-01-04 00:00:00”
octet 24~43 44 ~ 47
value EndTime, ex: “2012-01-04 01:00:00” reserved

octet 48 49 …

value Data: every byte symbolize a pixel

9.5 Crowd Distribute Map

9.5.1 Get Channel Caps


Request URL http://<server>/cgi-bin/crowdDistriMap.cgi?action=getCaps
DA

Method GET
HU

Request Params ( none)


A_

Name Type R/O Description Example


HT

Request Example
TP

http://192.168.1.108/cgi-bin/crowdDistriMap.cgi?action=getCaps
_ AP
I_

Response Params ( key=value format in body )


V3

Name Type R/O Description Example


.3

CrowdCapsList object[] R list


7

+channel uint R Video channel index which starts from 1, 1


fo
rV

+Support bool R Does this video channel support crowd true


distribution maps
el
se

Response Example
n

CrowdCapsList[0].channel=1
gS

CrowdCapsList[0].Support=true
dn

CrowdCapsList[1].channel=2
Bh

CrowdCapsList[1].Support=false
d

9.5.2 Subscribe to Realtime Crowd Stat


Subscribe the crowd distribuite map information, return info at regular time.
Request URL http://<server>/cgi-bin/crowdDistriMap.cgi?action=attach
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
video channel index to subscribe, starts from 1
channel int O
1, default 1

Video Analyse APIs 423


Send heartbeat interval, range is [1, 60],unit is 5
second. If the URL contains this parameter,
and the value is 5, it means every 5 seconds
heartbeat int O the device should send the heartbeat
message to the client, the heartbeat meaage
are "Heartbeat". If this parameter is not
present, its default value is 60.
Request Example
http://192.168.1.108/cgi-bin/crowdDistriMap.cgi?action=attach&channel=1&heartbeat=5

Response Params ( multipart; binary data in body )


Name Type R/O Description Example
CrowdStatData object[] R Array, each element is a detection area, and
each detection area can have multiple
people counting areas
+Channel uint R channel 1
DA

+GloabalPeopl uint R global people count number 10


HU

eNum
A_

+RegionNum uint R region number 1


HT

+RegionPeople object[] R list


TP

List
_

++RegionID uint R region id 0


AP

++RegionNam char[128] R region name "xxx"


I_

e
V3

++Region uint16[20 R region [10,10,0,100]


.3
7

][2]
fo

++RegionPeopl uint R people number 100


rV

eNum
el

+CrowdEventN uint O crowd event number 2


se
n

um default 0
gS

+CrowdList object[] O crowd list


dn

++Center Point R Central coordinate [12,50]


Bh

++Radius uint R radius 10


d

+RegionEvent uint O number, default 0 2


Num
+RegionList object[] O alarm region list
++Region uint16[20 R region [10,10,0,100]
][2]
++RegionID uint R region id 0
++PeopleNum uint R Statistics of the number of people in the 100
region
Response Example
HTTP/1.1 200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: close

--<boundary>

Video Analyse APIs 424


Content-Type: text/plain
Content-Length: <data length>

CrowdStatData[0].Channel=1
CrowdStatData[0].GloabalPeopleNum =10
CrowdStatData[0].RegionNum =1
CrowdStatData[0].RegionPeopleList[0].RegionID=0
CrowdStatData[0].RegionPeopleList[0].Region[0][0]=10
CrowdStatData[0].RegionPeopleList[0].Region[0][1]=10
CrowdStatData[0].RegionPeopleList[0].Region[1][0]=10
CrowdStatData[0].RegionPeopleList[0].Region[1][1]=100

CrowdStatData[0].RegionPeopleList[0].RegionPeopleNum=100
CrowdStatData[0].CrowdEventNum =2
CrowdStatData[0].CrowdList[0].Center=2
CrowdStatData[0].CrowdList[0].Radius=2
DA

CrowdStatData[0].RegionEventNum =2
HU

CrowdStatData[0].RegionList[0].Region[0][0]=10
A_

CrowdStatData[0].RegionList[0].Region[0][1]=10
HT

CrowdStatData[0].RegionList[0].Region[1][0]=10
TP

CrowdStatData[0].RegionList[0].Region[1][0]=100
_


AP

CrowdStatData[0].RegionList[0].RegionID=0
I_

CrowdStatData[0].RegionList[0].PeopleNum=100
V3

--<boundary>
.3
7

Content-Type: text/plain
fo

Content-Length: 11
rV
el

Heartbeat
se

--<boundary>
n gS

Content-Type: text/plain
dn

Content-Length: <data length>


Bh
d

CrowdStatData[0].Channel=1

9.5.3 Get Current Crowd Stat


Get crowd distribuite map information, return info only once.
Request URL http://<server>/cgi-bin/crowdDistriMap.cgi?action=getSummary
Method GET
Request Params ( none)
Name Type R/O Description Example
video channel index to subscribe, starts 1
channel int O
from 1, default 1
Request Example

Video Analyse APIs 425


http://192.168.1.108/cgi-bin/crowdDistriMap.cgi?action=getSummary&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
CrowdStatData object[] R Array, each element is a detection area,
and each detection area can have multiple
people counting areas
+Channel uint R channel 1
+GloabalPeopl uint R global people count number 10
eNum
+RegionNum uint R region number 1
+RegionPeople object[] R list
List
++RegionID uint R region id 0
++RegionNam char[128] R region name "xxx"
e
DA

++Region uint16[20 R region [10,10,0,100]


HU

][2]
A_

++RegionPeopl uint R people number 100


HT

eNum
TP

+CrowdEventN uint O crowd event number 2


_

um default 0
AP

+CrowdList object[] O crowd list


I_
V3

++Center Point R Central coordinate [12,50]


++Radius uint R radius 10
.3
7

+RegionEvent uint O number, default 0 2


fo

Num
rV

+RegionList object[] O alarm region list


el

++Region uint16[20 R region [10,10,0,100]


se
n

][2]
gS

++RegionID uint R region id 0


dn

++PeopleNum uint R Statistics of the number of people in the 100


Bh

region
d

Response Example
CrowdStatData[0].Channel=1
CrowdStatData[0].GloabalPeopleNum =10
CrowdStatData[0].RegionNum =1
CrowdStatData[0].RegionPeopleList[0].RegionID=0
CrowdStatData[0].RegionPeopleList[0].Region[0][0]=10
CrowdStatData[0].RegionPeopleList[0].Region[0][1]=10
CrowdStatData[0].RegionPeopleList[0].Region[1][0]=10
CrowdStatData[0].RegionPeopleList[0].Region[1][1]=100

CrowdStatData[0].RegionPeopleList[0].RegionPeopleNum=100
CrowdStatData[0].CrowdEventNum =2
CrowdStatData[0].CrowdList[0].Center=2
CrowdStatData[0].CrowdList[0].Radius=2

Video Analyse APIs 426


CrowdStatData[0].RegionEventNum =2
CrowdStatData[0].RegionList[0].Region[0][0]=10
CrowdStatData[0].RegionList[0].Region[0][1]=10
CrowdStatData[0].RegionList[0].Region[1][0]=10
CrowdStatData[0].RegionList[0].Region[1][0]=100

CrowdStatData[0].RegionList[0].RegionID=0
CrowdStatData[0].RegionList[0].PeopleNum=100

9.6 Video Analyse

9.6.1 Get Video Analyse Capability


Request URL http://<server>/cgi-bin/devVideoAnalyse.cgi?action=getcaps
DA

Method GET
HU

Request Params ( none)


A_

Name Type R/O Description Example


HT

channel int R video channel index which starts from 1. 1


Request Example
TP
_

http://192.168.1.108/cgi-bin/devVideoAnalyse.cgi?action=getcaps&channel=1
AP
I_

Response Params ( key=value format in body )


V3

Name Type R/O Description Example


.3
7

caps object R capabilities


fo

+SupportedSc char[32][ O scene list ["Normal",


rV

ene 16] "ATM","NumberStat"]


el

+SupportedSc object O Supported Scenes


se

enes
ngS

++FaceDetecti object O face detection


dn

on
Bh

+++Supported object O Calibrate Params


CalibratePara
d

ms
++++Groud object O groud
+++++Horizont uint16[2] O Range of values for the number of [1, 2]
alStaffs horizontal staffs
the first is the minimum and the second is
the maximum
+++++VerticalS uint16[2] O Range of values for the number of [3, 3]
taffs vertical staffs
the first is the minimum and the second is
the maximum
++NumberStat object O number stat
+++CameraTy uint8 O range {0,1,2} 1
pe

Video Analyse APIs 427


+++Supported object O rules
Rules
++StereoBeha object O Stereo Behavior
vior
+++OnlyFindLa char[32][ O event type list in which last ones are ["ParkingStatusChan
stEvtList 32] supported to be inquired. geDetection"]
+MaxModules uint8 O max modules 5
+MaxRules uint8 O The maximum number of rules that can 32
be saved for all preset points in each
channel.
default 32
+SupportedRul char[128] O Union of rule lists supported by class ["CrossLineDetection
es [128] ", "PasteDetection",
"FlowStat" ]
+MaxCelibateA int O Maximum number of calibration regions 10
reas
DA

+MaxStaffs int O Maximum number of staffs 10


HU

+MaxPointOfLi int O Maximum number of lines 2


A_

ne
HT

+MaxPointOfR int O Maximum number of regions 4


TP

egion
_

+MaxExcludeR int O Maximum number of exclude regions 10


AP

egions
I_

+MaxInternalO int O Maximum number of internal options 512


V3

ptions
.3
7

+ComplexSize bool O Does support complex size flter true


fo

Filter
rV

+CalibrateBoxs uint8[2] O [2, 3]


el

+SpecifiedObje bool O does support specified object filter true


se
n

ctFilter
gS

Response Example
dn

caps.CalibrateBoxs[0]=2
Bh

caps.CalibrateBoxs[1]=3
d

caps.ComplexSizeFilter=false
caps.MaxCelibateAreas=10
caps.MaxExcludeRegions=0
caps.MaxInternalOptions=512
caps.MaxModules=1
caps.MaxPointOfLine=20
caps.MaxPointOfRegion=20
caps.MaxRules=10
caps.MaxStaffs=4
caps.SpecifiedObjectFilter=true
caps.SupportedRules[0]=CrossLineDetection
caps.SupportedRules[1]=CrossRegionDetection
caps.SupportedRules[2]=LeftDetection
caps.SupportedRules[3]=TakenAwayDetection

Video Analyse APIs 428


caps.SupportedScene[0]=Normal
caps.SupportedScene[1]=FaceDetection
caps.SupportedScene[2]=VideoDiagnosis
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalStaffs[0]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalStaffs[1]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs[0]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs[1]=0
caps.SupportedScenes.StereoNumber.SupportedRules.ManNumDetection.SupportLocalDataStore=fals
e
caps.SupportedScenes.NumberStat.CameraType=1
caps.SupportedScenes.NumberStat.SupportedRules.NumberStat.MaxRules=8
caps.SupportedScenes.StereoBehavior.OnlyFindLastEvtList[0]=ManStandDetection

9.6.2 [Config] Video Analyse Global


DA

Config Data Params


HU

Name Type R/O Description Example


A_

VideoAnalyse object[] O array index starts from 0, which means


HT

Global video channel (equals to video channel


TP

index -1, and so 0 means channel 1).


_
AP

+Scene object O scene


++Type char[] O Scene class, the range is { "", "Normal", "Normal"
I_
V3

"Indoor", "ATM", "Traffic",


.3

"FaceRecognition", "FaceDetection",
7

"NumberStat", "HeatMap",
fo

"VideoDiagnosis", "VehicleAnalyse",
rV

"TrafficPatrol", "CourseRecord",
el
se

"Vehicle" , "ObjectDetect",
n

"VehicleCompare"}
gS

++PtzPresetId uint8 O Range is 0 — 255, 0 means that the 1


dn

scene is unassociated with PTZ.


Bh

++Depth enumchar[ O Picture distance feature, the range is "Normal"


d

8] { "Normal", "Far", "Middle", "Near" }


++Detail object O Detail config of a scene. For example,
when Scene.Type is "Normal", it's
detail includes CameraAngle,
CameraDistance, CameraHeight, etc.
+TimePeriod object O period
++Day char[2][16] O The start and end time of Day, it's ["8:00:00", "20:00:00"]
format is hh:mm:ss
++Night char[2][16] O The start and end time of Night, it's ["20:00:00", "7:00:00"]
format is hh:mm:ss

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example

Video Analyse APIs 429


http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseGlobal
Get Config Response Example
table.VideoAnalyseGlobal[0].Scene.Type=Normal
table.VideoAnalyseGlobal[0].Scene.PtzPresetId=1
table.VideoAnalyseGlobal[0].Scene.Depth=Far
table.VideoAnalyseGlobal[0].Scene.Detail.CameraAngle=30
table.VideoAnalyseGlobal[0].Scene.Detail.CameraDistance=10.000000
table.VideoAnalyseGlobal[0].Scene.Detail.CameraHeight=6.200000
table.VideoAnalyseGlobal[0].TimePeriod.Day[0]=8:00:00
table.VideoAnalyseGlobal[0].TimePeriod.Day[1]=20:00:00
table.VideoAnalyseGlobal[0].TimePeriod.Night[0]=20:00:00
table.VideoAnalyseGlobal[0].TimePeriod.Night[1]=8:00:00

Set Config Request Example


http://192.168.1.108/cgi-
DA

bin/configManager.cgi?action=setConfig&VideoAnalyseGlobal[0].Scene.Type=Normal&VideoAnalyseGl
HU

obal[0].Scene.PtzPresetId=1
A_

Set Config Response Example


HT

OK
TP
_
AP

9.6.3 [Config] Video Analyse Rule


I_
V3
.3

Config Data Params


7

Name Type R/O Description Example


fo

VideoAnalyse object[Cha O ChannelNo: integer, array index starts from


rV

Rule nnelNo][ R 0, which means video channel (equals to


el
se

uleNo] video channel index -1, and so 0 means


n

channel 1).
gS

RuleNo =rule index.


dn

ParamName start with head.Config is only


Bh

effective with {"CrossLineDetection",


d

"CrossRegionDetection", "LeftDetection",
"TakenAwayDetection"}.
+Name char[128] O Rule name, it must be unique. "GuardLine1"
+Enable bool O Enable/Disable this rule. true
+Type char[32] R The range is {"CrossLineDetection", "CrossLineDetection
"CrossRegionDetection", "LeftDetection", "
"TakenAwayDetection",
"VideoAbnormalDetection",
"FaceDetection", "AudioMutation",
"AudioAnomaly", "VideoUnFocus",
"WanderDetection", "RioterDetection",
"ParkingDetection", "MoveDetection",
"NumberStat", "HeatMap", "FaceAttribute",
"VehicleDetect", "NonMotorDetect",

Video Analyse APIs 430


"HumanTrait", "ObjectPlacement",
"ObjectRemoval" }.
+EventHandle EventHand O Setting of EventHandler is described in
r ler SetEventHandler.
+Config object O configuration
Depending on the specific rule type,
The following parameters are only valid
when Type is the following value:
{"CrossLineDetection",
"CrossRegionDetection", "LeftDetection",
"TakenAwayDetection"}.
+DetectLine uint16[20][ O The line point
2] The coordinates of the point is unified
within the range of 0–8192.
+Direction enumchar[ O enumchar[16]{ "LeftToRight"
16] "LeftToRight"
DA

"RightToLeft"
HU

"Both"
A_

}
HT

+SizeFilter object O size filter


TP

++MaxSize int[2] O Maximum width and Maximum height. The


_

width and the height of the object must not


AP

be beyond maximum value.


I_

Adapt to:
V3

{"CrossLineDetection",
.3
7

"CrossRegionDetection", "LeftDetection",
fo

"TakenAwayDetection", "FaceDetection",
rV

"WanderDetection", "RioterDetection",
el

"ParkingDetection", "MoveDetection"}.
se
n

++MinSize int[2] O Minimum width and Minimum height. The


gS

width and the height of the object must not


dn

be less than minimum value.


Bh

+DetectRegio uint16[20][ O The coordinates of the point is unified


d

n 2] within the range of 0–8192.Adapt to :


{"CrossRegionDetection", "LeftDetection",
"TakenAwayDetection",
"WanderDetection", "RioterDetection",
"ParkingDetection", "MoveDetection"}.
+MinDuration uint O Range is 1—600, adapt to {"LeftDetection", 0
"TakenAwayDetection",
"WanderDetection"}.
Range is 10-300, adapt to
{"RioterDetection"}.
Range is 6-300, adapt to
{"ParkingDetection"}.
+Sensitivity uint8 O Range is 1—10, adapt to {"RioterDetection", 6
"MoveDetection"}.

Video Analyse APIs 431


+EnterThresh uint16 O Range is 0—100000000, adapt to 0
old {"NumberStat"}.
+ExitThreshol uint16 O Range is 0—100000000, adapt to 0
d {"NumberStat"}.
+InsideThresh uint16 O Range is 0—100000000, adapt to 0
old {"NumberStat"}.
+DirectionStat object O 方向统计配置
s
++Enable bool O Enable/Disable object detect Direction. false
Rule range is {"VehicleDetect",
"NonMotorDetect", "HumanTrait"}.
++DetectLine uint16[20][ O The line point
2] The coordinates of the point is unified
within the range of 0–8192.
++Direction enumchar[ O enumchar[16]{ "Both"
16] "Both"
DA

"LeftToRight"
HU

"RightToLeft"
A_

}
HT

+FilterUnAlive bool O Enable the non-living filtering function. It is false


TP

Enable false by default.


_

+EyesDistThre uint32 O Set filtering threshold of pupillary distance. 50


AP

shold If the actual pupillary distance is less than


I_
V3

the threshold, it will be filtered. Refer to


.3

GB/T 35678-2017: Value range [50–no


7

upper limit] required for face recognition


fo

application image technology. The default


rV

value 0 indicates no filtering.


el

O
se

+HelmetEnabl bool Enable safety helmet detection. With the false


n

e function enabled, the face recognition


gS

result carries information related to safety


dn

helmet detection. It is false by default.


Bh

+TempSwitch uint8 O Select temperature monitoring status: 1


d

0: Disable temperature monitoring


1: Normal temperature monitoring
2: Debug temperature monitoring
+TempModel uint8 O Temperature monitoring mode (valid when 0
TempSwitch is not 0):
0: Automatical mode
1: Thermal image detection mode
2: Calibration mode
+TempStrateg object O strategy
y
++TempValue double O Maximum value of normal face 45.1
Max temperature range
++TempValue double O Minimum value of normal face temperature 35.5
Min range

Video Analyse APIs 432


++TempType uint8 O Strategy type for calculating face 0
temperature:
0: Use the highest temperature
1: Use the average temperature
++SlideNum uint8 O The number of sliding cache frames. 0 0
means no sliding, and the maximum cache
is 32 frames.
++HightTemp object O valid whenTempType=0
Strategy
+++TempDete uint8 O 0: Forehead part 0
ctRegion 1: Whole face
++AverageTe object O valid whenTempType=1
mpStrategy
+++StrategyTy uint8 O Parameter for average temperature 0
pe strategy (valid when tempType is 1).
Average temperature strategy type:
DA

0: Center point
HU

1: high temperature point


A_

+++PointNum uint8 O Parameter for average temperature 9


HT

strategy (valid when tempType is 1).


TP

The number of points used to find the


_

average value, and it is the square of the


AP

integer, such as 4, 9, and 16.


I_

O
V3

+++EnableFilt bool Parameter for average temperature false


.3

er strategy (valid when tempType is 1).


7

Whether to enable the removal of the


fo

highest temperature and the lowest


rV

temperature to take the average value:


el
se

False: Disable
n

True: Enable
gS

+FilterMaskUn bool O Select whether to enable liveness false


dn

AliveEnable detection for person wearing mask. This


Bh

value is related to FilterUnAliveEnable.


d

When FilterUnAliveEnable is true (liveness


detection is enabled), this field is valid.

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule
Get Config Response Example
table.VideoAnalyseRule[0][0].Name= line1
table.VideoAnalyseRule[0][0].Type=CrossLineDetection
table.VideoAnalyseRule[0][0].VideoAnalyseRule[0][0].Enable =true
table.VideoAnalyseRule[0][0].VideoAnalyseRule[0][0].EventHandler= (output of EventHandler is
described in GetEventHandler)

Video Analyse APIs 433


Set Config Request Example
http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&VideoAnalyseRule[0][0].Name=myAnalyseRule1&VideoAnalys
eRule[0][0].Type=CrossLineDetection
Set Config Response Example
OK

9.6.4 Get Last Event Info


Get Last Event Info
Request URL http://<server>/cgi-bin/devVideoAnalyse.cgi?action=getLastEventInfo
Method GET
Request Params ( none)
DA

Name Type R/O Description Example


HU

Starts from 0, which means video 0


channel int R channel (equals to video channel index -
A_

1, and so 0 means channel 1).


HT

ClassName char[] R means Class name. StereoBehavior


TP

EventName char[] R means Event name. ManStandDetection


_AP

Request Example
I_

http://192.168.1.108/cgi-
V3

bin/devVideoAnalyse.cgi?action=getLastEventInfo&channel=1&ClassName=StereoBehavior&EventN
.3

ame=ManStandDetection
7
fo
rV

Response Params ( key=value format in body )


el

Name Type R/O Description Example


se

State int R enumint{ 1


ngS

0: off
dn

1: on
}
Bh

EventInfo object R event info


d

Code char[32] R event code "BusDoor"


Action enumcha R action "Start"
r[32] enumchar[32]{
"Start"
"Stop"
"Pulse"
}
Response Example
State=1
EventInfo.Code=ManStandDetection
EventInfo.Action=Start

Video Analyse APIs 434


9.6.5 [Config] GlobalDeviceParam
Config Data Params
Name Type R/O Description Example
GlobalDevice object O
Global Device Param
Param
+LocateHeight float O Device locate Height 10.5
+Profile uint32 O range:{ 0
0-outdoor
1-indoor
}
default 0

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
DA

Get Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=GlobalDeviceParam
HU

Get Config Response Example


A_

table.GlobalDeviceParam.LocateHeight=10.5
HT

table.GlobalDeviceParam.Profile=0
TP
_
AP

Set Config Request Example


I_

http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&GlobalDeviceParam.LocateHeight=10.5
V3

Set Config Response Example


.3

OK
7
fo
rV

9.6.6 Get Template Rule


el
se

Gets all intelligent rule configuration templates and default values under the specified category
n gS

Request URL http://<server>/cgi-bin/VideoInAnalyse.cgi?action=getTemplateRule


dn

Method GET
Bh

Request Params ( key=value format in URL )


d

Name Type R/O Description Example


Class Char[32] R the same meaning with Type in config "Normal"
VideoAnalyseGlobal
"Normal"
"Traffic"
"TrafficPatrol"
"FaceDetection"(shared by face detect
and face recognition)
in added, Web can use “ALL” for all
rules.
Channel integer R video channel, which starts from 1. 1
Example
http://<server>/cgi-bin/VideoInAnalyse.cgi?action=getTemplateRule&Channel=1&Class=Normal

Video Analyse APIs 435


Response Params ( key=value format in body )
Name Type R/O Description Example
Rule object R rule info
+Normal object R business class
++CrossRegio object R cross region templet
nDetection
++CrossLineD object R default config of crossline
etection format as the same as each object in
the second dimension of
VideoAnalyseRule
+++Config object R detail of rule config
++++SizeFilter object R
+++++MinSize int[2] R [0, 0]
+++++MaxSiz int[2] R [8191, 8191]
e
++++DetectLin object[] R
DA

e
HU

++++Direction char[] R direction "Both"


A_

+++PtzPresetI integer R Preset number 0


HT

d
TP

+++ObjectTyp char[][] R type of detect object ["Unknown"]


_

es
AP

+++Type char[64] R rule type "CrossLineDetection"


I_
V3

+++Class char[16] R business plan class "Normal"


+++Enable bool R enable the rule false
.3
7

+++Id integer R rule id 0


fo

Example
rV

Rule.Normal.CrossLineDetection.Id=0
el

Rule.Normal.CrossLineDetection.Enable=false
se
n

Rule.Normal.CrossLineDetection.Class=Normal
gS

Rule.Normal.CrossLineDetection.Type=CrossLineDetection
dn

Rule.Normal.CrossLineDetection.ObjectTypes[0]=Unknown
Bh

Rule.Normal.CrossLineDetection.PtzPresetId=0
d

Rule.Normal.Config.Direction=Both
Rule.Normal.Config.SizeFilter.MaxSize[0]=[8191, 8191]
Rule.Normal.Config.SizeFilter.MinSize[0]=[0, 0]

9.6.7 [Config] IntelliSchemeTourEnableSetting


Config Data Params
Name Type R/O Description Example
IntelliSchemeTour object R IntelliSchemeTour Setting
+Enable bool R IntelliSchemeTour Enable True
Setting

Video Analyse APIs 436


Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=IntelliSchemeTour
Get Config Response Example
table.IntelliSchemeTour.Enable=true

Set Config Request Example


http://172.27.2.72/cgi-bin/configManager.cgi?action=setConfig&IntelliSchemeTour.Enable=true
Set Config Response Example
OK

9.6.8 [Config] Intelligent Tour Plan


DA

Config Data Params


Name Type R/O Description Example
HU

IntelliSchemeTour object O Intelligent package tour plan. No


A_

channel sensitive.
HT

+Enable bool O Whether the package tour plan true


TP

is enabled.
_ AP

+TourPriMode enumchar[32] O Tour priority mode "Switch"


I_

enumchar[32]{
V3

"Switch": Scene priority, tour in


.3

strict accordance with the


7

defined tour time.


fo
rV

"Detect": Detection priority, with


el

the complete set of data as the


se

condition for scene switching


n

upon completion of scene


gS

detection (For illegal parking


dn

detection cameras. Multiple


Bh

images may be needed in one


d

scene. In this case, the camera


can rotate to the next scene
after all images are captured).
"Tour": Tour priority, similar to
detection priority, with a set of
data as the condition for scene
switching upon completion of
scene detection (both close shot
and long shot available. Apply
close shot first and then long
shot according to the tour path).
}
For details, refer to the capability
set IntelliScheme.getCaps.

Video Analyse APIs 437


+IdleWaitingTime uint32 O Idle waiting time, that is, the idle 10
delay time until the tour plan
continues to take effect after a
user stops operating the device,
in second(s).
+SceneSwitching uint32 O Scene switching time. When the 20
Time tour plan is enabled and the
priority mode is either detection
priority or tour priority, it will
automatically rotate to the next
scene after an object cannot be
detected for a certain period of
time.
+TourPlan object[7][16] O Package tour plan
2D array. The first dimension
indicates the day of a week,
DA

totally 7 weekdays, and the


HU

second dimension indicates the


A_

tour groups supported that day.


HT

++TimeSection TimeSection O Period of time. 00:00:00 "1 00:00:00-23:59:59"


TP

indicates the start time and


_

23:59:59 indicates the end time.


AP

++TourPath object[] O Tour path null


I_
V3

1D array, to adjust the order of


.3

packages. Up to 10 packages
7

are supported. It is null by


fo

default and added by a user.


rV

Field values are specified by a


el

user.
se
n

+++SchemeID uint32 O Intelligent package ID, value 1


gS

range: 1-300.
dn

+++Duration uint32 O Retention time, value range: 30- 600


Bh

36,000 s or 0.
d

It is 0 by default if this field is


unavailable. Indicates that the
switching has not been made
during the period of time.
+++Speed uint32 O The speed of the camera 7
rotating to the preset when a
package includes a preset
channel of a PTZ camera, value
range: 1-10 speed levels.

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=IntelliSchemeTour

Video Analyse APIs 438


Get Config Response Example
table.IntelliSchemeTour.Enable=true
table.IntelliSchemeTour.IdleWaitingTime=10
table.IntelliSchemeTour.SceneSwitchingTime=20
table.IntelliSchemeTour.TourPlan[0][0].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][1].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][2].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][3].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][4].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][5].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][6].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][7].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][8].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][9].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][10].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[0][11].TimeSection=1 00:00:00-00:00:00
DA

table.IntelliSchemeTour.TourPlan[0][12].TimeSection=1 00:00:00-00:00:00
HU

table.IntelliSchemeTour.TourPlan[0][13].TimeSection=1 00:00:00-00:00:00
A_

table.IntelliSchemeTour.TourPlan[0][14].TimeSection=1 00:00:00-00:00:00
HT

table.IntelliSchemeTour.TourPlan[0][15].TimeSection=1 00:00:00-00:00:00
TP

table.IntelliSchemeTour.TourPlan[1][0].TimeSection=1 00:00:00-00:00:00
_

table.IntelliSchemeTour.TourPlan[1][1].TimeSection=1 00:00:00-00:00:00
AP

table.IntelliSchemeTour.TourPlan[1][2].TimeSection=1 00:00:00-00:00:00
I_

table.IntelliSchemeTour.TourPlan[1][3].TimeSection=1 00:00:00-00:00:00
V3

table.IntelliSchemeTour.TourPlan[1][4].TimeSection=1 00:00:00-00:00:00
.3
7

table.IntelliSchemeTour.TourPlan[1][5].TimeSection=1 00:00:00-23:00:00
fo

table.IntelliSchemeTour.TourPlan[1][6].TimeSection=1 00:00:00-00:00:00
rV

table.IntelliSchemeTour.TourPlan[1][7].TimeSection=1 00:00:00-00:00:00
el

table.IntelliSchemeTour.TourPlan[1][8].TimeSection=1 00:00:00-00:00:00
se

table.IntelliSchemeTour.TourPlan[1][9].TimeSection=1 00:00:00-00:00:00
ngS

table.IntelliSchemeTour.TourPlan[1][10].TimeSection=1 00:00:00-00:00:00
dn

table.IntelliSchemeTour.TourPlan[1][11].TimeSection=1 00:00:00-00:00:00
Bh

table.IntelliSchemeTour.TourPlan[1][12].TimeSection=1 00:00:00-00:00:00
d

table.IntelliSchemeTour.TourPlan[1][13].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[1][14].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[1][15].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][0].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][1].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][2].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][3].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][4].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][5].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][6].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][7].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][8].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][9].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][10].TimeSection=1 00:00:00-00:00:00

Video Analyse APIs 439


table.IntelliSchemeTour.TourPlan[2][11].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][12].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][13].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][14].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[2][15].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][0].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][1].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][2].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][3].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][4].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][5].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][6].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][7].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][8].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][9].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[3][10].TimeSection=1 00:00:00-00:00:00
DA

table.IntelliSchemeTour.TourPlan[3][11].TimeSection=1 00:00:00-00:00:00
HU

table.IntelliSchemeTour.TourPlan[3][12].TimeSection=1 00:00:00-00:00:00
A_

table.IntelliSchemeTour.TourPlan[3][13].TimeSection=1 00:00:00-00:00:00
HT

table.IntelliSchemeTour.TourPlan[3][14].TimeSection=1 00:00:00-00:00:00
TP

table.IntelliSchemeTour.TourPlan[3][15].TimeSection=1 00:00:00-00:00:00
_

table.IntelliSchemeTour.TourPlan[4][0].TimeSection=1 00:00:00-00:00:00
AP

table.IntelliSchemeTour.TourPlan[4][1].TimeSection=1 00:00:00-00:00:00
I_

table.IntelliSchemeTour.TourPlan[4][2].TimeSection=1 00:00:00-00:00:00
V3

table.IntelliSchemeTour.TourPlan[4][3].TimeSection=1 00:00:00-00:00:00
.3
7

table.IntelliSchemeTour.TourPlan[4][4].TimeSection=1 00:00:00-00:00:00
fo

table.IntelliSchemeTour.TourPlan[4][5].TimeSection=1 00:00:00-00:00:00
rV

table.IntelliSchemeTour.TourPlan[4][6].TimeSection=1 00:00:00-00:00:00
el

table.IntelliSchemeTour.TourPlan[4][7].TimeSection=1 00:00:00-00:00:00
se

table.IntelliSchemeTour.TourPlan[4][8].TimeSection=1 00:00:00-00:00:00
ngS

table.IntelliSchemeTour.TourPlan[4][9].TimeSection=1 00:00:00-00:00:00
dn

table.IntelliSchemeTour.TourPlan[4][10].TimeSection=1 00:00:00-00:00:00
Bh

table.IntelliSchemeTour.TourPlan[4][11].TimeSection=1 00:00:00-00:00:00
d

table.IntelliSchemeTour.TourPlan[4][12].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[4][13].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[4][14].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[4][15].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][0].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][1].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][2].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][3].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][4].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][5].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][6].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][7].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][8].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][9].TimeSection=1 00:00:00-00:00:00

Video Analyse APIs 440


table.IntelliSchemeTour.TourPlan[5][10].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][11].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][12].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][13].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][14].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[5][15].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][0].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][1].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][2].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][3].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][4].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][5].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][6].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][7].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][8].TimeSection=1 00:00:00-00:00:00
table.IntelliSchemeTour.TourPlan[6][9].TimeSection=1 00:00:00-00:00:00
DA

table.IntelliSchemeTour.TourPlan[6][10].TimeSection=1 00:00:00-00:00:00
HU

table.IntelliSchemeTour.TourPlan[6][11].TimeSection=1 00:00:00-00:00:00
A_

table.IntelliSchemeTour.TourPlan[6][12].TimeSection=1 00:00:00-00:00:00
HT

table.IntelliSchemeTour.TourPlan[6][13].TimeSection=1 00:00:00-00:00:00
TP

table.IntelliSchemeTour.TourPlan[6][14].TimeSection=1 00:00:00-00:00:00
_

table.IntelliSchemeTour.TourPlan[6][15].TimeSection=1 00:00:00-00:00:00
AP

table.IntelliSchemeTour.TourPriMode=Switch
I_
V3

Set Config Request Example


.3
7

http://172.27.2.72/cgi-bin/configManager.cgi?action=setConfig&IntelliSchemeTour.TourPriMode=Switch
fo

Set Config Response Example


rV

OK
el
se
n gS

9.6.9 Export Intelligent Diagnosis, Allowlist, and Blocklist Information


dn
Bh

Export information, such as intelligent diagnosis, allowlist, and blocklist information. The export data
d

format is csv
Request URL http://<server>/cgi-bin/api/ImExport/exportData
Method POST
Request Params (JSON format in body)
Name Type R/O Description Example
type enumint O Exported data type. 0
enumint{
0: License plate allowlist
1: License plate blocklist
2: License plate blocklist and
allowlist
3: Voice talk contacts
4: Custom password
5: Card recordset

Video Analyse APIs 441


6: Face information for access
control
7: Fingerprints for access control
8: IPC information of voice talk
9: Calling person information
10: Public password recordset
11: Operation and maintenance
information
}
Request Example
{
"type": 1
}

Response Params (binary in body)


Name Type R/O Description Example
DA

Response Example
HU

HTTP/1.1 200 OK
A_

Server: Device/1.0
HT

Content-Type: application/octet-stream
TP

Content-Length: <length>
_ AP

< binary data>


I_
V3

9.6.10 Import Intelligent O&M, Allowlist, and Blocklist Information


.3
7
fo

Import intelligent O&M, allowlist, and blocklist information.


rV
el

Request URL http://<server>/cgi-bin/api/ImExport/importData


se

Method POST
n
gS

Request Params (multipart in body)


dn

Name Type R/O Description Example


type uint32 R Imported data type 0
Bh

enumint{
d

0 : License plate allowlist


1 : License plate blocklist
2 : License plate blocklist and
allowlist
3: Voice talk contacts
4: Custom password
5: Card recordset
6: Face information for access
control
7: Fingerprint for access control
8: IPC information of voice talk
9: Calling person information
10: Public password recordset

Video Analyse APIs 442


11: Operation and maintenance
information
}
isOverWrite bool R Whether to overwrite the original true
data. If isOverWrite=true, clear all
license plate lists, and then import
the data. If isOverWrite=false, it
will be imported directly, even if the
license plate to be imported is
duplicated with the existing license
plate of the device.
Request Example
POST http://<server>/cgi-bin/api/ImExport/importData HTTP/1.1
User-Agent: client/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
DA

--<boundary>
HU

Content-Type: application/json
A_

Content-Length: 12
HT
TP

{
_

"type": 0,
AP

"isOverWrite": true
I_
V3

}
--<boundary>
.3
7

Content-Type: application/octet-stream
fo

Content-Length: 800
rV
el

< binary data>


se
n

--<boundary>
gS
dn

Response Params ( JSON format in body )


Bh

Name Type R/O Description Example


d

Response Example
{}

9.6.11 Get Intelligent Capability


Request URL http://<server>/cgi-bin/intelli.cgi?action=getCaps
Method GET
Request Params ( none)
Name Type R/O Description Example
Name of capability, it can be: AnalyseMode
capsName string O AnalyseMode: get analyse mode
capacity

Video Analyse APIs 443


MultiChannelMode: get multi channel
seperate intelligent capacity and
combined intelligent capacity
MultiVideoAnalyse: get all intelligent
capacity from the multichannel device in
each channel
if omit, means get all capacity
Request Example
http://192.168.1.108/cgi-
bin/devVideoAnalyse.cgi?action=getLastEventInfo&channel=1&ClassName=StereoBehavior&EventN
ame=ManStandDetection

Response Params ( key=value format in body )


Name Type R/O Description Example
caps object R The video service capabilities.
Analyse mode, can be : RealStream, RecordFileStream
DA

+AnalyseMode char[] O
RecordFileStream, PicFileStream
HU

+MultiChannel
object O Multi channel description
A_

Mode
HT

++IndepMode object[][] O Multi channel open at one time separately


TP

+++Channel int R Video channel number, start from 0


_

+++Type char[] R Business class


AP

++CompMode object[][] O Multi channel combined mode


I_

+++Channel int R Video channel number, start from 0 0


V3

+++Type char[] R Business class


.3
7

+MultiVideoAn
fo

object[] O List of channel capabilities


alyse
rV

++caps object R Video analyse capabilities


el

+Algorithm object[] O Algorithm version information


se
n

++Class char[] R Intelligent analyse class, ex : ObjectDetect


gS

++AlgorithmVer char[]
R Algorithm version
dn

sion
Bh

++AlgorithmVe char[]
R Algorithm Vendor name
d

ndor
+TotalCapacity object[] O Intelligent analyse total capacity
++Class char[] R Intelligent analyse class, ex : ObjectDetect ObjectDetect
Intelligent analyse rules, ex : ["FaceDetection"]
++Type char[][] R
FaceDetection
The maximum number of video channels
++Number int R
that can be analysed at same time
Response Example
caps.AnalyseMode=RealStream
caps.MultiChannelMode.IndepMode[0][0].Channel=0
caps.MultiChannelMode.IndepMode[0][0].Type=Normal
caps.MultiChannelMode.IndepMode[0][1].Channel=1
caps.MultiChannelMode.IndepMode[0][1].Type=ObjectDetect

Video Analyse APIs 444


caps.MultiChannelMode.CompMode[0][0].Channel=0
caps.MultiChannelMode.CompMode[0][0].Type=Normal
caps.MultiChannelMode.CompMode[0][1].Channel=1
caps.MultiChannelMode.CompMode[0][1].Type=ObjectDetect

caps.Algorithm[0].Class=Normal
caps.Algorithm[0].AlgorithmVersion=V2.8
caps.Algorithm[0].AlgorithmVendor=XXX
caps.Algorithm[1].Class=ObjectDetect
caps.Algorithm[1].AlgorithmVersion=V2.8
caps.Algorithm[1].AlgorithmVendor=YYY

caps.TotalCapacity[0].Class=Normal
caps.TotalCapacity[0].Type[0]=FaceDetection
caps.TotalCapacity[0].Number=3
caps.TotalCapacity[1].Class=ObjectDetect
DA

caps.TotalCapacity[1].Type[0]=FaceDetection
HU

caps.TotalCapacity[1].Number=3
A_


HT
TP
_

9.6.12 Subscribe Resource Usage Info


AP
I_
V3

Request URL http://<server>/cgi-bin/intelli.cgi?action=attachResource


.3

Method GET
7

Request Params ( key=value format in URL )


fo
rV

Name Type R/O Description Example


Send heartbeat interval, range is [1, 60],unit is 5
el
se

second. If the URL contains this parameter, and


n

the value is 5, it means every 5 seconds the


gS

heartbeat int O device should send the heartbeat message to the


dn

client, the heartbeat meaage are "Heartbeat". If


Bh

this parameter is not present, its default value is


d

60.
Request Example
http://192.168.1.108/cgi-bin/intelli.cgi?action=attachResource&heartbeat=5

Response Params ( multipart; key=value format in body )


Name Type R/O Description Example
RemainCapacit
object[] R Remain capacity of intelligent analyse
y
+Class string R Intelligent analyse class, ex : ObjectDetect Normal
Remain number of video channels that can be 1
+Number int O
analysed
Response Example
HTTP/1.1 200 OK
Server: Device/1.0

Video Analyse APIs 445


Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: text/plain
Content-Length: <length>

RemainCapacity[0].Class=Normal
RemainCapacity[0].Number=1
RemainCapacity[1].Class=ObjectDetect
RemainCapacity[1].Number=2

--<boundary>
Content-Type: text/plain
Content-Length: 11
DA

Heartbeat
HU

--<boundary>
A_

Content-Type: text/plain
HT

Content-Length: <length>
TP
_

RemainCapacity[0].Class=Normal
AP

RemainCapacity[0].Number=1
I_

RemainCapacity[1].Class=ObjectDetect
V3

RemainCapacity[1].Number=1
.3
7


fo
rV
el
se

9.6.13 Export Encrypted Files


n gS

Request URL http://<server>/cgi-bin/api/SecurityImExport/exportData


dn

Method POST
Bh

Request Params ( JSON format in body )


d

Name Type R/O Description Example


key char[1024] R Password string encrypted with public "1BBzdSS***"
key and encoded by Base64
type enumint R Exported types 0
enumint{
0: License plate allowlist
1: License plate blocklist
2: License plate allowlist/blocklist
3: Voice talk contacts
4: Custom password
5: Card recordset
6: Face information for access control
7: Fingerprint for access control

Video Analyse APIs 446


8: Network camera information of voice
talk
9: Calling person information
10: Public password recordset
11: Operation and maintenance
information
12: Face data
13: Face images
}
Request Example
{
"key": "1BBzdSS***",
"type": 0
}
DA

Response Params ( binary in body )


HU

Name Type R/O Description Example


Response Example
A_

HTTP/1.1 200 OK
HT

Server: Device/1.0
TP

Content-Type: application/octet-stream
_ AP

Content-Length: <length>
I_
V3

< binary data>


.3

//Before the device returns the actual data, use AES symmetric encryption (the key is generated
7
fo

according to the plaintext conversion after key decryption).


rV

//AES-256bit-CBC. Filling mode: PKCS7.


el
se

9.6.14 Platform intelligent control


n gS
dn

Request URL http://<server>/cgi-bin/api/intelli/setPollingConfig


Method POST
Bh

Request Params ( JSON format in body )


d

Name Type R/O Description Example


Config object[] O Length max 256
+Enable bool O Whether it is intelligently turned on true
+Channel uint32 O Channel number 12
+GlobalType char[64] O Global configuration, only support single "Normal"
channel and single intelligence,
+RulelType char[16][64 O Rule configuration, which represents all ["CrossLineDetectio
] rules enabled in the GlobalType or n"]
GlobalTypeList scenario
+GlobalTypeLi char[6][64] O The global configuration list, the extension ["Normal",
st supports the opening of multiple "GasStation"]
intelligence of a single channel, choose

Video Analyse APIs 447


one of GlobalType and GlobalTypeList,
GlobalTypeList will be used first
Request Example
{
"Config": [{
"Enable": true,
"Channel": 12,
"GlobalType": "Normal",
"RulelType": ["CrossLineDetection"],
"GlobalTypeList": ["Normal", "GasStation"]
},…{}]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
DA

{}
HU
A_
HT

9.6.15 Get Scene List


TP
_ AP

Get the list of intelligent schemes that have been opened for a channel.
I_
V3

Request URL http://<server>/cgi-bin/devVideoAnalyse.cgi?action=getSceneList


.3

Method GET
7
fo

Request Params ( JSON format in body )


rV

Name Type R/O Description Example


el

Request Example
se

http://<server>/cgi-bin/devVideoAnalyse.cgi?action=getSceneList
ngS
dn
Bh

Response Params ( key=value format in body )


d

Name Type R/O Description Sample


VideoAnalyseGl object[] R List of intelligent schemes
obal opened for each video channel.
+Scenes char[32][16] R If none of the intelligent schemes ["Normal", "HeatMap"]
are enabled, return
VideoAnalyseGlobal[0].Scenes[
0]=""
Response Example
VideoAnalyseGlobal[0].Scenes[0]=Normal
VideoAnalyseGlobal[0].Scenes[1]=FaceDetection

9.6.16 Open Intelligent Schemes

Open several intelligent schemes for a channel

Video Analyse APIs 448


Request URL http://<server>/cgi-bin/devVideoAnalyse.cgi?action=enableScene
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
typeList char[32][16] R For the list of intelligent ["Normal","HeatMap"]
schemes to open, refer to
getSceneList
channel int32 R Video channel, counted from 0 0
Request Example
http://192.168.1.108/cgi-
bin/devVideoAnalyse.cgi?action=enableScene&typeList=[Normal,HeatMap]&channel=0

Response Params ( key=value format in body )


Name Type R/O Description Sample
response char[256] R Result "OK"
"OK" is returned for success, and
DA

"Error" is returned for failure


HU

Response Example
A_

OK
HT
TP

9.6.17 Close Intelligent Schemes


_
AP
I_

Close several intelligent schemes for a channel


V3

Request URL http://<server>/cgi-bin/devVideoAnalyse.cgi?action=disableScene


.3
7

Method GET
fo

Request Params ( key=value format in URL )


rV

Name Type R/O Description Example


el

typeList char[32][16] R For the list of intelligent ["Normal","HeatMap"]


se
n

schemes to close, refer to


gS

getSceneList
dn

channel int32 O Video channel, counted from 0 0


Bh

Request Example
d

http://192.168.1.108/cgi-
bin/devVideoAnalyse.cgi?action=disableScene&typeList=[Normal,HeatMap]&channel=0

Response Params ( OK in body )


Name Type R/O Description Sample
response char[256] R Result "OK"
"OK" is returned for success, and
"Error" is returned for failure
Response Example
OK

9.6.18 Get Algorithm Version Of Channel


Get algorithm version according to channel and algorithm type.

Video Analyse APIs 449


Request URL http://<server>/cgi-bin/api/intelli/getChannelAlgVersion
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Channel int32 R -1 means to obtain all channels. -1
Other values mean corresponding
channels
AlgType char[32] O Refer to VAClassEnum. "Normal"
"Null" or without this field, get all
algorithm version information

Request Example
{
"Channel": -1,
"AlgType": "Normal"
}
DA
HU

Response Params ( JSON format in body )


A_

Name Type R/O Description Example


HT

Info object[][256] R Version information


TP

+ClassType char[32] R Refer to VAClassEnum "Normal"


_

+AlgTypeVersion char[32][256] R Algorithm version information. ["R497490.0_V3.004.0


AP

000000.1.R"]
I_
V3

Response Example
.3

{
7

"Info": [[{
fo

"ClassType": "Normal",
rV

"AlgTypeVersion": ["R497490.0_V3.004.0000000.1.R"]
el
se

},…{}],…[]]
n

}
gS
dn
Bh

9.7 WorkSuitCompareServer
d

9.7.1 Add Compliance Library


Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/createGroup
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Group object R Compliance library group info
+GroupName char[128] R Compliance library group name, up to "takeout"
127 characters.
+CutoutPolicy uint32 O Preferred solution 1
0: Full body
1: Upper body

Video Analyse APIs 450


+Similarity uint8 O Similarity threshold, range [1, 100], 90
default 67
+GroupType enumchar[ O Compliance library group type "BlockListDB"
16] enumchar[16]{
"BlockListDB": Registry (control list)
to save external imported data
}
+GroupDetail char[256] O group remark information "community owner"
+Type enumchar[ O type, default: "WorkSuit" "ClothesCommon"
16] enumchar[16]{
"WorkSuit"
"ClothesCommon"
}
In the future, there may be traffic
police comparison, takeout
comparison and worker comparison,
DA

and "clothescommon" may be used


HU

for comparison through clothing


A_

characteristics
HT

Request Example
TP

{
_

"Group": {
AP

"GroupName": "takeout",
I_
V3

"CutoutPolicy": 1,
.3

"Similarity": 90,
7

"GroupType": "BlockListDB",
fo

"GroupDetail":"community owner",
rV

"Type": "ClothesCommon"
el
se

}
n

}
gS
dn

Response Params ( JSON format in body )


Bh

Name Type R/O Description Example


d

GroupID char[64] R Compliance library group ID "10000"


Response Example
{
"GroupID": "10000"
}

9.7.2 Delete Compliance Library


Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/deleteGroup
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example

Video Analyse APIs 451


GroupID char[64] R Compliance library group ID "000001"
Request Example
{
"GroupID": "000001"
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

9.7.3 Find Compliance Library


Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/findGroup
Method POST
DA

Request Params ( JSON format in body )


HU

Name Type R/O Description Example


A_

GroupID char[64] R Compliance library group ID,"" for "000001"


HT

all Compliance library group IDs


TP

Request Example
_

{
AP

"GroupID": "000001"
I_

}
V3
.3
7

Response Params ( JSON format in body )


fo

Name Type R/O Description Example


rV

GroupList object[64] O List of found compliance library


el

group information
se
n

+GroupID char[64] O Compliance library group ID "000001"


gS

+GroupName char[128] O Compliance library group name, up "taken"


dn

to 127 characters.
Bh

+CutoutPolicy uint32 O Preferred solution 0


d

0: Full body
1: Upper body
+GroupType enumchar[ O Compliance library group type "BlockListDB"
16] enumchar[16]{
"BlockListDB": Registry (control list)
to save external imported data
}
+GroupDetail char[256] O group remark info "community owner"
+GroupSize int O size 30
+Channels int16[1024] O The list of video channel numbers to [0]
which the current group is bound
(see setgroup).
If not associated with any video
channel, it should be [-1]

Video Analyse APIs 452


+Similarity uint8[1024] O It corresponds to the similarity [90]
threshold when Binding video. The
array length is equal to channels. It
is meaningless when no video
channel is bound.
Each value range [1, 100]
+FeatureState uint[4] O The number of work suit in various [10,20,30,40]
states in the group and the work suit
that have not completed modeling
(feature extraction) cannot be
identified by the algorithm
Array subscript correspondence
[0] - the number of work suit ready
for modeling does not guarantee the
success of modeling
[1] - the number of work suit failed
DA

in modeling, the picture does not


HU

meet the algorithm requirements,


A_

and the picture needs to be


HT

replaced
TP

[2] - the number of work suit


_

successfully modeled, and the data


AP

can be used for work suit


I_

identification by algorithm
V3

[3] - the number of models that have


.3
7

been successfully modeled but


fo

become unavailable due to


rV

algorithm upgrade, it will be


el

available after remodeled.


se
n

Response Example
gS

{
dn

"GroupList": [{
Bh

"GroupID": "000001",
d

"GroupName": "taken",
"CutoutPolicy": 0,
"GroupType": "BlockListDB",
"GroupDetail": "community owner",
"GroupSize": 30,
"Channels": [0],
"Similarity": [90],
"FeatureState": [10,20,30,40]
},…{}]
}

9.7.4 Get Compliance Library Arming Information of Channels


Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/getGroup

Video Analyse APIs 453


Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Channel int R Video channel number 0
Request Example
{
"Channel": 0
}

Response Params ( JSON format in body )


Name Type R/O Description Example
GroupList object[128] O List of compliance library group information
+GroupID char[64] O Compliance group ID, up to 63 characters. "001"
+Similarity uint8 O Similarity threshold; value range: 1–100. 80
+CutoutPolicy uint32 O Preferred solution 1
DA

0: Full body
1: Upper body
HU

Response Example
A_

{
HT

"GroupList": [{
TP

"GroupID": "001",
_
AP

"Similarity": 80,
I_

"CutoutPolicy": 1
V3

},…{}]
.3

}
7
fo

9.7.5 Modify Compliance Group Information


rV
el
se

Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/modifyGroup


n gS

Method POST
Request Params ( JSON format in body )
dn

Name Type R/O Description Example


Bh

Group object R Compliance library group info


d

+GroupID char[64] R Compliance group ID, up to 63 "0001"


characters
+GroupName char[128] O Compliance library group name, up to "park"
127 characters.
+Similarity uint8 O Similarity threshold, range [1, 100], 90
default 67
+GroupType enumchar[ O Compliance library group type "BlockListDB"
16] enumchar[16]{
"BlockListDB": Registry (control list) to
save external imported data
}
+GroupDetail char[256] O group remark info "community owner"
Request Example

Video Analyse APIs 454


{
"Group": {
"GroupID": "0001",
"GroupName": "park",
"Similarity": 90,
"GroupType": "BlockListDB",
"GroupDetail": "community owner"
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

9.7.6 Deploy Compliance Library


DA
HU

Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/setGroup


A_

Method POST
HT

Request Params ( JSON format in body )


TP

Name Type R/O Description Example


_
AP

Channel int R video channel number 0


I_

GroupList object[128] O Arming information list: If the list does


V3

not exist, the arming of all compliance


.3

libraries for the channels are deleted.


7

+GroupID char[64] O Compliance group ID, up to 63 "001"


fo
rV

characters
el

+Similarity uint8 O Similarity threshold for each 80


se

compliance group. Action after the


n

comparison similarity is higher than


gS

the threshold
dn

Absence of this field means no


Bh

modification
d

Similarity range [0, 100]


Request Example
{
"Channel": 0,
"GroupList": [{
"GroupID": "001",
"Similarity": 80
},…{}]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example

Video Analyse APIs 455


{}

9.7.7 Find Workwear Information in Compliance Library


Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/startFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Condition object O Search condition.
+GroupID char[128][6 O Array list of compliance library IDs. ["00001","00002"]
4] Each compliance library ID is up to
63 characters.
WorkSuit object O Search condition of workwear
information
+FeatureState uint8 O Feature value status: 1
0: Unknown;
DA

1: Extraction failed;
HU

2: Extracted successfully;
A_

3: Modeled but algorithm upgrade


HT

causes data unavailability and


TP

remodeling is required.
_
AP

Request Example
I_

{
V3

"Condition": {
.3

"GroupID": ["00001","00002"]
7

},
fo
rV

"WorkSuit": {
"FeatureState": 1
el
se

}
n

}
gS
dn

Response Params ( JSON format in body )


Bh

Name Type R/O Description Example


d

Token uint O Token for search task, which is used 2342343


to get search results and stop the
search.
TotalCount int O Total number of results returned. 3333
Response Example
{
"Token": 2342343,
"TotalCount": 3333
}

9.7.8 Get Find Workwear Information Result


Acquire the work uniform information from the search result.
Note: If doFind operation is not performed for 60 seconds, the returned token will be invalid.

Video Analyse APIs 456


Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/doFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Condition object R Search for the input parameter
of work uniform.
+Token uint R Search token. 46878
+BeginNumber uint R Start number of the search. 0
The search starts from the
“beginNumber” records, and
returns predefined number
(count) of records.
0<=beginNumber<= totalCount-
1
+Count int R Number of entries obtained 20
each time.
DA

It should not exceed 50.


HU

+NeedData uint O Image format mask returned by 1


A_

search results.
HT

It is added for IPC. bit0 means


TP

to return the HTTP link of image.


_

For example, 1 only returns


AP

HTTP link. If the field does not


I_
V3

exist, the server decides how to


.3

return it.
7

Request Example
fo

{
rV

"Condition": {
el
se

"Token": 46878,
n

"BeginNumber": 0,
gS

"Count": 20,
dn

"NeedData": 1
Bh

}
d

Response Params ( JSON format in body )


Name Type R/O Description Example
Results object R Output parameter of the search. 0
+Found int R The actual number of entries 1
returned by this search.
+Candidates object[] R Information list of work uniform
to be selected.
Maximum 50 information lists
can be returned at one time.
++WorkSuit object R Searched work uniform 12
information list.

Video Analyse APIs 457


+++UID string O Work uniform identifier. The 0005
maximum length is 31
characters.
+++GroupID string O Compliance database ID. The 10000
maximum length is 63
characters.
+++GroupName string O Name of work uniform group. Group1
+++FeatureState uint O Feature status. 0: Unknown. 1: 0
Extraction failed. 2: Extraction
succeeded. 3: Algorithm
upgrade makes data unavailable
and it needs to be remodeled. 4:
Calculating features.
+++FeatureErrC uint O Recorded reasons for modeling 0
ode failure.
Only valid when FailedCnt is
DA

greater than 0.
HU

0: Unknown (other errors)


A_

1: Modeling failed.
HT

2: System errors (for example,


TP

errors caused by invalid license


_

and unstarted modeling


AP

analyzer).
I_
V3

3: Database operation failed.


.3

4: image decoding failed.


7

5: Multiple targets.
fo

6: No target.
rV
el
se

+++ImagePath string O Work uniform thumbnail path. /mnt/2010/8/1/dav/15:40:


n

50.jpg
gS

+++SourceUID string O Unique identifier of panoramic 1


dn

image. It is generated by the


Bh

platform.
d

+++SourceFileN string O Panoramic image name. aaa


ame
+++Image object O Image information [,]
++++ Width uint O Image width 100
++++ Height uint O Image height 50
++++ Offset uint O Offset in the binary data block 0
++++ Length uint O Image size 10000
Response Example
{
“Results”:{
"Found": 12,
“Candidates”:[{
"WorkSuit": [{
“UID”: “111”,

Video Analyse APIs 458


“GroupID”: “0001”,
“GroupName”: “group1’,
“FeatureState”: 1,
“FeatureErrCode”: 2,
“ImagePath”: "/mnt/2010/8/1/dav/15:40:50.jpg",
“SourceUID”: “1”,
“SourceFileName”: “aaaaa” ,
“Image”: {
“Width”: 1920,
“Height”; 1080,
“Offset”; 0,
“Length”; 1156
},…{}]
}]
}
}
DA
HU
A_

9.7.9 Stop Find Workwear Information


HT
TP

Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/stopFind


_
AP

Method POST
I_

Request Params ( JSON format in body )


V3

Name Type R/O Description Example


.3

Token uint R Token for search task, which is used to 46878


7

get search results and stop the search.


fo
rV

Request Example
el

{
se

"Token": 46878
n gS

}
dn

Response Params ( JSON format in body )


Bh

Name Type R/O Description Example


d

Response Example
{}

9.7.10 Delete Workwear Information


Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/deleteByUID
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
UID char[64][32 O Workwear identifier list, up to 31 ["123", "234"]
] characters.
Request Example
{

Video Analyse APIs 459


"UID": ["123", "234"]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
ErrCode uint[64] O Error code list, indicating error [0,0]
messages when deleting information.
0: Success.
1: The workwear does not exist.
2: Database operation failed.
Response Example
{
"ErrCode": [0,0]
}
DA

9.7.11 Re-extracting Features by Workwear


HU
A_

Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/reAbstract


HT

Method POST
TP

Request Params ( JSON format in body )


_

Name Type R/O Description Example


AP

WorkSuit object[64] O Multiple work suit information, [] means


I_

to reconstruct all work suit with missing


V3

or mismatched feature vectors


.3
7

+UID char[32] O Workwear identifier list; each UID is up "120837"


fo

to 31 characters.
rV

Token uint O The token value of the work clothes 1


el

modeling. The token can be obtained


se
n

through getappendtoken
gS

Request Example
dn

{
Bh

"WorkSuit": [{
d

"UID": "120837"
},…{}],
"Token": 1
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

9.7.12 Stop Re-extracting Workwear Features


Request URL http://<server>/cgi-bin/api/WorkSuitCompareServer/stopReAbstract

Video Analyse APIs 460


Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Request Example
{}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

9.8 Smart Motion Detection

9.8.1 [Config] SmartMotionDetect


DA

Config Data Params


HU

Name Type R/O Description Example


A_

SmartMotionD object[] O PrivacyMasking config, each channel


HT

etect has one config object


TP

+Enable bool O Enable/Disable false


_

+Sensitivity char[16] O Detection sensitivity, can be: "Low", "Middle"


AP

"Middle", "High"
I_

+SmartTrack bool O Enable/Disable smart track true


V3

default false
.3
7

+ObjectTypes object O Detection object type


fo

++Human bool O Whether detect motion of human true


rV

++Vehicle bool O Whether detect motion of vehicle true


el

++Animal bool O Whether detect motion of animal true


se

+Mode char[16] O range { "General", "Agile" } "General"


ngS
dn

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
Bh

are as follows :
d

Get Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=SmartMotionDetect
Get Config Response Example
table.SmartMotionDetect[0].Enable=true
table.SmartMotionDetect[0].Sensitivity=Middle
table.SmartMotionDetect[0].ObjectTypes.Human=true
table.SmartMotionDetect[0].ObjectTypes.Vehicle=true

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&SmartMotionDetect[0].Enable=true&SmartMotionDetect[0].Se
nsitivity=Middle&SmartMotionDetect[0].ObjectTypes.Human=true&SmartMotionDetect[0].ObjectTypes.V
ehicle=true

Video Analyse APIs 461


Set Config Response Example
OK

9.8.2 Start SMD Data Search


Request URL http://<server>/cgi-bin/api/SmdDataFinder/startFind
Method POST
Request Params (JSON format in body)
Name Type R/O Description Example
Condition object R Search conditions
+Channel int32 O Channel number. -1 means searching for 0
all channels
+Channels int[] O Channel number array (starting from 0).
There should be at least one field, Channel
or Channels. Generally, If both Channel
and Channels fields exist, Channels should
DA

prevail.
HU

+SmdType char[8][ O Video type. Array "smdTypeHuman": ["smdTypeHuman",


A_

32] Human. "smdTypeVehicle",


HT

"smdTypeVehicle": Vehicle. "smdTypeHumanAnd


TP

"smdTypeHumanAndVehicle": Human and Vehicle"]


_

vehicle.
AP

+StartTime char[32] O Start time "2017-08-01


I_
V3

00:00:00"
.3

+EndTime char[32] O End time "2017-08-02


7

00:00:00"
fo

+Order char[16] O Search for ordering method.


rV

"ascOrder"
"ascOrder": Ascending order (default
el
se

value).
n

"descOrder": Descending order.


gS

Request Example
dn

{
Bh

"Condition": {
d

"Channel": 0,
"Channels": [0,1,2,5],
"SmdType": ["smdTypeHuman", "smdTypeVehicle", "smdTypeHumanAndVehicle" ],
"StartTime": "2017-08-01 00:00:00",
"EndTime": "2017-08-02 00:00:00",
"Order": "ascOrder"
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Token int O Return searched ID 1
Count int O Total number of searched entries 100

Video Analyse APIs 462


Response Example
{
"Token": 1,
"Count": 100
}

9.8.3 Get SMD Data Search Result


Request URL http://<server>/cgi-bin/api/SmdDataFinder/doFind
Method POST
Request Params (JSON format in body)
Name Type R/O Description Example
Token int R Search ID 1
Offset int32 R Location offset 0
Count int R Number of searched items 100
Request Example
DA

{
HU

"Token": 1,
A_

"Offset": 0,
HT

"Count": 100
TP

}
_AP
I_

Response Params ( JSON format in body )


V3

Name Type R/O Description Example


.3

SmdInfo object[] R It is an array. Each element represents


7

the historical data of a record data at a


fo
rV

certain time.
el

+Channel int32 O Channel number, starting from 0 1


se

+EndTime char[32] O End time. "201 "2017-08-02 00:00:00"


n gS

+Type char[32] O Video type. "smdTypeHuman": "smdTypeHuman"


Human.
dn

"smdTypeVehicle": Vehicle.
Bh

"smdTypeHumanAndVehicle": Human
d

and vehicle.
+StartTime char[32] O Start time 2017-01-01 10:00:
Response Example
{
"SmdInfo": [{
"Channel": 1,
"StartTime": "2017-08-01 00:00:00",
"EndTime": "2017-08-02 00:00:00",
"Type": "smdTypeHuman"
},…{}]
}

Video Analyse APIs 463


9.8.4 End SMD Data Search
Request URL http://<server>/cgi-bin/api/SmdDataFinder/stopFind
Method POST
Request Params (JSON format in body)
Name Type R/O Description Example
Token int O Search ID 1
Request Example
{
"Token": 1
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
DA

{}
HU
A_

9.9 Intelligent analysis tasks


HT
TP
_

9.9.1 Add task


AP
I_
V3

Request URL http://<server>/cgi-bin/api/analyseTaskManager/add


.3

Method POST
7

Request Params ( JSON format in body )


fo
rV

Name Type R/O Description Example


Task object R Task object
el
se

+TaskUserDat char[512] R Task data, add it intact to the "asdvbtgrffg"


n

a response
gS

+SourceType char[32] R Data source type "StreamSource"


dn

Use devVideoAnalyse component


Bh

for local streams (LocalStream),


d

and it is not included in this


component group.
"LocalStream": Local stream
Currently, the local stream is used
only by NVR and SMD. Use
devVideoAnalyse for other cases.
"RemoteStream": Remote real
stream
"LocalVideoFile": Local video files
"LocalPictureFile”: Local picture files
"RemoteVideoFile": Remote video
files
"RemotePictureFile": Remote
picture files

Video Analyse APIs 464


"PushVideoFile": Actively pushed
video files
"PushPictureFile": Actively pushed
picture files
"OffLineVideoFile": Offline video
files (from third parties)
PushPictureFileByRule: Remote
picture files. Rules and picture
information are not included when
adding tasks. Through pushing the
picture interface, each picture is
attached with different rule
information (Used in energy-related
scenes currently).
"IOTData": IoT device data
For active pushed files such as
DA

PushVideoFile, the command does


HU

not specify the file information, but


A_

pushes data through command


HT

such as analysePushVideoFile.
TP

+IsStart bool O Starts immediately after being true


_

created or not
AP

(Valid when the file type is


I_

LocalVideoFile, LocalPictureFile,
V3

RemoteVideoFile, and
.3
7

RemotePictureFile. Add, attach and


fo

then start in case of result loss)


rV

If the value is true, the command


el

will start immediately after being


se

created.
ngS

+LocalStream object O Local real-time video sources


dn

Valid when SouceType is


Bh

LocalStream
d

++Channel int O Video channel 0


++Subtype uint8 O Stream type: 0
0: Main stream
1: Sub stream 1
2: Sub stream 2
+RemoteStrea object O Remote real-time stream source
m Valid when SouceType is
RemoteStream
++Protocol char[32] O Video stream protocol Supported "RTSP"
protocols by now:
"Private"
"RTSP"
"Onvif"
"GB28181"

Video Analyse APIs 465


"HIKVISION"
"BSCP"
++Path char[256] O Video stream URL "rtsp://10.35.114.145:554/
dss/monitor/param?camer
aid=AGfQv8TwA1ALIPO2
9LA9L2&substream=1&tra
ckID=801"
++IP char[64] O IP Address "10.35.114.145"
++Port uint16 O Port 554
++UserName char[64] O Username "admin"
++Password char[64] O Password "admin123"
++Channel int O Video channel 0
++Subtype uint8 O Stream type: 0
0: Main stream
1: Sub stream 1
2: Sub stream 2
DA

++ChannelId char[256] O Platform channel No, used to bind "1000254$1$0$110"


HU

the device channels.


A_

+LocalVideoFil object O Local video file, and only 1 video file


HT

e is supported
TP

Valid when SouceType is


_

LocalVideoFile
AP

++FileID char[128] O File ID "file-1234"


I_

++Path char[260] O File name "/xxxx/a.dav"


V3

+LocalPicture object O Local picture file, and multiple


.3
7

File picture files are supported.


fo

Valid when SouceType is


rV

LocalPictureFile
el

++Files object[] O
se
n

+++FileID char[128] O File ID "file-1234"


gS

+++Path char[260] O File name "/xxxx/a.jpg"


dn

+RemoteVide object O Remote video file, and only 1 video


Bh

oFile file is supported.


d

Valid when SouceType is


RemoteVideoFile
++Protocol char[16] O Protocol for accessing remote files "RTSP"
"RTSP",
"RabbitMq"
"Private"
"Onvif"
"GB28181"
"HIKVISION"
"BSCP"
(FTP and RTSP are expected to be
covered)
++VideoAnaly uint32 O Video analysis progress. When 66
sisProcess SourceType is RemoteVideoFile,

Video Analyse APIs 466


the valid value range is 0–100. 100
means the analysis is compete.
++Path char[260] O File path "rtsp://192.168.1.1:554/xx
xx/a.dav"
++IP char[64] O Remote IP address "192.168.1.1"
++Port int O Remote port 554
++Channel int O Video channel 1
++Subtype uint8 O Stream type: 1
0: Main stream
1: Sub stream 1
2: Sub stream 2
++Username char[64] O Username "admin"
++Password char[64] O Password "123456"
++FileID char[128] O File ID "file-1234"
++StartTime char[64] O Start time "2010-05-25 00:00:00"
++EndTime char[64] O End time "2010-05-25 23:59:59"
DA

+OffLineVideo object O Remote video file, and only 1 video


HU

File file is supported (the file imported


A_

from a third party).


HT

Valid when SouceType is


TP

OffLineVideoFile
_

++Protocol char[16] R Protocol for accessing remote files "RTSP"


AP
I_

RTSP
V3

++FileSize uint64 O File size (in bytes) 1000


.3
7

++VideoAnaly uint32 O Video analysis progress. When 66


fo

sisProcess SourceType is OffLineVideoFile, the


rV

valid value range is 0–100. 100


el

means the analysis is compete.


se
n

++Path char[260] R File path "rtsp://192.168.1.1:554/xx


gS

xx/a.dav"
dn

++IP char[64] R Remote IP address "192.168.1.1"


Bh

++Port int R Remote port 4000


d

++Username char[64] R Username "admin"


++Password char[64] R Password "123456"
++FileID char[128] R File ID "file-1234"
++isReportPT bool O Reports the relative timestamp or true
S not
+RemotePictu object O Remote picture file, and multiple
reFile picture files are supported. The
server must be identical.
Valid when SouceType is
RemotePictureFile
++Protocol char[16] O Protocol for accessing remote files "HTTP"
HTTP, RabbitMq, ActiveMq
(FTP and RTSP are expected to be
covered)

Video Analyse APIs 467


++IP char[64] O Remote IP address "192.168.1.1"
++Port int O Remote port 80
++Username char[64] O Username "admin"
++Password char[64] O Password "123456"
++Files object[] O File list
+++FileID char[128] O File ID "file-1234"
+++Path char[260] O File name "http://192.168.1.1:80/xxx
x/a.jpg"
+Global object O Global settings
++Lanes object[8] O Lane information; each lane
includes 2 border lines.
Maximum length: 8 arrays
For highway all-in-one device, a
channel supports up to 8 pairs of
lane lines.
+++Enable bool O Enable lane true
DA

The rules take effect only when the


HU

lane is enabled. It tackles the


A_

detection errors when a lane is


HT

under construction in a specific


TP

period.
_

When the filed is empty, the lane is


AP

enabled by default.
I_

+++Number int O Lane No. 0


V3

+++LeftLine uint16[20][ O Left lane line. The direction of the


.3
7

2] lane line refers to the lane direction,


fo

and the line at the left side of the


rV

lane is left lane line.


el

The coordinates of the point is


se
n

unified within the range of 0–8192.


gS

+++LeftLineEx uint16[64][ O LeftLineExt is the extension filed of


dn

t 2] LeftLine. When the point number of


Bh

the left lane line is less than 20, use


d

LeftLine only. When the point


number of the left lane line is more
than 20, use LeftLine for the former
20 points, and LeftLineExt for the
rest. LeftLine and LeftLIneExt
comprise the left lane line.
+++LeftLineTy enumchar[ O Attributes of the left lane line "WhiteSolid"
pe 16] enumchar[16]{
"WhiteSolid": White solid line
"WhiteDotted": White dotted line
"Yellow": Yellow line
"UpSolidDownDotted": Solid at the
top and dotted at the bottom

Video Analyse APIs 468


"UpDottedDownSolid": Dotted at the
top and solid at the bottom
+++RightLine uint16[20][ O Right lane line. The direction of the
2] lane line refers to the lane direction,
and the line at the right side of the
lane is right lane line.
The coordinates of the point is
unified within the range of 0–8192.
+++RightLine uint16[64][ O RightLineExt is the extension filed ++++RightLineExt
Ext 2] of RightLine.
+++RightLineT char[16] O Attributes of the right lane line "WhiteSolid"
ype Refer to LeftLineType
++CalibrateAr object[] O Calibration Area
ea An array. Each scene includes
multiple calibration areas. If the file
does not exist, the whole scene is
DA

the calibration area.


HU

CalibrateArea, CalibrateArea1 ……
A_

CalibrateAreaN refers to scene,


HT

scene 1…… scene N.


TP

For highway all-in-one device, a


_

channel supports 1 calibration area.


AP

+++Area uint[20][2] O Calibrates a polygon area, and uses


I_

all.
V3

For highway all-in-one device: 1


.3
7

area.
fo

+++Staffs object[] O Ruler line


rV

A calibration area requires multiple


el

ruler lines.
se
n

Use 4 elements for depth of field


gS

calibration (3 vertical elements and


dn

1 horizontal element)
Bh

Use 2 elements for lane calibration


d

(an element for each side)


No element is needed for license
plate calibration (illegal parking),
and use VideoAnalyseCalibrate to
configure separately.
No element is needed for dual-PTZ
calibration, and draw an area.
LaneNew only covers 1 vertical
straight line segment, and the
coordinates of the vertical straight
line must be entered.
For highway all-in-one device, 1
Staffs for a calibration area.

Video Analyse APIs 469


++++Type enumchar[ O Ruler type "Horizontal"
32] enumchar[32]{
"Horizontal": Horizontal line
segment
"Vertical": Vertical line segment
"Any": Any line segment, unused
"Cross": Cross line segment,
unused
}
For highway all-in-one device (1
staffs): 1 type
++++Start int[2] O Coordinates of the start point [0, 0]
The coordinates is unified within the
range of 0–8192
++++End int[2] O Coordinates of the end point [100, 100]
The coordinates is unified within the
DA

range of 0–8192
HU

++++Length double O Actual length, in meters 1.0


A_

Note: The current system layer


HT

length, in meters
TP

++GlobalDete bool O Enable detection identifiers in the false


_

ctionEnable area
AP

++ObjectArea object[20] O Arrays in the target detection area


I_

+++Area uint16[20][ O Area, refer to the configurations of


V3

2] DetectRegion.
.3
7

+++Type enumchar[ O Target area type "SignalLight"


fo

16] enumchar[16]{
rV

"SignalLight": Signal light


el

"LEDScreen": LED screen


se
n

}
gS

++CameraHei float O Installation height of the camera 6.2


dn

ght in meters
Bh

+Module object O Module configuration


d

++ExcludeReg uint16[][20] O Zones that should be excluded from [, …, ]


ion [2] the detection area, usually zones
that might interfere with the
algorithms. A detection area might
have 0 or more excluded zones.
Array of areas. For the definition of
area, see DetectRegion.
The maximum number depends on
the capability set.
For highway all-in-one device, up to
10 excluded areas are supported.
++SizeFilter SizeFilter O Physical size filter by default. SizeFilter

Video Analyse APIs 470


If both the default object type and a
specific filter are selected, choose
the specific filter.
Highway all-in-one device supports
a maximum box and a minimum
box.
++ObjectFilter object[] O The specific filter for each object. It
is a number.
+++ObjectTyp char[16] O Object type. For available values, "Vechicle"
e see ObjectTypeEnum.
+++SizeFilter SizeFilter O Size filter
+++Enable bool O Enable the size filter of the specific true
object or not
++DetectRegi uint16[20][ O Detection area. Coordinates of the
on 2] peaks of the polygon.
++SpecialDete object[10] O Specifies the general service
DA

ctRegion detection area and exclusion area.


HU

Up to 10 service types are


A_

supported.
HT

+++Type char[16] O Which service scheme category "Normal"


TP

does the detection area parameter


_

suits.
AP

For available values, see


I_

VAClassEnum.
V3

+++DetectReg uint16[10][ O Detection area


.3
7

ion 20][2] The coordinates of the peaks is


fo

unified within the range of 0–8192.


rV

+++ExcludeRe uint16[10][ O Zones that should be excluded from [, …, ]


el

gion 20][2] the detection area, usually zones


se
n

that might interfere with the


gS

algorithms. A detection area might


dn

have 0 or more excluded zones.


Bh

+Rules object[] R Analysis rule


d

++Class char[16] R Analysis category "ObjectDetect"


The values are identical with the
service scheme categories of
VideoAnalyseGlobal.
++Type char[32] R Analysis rule type "ObjectDetect"
The values are identical with the
rule types of ideoAnalyseRule.
++Name char[128] R Rule name. Rule name of devices "GuardLine1"
without presets must be different.
For devices with presets, the rule
name in the same preset must be
different. The name of rules in
different presets can overlap.

Video Analyse APIs 471


++ObjectType char[16][16 O List of detected object types ["Human", "Vehicle"]
s ] Note: Not all rules need the object
type. It is used primarily for the
earliest behavior algorithms. We
recommend you add the parameter
to rule config. Here it is not changed
due to compatibility. It is identical
with VideoAnalyseRule(Base).
When only the object type in the
array is detected, the array cannot
be empty. See
VideoAnalysModule.ObjectType
When ObjectTypes is empty, or
there is unknown filed in the array,
no matter whether there is other
element, it means the classifier is
DA

not enabled.
HU

If Unknown does not exist in the


A_

array, only specific object types will


HT

be detected.
TP

++Config object R For specific rules, see


_

"VideoAnalyseRule(XXXX)
AP

++Experience object[128] O Experience database configuration


I_

Config array
V3

+++ID char[64] O Experience database ID "1"


.3
7

+++Similarity uint8 O Similarity threshold: 67


fo

The range is [1–100], and it is 67 by


rV

default.
el

+++IsPositive bool O True or not: true


se
n

true: True
gS

false: False
dn

+MQConfig char[4096] O MQ configurations. See PaaS ""


Bh

protocol configuration center >


d

Operator configuration. When the


remote access type is RabbitMq or
ActiveMq, try to acquire MQ from
this field. ActiveMq is ised for the
exchange of sensitive information.
+IsRepeat int O Whether repeation is allowed. 0 0
means R, and it is the default value.
1 means no.
Request Example
{
"Task": {
"TaskUserData": "asdvbtgrffg",
"SourceType": "StreamSource",
"IsStart": true,

Video Analyse APIs 472


"LocalStream": {
"Channel": 0,
"Subtype": 0
},
"RemoteStream": {
"Protocol": "RTSP",
"Path":
"rtsp://10.35.114.145:554/dss/monitor/param?cameraid=AGfQv8TwA1ALIPO29LA9L2&substream=1&tr
ackID=801",
"IP": "10.35.114.145",
"Port": 554,
"UserName": "admin",
"Password": "admin123",
"Channel": 0,
"Subtype": 0,
"ChannelId": "1000254$1$0$110"
DA

},
HU

"LocalVideoFile": {
A_

"FileID": "file-1234",
HT

"Path": "/xxxx/a.dav"
TP

},
_

"LocalPictureFile": {
AP

"Files": [{
I_

"FileID": "file-1234",
V3

"Path": "/xxxx/a.jpg"
.3
7

},…{}]
fo

},
rV

"RemoteVideoFile": {
el

"Protocol": "RTSP",
se

"VideoAnalysisProcess": 66,
ngS

"Path": "rtsp://192.168.1.1:554/xxxx/a.dav",
dn

"IP": "192.168.1.1",
Bh

"Port": 554,
d

"Channel": 1,
"Subtype": 1,
"Username": "admin",
"Password": "123456",
"FileID": "file-1234",
"StartTime": "2010-05-25 00:00:00",
"EndTime": "2010-05-25 23:59:59"
},
"OffLineVideoFile": {
"Protocol": "RTSP",
"FileSize": 1000,
"VideoAnalysisProcess": 66,
"Path": "rtsp://192.168.1.1:554/xxxx/a.dav",
"IP": "192.168.1.1",

Video Analyse APIs 473


"Port": 4000,
"Username": "admin",
"Password": "123456",
"FileID": "file-1234",
"isReportPTS": true
},
"RemotePictureFile": {
"Protocol": "HTTP",
"IP": "192.168.1.1",
"Port": 80,
"Username": "admin",
"Password": "123456",
"Files": [{
"FileID": "file-1234",
"Path": "http://192.168.1.1:80/xxxx/a.jpg"
},…{}]
DA

},
HU

"Global": {
A_

"Lanes": [{
HT

"Enable": true,
TP

"Number": 0,
_

"LeftLine": ,
AP

"LeftLineExt": ,
I_

"LeftLineType": "WhiteSolid",
V3

"RightLine": ,
.3
7

"RightLineExt":,
fo

"RightLineType": "WhiteSolid"
rV

},…{}],
el

"CalibrateArea": [{
se

"Area": ,
n
gS

"Staffs": [{
dn

"Type": "Horizontal",
Bh

"Start": [0, 0],


d

"End": [100, 100],


"Length": 1.0
},…{}]
},…{}],
"GlobalDetectionEnable": false,
"ObjectArea": [{
"Area": ,
"Type": "SignalLight"
},…{}],
"CameraHeight": 6.2
},
"Module": {
"ExcludeRegion": [, …, ],
"SizeFilter": SizeFilter,

Video Analyse APIs 474


"ObjectFilter": [{
"ObjectType": "Vechicle",
"SizeFilter":,
"Enable": true
},…{}],
"DetectRegion":,
"SpecialDetectRegion": [{
"Type": "Normal",
"DetectRegion": ,
"ExcludeRegion": [, …, ]
},…{}]
},
"Rules": [{
"Class": "ObjectDetect",
"Type": "ObjectDetect",
"Name": "GuardLine1",
DA

"ObjectTypes": ["Human", "Vehicle"],


HU

"Config": {
A_

},
HT

"ExperienceConfig": [{
TP

"ID": "1",
_

"Similarity": 67,
AP

"IsPositive": true
I_

},…{}]
V3

},…{}],
.3
7

"MQConfig": "",
fo

"IsRepeat": 0
rV

}
el

}
se
n gS

Response Params ( JSON format in body )


dn

Name Type R/O Description Example


Bh

TaskID uint32 O Task ID, > 0. (If it is failed, the result 1234
d

is false)
VirtualChannel uint32 O The corresponding virtual channel 1234
number of the task. The value range
is within the values of
ChannelManager.getVirtualChannel
s.
Path char[256] O RTSP address of the AI stream "rtsp://192.168.1.1:554/xx"
Response Example
{
"TaskID": 1234,
"VirtualChannel": 1234,
"Path": "rtsp://192.168.1.1:554/xx"
}

Video Analyse APIs 475


9.9.2 Attach task result
Subscribe to all results (do not specify TaskID), or subscribe to specific TaskID. If you want to subscribe
to the results of newly created tasks, to avoid event loss, we recommend you not set immediate start
when creating the tasks. You can subscribe to the results first, and then run the start command.
Request URL http://<server>/cgi-bin/api/analyseTaskManager/attachResult
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
TaskID uint[64] O Subscribed TaskID [ 1, 2, 3 ]
When it is not entered, or the array is
empty, the results of all tasks are
subscribed to.
Filters object O Filter conditions for subscription
+Events char[64][32] O Filtered event [ "FaceDetection", … ]
DA

+ImageDataFla uint32 O 0 means containing pictures. It is the 0


g default value.
HU

1 means not containing pictures.


A_

+ImageDataTy char[16][16] O Optional. It is used to combine the ["ObjectImage",


HT

pe images of the event. One- "SceneImage"]


TP

dimensional array. If
_ AP

"ImageDataType” does not exist, it


I_

means reporting all the pictures of


V3

the event. If there is an element in


.3

the array, it reports pictures based


7

on the element requirements. The


fo
rV

value of each element:


el

1. "ObjectImage": Reporting target


se

cutout
n gS

2. "SceneImage": Reporting scene


image
dn

Heartbeat int O Server keep-alive; integer; Unit: s; 5


Bh

The value range is [1–60].


d

For example, if the parameter exists


in the URL and the value is 5, the
device will send “heartbeat” to the
client as a keep-alive message.
Note: The keep-alive message must
be sent before the keepalive
parameter expires.

Request Example
{
"TaskID": [ 1, 2, 3 ],
"Filters": {
"Events": [ "FaceDetection", … ],
"ImageDataFlag": 0,

Video Analyse APIs 476


"ImageDataType": ["ObjectImage", "SceneImage"],
"Heartbeat": 5
}
}

Response Params ( JSON format in body )


Name Name Name Name Name
SID uint32 R Subscribed SID 1234U
Infos object[] O
+TaskID uint O Task ID 1
+TaskUserData char[512] O Task data "asdvbtgrffg"
+UserData char[64] O Video source data, including "asdvbtgrffg"
the video source
information,.and it corresponds
to the UserData field in
addPollingTask.
DA

+TaskCustomDa TaskCustomDa O Custom data


HU

ta ta
A_

+UserDefineDat char[512] O Custom data by the user, and it


HT

a corresponds to the
TP

UserDefineData field in
_

analyseTaskManager.analyseP
AP

ushPictureFileByRule.
I_
V3

+FileID char[128] O File ID. Valid when analyzing "file-1234"


.3

the file, and offered when a file


7

analysis task is complete.


fo

+FileState int O File analysis status: 0


rV

0: Analyzing
el
se

1: Complete
n

2: Failed
gS

+FileAnalyseMs char[256] O Analyzing additional "Decode Failed,


dn

g information, usually the failure Download Failed"


Bh

reason.
d

+Events object[] O Event information, such as


TrafficJunction, HumanTrait
and more. For the format, see
EventInfo in EventManager.
Offered when the analysis
results come out.
Simultaneously reports up to
32 events.
+Flag uint32 O Tag status: 2
1: Unprocessed
2: Valid
3: Invalid
+Image object O Linked snapshots
++Offset uint O Offset of images in binary data 0

Video Analyse APIs 477


++Length uint O Image length (in bytes) 60000
Response Example
HTTP/1.1 200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: close
--<boundary>
Content-Type: application/json
Content-Length: <data length>
{
"SID": 1234U,
"Infos": [
{
"TaskID": 1,
"TaskUserData": "asdvbtgrffg",
"UserData": "asdvbtgrffg",
"TaskCustomData": null,
DA

"FileID": "file-1234",
HU

"FileState": 0,
A_

"FileAnalyseMsg": "Decode Failed, Download Failed",


HT

"Events": [{}],
TP

"Flag": 2,
_

"Image": {
AP

"Offset": 0,
I_

"Length": 60000
V3

}
.3
7

}
fo

]
rV

}
el

--<boundary>
se
n

Content-Type: text/plain
gS

Content-Length: 11
dn

Heartbeat
Bh

--<boundary>
d

9.9.3 Remove task


Request URL http://<server>/cgi-bin/api/analyseTaskManager/remove
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
TaskID uint32 R Task ID 1
Request Example
{
"TaskID": 1
}

Video Analyse APIs 478


Response Params ( JSON format in body )
Name Type R/O Description Example
Response Example
{}

9.9.4 Push Picture File


Valid when data source type is PushPictureFile. support pushing multiple files at the same time, each
file should be completed, not support chunk
Request URL http://<server>/cgi-bin/api/analyseTaskManager/analysePushPictureFile
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
TaskID uint R Task ID 1
DA

Files object[] R File list


HU

URL path and binary data are


A_

supported, but only one way can


HT

be selected at a time
TP

+FileID char[128] R File ID "file-1234"


_

+Url char[512] O Remote file URL , with the "ftp://username:password@


AP

necessary information for access, hostname:port/filepath"


I_

including username, password


V3

+Offset uint O Offset in binary data, bytes 0


.3
7

+Length uint O File size, bytes 256000


fo

+XRayCustom XRayCusto O Customer information, X-ray


rV

Info mInfo machine customization


el

+ModelPath char[512] O Algorithm model path "/aaa/bbb/ccc"


se
n

Request Example
gS

{
dn

"TaskID": 1,
Bh

"Files": [{
d

"FileID": "file-1234",
"Url": "ftp://username:password@hostname:port/filepath",
"Offset": 0,
"Length": 256000,
"XRayCustomInfo": ,
"ModelPath": "/aaa/bbb/ccc"
},…{}]
}
--<boundary>
Content-Type: image/jpeg
Content-Length:<image size>
<JPEG image data>
--<boundary>

Video Analyse APIs 479


Response Params ( JSON format in body )
Name Type R/O Description Example
Response Example
{}

9.10 SceneModeManager

9.10.1 Get Scene Mode Capabilities


Get Scene Mode Capabilities
Request URL http://<server>/cgi-bin/api/SceneModeManager/getCaps
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
DeviceID char[128] O Device ID. "12345678"
DA

For cascading scenarios.


HU

Channel int32 O Video channel number. 0


If - 1, query all channels.
A_

If this field is not available, query


HT

the device scenario mode.


TP

Request Example
_ AP

{
I_

"DeviceID": "12345678",
V3

"Channel": 0
.3

}
7
fo
rV

Response Params ( JSON format in body )


el

Name Type R/O Description Example


se

caps object[102 O
n gS

4]
+SupportedMo char[32][32 O Supported scenario modes. ["AcuPick"]
dn

de ] If this field is not present or empty,


Bh

it indicates that it is not supported.


d

+Channel int32 O Video channel number. 0


If this field is not available, query
the device scenario mode.
Response Example
{
"caps": [{
"SupportedMode": ["AcuPick"],
"Channel": 0
},…{}]
}

Video Analyse APIs 480


9.10.2 Get The Current Scene Mode
Get the current scene mode
Request URL http://<server>/cgi-bin/api/SceneModeManager/getMode
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Channel int32 O Video channel number. 0
If - 1, query all channels.
If this field is not available, query
the device scenario mode.
DeviceID char[128] O Device ID. "12345678"
For cascading scenarios.
Request Example
{
DA

"Channel": 0,
"DeviceID": "12345678"
HU

}
A_
HT

Response Params ( JSON format in body )


TP

Name Type R/O Description Example


_ AP

infos object[] O
I_

+Channel int32 O Video channel number. 0


V3

If this field is not available, query


.3

the device scenario mode.


7
fo

+Mode char[32] R Scene Mode. "None"


rV

Response Example
el

{
se

"infos": [{
n gS

"Channel": 0,
"Mode": "None"
dn

},…{}]
Bh

}
d

9.10.3 Get The Default Scene Mode


Get the default scene mode
Request URL http://<server>/cgi-bin/api/SceneModeManager/getDefault
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Channel int32 O Video channel number. 0
If - 1, query all channels.
If this field is not available, query
the device scenario mode.
DeviceID char[128] O Device ID. "12345678"

Video Analyse APIs 481


For cascading scenarios.
Request Example
{
"Channel": 0,
"DeviceID": "12345678"
}

Response Params ( JSON format in body )


Name Type R/O Description Example
infos object[] O The content is the same as
SceneModeManager.getMode
Response Example
{
"infos": [{
},…{}]
}
DA
HU

9.10.4 Set The Scene Mode


A_
HT

Set the scene mode. To check the mode settings and whether the device needs to be restarted, please
TP

use the DevVariableCapsManager.checkStart。


_

Request URL http://<server>/cgi-bin/api/SceneModeManager/setMode


AP

Method POST
I_

Request Params ( JSON format in body )


V3

Name Type R/O Description Example


.3
7

infos object[102 O The content is the same as return


fo

4] of
rV

"SceneModeManager.getMode".
el

DeviceID char[128] O Device ID. "12345678"


se
n

For cascading scenarios.


gS

Request Example
dn

{
Bh

"infos": [{
d

},…{}],
"DeviceID": "12345678"
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

9.11 ExperienceRegistry

9.11.1 Acquiring Experience Database Capabilities


Acquire the capabilities of the experience database.

Video Analyse APIs 482


Request URL http://<server>/cgi-bin/api/ExperienceRegistry/getCaps

Method POST

Request Params (JSON format in body)

Name Type R/O Description Example

Request Example

{}

Response Params (JSON format in body)

Name Type R/O Description Example


GroupTypeList object[16] O Information on the 0
supported function
DA

databases.
HU

+GroupType enumchar[32] O The type of the function “FilterEvent”


A_

databases.
HT
TP

enumchar[32]{
_AP

“FilterEvent”: The sample


I_

database of filtered
V3

events (enter negative


.3
7

samples for the sub-


fo

attribute when it is false


rV

alarm database). If
el

filtered events for


se

positive samples are


n gS

supported later, sub-


dn

attribute can be
Bh

extended to positive
d

samples.

}
+MaxGroupNum uint32 O The maximum number of 10
groups supported by the
current database.
+PicStorageNum uint32 O The maximum number of 1,000
images that can be
stored in the current
database (the sum of
images in all groups).
+ImportSmallNu uint32 O The maximum number of 50
mber small images that can be
imported at a time.

Video Analyse APIs 483


+ImportBigNumb uint32 O The maximum number of 40
er panoramic images that
can be imported at a
time.
+SinglePicMaxLe int32 O The largest size of a 4096
ngth single panoramic image
that can be imported.
Unit: KB. -1 means there
is no size limit.
+SupportDetectW int8 O Supported import 2
ay methods. Each binary
digit represents different
functions. 1 (0001B):
Supports importing large
images (cutouts are
DA

needed); 2 (0010B):
HU

Supports importing small


A_

images (cutouts are not


needed); 3 (0011B): A
HT

combination of 0001B
TP

and 0010B. It supports


_ AP

importing large and small


I_

images.
V3

+SupportedScene object[64] O Supported business


.3
7

s categories. If the field


fo

does not exist, it means


rV

databases cannot be
el

created by category.
se
n gS

++ClassType char[32] O Solution types. “Normal”


dn

++ClassAlias char[32] O Class alias. If the field “”


Bh

does not exist or if it is ””,


d

it means there is no alias.

++Subclasses bool O Whether there are false


function flag bits. The
client determines
whether to request sub-
functions according to
this flag bit. This field is
used if there is no
SupportedRules.
++FuncList enumchar[16][3 O List of sub-functions. [“Positives”,
2] “Pegative”]
enumchar[16][32]{

Video Analyse APIs 484


“Positives”: Positive
samples.

“Negative”: Negative
samples.

}
++SupportedRule object[16] O The types of rules that
s can be created. If the
field does not exist, it
means that databases
cannot be created by
rule.

+++RuleType char[32] O Rule types. “CrossLineDetection”


DA

+++EventType char[32] O The types of events “CrossLineDetection”


corresponding to the
HU

rules.
A_
HT

+++Subclasses bool O Whether there are false


function flag bits. The
TP

client determines
_
AP

whether to request sub-


I_

functions according to
V3

this flag bit. This filed is


.3

used if there is no
7
fo

SupportedObjects.
rV

+++FuncList enumchar[16][3 O List of sub-functions. [“Positives”,


el

2] “Pegative”]
se

enumchar[16][32]{
n gS
dn

“Positives”: Positive
samples.
Bh
d

“Negative”: Negative
samples.

}
+++SupportedObj object[16] O List of detection target
ects types. If the field does
not exist, it means that it
is not supported.
++++ObjectType enumchar[32] O Types of detection “Human”
targets.

++++Subclasses bool O Whether there are false


function flag bits. The

Video Analyse APIs 485


client determines
whether to request sub-
functions according to
this flag bit.

++++FuncList enumchar[16][3 O List of sub-functions. [“Positives”,


2] “Pegative”]
enumchar[16][32]{

“Positives”: Positive
samples.

“Negative”: Negative
samples.

}
Whether registered
DA

+SupportedChann bool O true


database can be created
HU

el
by channel. true:
A_

supported; false: not


HT

supported. It is not
TP

supported by default.
_ AP

+SupportDispositi bool O Whether channel arming true


I_

on is supported. true:
V3

supported; false: not


.3

supported. It is not
7

supported by default.
fo
rV

Note: If the registered


el
se

database is created with


n

a channel ID, the channel


gS

ID that is used when the


dn

channel is armed must be


Bh

the same.
d

Response Example

{
"GroupTypeList": [
{
"GroupType": "FilterEvent",
"ImportSmallNumber": 50,
"ImportBigNumber": 50,
"SinglePicMaxLength": 50,
"MaxGroupNum": 10,
"PicStorageNum": 1000,

Video Analyse APIs 486


"SupportDetectWay": 2,
"SupportedChannel": true,
"SupportDisposition": true,
"SupportedScenes": [
{
"ClassAlias": "",
"ClassType": "Normal",
"FuncList": [
"Negative"
],
"Subclasses": true,
"SupportedRules": [
DA

{
HU

"RuleType": "CrossLineDetection",
A_

"EventType": "CrossLineDetection",
HT

"FuncList": [
TP
_

"Negative"
AP

],
I_
V3

"Subclasses": true,
.3

"SupportedObjects": [
7
fo

{
rV

"ObjectType": "Human",
el
se

"FuncList": [
ngS

"Negative"
dn

],
Bh

"Subclasses": true
d

}
]
}
]
}
]
}
]
}

Video Analyse APIs 487


9.11.2 Creating Experience Database
Create the experience database.
Request URL http://<server>/cgi-bin/api/ExperienceRegistry/createGroup

Method POST

Request Params (JSON format in body)

Name Type R/O Description Example

Group object R Information on the


experience database.

+GroupName char[128] R Name of the experience Express


database.
DA

+GroupDetail char[256] O Remarks on the "Community


HU

database. Homeowners"
A_

+SampleAttribute uint8 O Sample attributes. 1


HT

1: Positive samples; 2:
TP

Negative samples.
_AP

+GroupType enumchar[32] O The type of the function “FilterEvent”


I_

database.
V3
.3

enumchar[32]{
7
fo
rV

“FilterEvent”: Sample
database of filtered
el
se

events (including positive


n

sample database and


gS

negative sample
dn

database).
Bh
d

}
+Channel int O The channel of the group 0
starting from 0. If this
field does not exist or if it
is -1, it means that it is
not dependent on the
channel.

+ClassType char[32] O Solution types. “Normal”

+RuleType char[32] O Rule types “CrossLineDetection”


+ObjectType char[32] O Types of supported “Human”
detection targets.

Video Analyse APIs 488


+Disposition object[64] O Information on the
channel arming.

+Enable bool O Whether the channel is false


armed. true: armed;
false: not armed.

+DeployedChann int16 O The ID of the video 0


el channel to which the
current group is bound. It
starts from 0.

+Similarity uint8 O The similarity threshold 90


of the feature
comparison
corresponding to the
bound video channel.
DA
HU

Request Example
A_

{
HT

"Group": {
TP
_

"GroupName": "zl",
AP
I_

"GroupDetail": "11",
V3

"SampleAttribute": 1,
.3
7

"GroupType": "FilterEvent",
fo

"Channel": 0,
rV
el

"ClassType": "Normal",
se

"RuleType": "RuleType",
n gS

"ObjectType": "ObjectType",
dn

"Disposition": [
Bh

{
d

"DeployedChannel": 0,
"Similarity": 90,
"Enable" : false
}
]
}
}

Response Params (JSON format in body)

Name Type R/O Description Example

Video Analyse APIs 489


GroupID char[64] R Experience database ID. "11"

Response Example

"GroupID": "34"

9.11.3 Searching for Group Information on Experience Database


Search for the group Information on the experience database.
Request URL http://<server>/cgi-bin/api/ExperienceRegistry/findGroup

Method POST

Request Params (JSON format in body)


DA
HU

Name Type R/O Description Example


A_

+GroupID char[64][64] No Group ID of the ["000001"]


HT

experience database. If
TP

the field is empty or not


_AP

filled in, it means


I_

searching information on
V3

all groups.
.3
7

+GroupType enumchar[32] No The type of the function "FilterEvent"


fo

database.
rV
el

Request Example
se
n

{
gS

"GroupID": [],
dn
Bh

"GroupType": "FilterEvent"
d

Response Params (JSON format in body)

Name Type R/O Description Example

GroupList object[64] O Information list of the


experience database.

+GroupName char[128] O Name of the experience Express


database.

+GroupDetail char[256] O Remarks on the "Community


database. Homeowners"

Video Analyse APIs 490


+SampleAttribute uint8 O Sample attributes. 1
1: Positive samples; 2:
Negative samples.
+GroupType enumchar[32] O The type of the function “FilterEvent”
database.

enumchar[32]{

“FilterEvent”: Sample
database of filtered
events (including positive
sample database and
negative sample
database).
DA

}
HU

+Channel int O The channel of the group. 0


A_

It starts from 0. If this


field does not exist or if it
HT

is -1, it means that it is


TP

not dependent on the


_
AP

channel.
I_
V3

+ClassType char[32] O Solution types. “Normal”


.3
7

+RuleType char[32] O Rule types. “CrossLineDetection”


fo
rV

+ObjectType char[32] O Types of supported “Human”


detection targets.
el
se

+Disposition object[64] O Information on the


ngS

channel arming. Its size


dn

depends on the
capabilities of the video
Bh

channel.
d

+Enable bool O Whether the channel is false


armed. true: armed;
false: not armed.

+DeployedChann int16 O The ID of the video 0


el channel to which the
current group is bound. It
starts from 0.

+Similarity uint8 O The similarity threshold 90


of the feature
comparison

Video Analyse APIs 491


corresponding to the
bound video channel.

Response Example

{
"GroupList": [
{
"GroupName": "zl",
"GroupDetail": "11",
"SampleAttribute": 1,
"GroupType": "FilterEvent",
"Channel": 0,
"ClassType": "Normal",
DA

"RuleType": "RuleType",
HU

"ObjectType": "ObjectType",
A_

"Disposition": [
HT
TP

{
_

"DeployedChannel": 0,
AP
I_

"Similarity": 90,
V3

"Enable": false
.3
7

}
fo
rV

]
el

}
se
n

]
gS

}
dn
Bh

9.11.4 Deleting Information on Experience Database Groups


d

Deleting the information on the experience database groups.


Request URL http://<server>/cgi-bin/api/ExperienceRegistry/deleteGroup

Method POST

Request Params (JSON format in body)

Name Type R/O Description Example

GroupID char[64] R Experience database "1"


group ID.

Request Example

Video Analyse APIs 492


{
"GroupID": “1”
}

Response Params (JSON format in body)

Name Type R/O Description Example

Response Example

{}

9.11.5 Modifying Information on Experience Database Groups


Modify the information on the experience database groups.
DA

Request URL http://<server>/cgi-bin/api/ExperienceRegistry/modifyGroup


HU
A_

Method POST
HT

Request Params ( JSON format in body )


TP
_

Name Type R/O Description Example


AP
I_

Group object R Information on the


V3

experience database.
.3
7

+GroupID char[64] R Experience database ID. "0001"


fo
rV

+GroupName char[128] O Name of the experience Express


el

database.
se
n gS

+GroupDetail char[256] O Remarks on the "Community


database. Homeowners"
dn
Bh

+Disposition object[64] O Information on the


d

channel arming. If this


field does not exist or is
empty, it means not
modifying the arming
information.

+Enable bool O Whether the channel is false


armed. true: armed;
false: not armed.

+DeployedChann int16 O The ID of the video 0


el channel to which the
current group is bound. It
starts from 0.

Video Analyse APIs 493


+Similarity uint8 O The similarity threshold 90
of the feature
comparison
corresponding to the
bound video channel.

Request Example

{
"Group": {
"GroupID": "1",
"GroupName": "zl",
"GroupDetail": "11",
"Disposition": [
DA

{
HU

"DeployedChannel": 0,
A_

"Similarity": 90,
HT

"Enable" : false
TP

}
_
AP

]
I_
V3

}
.3

}
7
fo
rV

Response Params ( JSON format in body )


el
se

Name Type R/O Description Example


n gS

Response Example
dn
Bh

{}
d

9.11.6 Searching for Remaining Storage Size of the Experience


Database

Request URL http://<server>/cgi-bin/api/ExperienceRegistry/getGroupSpaceInfo

Method POST

Request Params (JSON format in body)

Name Type R/O Description Example


GroupType enumchar[32] O The type of the function “FilterEvent”
database.

Video Analyse APIs 494


Request Example

{
"GroupType": "FilterEvent"
}

Response Params (JSON format in body)

Name Type R/O Description Example

TotalSize uint32 O The total storage size 11


(MB) of the experience
database.

FreeSize uint32 O The remaining storage 11


size (MB) of the
DA

experience database.
HU
A_

TotalCount uint32 O The total number of 11


HT

items that can be


imported to the
TP

experience database.
_ AP
I_

FreeCount uint32 O The remaining number of 11


V3

items that can be


.3

imported to the
7

experience database.
fo
rV

Response Example
el
se

{
n gS

"TotalSize": 11,
dn

"FreeSize": 11,
Bh

"TotalCount": 11,
d

"FreeCount": 11
}

9.11.7 Acquiring Additional Tokens


Acquire additional tokens to use them with multiAppend.
Request URL http://<server>/cgi-bin/api/ExperienceRegistry/getDetectToken

Method POST

Request Params (JSON format in body)

Video Analyse APIs 495


Name Type R/O Description Example

Request Example

{}

Response Params (JSON format in body)

Name Type R/O Description Example

Token uint O Detection tokens. 1

Response Example

{
"Token": 17
DA

}
HU
A_

9.11.8 Adding Multiple Experience Database Samples Asynchronously


HT
TP

Add multiple experience database samples asynchronously to use them with getDetectToken.
_ AP

Request URL http://<server>/cgi-bin/api/ExperienceRegistry/multiAppend


I_
V3

Method POST
.3
7

Request Params (JSON format in body)


fo
rV

Name Type R/O Description Example


el
se

PicInfo object[128] O Information on multiple


n gS

images.
dn

+GroupID char[64] R Experience database ID. "1"


Bh

+BigID char[64] O Unique ID of the large "1"


d

image.

+BigName char[64] O Name of the large image. "aaaaa"

+SmallName char[64] O Name of the small image. "aaaaa"

+ObjectRect Rect[32] O The coordinate arrays of [0,0,100,100]


the target rectangular.
The value ranges from 0
to 8191.

+Image object O Image information.

++Width uint16 O Image width. 100

Video Analyse APIs 496


++Height uint16 O Image height. 50

++Offset uint32 O Offset in the binary data 0


blocks.

++Length uint32 O Image size. 100000

++FilePath char[256] O File path. "/mnt/2010/8/1/dav/15:4


1-Supports HTTP URL: 0:50.jpg"
"http://www.dahua.com/
1.jpg"
2-Supports: FTP URL:
"ftp://ftp.dahua.com/1.jp
g"
3-Supports locan path of
the server:
a) "C:/pic/1.jpg"
DA

b)
HU

"/mnt/2010/8/1/dav/15:40:
A_

50.jpg"
HT

It conflicts with Offset


TP

and Length.
_
AP

Info object O Status flag.


I_
V3

+Token uint16 O The token of the image ++Token


.3

import.
7
fo

+State bool O Whether the image ++State


rV

import request is
el
se

finished. true: finished.


n

false: not finished.


gS
dn

+DetectWay int32 O 1: Import large images; 2: ++DetectWay


import small images.
Bh
d

Request Example

Content-Type: application/json
Content-Length: <data length>
{
"PicInfo": [
{
"GroupID": "1",
"BigID": "1",
"BigName": "aaaaa",
"Image": {

Video Analyse APIs 497


"Width": 100,
"Height": 50,
"Offset": 0,
"Length": 100000,
"FilePath": "/mnt/2010/8/1/dav/15:40:50.jpg"
},
"SmallName": "aaaaa",
"ObjectRect": [
[
0,
0,
100,
DA

100
HU

]
A_

]
HT

}
TP
_

],
AP

"Info": {
I_
V3

"Token": 1,
.3

"State": false,
7
fo

"DetectWay": 2
rV

}
el
se

}
n
gS

--<boundary>
dn

Content-Type: image/jpeg
Bh

Content-Length: <image size>


d

<Jpeg image data>


--<boundary>

Response Params (JSON format in body)

Name Type R/O Description Example

ErrCode uint8[128] O Error code. [1, 2]


{
1: Successful.
2: The database ID does
not exist.
3: Incorrect parameters.

Video Analyse APIs 498


4: Failed to perform
operation on the file.
5: Failed to download the
image information.
6: Failed to download the
feature information.
7: Failed to perform
operation on the
database.
8: Unknown error.
9: The quantity exceeds
the limit.
10: Insufficient storage
space.
}
DA

Response Example
HU
A_

{
HT

"ErrCode": [
TP

1,
_
AP

2
I_
V3

]
.3

}
7
fo
rV

9.11.9 Searching for Image Information on the Experience Database


el
se

Search for the image information on the experience database.


n gS

Request URL http://<server>/cgi-bin/api/ExperienceRegistry/startFind


dn

Method POST
Bh
d

Request Params ( SON format in body)

Name Type R/O Description Example

Condition object R Search conditions.

+GroupID char[128][64] R List of database group ["00001","00002"]


IDs.

+FeatureState uint8[5] O The status of feature [1,2]


values.
0: Unknown.
1: Failed to model. The
images might not meet
the requirements and

Video Analyse APIs 499


need to be replaced.
2: There are feature
values that can be used. If
the feature values of one
image has been
calculated, it is enough.
3: Feature values are
being calculated. The
actual calculation process
only takes tens of
milliseconds. It is mainly
used for images that are
placed after the batch
queue when the feature
values are reconstructed
in batches. When there
DA

are no feature values, the


HU

program will switch to


A_

this status.
HT

4: Modeling is complete,
TP

but the data cannot be


_

used due to algorithm


AP

update. Remodeling is
I_
V3

needed.
.3

Request Example
7
fo
rV

{
el

"Condition": {
se

"GroupID": ["00001"]
n gS

},
dn

"FeatureState" : [1,4]
Bh

}
d

Response Params (JSON format in body)

Name Type R/O Description Example

Token uint O Acquired search token. 2342343

TotalCount uint64 O Total number of results 3333


that meet the search
conditions.

Response Example

Video Analyse APIs 500


"Token": 2342343,

"TotalCount": 3333

9.11.10 Reading Search Results of Experience Database Images


Read the search results of the experience database images.
Request URL http://<server>/cgi-bin/api/ExperienceRegistry/doFind

Method POST

Request Params (JSON format in body)

Name Type R/O Description Example

Condition object R Input parameters of the


DA

search.
HU

+Token uint R Search token. 46878


A_
HT

+BeginNumber uint R Starting sequence 0


TP

number of the search. It


_

means that the search


AP

starts from the


I_
V3

beginNumber records,
.3

and returns count


7

records.
fo

0&lt;=beginNumber&lt;=
rV

totalCount-1
el
se

+Count int R Number of entries 20


n gS

acquired each time.


dn

Request Example
Bh
d

{
"Token": 46878,
"BeginNumber": 0,
"Count": 20
}

Response Params (JSON format in body)

Name Type R/O Description Example

Results object R Output parameters of the


search.

Video Analyse APIs 501


+Found int R Number of feature 12
entries found this time.

+PicInfoList object[1024] O List of searched feature


information.

++GroupID char[64] O Database ID. "12"

++SmallID char[64] O Small image ID. "1"

++SmallUrl char[64] O URL of small image. "/mnt/small.jpg"

++SmallImportTi uint32 O The UTC time when the 1634604948


me small image was
imported (unit: second).

++FeatureState uint8 O The status of feature 1


values.
DA

0: Unknown.
HU

1: Failed to model. The


A_

images might not meet


HT

the requirements and


TP

need to be replaced.
_
AP

2: There are feature


I_

values that can be used. If


V3

the feature values of one


.3

image has been


7

calculated, it is enough.
fo
rV

3: Feature values are


el

being calculated. The


se

actual calculation process


n

only takes tens of


gS

milliseconds. It is mainly
dn

used for images that are


Bh

placed after the batch


d

queue when the feature


values are reconstructed
in batche. When there
are no feature values, the
program will switch to
this status.
4: Modeling is complete,
but the data cannot be
used due to algorithm
update. Remodeling is
needed.

Response Example

Video Analyse APIs 502


{
"Results": {
"Found": 12,
"PicInfoList": [
{
"GroupID": "12",
"SmallIID": "1",
"SmallUrl": "/mnt/small.jpg",
"SmallImportTime": 1634604948,
"FeatureState": 2
}
]
DA

}
HU

}
A_
HT

9.11.11 Stopping Searching for Image Information on Experience


TP
_
AP

Database
I_
V3

Stop searching for the image information on the experience database.


.3
7

Request URL http://<server>/cgi-bin/api/ExperienceRegistry/stopFind


fo
rV

Method POST
el
se

Request Params (JSON format in body)


n
gS

Name Type R/O Description Example


dn

Token uint R Search token. 46878


Bh
d

Request Example

{
"Token": 46878
}

Response Params (JSON format in body)

Name Type R/O Description Example

Response Example

{}

Video Analyse APIs 503


9.11.12 Deleting Image Information on the Experience Database
Delete the image information.
Request URL http://<server>/cgi-bin/api/ExperienceRegistry/deleteByFeatureID

Method POST

Request Params ( JSON format in body )

Name Type R/O Description Example

GroupID char[64] O Database ID. "5"

SmallID char[100][64] O Unique ID of the small ["123", "234"]


image.

Request Example
DA

{
HU

"GroupID": "1",
A_
HT

"SmallID": [
TP

"123",
_
AP

"234"
I_

]
V3

}
.3
7
fo
rV

Response Params (JSON format in body)


el
se

Name Type R/O Description Example


n gS

+ErrCode uint[100] O Error code which [1,2]


dn

indicates the deleting


Bh

result.
d

1: Successful.
2: The feature ID does not
exist.
3: Failed to perform
operation on the
database.
4: Failed to update the
arming database.
5: Failed to perform
operation on the storage
service.

Video Analyse APIs 504


6: The image does not
exist.

Response Example

"ErrCode": [

1,

9.11.13 Subscribing Feature Extraction Results


DA

Subscribe to feature extraction progress and use it with multiAppend, reAbstract and groupReAbstract.
HU

Request URL http://<server>/cgi-bin/api/ExperienceRegistry/attachFeatureState


A_

Method POST
HT
TP

Request Params (JSON format in body)


_ AP

Name Type R/O Description Example


I_
V3

Tokens uint[32] O Search token. If this field [23, 25]


.3

does not exist, it means


7

subscribe all tokens.


fo
rV

Heartbeat int O The keep-alive time of 5


el

the server keep-alive. It is


se

an integer (unit: second).


n gS

The value range is [1,60].


dn

For example, if URL


comes with this
Bh

parameter and the value


d

is 5, it means that the


device sends a keep-alive
message to the client
every 5 seconds, and the
keep-alive message is
"Heartbeat".
Note: The keep-alive
message must be sent
before the keep-alive
time expires.

Request Example

Video Analyse APIs 505


HTTP/1.1 200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: close
--<boundary>
Content-Type: application/json
Content-Length: <data length>
{
"SID": 1234U,
"Infos": [
{
"TaskID": 1,
"TaskUserData": "asdvbtgrffg",
DA

"UserData": "asdvbtgrffg",
HU

"TaskCustomData": null,
A_

"FileID": "file-1234",
HT
TP

"FileState": 0,
_

"FileAnalyseMsg": "Decode Failed, Download Failed",


AP
I_

"Events": [{}],
V3

"Flag": 2,
.3
7

"Image": {
fo
rV

"Offset": 0,
el

"Length": 60000
se

}
n
gS

}
dn

]
Bh

}
d

--<boundary>
Content-Type: text/plain
Content-Length: 11
Heartbeat
--<boundary>

Response Params ( JSON format in body )

Name Type R/O Description Example

Video Analyse APIs 506


SID uint32 R Subscription ID. 1234

info object R The pushed data content.

+Progress uint8 O Modelling progress 34


[0,100]

+Token uint32 O Subscription token. 1

+SucceedCnt uint O The number of items that 100


are successfully modeled.

+FailedCnt uint O The number of items that 20


failed to be modeled.

+FailedPicDetails object[100] O The details of the images


failed to be modelled in
the current sending
DA

progress.
HU
A_

++BigName char[64] No The name of the image to "aaaaa"


HT

be imported.
TP

++SmallName char[64] O Name of the small image. "aa_1.jpg"


_
AP

++ErrCode uint8 O Error code. 1


I_

{
V3

1: Modeling failed.
.3
7

2: System errors (for


fo
rV

example, errors caused


by invalid license and
el
se

unstarted modeling
n

analyzer).
gS
dn

3: Failed to perform
operation on the
Bh

database.
d

4: The number of image


exceeds the limit.
5: The remaining storage
space is insufficient.
6: Failed to decode the
image.
7: Failed to verify the
image resolution.
8: No targets were
detected.
9: Failed to write the
image files.

Video Analyse APIs 507


10: Failed to download
the images through
HTTP.
11: Requests other than
HTTP are not supported.
}

Response Example

HTTP/1.1 200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: close
--<boundary>
Content-Type: application/json
DA

Content-Length: <data length>


HU

{
A_

"SID": 123,
HT

"info": {
TP

"Progress": 34,
_ AP

"Token": 1,
I_
V3

"SucceedCnt": 100,
.3

"FailedCnt": 20,
7
fo

"FailedPicDetails": [
rV

{
el
se

"SmallName": "aaaaa",
n
gS

"BigName": "aaaaa",
dn

"ErrCode": 1
Bh

}
d

]
}
}
--<boundary>
Content-Type: text/plain
Content-Length: 11
Heartbeat
--<boundary>

Video Analyse APIs 508


9.11.14 Remodeling Experience Database

The feature vectors of the images are stored in the database after the calculation of the algorithm database. The
feature vectors need to be reconstructed after the algorithm is updated. Non-blocking interface used with
attachFeatureState.
Request URL http://<server>/cgi-bin/api/ExperienceRegistry/reAbstract

Method POST

Request Params (JSON format in body)

Name Type R/O Description Example

GroupID char[64] O Database ID. "00001"

PicInfoList object[100] O Information on multiple


DA

images.
HU

+SmallID char[64] O Reconstruct by the "120837"


A_

unique ID of the small


HT

image.
TP

Request Example
_ AP
I_

{
V3

"GroupID": "00001",
.3
7

"PicInfoList": [
fo

{
rV
el

"SmallID": "111"
se

}
n gS

]
dn

}
Bh
d

Response Params (JSON format in body)

Name Type R/O Description Example

Token uint32 O The token of the image 1


modeling.

Response Example

{
"Token": 1
}

Video Analyse APIs 509


9.11.15 Modeling All Items in the Experience Databases
The functions are the same as that of reAbstract interface. This is to remodel all items by database.
Request URL http://<server>/cgi-bin/api/ExperienceRegistry/groupReAbstract

Method POST

Request Params (JSON format in body)

Name Type R/O Description Example

GroupID char[64][64] O List of group IDs. There ["00001"]


must be at least one
group ID.

Request Example
DA

{
HU

"GroupID": [
A_

"00001"
HT

]
TP
_

}
AP
I_
V3

Response Params (JSON format in body)


.3
7

Name Type R/O Description Example


fo
rV

Token uint32 O The token of the image 1


el

modeling.
se
n

Response Example
gS
dn

{
Bh

"Token": 1
d

9.11.16 Unbinding Experience Databases


Remove all rule binding information of the database/
Request URL http://<server>/cgi-bin/api/ExperienceRegistry/unbind

Method POST

Request Params (JSON format in body)

Name Type R/O Description Example

Video Analyse APIs 510


GroupID char[64][64] O List of group IDs. There ["00001"]
must be at least one
group ID.

Request Example

{
"GroupID": [
"00001"
]
}

Response Params ( JSON format in body )

Name Type R/O Description Example


DA
HU

Response Example
A_

{}
HT
TP

9.11.17 Searching for Records of Suspected False Alarm Events


_AP
I_

Search for the records of suspected false alarm events.


V3

Request URL http://<server>/cgi-bin/api/ExperienceRegistry/startFindFilterEvent


.3
7
fo

Method POST
rV

Request Params (JSON format in body)


el
se

Name Type R/O Description Example


n gS

Condition object O Search conditions.


dn
Bh

+StartTime char[20] O Start time. "2012-01-04 00:00:00"


d

+EndTime char[20] O End time. "2012-01-04 23:59:59"

Request Example

{
"Condition": {
"StartTime": "2012-01-04 00:00:00",
"EndTime": "2012-01-04 23:59:59"
}
}

Response Params (JSON format in body)

Video Analyse APIs 511


Name Type R/O Description Example

Token uint32 R Acquired search token. 123

TotalCount uint32 R Total number of results 23


that meet the search
conditions.

Response Example

{
"Token": 123,
"TotalCount": 23
}

9.11.18 Reading Search Results for Suspected False Alarm Events


DA
HU

Read the search results for the suspected false alarm events.
A_

Request URL http://<server>/cgi-bin/api/ExperienceRegistry/doFindFilterEvent


HT
TP

Method POST
_ AP

Request Params (JSON format in body)


I_
V3

Name Type R/O Description Example


.3
7

Condition object R Input parameters of the


fo

search.
rV
el

+Token uint32 R Search token. 123


se
n

+BeginNumber uint32 R Starting sequence 0


gS

number of the search. It


dn

means that the search


Bh

starts from the


d

beginNumber records,
and returns count
records.
0<=BeginNumber<=
TotalCount-1

+Count uint32 R Number of entries 20


acquired each time.

Request Example

{
"Condition": {
"Token": 123,

Video Analyse APIs 512


"BeginNumber": 0,
"Count": 20
}
}

Response Params (JSON format in body)

Name Type R/O Description Example

Results object O Output parameters of the


search.

+Found uint32 O Total number of entries 12


found this time.

+Info object[1000] O The suspected false


DA

alarm events that were


HU

found.
A_
HT

++EventType char[32] O Event type. "CrossLineDetection"


TP

++ClassType char[32] O Category of the AI event. "Normal"


_AP

++UTC uint32 O The UTC time when the 152463285


I_

event occurred with zone


V3

deviation (unit: second).


.3
7
fo

++RuleType char[32] O Rule types. "CrossLineDetection"


rV

Response Example
el
se

{
n gS

"Results": {
dn

"Found": 12,
Bh

"Info": [
d

{
"EventType": "CrossLineDetection",
"ClassType": "Normal",
"UTC": 152463285,
"RuleType": "CrossLineDetection"
}
]
}
}

Video Analyse APIs 513


9.11.19 Stopping Searching for Records of Suspected False Alarm
Events
Stop searching for the records of the suspected false alarm events.
Request URL http://<server>/cgi-bin/api/ExperienceRegistry/stopFindFilterEvent

Method POST

Request Params (JSON format in bod )

Name Type R/O Description Example

Token uint32 R Search token. 123

Request Example
DA

{
HU

"Token": 123
A_

}
HT
TP
_

Response Params (JSON format in body)


AP
I_

Name Type R/O Description Example


V3
.3

Response Example
7
fo

{}
rV
el
se
n
gS
dn
Bh
d

Video Analyse APIs 514


Video Analyse APIs 515
d
Bh
dn
ngS
se
el
rV
fo
7
.3
V3
I_
_AP
TP
HT
A_
HU
DA
10 Intelligent Traffic APIs

10.1 Intelligent Traffic Event

10.1.1 [Event] TrafficJunction


Event Code TrafficJunction
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
DA

+GroupID int O The id of event group.


+CountInGroup int O Event count in the event group. 1
HU

The index of this event in the event 1


A_

+IndexInGroup int O
group, start from 1.
HT

+Lane int O Lane number, start from 0. 0


TP

Trigger type. It can be: 0 — car


_

+TriggerType int O
AP

detector, 1—radar, 2—video.


I_

+Speed int O Vehicle speed, unit is km/hour.


V3

+Vehicle object O The information of vehicle object.


.3

The detected car bounding box, 4


7

interge, refer to x's value of left-top


fo
rV

point, y's value of left-top point, x's


++BoundingBox int[4] R
el

value of right-bottom point, y's


se

value of right-bottom point.


n gS

Coordinate remap to 0 — 8192.


++Text char[] O Vehicle logo.
dn

++SubText char[] O Vehicle sub logo.


Bh

++SubBrand int O Vehicle sub brand index.


d

++BrandYear int O Vehicle brand year index.


+TrafficCar object O Traffic Car info.
++RecNo int R The record id.
++PlateNumber char[] R Car plate number.
++PlateType char[] O Plate type.
char[] Plate color, ex: "Yellow", "Blue", … "Yellow"
++PlateColor O
etc.
Vehicle color, ex: "Yellow",
++VehicleColor char[] O
"Blue", … etc.
The detected plate bounding box, 4
interge, refer to x's value of left-top
++BoundingBox int[4] R
point, y's value of left-top point, x's
value of right-bottom point, y's

Intelligent Traffic APIs 516


value of right-bottom point.
Coordinate remap to 0 — 8192.
Country info. Max string length is
++Country char[] O
19.
++Speed int O Vehicle speed, unit is km/hour.
The event info, ex: "TrafficJunction"
++Event char[] O
"TrafficJunction".
+CommInfo object O Traffic event common info.
++Seat object[] O Vehicle front seat info.
Front seat type. It can be: "Main"
+++Type char[] O
"Main""Slave".
Some driver status. It can be some
+++Status char[][] O of the following: "Smoking",
"Calling".
Sunshade status. It can be: "WithSunShade"
+++SunShade string O "Unknow", "WithSunShade",
DA

"WithoutSunShade".
HU

The detected sun shade bounding


A_

box, 4 interge, refer to x's value of


HT

left-top point, y's value of left-top


TP

+++ShadePos int[4] O point, x's value of right-bottom


_

point, y's value of right-bottom


AP

point. Coordinate remap to 0 —


I_

8192.
V3

SafeBelt status. It can be: WithoutSafeBelt


.3
7

+++SafeBelt char[] O "Unknow", "WithSafeBelt",


fo

"WithoutSafeBelt".
rV
el

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
se
n

4.4.3 snap subscription )


gS

--<boundary>
dn

Content-Type: text/plain
Bh

Content-Length: <length>
d

Events[0].EventBaseInfo.Code=TrafficJunction
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].GroupID=123
Events[0].CountInGroup=3
Events[0].IndexInGroup=1
Events[0].Lane=0
Events[0].Vehicle.BoundingBox[0]=1341
Events[0].Vehicle.BoundingBox[1]=2451
Events[0].Vehicle.BoundingBox[2]=4513
Events[0].Vehicle.BoundingBox[3]=4135
Events[0].Vehicle.Text=Audi
Events[0].Vehicle.SubText=A6L

Intelligent Traffic APIs 517


Events[0].Vehicle.SubBrand=5
Events[0].Vehicle.BrandYear=2
Events[0].TrafficCar.RecNo=123
Events[0].TrafficCar.PlateNumber=AC00003
Events[0].TrafficCar.PlateColor=Yellow
Events[0].TrafficCar.VehicleColor=Blue
Events[0].TrafficCar.BoundingBox[0]=1341
Events[0].TrafficCar.BoundingBox[1]=2451
Events[0].TrafficCar.BoundingBox[2]=4513
Events[0].TrafficCar.BoundingBox[3]=4135
Events[0].TrafficCar.Country=China
Events[0].CommInfo.Seat[0].Type=Main
Events[0].CommInfo.Seat[0].Status[0]=Smoking
Events[0].CommInfo.Seat[0].SunShade=WithSunShade
Events[0].CommInfo.Seat[0].ShadePos[0]=2021
Events[0].CommInfo.Seat[0].ShadePos[1]=3041
DA

Events[0].CommInfo.Seat[0].ShadePos[2]=2151
HU

Events[0].CommInfo.Seat[0].ShadePos[3]=3661
A_

Events[0].CommInfo.Seat[0].SafeBelt=WithoutSafeBelt
HT


TP

--<boundary>
_

Content-Type: image/jpeg
AP

Content-Length: <image size>


I_
V3

<Jpeg image data>


.3
7

--<boundary>
fo
rV

10.1.2 [Event] TrafficRetrograde


el
se

When detects vehicle retrograde, send this event.


ngS

Event params is the same as TrafficJunction, except for event Code is TrafficRetrograde.
dn
Bh

10.1.3 [Event] TrafficJam


d

When detects traffic jam, send this event.


Event Code TrafficJam
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
+GroupID int O The id of event group. 123
+CountInGroup int O Event count in the event group. 1
The index of this event in the event 1
+IndexInGroup int O
group, start from 1.
+Lane int O Lane number, start from 0. 0
+StartJaming int O Start jam time, UTC seconds. 123456789

Intelligent Traffic APIs 518


+AlarmInterval int O Alarm interval, unit is second. 180
+JamLenght int O Jam length, percentage of the lane. 70
+JamRealLengt 120
int O Jam real length, unit is metre.
h

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Events[0].EventBaseInfo.Code=TrafficJam
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].GroupID=123
Events[0].CountInGroup=3
DA

Events[0].IndexInGroup=1
HU

Events[0].Lane=0
A_

Events[0].StartJaming=123456789
HT

Events[0].AlarmInterval=180
TP

Events[0].JamLenght=70
_

Events[0].JamRealLength=120
AP


I_

--<boundary>
V3

Content-Type: image/jpeg
.3
7

Content-Length: <image size>


fo
rV

<Jpeg image data>


el

--<boundary>
se
n gS

10.1.4 [Event] TrafficUnderSpeed


dn
Bh

When detects vehicle under speed, send this event.


d

Event params is the same as TrafficJunction, except for event Code is TrafficUnderSpeed, and
add following params:
Event Code TrafficUnderSpeed
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
Speed limit, 2 integer, min speed [60,120]
+SpeedLimit int[2] O
and max speed.
+UnderSpeedin 20
int O Percentage of under speed.
gPercentage
The other event parameters are the
+…
same as TrafficJunction

Intelligent Traffic APIs 519


Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Events[0].EventBaseInfo.Code=TrafficUnderSpeed
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].GroupID=123
Events[0].CountInGroup=3
Events[0].IndexInGroup=1
Events[0].Lane=0
Events[0].Vehicle.BoundingBox[0]=1341
Events[0].Vehicle.BoundingBox[1]=2451
Events[0].Vehicle.BoundingBox[2]=4513
DA

Events[0].Vehicle.BoundingBox[3]=4135
HU

Events[0].Vehicle.Text=Audi
A_

Events[0].Vehicle.SubText=A6L
HT

Events[0].Vehicle.SubBrand=5
TP

Events[0].Vehicle.BrandYear=2
_

Events[0].TrafficCar.RecNo=123
AP

Events[0].SpeedLimit[0]=60
I_

Events[0].SpeedLimit[1]=120
V3

Events[0].UnderSpeedingPercentage=20
.3
7


fo

--<boundary>
rV

Content-Type: image/jpeg
el

Content-Length: <image size>


se
ngS

<Jpeg image data>


dn

--<boundary>
Bh

10.1.5 [Event] TrafficOverSpeed


d

When detects vehicle over speed, send this event.


Event params is the same as TrafficJunction, except for event Code is TrafficOverSpeed, and
add following params:
Event Code TrafficOverSpeed
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
Speed limit, 2 integer, min speed [60,120]
+SpeedLimit int[2] O
and max speed.

Intelligent Traffic APIs 520


+UnderSpeedin 20
int O Percentage of over speed.
gPercentage
The other event parameters are the
+…
same as TrafficJunction

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Events[0].EventBaseInfo.Code=TrafficOverSpeed
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].GroupID=123
Events[0].CountInGroup=3
DA

Events[0].IndexInGroup=1
HU

Events[0].Lane=0
A_

Events[0].Vehicle.BoundingBox[0]=1341
HT

Events[0].Vehicle.BoundingBox[1]=2451
TP

Events[0].Vehicle.BoundingBox[2]=4513
_

Events[0].Vehicle.BoundingBox[3]=4135
AP

Events[0].Vehicle.Text=Audi
I_

Events[0].Vehicle.SubText=A6L
V3

Events[0].Vehicle.SubBrand=5
.3
7

Events[0].Vehicle.BrandYear=2
fo

Events[0].TrafficCar.RecNo=123
rV

Events[0].SpeedLimit[0]=60
el

Events[0].SpeedLimit[1]=120
se
n

Events[0].UnderSpeedingPercentage=20
gS


dn

--<boundary>
Bh

Content-Type: image/jpeg
d

Content-Length: <image size>

<Jpeg image data>


--<boundary>

10.1.6 [Event] TrafficPedestrain


Event Code TrafficPedestrain
Event action Pulse
Event index 0
Event Data
Name Type R/O Description Example
+GroupID int O The id of event group. 123

Intelligent Traffic APIs 521


+CountInGroup int O Event count in the event group. 3
+IndexInGroup int O The index of this event in the event 1
group, start from 1.
+Lane int O Lane number, start from 0. 0
+Vehicle object O Actually this is the human that
detected, not vehicle.
++Category char[] R Must be "Passerby", means this Passerby
actually is a human.
++BoundingBox int[4] R The detected car bounding box, 4 []
interge, refer to x's value of left-top
point, y's value of left-top point, x's
value of right-bottom point, y's
value of right-bottom point.
Coordinate remap to 0 — 8192.

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
DA

4.4.3 snap subscription )


HU

--<boundary>
A_

Content-Type: text/plain
HT

Content-Length: <length>
TP
_

Events[0].EventBaseInfo.Code=TrafficPedestrain
AP

Events[0].EventBaseInfo.Action=Pulse
I_

Events[0].EventBaseInfo.Index=0
V3

Events[0].GroupID=123
.3
7

Events[0].CountInGroup=3
fo

Events[0].IndexInGroup=1
rV

Events[0].Lane=0
el

Events[0].Vehicle.Category=Passerby
se
n

Events[0].Vehicle.BoundingBox[0]=1341
gS

Events[0].Vehicle.BoundingBox[1]=2451
dn

Events[0].Vehicle.BoundingBox[2]=4513
Bh

Events[0].Vehicle.BoundingBox[3]=4135
d


--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>

<Jpeg image data>


--<boundary>

10.1.7 [Event] TrafficParking


When detects vehicle illegal parking, send this event.
Event params is the same as TrafficJunction, except for event Code is TrafficParking, and
remove param "speed", add following params:

Intelligent Traffic APIs 522


Event Code TrafficParking
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
The start time of parking, UTC 6538920
+StartParking int O
seconds.
+AlarmInterval int O The alarm interval. 180
+ParkingAllowed 1600
int O The allowed time of parking.
Time
The other event parameters are the
+…
same as TrafficJunction

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )
--<boundary>
DA

Content-Type: text/plain
HU

Content-Length: <length>
A_
HT

Events[0].EventBaseInfo.Code=TrafficParking
TP

Events[0].EventBaseInfo.Action=Pulse
_

Events[0].EventBaseInfo.Index=0
AP

Events[0].GroupID=123
I_

Events[0].CountInGroup=3
V3

Events[0].IndexInGroup=1
.3
7

Events[0].Lane=0
fo

Events[0].Vehicle.BoundingBox[0]=1341
rV

Events[0].Vehicle.BoundingBox[1]=2451
el

Events[0].Vehicle.BoundingBox[2]=4513
se
n

Events[0].Vehicle.BoundingBox[3]=4135
gS

Events[0].Vehicle.Text=Audi
dn

Events[0].Vehicle.SubText=A6L
Bh

Events[0].Vehicle.SubBrand=5
d

Events[0].Vehicle.BrandYear=2
Events[0].TrafficCar.RecNo=123
Events[0].StartParking=6538920
Events[0].AlarmInterval=180
Events[0].ParkingAllowedTime=1600

--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>

<Jpeg image data>


--<boundary>

Intelligent Traffic APIs 523


10.2 Traffic Flow

10.2.1 [Event] TrafficFlowStat


When traffic flow trigger the rule, send this event
Event Code TrafficFlowStat
Event action Start/Stop
Event index 0
Event Data
Name Type R/O Description Example
+FlowStates object[] R Traffic flow info, each object in list
is traffic flow info about one lane.
++Lane int R Lane number, start from 0. 0
++Flow int R Traffic flow number. 50
++Period int R Traffic stat time, unit is minute. 5
DA

++PeriodByMili int O Traffic stat time, unit is 655


HU

millisecond, value should between


A_

0 and 59999.
HT

++DrivingDirecti char[][] O Driving direction, should be an [ "Approach",


TP

on array of three strings: "XXXCity", "YYYCity"]


_ AP

 1st string: direction, can be:


"Approach", "Leave"
I_
V3

 2nd string: Approach position


.3

name
7

 3rd string: Leave position


fo

name
rV
el
se

Event Response Example ( multipart , JSON format in body ) ( response to 4.9.17 event
n gS

subscription )
dn

--<boundary>
Bh

Content-Type: text/plain
d

Content-Length: xxxx

Code=TrafficFlowStat;action=Pulse;index=0;data={
"FlowStates": [ { "Lane": 0,
"Flow": 50,
"Period": 5,
"DrivingDirection": [ "Approach", "XXXCity", "YYYCity"]
}, {…}, … ]
}
--<boundary>

10.2.2 Find Traffic Flow History


Request URL http://<server>/cgi-bin/recordFinder.cgi?action=find

Intelligent Traffic APIs 524


Method GET
Request Params ( key=value format in URL)
Name Type R/O Description Example
name char[] R The name of record table. It should be TrafficFlow
"TrafficFlow".
count int O Max result to return, default is 1024. 100
StartTime char[] O The start of the record's CreateTime. 123456700
EndTime char[] O The End of the record's CreateTime. 123456800
condition object O Search condition.
+Channel int O Video channel index which starts from 0. 0
+Lane int O Lane index, starts from 0. 0
Request Example
http://192.168.1.108/cgi-
bin/recordFinder.cgi?action=find&name=TrafficFlow&condition.Channel=0&condition.Lane=0&StartTi
me=123456700&EndTime=123456800&count=100
DA

Response Params ( key=value format in body )


HU

Name Type R/O Description Example


A_

totalCount int O Total record num that find. 1000


HT

found int O Record num that returned. 100


TP

records object[] R The records that returned.


_

+RecNo int R Record id. 12345


AP

+CreateTime int R The create time of record. 123456789


I_
V3

+StatisticsTime int R Traffic flow statistics time, UTC seconds. 123456789


.3

+Period int R Statistics period, unit is second. 300


7

+Channel int R Video channel index which starts from 0. 0


fo

+Lane int R Lane index, starts from 0. 0


rV

+Vehicles int R Total vehicle num. 220


el

+AverageSpee float O Average speed of the vehicle, -1 means no 21.8


se
n

d vehicle, 0 means congestion.


gS

Response Example
dn

totalCount=1000
Bh

found=100
d

records[0].RecNo=12345
records[0].CreateTime=123456789
records[0].StaticsticsTime=123456789
records[0].Period=300
records[0].Channel=0
records[0].Lane=0
records[0].Vehicles=250
records[0].AverageSpeed=25.4

records[1].RecNo=13579
records[1].CreateTime=123456799
records[1].StaticsticsTime=123456799
records[1].Period=300
records[1].Channel=0

Intelligent Traffic APIs 525


records[1].Lane=0
records[1].Vehicles=220
records[1].AverageSpeed=21.8

10.2.3 Start Traffic Statistics Search


Request URL http://<server>/cgi-bin/api/trafficFlowStat/startFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
condition object R Traffic flow statistical conditions
+StartTime systemtime R Start time, accurate to hour "2010-05-25 00:00:00"
+EndTime systemtime R End time, accurate to hour "2010-05-25 23:59:59"
+Channel int O Channel number 0
+Lane int O Lane number 0
DA

+Lanes int[] O Lane number array, supports data [0]


HU

search by multiple lanes


A_

+ClassType int O As video metadata and road 1


HT

monitoring use the same database


TP

table, they need to be distinguished


_
AP

according to their types (0


represents video metadata and 1
I_
V3

represents road monitoring).


.3

+Granularity enumchar[ O The granularity of statistical "Hour"


7

8] information that needs to be


fo
rV

returned in the searching process.


This needs to be supported by
el
se

getCaps.
n

Enumchar[8]{
gS

"Minute": By 5 minutes (hourly


dn

report)
Bh

"Hour": By hour (daily report)


d

"Day": By day (monthly report)


"Month": By month (yearly report)
}
The default value is Hour.
+PresetID int[] O Preset [1]
+Direction enumchar[ O Search by statistical direction "Both"
16] enumchar[16]{
"Both"
"LeftToRight"
"RightToLeft"
}
+Channels int[256] O Channel number array. Used in [0,1,2,5]
structured traffic statistics. In multi-
channel query, the channel number

Intelligent Traffic APIs 526


is distributed to query the total data
of all channels
There must be at least one channel
and channels field. Generally, they
should not both exist. If both exist,
channels shall prevail.
Request Example
{
"condition": {
"StartTime": "2010-05-25 00:00:00",
"EndTime": "2010-05-25 23:59:59",
"Channel": 0,
"Lane": 0,
"Lanes": [0],
"ClassType": 1,
"Granularity": "Hour",
DA

"PresetID": [1],
HU

"Direction": "Both",
A_

"Channels": [0,1,2,5]
HT

}
TP

}
_
AP

Response Params ( JSON format in body )


I_
V3

Name Type R/O Description Example


.3

token uint O token 2342343


7

totalCount uint O Total number of results that meet the 333


fo

query criteria
rV

Response Example
el
se

{
n

"token": 2342343,
gS

"totalCount": 333
dn

}
Bh
d

10.2.4 Get Traffic Statistics


Request URL http://<server>/cgi-bin/api/trafficFlowStat/doFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
token uint R Search token. 46878
beginNumber uint R Search begin number. 0
That is to start from the beginNumber
records, fetch the count records, and
return.
0<=beginNumber<=totalCount-1

Intelligent Traffic APIs 527


count uint R Number of traffic statistic entries per 24
search
Request Example
{
"token": 46878,
"beginNumber": 0,
"count": 24
}

Response Params ( JSON format in body )


Name Type R/O Description Example
found int R Number of entries that are searched 12
info Info[] R Traffic statistics (For details, see traffic- [, … ]
flow statistics status information
structure in standard.)
Response Example
DA

{
HU

"found": 12,
A_

"info": [{
HT

"PresetID" : 1
TP

"DrivingDirection" : ["Approach", "XXXCity", "YYYCity"],


_

"Lane" : 1,
AP

"MachineAddress" : "XXX District, YYY Road",


I_

"MachineName" : "Device001",
V3

"UTC" : 1465389203,
.3

"UTCMS" : 123,
7

……
fo

},…{}]
rV

}
el
se
n

10.2.5 End Traffic Statistics Search


gS
dn

Request URL http://<server>/cgi-bin/api/trafficFlowStat/stopFind


Bh

Method POST
d

Request Params ( JSON format in body )


Name Type R/O Description Example
token uint R Search token. 46878
Request Example
{
"token": 46878
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

Intelligent Traffic APIs 528


10.3 Traffic Record

10.3.1 Insert Traffic BlockList/AllowList Record


Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=insert
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
The record table name, TrafficBlackList
name char[] R "TrafficBlackList" for BlockList and
"TrafficRedList" for AllowList.
char[] The number of car plate, max string AC00001
PlateNumber R
length is 31. It must be unique.
MasterOfCar char[] O The car owner, max string length is 15
char[] Plate color, max string length is 31, ex: Yellow
DA

PlateColor O
"Yellow", "Blue", … etc.
HU

PlateType char[] O Plate type, max string length is 31.


A_

VehicleType char[] O Vehicle type, max string length is 31.


HT

char[] Vehicle color, max string length is 31. ex: Yellow


VehicleColor O
TP

"Yellow", "Blue", … etc.


_

char[] "2010-05-25
AP

BeginTime O Begin time, ex: "2010-05-25 00:00:00".


00:00:00"
I_

char[] "2010-06-25
V3

CancelTime O Cancel time, ex: "2010-06-25 00:00:00".


00:00:00"
.3
7

Authority list, only valid for


fo

AuthorityList object O
"TrafficRedList" table.
rV

+OpenGate bool O Authority to open the gate. true


el

Request Example
se
n

http://192.168.1.108/cgi-
gS

bin/recordUpdater.cgi?action=insert&name=TrafficBlackList&PlateNumber=AC00001&MasterOfCar=
dn

ZhangSan&PlateColor=Yellow&VehicleColor=Blue&BeginTime=2011-01-
Bh

01%2012:00:00&CancelTime=2011-01-10%2012:00:00
d

Response Params ( key=value format in body )


Name Type R/O Description Example
The new record’s id, return -1 if the device 12345
RecNo int R
handles asynchronously.
Response Example
RecNo=12345

10.3.2 Update Traffic BlockList/AllowList Record


Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=update
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example

Intelligent Traffic APIs 529


The record table name, TrafficBlackList
name char[] R "TrafficBlackList" for BlockList and
"TrafficRedList"for AllowList.
recno int R record id 12345
char[] The number of car plate, max string AC00001
PlateNumber R
length is 31. It must be unique.
MasterOfCar char[] O The car owner, max string length is 15
char[] Plate color, max string length is 31, ex: Yellow
PlateColor O
"Yellow", "Blue", … etc.
PlateType char[] O Plate type, max string length is 31.
VehicleType char[] O Vehicle type, max string length is 31.
char[] Vehicle color, max string length is 31. ex: Yellow
VehicleColor O
"Yellow", "Blue", … etc.
char[] "2010-05-25
BeginTime O Begin time, ex: "2010-05-25 00:00:00".
00:00:00"
char[] "2010-06-25
DA

CancelTime O Cancel time, ex: "2010-06-25 00:00:00".


00:00:00"
HU

Authority list, only valid for


AuthorityList object O
A_

"TrafficRedList" table.
HT

+OpenGate bool O Authority to open the gate. true


TP

Request Example
_

http://192.168.1.108/cgi-
AP

bin/recordUpdater.cgi?action=update&name=TrafficBlackList&recno=12345&PlateNumber=AC00001
I_

&MasterOfCar=ZhangSan&PlateColor=Yellow&VehicleColor=Blue&BeginTime=2011-01-
V3

01%2012:00:00&CancelTime=2011-01-10%2012:00:00
.3
7
fo

Response Params ( OK in body )


rV

Response Example
el

OK
se
n gS

10.3.3 Remove Traffic BlockList/AllowList Record


dn
Bh

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=remove


d

Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
The record table name, TrafficBlackList
name char[] R "TrafficBlackList"for BlockList and
"TrafficRedList"for AllowList.
recno int R The record id. 12345
Request Example
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=remove&name=TrafficBlackList&recno=12345

Response Params ( OK in body )


Response Example
OK

Intelligent Traffic APIs 530


10.3.4 Find Traffic BlockList/AllowList Record
Request URL http://<server>/cgi-bin/recordFinder.cgi?action=find
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
The record table name, TrafficBlackList
name char[] R "TrafficBlackList"for BlockList and
"TrafficRedList"for AllowList.
count int O Max result to return, default is 1024. 100
StartTime string O The start of the record's CreateTime. 123456700
EndTime string O The end of the record's CreateTime. 123456800
condition object O Search condition.
Car plate number, max string length is AC00001
+PlateNumber char[] O
47.
DA

Car plate number substring, match any


+PlateNumber
HU

char[] O car plate number that contain this


Vague
substring, max string length is 47.
A_

+PlateNumber Car plate number substring array, max


HT

char[][] O
VagueGroup string length is 47.
TP

+QueryCount int O Query count, default is 1000. 500


_ AP

+QueryResult Begin number in the result set, default is 0


int O
I_

Begin 0.
V3

Request Example
.3

http://192.168.1.108/cgi-
7
fo

bin/recordFinder.cgi?action=find&name=TrafficBlackList&condition.PlateNumber=AC00001&StartTim
rV

e=123456700&EndTime=123456800&count=100
el
se

Response Params ( key=value format in body )


n gS

Name Type R/O Description Example


totalCount int O Total record num that find. 1000
dn

found int O Record num that returned. 100


Bh

records object[] R The records that returned.


d

+RecNo int R Record id. 12345


+CreateTime int R The create time of record. 123456789
+PlateNumber char[] R Car plate number. AC00001
+MasterOfCar char[] O Car owner. ZhangSan
…<see above insert command for other
+… - -
params of the record>
Response Example
totalCount=1000
found=100
records[0].RecNo=12345
records[0].CreateTime=123456789
records[0].PlateNumber=AC00001
records[0].MasterOfCar=ZhangSan

Intelligent Traffic APIs 531



records[1].RecNo=13579
records[1].CreateTime=123456799
records[1].PlateNumber=AC00001
records[1].MasterOfCar=LiSi

10.3.5 RemoveEx Traffic BlockList/AllowList Record


Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=removeEx
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
The record table name, TrafficBlackList
name char[] R "TrafficBlackList"for BlockList and
"TrafficRedList"for AllowList.
DA

recno int O The record id. 12345


HU

PlateNumber string O The number of car plate, max string AC00001


A_

length is 31. It must be unique.


HT

Request Example
TP

http://192.168.1.108/cgi-
_

bin/recordUpdater.cgi?action=removeEx&name=TrafficBlackList&PlateNumber=AC00001
AP
I_

Response Params ( OK in body )


V3

Response Example
.3
7

OK
fo
rV

10.3.6 Import Traffic BlockList/AllowList


el
se
n

 Import the traffic blocklist and allowlist


gS

Upload a blocklist or allowlist file to the device, and then import the data into the device. This
dn

operation might take a long time.


Bh

Request URL http://<server>/cgi-bin/trafficRecord.cgi?action=uploadFile&Type=<Type>


d

Method POST
Request Params ( key=value format in URL ; binary data in body )
Name Type R/O Description Example
Type char[16] R File type, value: "TrafficBlackList"
"TrafficBlackList” Traffic blocklist
"TrafficRedList" Traffic allowlist
format char[16] R File format, fixed to "CSV” "CSV”
code char[16] R Encoding format, the value is "utf-8" or "utf-8"
"GB2312”
Request Example
POST http://192.168.1.108/cgi-bin/trafficRecord.cgi?action=uploadFile&Type=TrafficBlackList&forma
t=CSV&code=utf-8 HTTP/1.1
User-Agent: Client/1.0

Intelligent Traffic APIs 532


Content-Type: multipart/form-data; boundary=<boundary>
Content-Length:XXXX

--<boundary>
Content-Disposition: form-data; name="blackfile"; filename="TrafficBlackList.CSV"
Content-Type: application/vnd.ms-excel

<File data….>
--<boundary>--

Response Params ( OK in body )


Response Example
OK

10.3.7 Export Traffic BlockList/AllowList


DA

 Asynchronously export traffic blocklist and allowlist


HU

Notify the device to export the traffic blocklist and allowlist to the file. This operation is non-blocking.
A_

To obtain the export result, please run the“getFileExportState” command.


HT

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=exportAsyncFile&name=<Name>


TP

Method GET
_ AP

Request Params ( key=value format in URL )


I_

Name Type R/O Description Example


V3

name char[16] R File type, value: "TrafficBlackList"


.3

"TrafficBlackList” Traffic blocklist


7
fo

"TrafficRedList" Traffic allowlist


rV

filename char[256] O Export Filename "RecordFile01"


el

format char[16] R File format, fixed to "CSV” CSV


se

code char[16] R Encoding format, the value is "utf-8" "utf-8"


ngS

or "GB2312”
dn

Request Example
http://<server>/cgi-
Bh

bin/recordUpdater.cgi?action=exportAsyncFile&name=TrafficBlackList&filename=RecordFile01&form
d

at=CSV&code=utf-8

Response Params ( OK in body )


Response Example
OK
 Get the status of the exported traffic blocklist and allowlist
Get the result of the exported traffic blocklist and allowlist
Request URL http://<server>/cgi-
bin/recordUpdater.cgi?action=getFileExportState&name=<Name>
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example

Intelligent Traffic APIs 533


name char[16] R File type, value: "TrafficBlackList"
"TrafficBlackList” Traffic blocklist
"TrafficRedList" Traffic allowlist
Request Example
http://<server>/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=TrafficBlackList

Response Params ( key=value format in body )


Name Type R/O Description Example
state int R Exporting status: 1
0: Success
1: Failure
2: running
3: the file is invalid
4: the file is too large
5: the file has duplicate data
Response Example
DA

state=0
HU

 Download the exported traffic blocklist and allowlist file


A_

Download the exported traffic blocklist and allowlist file


HT
TP

Request URL http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=<Type>


_

Method GET
AP

Request Params ( key=value format in URL )


I_

Name Type R/O Description Example


V3

Type char[16] O File type, value: "TrafficBlackList"


.3
7

"TrafficBlackList”: Traffic blocklist


fo

"TrafficRedList": Traffic allowlist


rV

filename char[256] O The exported file name must be the "RecordFile01"


el

same as the file name used in the


se

export command(exportAsyncFile).
n gS

Request Example
dn

http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficBlackList&filename=Recor
Bh

dFile01
d

Response Params ( binary in body )


Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: application/octet-stream
Content-Length: xxx

<File Data…>

10.3.8 Export Traffic Flow


 Export traffic flow records

Intelligent Traffic APIs 534


Notify the device to export the traffic flow records to the file. This operation is non-blocking. To
obtain the export result, please run the“getFileExportState” command.
Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=exportAsyncFile&name=TrafficFlo
w
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name char[16] R File type, fixed value: "TrafficFlow” "TrafficFlow"
filename char[256] O Name of the exported file "RecordFile01"
format char[16] R Format of the exported file, fixed to CSV
"CSV”
code char[16] R Encoding format of the exported file, "utf-8"
the value is "utf-8" or "GB2312”
Request Example
http://<server>/cgi-bin/recordUpdater.cgi?action=exportAsyncFile&name=TrafficFlow&filename=Reco
DA

rdFile01&format=CSV&code=utf-8
HU

Response Params ( OK in body )


A_

Response Example
HT

OK
TP

Get the exported traffic flow record results


_


AP

Get the exported traffic flow record results


I_
V3

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=TrafficF


.3

low
7

Method GET
fo
rV

Request Params ( key=value format in URL )


Name Type R/O Description Example
el
se

name char[16] R File type, fixed value: "TrafficFlow” "TrafficFlow"


n

Request Example
gS

http://<server>/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=TrafficFlow
dn
Bh

Response Params ( key=value format in body )


d

Name Type R/O Description Example


state int R Export status, the value is 0: success, 1
1: failure, 2: running, 3: the file is
invalid, 4: the file is too large, 5: the
file has duplicate data
Response Example
state=0
 Download Export 0 traffic flow records File
Download the exported traffic flow log file
Request URL http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficFlow
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example

Intelligent Traffic APIs 535


Type char[16] O File type, fixed value: "TrafficFlow” "TrafficFlow"
filename char[256] O The exported file name must be the "RecordFile01"
same as the file name used in the
export command (exportAsyncFile).
Request Example
http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficFlow&filename=RecordFil
e01

Response Params ( binary in body )


Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: application/octet-stream
Content-Length: xxx

<File Data…>
DA
HU

10.3.9 Export Traffic Snap Event Info


A_
HT

 Export traffic snapshot event records


TP

Notify the device to export the traffic snapshot event records to the file. This operation is non-
_ AP

blocking. To obtain the export result, please run the “getFileExportState” command.
I_

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=exportAsyncFileByConditon&nam


V3

e=TrafficSnapEventInfo
.3

Method GET
7
fo

Request Params ( key=value format in URL )


rV

Name Type R/O Description Example


el

name char[16] R File type, fixed value: "TrafficSnapEventInf


se

"TrafficSnapEventInfo" o"
n gS

filename char[256] O Export Filename "RecordFile01"


dn

format char[16] R File format, fixed to "CSV" CSV


code char[16] R Encoding format, the value is "utf-8" or "utf-8"
Bh

"GB2312"
d

condition object R Data Conditions


+startTime char[16] R Export the Start time, local UTC seconds "1465389120"
+endTime char[16] R Export the End time, local UTC seconds "1465399120"
Request Example
http://<server>/cgi-bin/recordUpdater.cgi?action=exportAsyncFileByConditon&name=TrafficSnapEve
ntInfo&filename=RecordFile01&format=CSV&code=utf-8&condition.startTime=1465389120&conditio
n.endTime=1465399120

Response Params ( OK in body )


Response Example
OK
 Obtain and export traffic snapshot event record results
Obtain and export traffic snapshot event record results

Intelligent Traffic APIs 536


Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=TrafficS
napEventInfo
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name char[16] R File type, fixed value: "TrafficSnapEventInfo"
"TrafficSnapEventInfo"
Request Example
http://<server>/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=TrafficSnapEventInfo

Response Params ( key=value format in body )


Name Type R/O Description Example
state int R Export status, the value is 0: success, 1
1: failure, 2: running, 3: the file is
invalid, 4: the file is too large, 5: the file
has duplicate data
DA

Response Example
HU

state=0
A_

 Download the exported traffic snapshot event record file


HT

Download the exported traffic snapshot event record file


TP
_

Request URL http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficSnapEve


AP

ntInfo
I_

Method GET
V3

Request Params ( key=value format in URL )


.3
7

Name Type R/O Description Example


fo

Type char[16] O File type, fixed value: "TrafficSnapEventInfo"


rV

"TrafficSnapEventInfo”
el

filename char[256] O The exported file name must be the "RecordFile01"


se

same as the file name used in the


n gS

export command
dn

(exportAsyncFileByConditon).
Bh

Request Example
d

http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficSnapEventInfo&filename=
RecordFile01

Response Params ( binary in body )


Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: application/octet-stream
Content-Length: xxx

<File Data…>

Intelligent Traffic APIs 537


10.4 Traffic Snap Operation

10.4.1 Open Strobe


Request URL http://<server>/cgi-bin/trafficSnap.cgi?action=openStrobe
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R video channel index which starts from 1
1.
info object R info
openType char[] R For now, the value is fixed to "Normal" "Normal"
plateNumber char[] R the plateNumber of the TrafficCar. 046XRW
Request Example
http://192.168.1.108/cgi-
DA

bin/trafficSnap.cgi?action=openStrobe&channel=1&info.openType=Normal&info.plateNumber=046X
HU

RW
A_
HT

Response Params ( OK in body )


TP

Response Example
_

OK
AP
I_

10.4.2 Close Strobe


V3
.3
7

Request URL http://<server>/cgi-bin/api/trafficSnap/closeStrobe


fo

Method POST
rV

Request Params ( JSON format in body )


el

Name Type R/O Description Example


se
n

info object O close strobe params null


gS

+location int32 O lane number, default 0 0


dn

Request Example
Bh

{
d

"info": {
"location": 0
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

10.4.3 Open/Close Unlicensed Vehicle Detection


Request URL http://<server>/cgi-bin/trafficSnap.cgi?

Intelligent Traffic APIs 538


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
action char[] R this value can be open and close open
channel int R video channel index which starts from 1
1.
name char[] R name UnlicensedVehicle
Request Example
http://192.168.1.108/cgi-bin/trafficSnap.cgi?action=open&channel=1&name=UnlicensedVehicle

Response Params ( OK in body )


Response Example
OK

10.4.4 Manual Snap


DA
HU

Take a snapshot manually. For intelligent traffic device, it should use this method to take a snapshot.
A_

But, the response is not image data.If you want to get the image data, please follow these steps:
HT

1. Use the method mentioned chapter (4.4.3 Subscribe to snapshot) to subscribe the image data,
TP

and the eventcode is "TrafficManualSnap".


_ AP

2. Use the "manSnap"to take a snapshot manually.


I_
V3

3. In the connection which built in the Step 1, the device will send the image data.
.3

Request URL http://<server>/cgi-bin/trafficSnap.cgi?action=manSnap


7
fo

Method GET
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Example


se

channel int R video channel index which starts from 1


n gS

1.
Request Example
dn

http://192.168.1.108/cgi-bin/trafficSnap.cgi?action=manSnap&channel=1
Bh
d

Response Params ( OK in body )


Response Example
OK

10.5 Traffic Parking

10.5.1 Get the Specific Parking Space Status


Request URL http://<server>/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus
Method GET
Request Params ( key=value format in URL )

Intelligent Traffic APIs 539


Name Type R/O Description Example
channel int32 O video channel index which starts from 1. 1
condition object O
+Lane int[] O The Lane value which starts from 0. [1,2]
+ResponseLev 0
int O The Level value , refer to condition
el
Request Example
http://192.168.1.108/cgi-
bin/trafficSnap.cgi?action=getParkingSpaceStatus&condition.Lane[0]=0&condition.Lane[1]=255

Response Params ( key=value format in body )


Name Type R/O Description Example
status object[] O
+Lane int O lane number 1
+PictureId uint O picture id 123456
+TrafficCar TrafficCar O car info
DA

++… the members refer to TrafficCar


HU

Response Example
A_

status[0].Lane=0
HT

status[0].PictureId=5
TP

status[0].TrafficCar.CountInGroup=1
_


AP

status[1].Lane=1
I_
V3

status[1].PictureId=4
status[1].TrafficCar.CountInGroup=1
.3
7


fo
rV

10.5.2 Get All Status of Parking Spaces


el
se
n

Request URL http://<server>/cgi-bin/trafficParking.cgi?action=getAllParkingSpaceStatus


gS

Method GET
dn

Request Params ( key=value format in URL )


Bh

Name Type R/O Description Example


d

Request Example
http://192.168.1.108/cgi-bin/trafficParking.cgi?action=getAllParkingSpaceStatus

Response Params ( key=value format in body )


Name Type R/O Description Example
status object[] O
+Lane int32 O 0
+CustomParkN char[32] O "A2701"
o
+Status enumcha O status "Park"
r[8] Enumchar[8]{
Park
NoPark
}

Intelligent Traffic APIs 540


+SpaceType enumint O 0: trolley parking space, 1: Crane parking 0
space
+Plate char[64] O car plate number "ZA888"
+Time uint64 O enter time 1678778135
+Enable bool O enable/disable true
sceneType enumcha O scene type; "ParkingStatistics"
r[32] "parkingspace": parking space detection
type; and "parkingstatistics": parking
space statistics type
statisticsMode enumcha O s Statistical mode, valid when the "AreaMode"
r[32] sceneType is "parkingstatistics".
enumchar[32]{
"AreaMode"
"SpaceMode"
}
areaStatus object[10] O area status. It is an array. It is valid when
DA

scenetype is "parkingstatistics" and


HU

statisticsmode is "areamode"
A_

+Name char[32] O name "A01"


HT

+Count uint32 O total count 10


TP

+SpaceType enumint O parking space type: 0: trolley parking 0


_

space, 1: Crane parking space


AP

+RemainCnt int32 O remain count 5


I_

Response Example
V3

status[0].Lane=0
.3
7

status[0].CustomParkNo = A2701
fo

status[0].Status = Park
rV

status[0].SpaceType = 0
el


se
n

status[1].Lane=1
gS

status[1]. Status = NoPark


dn


Bh

sceneType = ParkingStatistics
d

statisticsMode = AreaMode
areaStatus[0].Name = A01
areaStatus[0].Count = 10
areaStatus[0].SpaceType = 0
areaStatus[0].RemainCnt = 5

areaStatus[1].Name = A02
areaStauts[1].Count = 20

10.5.3 [Config] Parking Space Light State


Use this method. It can get the light state config. For example, it can know that when the space is free,
then the light should be green, and the space is full, the light should be red.

Intelligent Traffic APIs 541


Config Data Params
Name Type R/O Description Example
ParkingSpaceLight object O Parking space indicator light
State
+SpaceFree object O light color when the parking
space was in idle status.
++Red enumint O red light 0
enumint{
0: off
1: on
2: flshing
}
++Yellow enumint O enumint{ 0
0: off
1: on
2: flshing
DA

}
HU

++Blue enumint O enumint{ 0


A_

0: off
HT

1: on
TP

2: flshing
_

}
AP

++Green enumint O enumint{ 1


I_

0: off
V3

1: on
.3
7

2: flshing
fo

}
rV

++Purple enumint O enumint{ 0


el

0: off
se
n

1: on
gS

2: flshing
dn

}
Bh

++White enumint O enumint{ 0


d

0: off
1: on
2: flshing
}
++Pink enumint O enumint{ 0
0: off
1: on
2: flshing
}
++Cyan enumint O enumint{ 0
0: off
1: on
2: flshing
}

Intelligent Traffic APIs 542


++Color char[8][32] O Color range: ["Green","Off"]
"Off"
"Red"
"Yellow"
"Blue"
"Green"
"Purple"
"White"
"Pink"
"Cyan"
"Off"
+SpaceFull object O light color when the parking
space was occupied
refer to SpaceFree
+SpaceOverLine object O light color when the parking
space was pressing line
DA

refer to SpaceFree
HU

+SpaceOrder object O light color when the parking


A_

space was Scheduled


HT

refer to SpaceFree
TP

+NetworkException object O light color when network was


_

aborted
AP

++NetPortAbort object[] O refer to SpaceFree


I_

+SpaceSpecial object O light color of special space


V3

refer to SpaceFree
.3
7

+SpaceCharging object O light color of charging parking


fo

space
rV

refer to SpaceFree
el

+SpaceAbnormity object O light color when the parking


se
n

space was abnormal.


gS

refer to SpaceFree
dn

+AbnormalAlarm object O Abnormal


Bh

++VideoBlind object O light color when video blind


d

refer to SpaceFree
+SpaceFreeMode enumint O 0: Long on, 1: Flashing, 2: Off 1
Default 0
+SpaceFullMode enumint O When the parking space is full, 2
the indicator light mode is: 0:
permanently on, 1: flashing, and
2: off Default 0

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=ParkingSpaceLightState
Get Config Response Example
table.ParkingSpaceLightState.SpaceFree.Blue=0

Intelligent Traffic APIs 543


table.ParkingSpaceLightState.SpaceFree.Green=1
table.ParkingSpaceLightState.SpaceFree.Pink=0
table.ParkingSpaceLightState.SpaceFree.Purple=0
table.ParkingSpaceLightState.SpaceFree.Red=0
table.ParkingSpaceLightState.SpaceFree.White=0
table.ParkingSpaceLightState.SpaceFree.Yellow=0
table.ParkingSpaceLightState.SpaceFull.Blue=0
table.ParkingSpaceLightState.SpaceFull.Green=0
table.ParkingSpaceLightState.SpaceFull.Pink=0
table.ParkingSpaceLightState.SpaceFull.Purple=0
table.ParkingSpaceLightState.SpaceFull.Red=1
table.ParkingSpaceLightState.SpaceFull.White=0
table.ParkingSpaceLightState.SpaceFull.Yellow=0
table.ParkingSpaceLightState.SpaceOrder.Blue=0
table.ParkingSpaceLightState.SpaceOrder.Green=0
table.ParkingSpaceLightState.SpaceOrder.Pink=0
DA

table.ParkingSpaceLightState.SpaceOrder.Purple=0
HU

table.ParkingSpaceLightState.SpaceOrder.Red=0
A_

table.ParkingSpaceLightState.SpaceOrder.White=0
HT

table.ParkingSpaceLightState.SpaceOrder.Yellow=1
TP

table.ParkingSpaceLightState.SpaceOverLine.Blue=0
_

table.ParkingSpaceLightState.SpaceOverLine.Green=0
AP

table.ParkingSpaceLightState.SpaceOverLine.Pink=0
I_

table.ParkingSpaceLightState.SpaceOverLine.Purple=0
V3

table.ParkingSpaceLightState.SpaceOverLine.Red=0
.3
7

table.ParkingSpaceLightState.SpaceOverLine.White=0
fo

table.ParkingSpaceLightState.SpaceOverLine.Yellow=1
rV

table.ParkingSpaceLightState.SpaceSpecial.Blue=0
el

table.ParkingSpaceLightState.SpaceSpecial.Green=0
se

table.ParkingSpaceLightState.SpaceSpecial.Pink=0
ngS

table.ParkingSpaceLightState.SpaceSpecial.Purple=0
dn

table.ParkingSpaceLightState.SpaceSpecial.Red=0
Bh

table.ParkingSpaceLightState.SpaceSpecial.White=0
d

table.ParkingSpaceLightState.SpaceSpecial.Yellow=1

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&ParkingSpaceLightState.SpaceFree.Blue=1&ParkingSpaceLig
htState.SpaceFree.Green=0&ParkingSpaceLightState.SpaceFree.Pink=0&ParkingSpaceLightState.Spa
ceFree.Purple=0&ParkingSpaceLightState.SpaceFree.Red=0&ParkingSpaceLightState.SpaceFree.Whi
te=0&ParkingSpaceLightState.SpaceFree.Yellow=0
Set Config Response Example
OK

10.5.4 Set Order State


Request URL http://<server>/cgi-bin/trafficParking.cgi?action=setOrderState

Intelligent Traffic APIs 544


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
state object[] R state info
+Lane int R for now, fixed to 0 0
+State char[] R the value can be "Ordered"or "Free". Ordered
Request Example
http://192.168.1.108/cgi-
bin/trafficParking.cgi?action=setOrderState&state[0].Lane=0&state[0].State=Ordered

Response Params ( OK in body )


Response Example
OK

10.5.5 Set Light State


DA

Request URL http://<server>/cgi-bin/trafficParking.cgi?action=setLightState


HU

Method GET
A_

Request Params ( key=value format in URL )


HT

Name Type R/O Description Example


TP

state object[] R state info


_

+LightNo int R the No. of the Lane. 0


AP

+Color char[] R it can be Red, Yellow, Blue, Green, Ordered


I_
V3

Purple, White, Pink.


+State int O it can be 0, 1, 2.0 means close;1
.3
7

means open;2 means twinkle;


fo

+Enable bool O true or false, enable or not.


rV

Request Example
el

http://192.168.1.108/cgi-
se
n

bin/trafficParking.cgi?action=setLightState&state[0].LightNo=0&state[0].Color=Red&state[0].State=0&
gS

state[0].Enable=true
dn
Bh

Response Params ( OK in body )


d

Response Example
OK

10.5.6 [Config] Parking Space Access Filter Setting


Config Data Params
Name Type R/O Description Example
ParkingSpace object O ParkingSpaceAccessFilter config
AccessFilter object
+Enable bool O Enable filter or not true
+Type enumchar[ O Filter type, can be: "BannedList", "BannedList"
32] "TrustList".
+TrustList char[][40] O IP address list that trust ["10.6.10.1", "10.6.10.2"]
+BannedList char[][40] O IP address list that banned. ["10.6.10.3", "10.6.10.4"]

Intelligent Traffic APIs 545


Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=ParkingSpaceAccessFilter
Get Config Response Example
table.ParkingSpaceAccessFilter.Enable=false
table.ParkingSpaceAccessFilter.Type=TrustList
table.ParkingSpaceAccessFilter.TrustList[0]=172.24.2.14
table.ParkingSpaceAccessFilter.BannedList[0]=172.24.2.15

Set Config Request Example


http://10.0.0.8/cgi-
bin/ConfigManager.cgi?action=setConfig&ParkingSpaceAccessFilter.Enable=true&ParkingSpaceAcces
sFilter.Type=TrustList&ParkingSpaceAccessFilter.TrustList[0]=172.24.2.14&ParkingSpaceAccessFilter.B
annedList[0]=172.24.2.15
DA

Set Config Response Example


HU

OK
A_

10.5.7 Set OverLine State


HT
TP
_

Request URL http://<server>/cgi-bin/trafficParking.cgi?action=setOverLineState


AP

Method GET
I_

Request Params ( key=value format in URL )


V3

Name Type R/O Description Example


.3
7

state object[] R state


fo

+Lane int R for now, fixed to 0. 0


rV

+State char[] R the value can be “OverLine” or OverLine


el

“StopOverLine”.
se
n

Request Example
gS

http://192.168.1.108/cgi-
dn

bin/trafficParking.cgi?action=setOverLineState&state[0].Lane=0&state[0].State=OverLine
Bh
d

Response Params ( OK in body )


Response Example
OK

10.5.8 Set Parking Control Info


Request URL http://<server>/cgi-bin/api/trafficParking/setParkControlInfo
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Channel uint32 O Channel number, starting from 0 0
ScreenShowIn object[16] O Screen display control information,
fo up to 16 arrays.

Intelligent Traffic APIs 546


+ScreenNo uint32 O Screen number, starting from 0 4
+Text char[256] O Display content: "%H:%m:%S"
When the value of Text Type is 1,
the Text is displayed in the format of
time.
%Y: Year
%M: Month
%D: Day
%H: Hour (24-hour system)
%h: Hour (12-hour system)
%m: Minute
%S: Second
%W: Week
%T: Display a.m or p.m
%X: Displays the general text
When the value of Text Type is 2,
DA

the Text is displayed in the form of


HU

QR code URL.
A_

When the value of Text Type is 3, if


HT

a specific file is displayed or played,


TP

the text will be displayed in the form


_

of QR code URL, such as xx.jpg


AP

and xx.mp4. For the device to


I_

automatically play the resource files


V3

on the device, configure Text as


.3
7

Local.
fo

+Type uint32 O Content format: 1


rV

0: General text
el

1: Local time (notifies the device to


se

automatically update the time


ngS

displayed on the screen to the local


dn

time)
Bh

2: QR code
d

3: Resource file
+Color uint32 O Text color: 1
0: Green
1: Red
2: Yellow
3: White
+RollMode uint32 O Text scrolling mode: 1
0: NA (Do not scroll when the
content does not exceed the
screen)
1: Scroll left and right
2: Scroll up and down
3: Crop (Crop the part that exceeds
the screen)

Intelligent Traffic APIs 547


+RollSpeed uint32 O Scrolling speed, divided into 5 1
levels from 1 to 5 from slower to
faster
+DisplayEffect uint32 O Display effect: 1
When RollMode is 0/1:
{
0: Move left
1: Move right
2: Move up
3: Move down
}
When RollMode is 2:
{
0: Up
1: Down
}
DA

When RollMode is 3:
HU

{
A_

0: Left alignment
HT

1: Center
TP

2: Right alignment
_

}
AP

BroadcastInfo object[16] O Broadcasting control information, up


I_

to 16 arrays.
V3

+Text char[256] O Audio text "welcome"


.3
7

+Type uint32 O Text type 0


fo

0: General text
rV

1: License plate (Letters cannot be


el

combined into vocabularies for


se
n

broadcasting)
gS

2: Time text (Being broadcast in the


dn

format of time)
Bh

3: String of digits (Being broadcast


d

in the form of strings, and cannot be


combined into numbers)
Request Example
{
"Channel": 0,
"ScreenShowInfo": [{
"ScreenNo": 4,
"Text": "%H:%m:%S",
"Type": 1,
"Color": 1,
"RollMode": 1,
"RollSpeed": 1,
"DisplayEffect": 1
},…{}],

Intelligent Traffic APIs 548


"BroadcastInfo": [{
"Text": "welcome",
"Type": 0
},…{}]
}

Response Params (JSON format in body)


Name Type R/O Description Example
Response Example
{}

10.5.9 Set Parking Space Lighting Plan


Request URL http://<server>/cgi-bin/api/trafficParking/setSpaceLightPlan
Method POST
DA

Request Params ( JSON format in body )


HU

Name Type R/O Description Example


A_

Channel uint32 O channel number which starts from 0 0


HT

PhysicalLane uint8 O Physical parking space number, 0


TP

prioritize using this item. If it is not


_ AP

available, use ustomimParkN instead


I_

CustomParkN char[32] O Custom parking lot number(Parking lot) "A2701"


V3

o
.3

LightPlan object[] O Lighting Plan


7

+Color enumchar[ O Parking light color "Red"


fo
rV

16] enumchar[16]{
"Red"
el
se

"Yellow"
n

"Green"
gS

"Blue"
dn

"Purple"
Bh

"White"
d

"Pink"
}
+State enumint O Parking light status 1
enumint{
0: permanently off
1: permanently on
2: blink
3: Consistent with previous state
}
+KeepTime int32 O Duration, in seconds 30
-1 for permanently on
Request Example
{
"Channel": 0,

Intelligent Traffic APIs 549


"PhysicalLane": 0,
"CustomParkNo": "A2701",
"LightPlan": [{
"Color": "Red",
"State": 1,
"KeepTime": 30
},…{}]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

10.6 Vehicles Distribution


DA
HU

10.6.1 Subscribe Vehicles Distribution Data


A_
HT

Request URL http://<server>/cgi-bin/vehiclesDistribution.cgi?action=attach


TP

Method GET
_ AP

Request Params ( key=value format in URL )


I_

Name Type R/O Description Example


V3

Channel int R Video channel index which starts from 1 1


.3

Send heartbeat interval, range is [1, 5


7
fo

60],unit is second. If the URL contains this


rV

parameter, and the value is 5, it means


el

every 5 seconds the device should send


heartbeat int O
se

the heartbeat message to the client, the


ngS

heartbeat meaage are "Heartbeat". If this


dn

parameter is not present, its default value


is 60.
Bh

Request Example
d

http://192.168.1.108/cgi-bin/intelli.cgi?action=attachResource&heartbeat=5

Response Params ( multipart; key=value format in body )


Name Type R/O Description Example
Channel int R Video channel index which starts from 1 1
VehiclesData object[] R Vehicles distribution data info.
+PtzPresetId int R The ptz preset index which starts from 1. 1
+RuleId int R The rule id. 1
The rule type, 197 : vehicle congestion 197
+RuleType int R
detection, 198 : vehicle limit detection.
+VehiclesNum int R The vehicles number. 25
+QueueLen int R The vehicle queue length. 53

Intelligent Traffic APIs 550


The detection region, the first array is point [[1032,1257],[1045,5
list, max item is 32, the second array is 072], …]
+Region int[32][2] R
point, must be two int, means x and y
value, coordinate remap to 0 - 8192.
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: text/plain
Content-Length: <length>

Channel=1
VehiclesData[0].PtzPresetId=1
DA

VehiclesData[0].RuleId=1
HU

VehiclesData[0].RuleType=197
A_

VehiclesData[0].VehiclesNum=25
HT

VehiclesData[0].QueueLen=53
TP

VehiclesData[0].Region[0][0]=1032
_

VehiclesData[0].Region[0][1]=1035
AP

VehiclesData[0].Region[1][0]=1045
I_

VehiclesData[0].Region[1][1]=5072
V3

VehiclesData[0].Region[2][0]=6163
.3
7

VehiclesData[0].Region[2][1]=5127
fo

VehiclesData[0].Region[3][0]=6031
rV

VehiclesData[0].Region[3][1]=1063
el
se
n

--<boundary>
gS

Content-Type: text/plain
dn

Content-Length: 11
Bh
d

Heartbeat
-<boundary>
Content-Type: text/plain
Content-Length: <length>

Channel=1
VehiclesData[0].PtzPresetId=2

Intelligent Traffic APIs 551


10.7 Vehicle Manager

10.7.1 Adding Vehicle Groups


Add vehicle groups, and then add vehicles to the groups.
Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/createGroup
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
group object R Group information
+GroupName char[128] R Group name "Serious criminal database"
+GroupDetail char[256] O Remarks of the group "Key criminals"
+GroupType enumchar[ O Group type "AllowListDB"
16] enumchar[16]{
"AllowListDB": Allowlist
DA

"BlockListDB": Blocklist
HU

}
A_

Request Example
HT

{
TP

"group": {
_

"GroupName": “Serious criminal database”,


AP

"GroupDetail": "Key criminals",


I_
V3

"GroupType": " AllowListDB "


.3

}
7

}
fo
rV

Response Params ( JSON format in body )


el
se

Name Type R/O Description Example


n

groupID char[64] R Group ID assigned by server "10000"


gS

Response Example
dn

{
Bh

"groupID": "10000"
d

10.7.2 Modifying Vehicle Groups


Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/modifyGroup
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
group object R Group information
+GroupID char[128] R Group ID "0001"
+GroupName char[128] O Group name “Serious criminal database”
+GroupDetail char[256] O Remarks of the group "Key criminals"
+GroupType enumchar[ O Group type " AllowListDB "
16] enumchar[16]{

Intelligent Traffic APIs 552


"AllowListDB": Allowlist
"BlockListDB": Blocklist
}
Request Example
{
"group": {
"GroupID": "0001",
"GroupName": “Serious criminal database”,
"GroupDetail": "Key criminals",
"GroupType": " AllowListDB "
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
DA

{}
HU
A_

10.7.3 Deleting Vehicle Groups


HT
TP

Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/deleteGroup


_

Method POST
AP

Request Params ( JSON format in body )


I_

Name Type R/O Description Example


V3

groupID char[64] R Group ID. ““ means to delete all "000001"


.3
7

groups.
fo

Request Example
rV

{
el

"groupID": "000001"
se
n

}
gS
dn

Response Params ( JSON format in body )


Bh

Name Type R/O Description Example


d

Response Example
{}

10.7.4 Searching for Vehicle Groups


Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/findGroup
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
groupID char[64] R Group ID. "" means to search for all "000001"
group information.
Request Example
{
"groupID": "000001"

Intelligent Traffic APIs 553


}

Response Params ( JSON format in body )


Name Type R/O Description Example
GroupList object[] R List of searched vehicle group
information
+groupID char[64] R Group ID "000001"
+groupName char[128] O Group name "Serious criminal
database"
+groupDetail char[256] O Remarks of the group "Vehicles of key
criminals"
+groupType enumchar[ O Group type "AllowListDB"
16] enumchar[16]{
"AllowListDB": Allowlist
"BlockListDB": Blocklist
}
DA

+groupSize int O Number of vehicles in the current 30


HU

group
A_

+channels int16[1024] O List of video channel numbers to [0,]


HT

which the current group is bound. If


TP

the current group is not bound to any


_

video channel, enter [-1] in this


AP

parameter.
I_

Response Example
V3

{
.3
7

"GroupList": [{
fo

"groupID": "000001",
rV

"groupName": “Serious criminal database”,


el

"groupDetail": "Vehicles of key criminals",


se
n

"groupType": " AllowListDB",


gS

"groupSize": 30,
dn

"channels": [0]
Bh

},…{}]
d

10.7.5 Adding Vehicle Records


Add vehicle records to vehicle groups.
Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/multiAppend
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
vehicle object[] R Multiple vehicle information [ , ]
+UID uint64 R Unique identifier of the vehicle, 120837
generated by the server to represent a
unique identifier (primary key) in the

Intelligent Traffic APIs 554


program. It is different from the ID
field.
+GroupID char[64] R Group ID to which the vehicle belongs "00001"
+GroupName char[128] O Group name to which the vehicle "Group1"
belongs (exists only when the
parameter exits)
+PlateNumber char[64] O License plate number "ZA12345”
+PlateCountry char[3] O The country where the vehicle is "CN"
located (2 bytes), conforming to
ISO3166.
+PlateType uint16 O License plate type 12
+Type uint16 O Vehicle type (such as sedans and 2
trucks)
+Brand uint16 O Vehicle logo. You need to get the real 10
logo through the mapping table, which
is the same as CarLogoIndex of
DA

ANPR events.
HU

+Serie uint16 O Vehicle sub-brand. You need to get 1005


A_

the real sub-brand through the


HT

mapping table, which is the same as


TP

the SubBrand of ANPR event.


_

+CarSeriesMode uint16 O Vehicle model year. You need to get 12


AP

lYearIndex the real model year through the


I_

mapping table, which is the same as


V3

BrandYear of ANPR event..


.3
7

The model year No. of vehicle head


fo

ranges from 1 to 999; the model year


rV

No. of vehicle tail ranges 1001 to


el

1999. 0 means unknown, and 1000 is


se
n

reserved.
gS

+VehicleColor uint8[4] O Vehicle color. [128, 128, 128, 255]


dn

The first element represents the red


Bh

component value.
d

The second element represents the


green component value.
The third element represents the blue
component value.
The fourth element represents the
transparency component value
(meaningless).
+VehicleColorSta uint8 O Vehicle color status. 0: Unknown; 1: 0
te Known.
+PlateColor uint8[4] O License plate color. It is the same as [128, 128, 128, 255]
vehicle color.
+PlateColorState uint8 O License plate color status. 0: 0
Unknown; 1: Known.
+Name char[64] O Name of the vehicle owner “ZhangSan”

Intelligent Traffic APIs 555


+Sex char[16] O Gender "Male"
"Male"
"Female"
"Unknown” (such as no field)
+CertificateType char[16] O ID card type "IC"
IC: IC card
Passport
Officer: Officer card
Unknown
+ID char[32] O Person ID, employee ID, and other "123456789"
IDs
+Country char[3] O Nationality of vehicle owner (2 bytes), "CN"
conforming to ISO3166.
+Province char[64] O Province "XXX"
+City char[64] O City "YYY"
+HomeAddress char[128] O Home address of the registered “ZZZ Road”
DA

person (IVSS requirement)


HU

+Email char[32] O Email address of the vehicle owner "[email protected]"


A_

+PhoneNo char[128] O Phone No. of the registered vehicle "13xxxxx5678”


HT

owner
TP

replace bool O Overwrite the same record true


_

True: Yes; false: No.


AP

Request Example
I_

{
V3

"vehicle":
.3
7

[{
fo

"UID" : 120837,
rV

"GroupID" : "00001",
el

"GroupName" : "Group1",
se
n

"PlateNumber" : "ZA12345",
gS

"PlateCountry" : "CN",
dn

"PlateType" : 12,
Bh

"Type" : 2,
d

"Brand" : 10,
"Serie" : 1005,
"CarSeriesModelYearIndex" : 12,
"VehicleColor" : [128, 128, 128, 255],
"VehicleColorState" : 0,
"PlateColor" : [128, 128, 128, 255],
"PlateColorState" : 0,
"Name" : "ZhangSan",
"Sex" : "Male",
"CertificateType" : "IC",
"ID" : "123456789",
"Country" : "CN",
"Province" : "XXX",
"City" : "YYY",

Intelligent Traffic APIs 556


"HomeAddress" : "ZZZ Road",
"Email" : "[email protected]",
"PhoneNo" : "13xxxxx5678",
},…{}]
"replace": true
}

Response Params ( JSON format in body )


Name Type R/O Description Example
ErrCode uint[] O Error code. Defined the hexadecimal [0, 0]
error code before you use the error
code.
(Available for new devices).
0x0: Operation successful.
0x11340200: Database operation
failed.
DA

0x11340202: The license plate do not


HU

exist.
A_

0x11340205: Exceeded the maximum


HT

number of license plate database.


TP

Response Example
_

{
AP

"ErrCode": [0, 0]
I_

}
V3
.3
7

10.7.6 Modifying Vehicle Information


fo
rV

Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/modifyVehicle


el

Method POST
se
n

Request Params ( JSON format in body )


gS

Name Type R/O Description Example


dn

vehicle object R Vehicle information


Bh

+UID uint64 R Unique identifier of the vehicle, 120837


d

generated by the server to represent a


unique identifier (primary key) in the
program. It is different from the ID field.
+GroupID char[64] R Group ID to which the vehicle belongs "00001"
+GroupName char[128] O Group name to which the vehicle "Group1"
belongs (exists only when the
parameter exits)
+PlateNumber char[64] O License plate number "ZA12345”
+PlateCountry char[3] O The country where the vehicle is "CN"
located (2 bytes), conforming to
ISO3166.
+PlateType uint16 O License plate type 12
+Type uint16 O Vehicle type (such as sedans and 2
trucks)

Intelligent Traffic APIs 557


+Brand uint16 O Vehicle logo. You need to get the real 10
logo through the mapping table, which
is the same as CarLogoIndex of ANPR
events.
+Serie uint16 O Vehicle sub-brand. You need to get the 1005
real sub-brand through the mapping
table, which is the same as the
SubBrand of ANPR event.
+CarSeriesMod uint16 O Vehicle model year. You need to get the 12
elYearIndex real model year through the mapping
table, which is the same as BrandYear
of ANPR event..
The model year No. of vehicle head
ranges from 1 to 999; the model year
No. of vehicle tail ranges 1001 to 1999.
0 means unknown, and 1000 is
DA

reserved.
HU

+VehicleColor uint8[4] O Vehicle color. [128, 128, 128, 255]


A_

The first element represents the red


HT

component value.
TP

The second element represents the


_

green component value.


AP

The third element represents the blue


I_

component value.
V3

The fourth element represents the


.3
7

transparency component value


fo

(meaningless).
rV

+VehicleColorS uint8 O Vehicle color status. 0: Unknown; 1: 0


el

tate Known.
se
n

+PlateColor uint8[4] O License plate color. It is the same as [128, 128, 128, 255]
gS

vehicle color.
dn

+PlateColorStat uint8 O License plate color status. 0: Unknown; 0


Bh

e 1: Known.
d

+Name char[64] O Name of the vehicle owner “ZhangSan”


+Sex char[16] O Gender "Male"
"Male"
"Female"
"Unknown” (such as no field)
+CertificateTyp char[16] O ID card type "IC"
e IC: IC card
Passport
Officer: Officer card
Unknown
+ID char[32] O Person ID, employee ID, and other IDs. "13xxxxx6789"
+Country char[3] O Nationality of vehicle owner (2 bytes), "CN"
conforming to ISO3166.
+Province char[64] O Province "XXX"

Intelligent Traffic APIs 558


+City char[64] O City "YYY"
+HomeAddress char[128] O Home address of the registered person “ZZZ Road”
(IVSS requirement)
+Email char[32] O Email address of the vehicle owner "[email protected]"
+PhoneNo char[128] O Phone No. of the registered vehicle "13xxxxx5678"
owner.
Request Example
{
"vehicle":
{
"UID" : 120837,
"GroupID" : "00001",
"GroupName" : "Group1",
"PlateNumber" : "ZA12345",
"PlateCountry" : "CN",
"PlateType" : 12,
DA

"Type" : 2,
HU

"Brand" : 10,
A_

"Serie" : 1005,
HT

"CarSeriesModelYearIndex" : 12,
TP

"VehicleColor" : [128, 128, 128, 255],


_

"VehicleColorState" : 0,
AP

"PlateColor" : [128, 128, 128, 255],


I_

"PlateColorState" : 0,
V3

"Name" : "ZhangSan",
.3
7

"Sex" : "Male",
fo

"CertificateType" : "IC",
rV

"ID" : "123456789",
el

"Country" : "CN",
se
n

"Province" : "XXX",
gS

"City" : "YYY",
dn

"HomeAddress" : "ZZZ Road",


Bh

"Email" : "[email protected]",
d

"PhoneNo" : "13xxxxx5678",
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

10.7.7 Deleting Vehicle Information


Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/deleteVehicle
Method POST
Request Params ( JSON format in body )

Intelligent Traffic APIs 559


Name Type R/O Description Example
vehicle object R
+UID uint64 R Unique vehicle identifier. It can also be 124
deleted by groupID and plateNumber if
UID is not provided.
+groupID char[64] R Vehicle group ID "3"
+plateNumber char[64] O Licence plate "ZA12345”
Request Example
{
"vehicle": {
"UID": 124,
"groupID": "3",
"plateNumber": "ZA12345”
}
}
DA

Response Params ( JSON format in body )


HU

Name Type R/O Description Example


A_

Response Example
HT

{}
TP
_

10.7.8 Searching for Vehicles from Registered Database


AP
I_

Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/startFind


V3

Method POST
.3
7

Request Params ( JSON format in body )


fo

Name Type R/O Description Example


rV

vehicle object R Vehicle information. GroupID is


el

required. Other vehicle descriptions are


se
n

optional, and you can search for


gS

vehicles with these descriptions from


dn

specific databases.
Bh

+UID uint64 R Unique identifier of the vehicle, 120837


d

generated by the server to represent a


unique identifier (primary key) in the
program. It is different from the ID field.
+GroupID char[64] R Group ID to which the vehicle belongs "00001"
+GroupName char[128] O Group name to which the vehicle "Group1"
belongs (exists only when the
parameter exits)
+PlateNumber char[64] O License plate number "ZA12345”
+PlateCountry char[3] O The country where the vehicle is "CN"
located (2 bytes), conforming to
ISO3166.
+PlateType uint16 O License plate type 12
+Type uint16 O Vehicle type (such as sedans and 2
trucks)

Intelligent Traffic APIs 560


+Brand uint16 O Vehicle logo. You need to get the real 10
logo through the mapping table, which
is the same as CarLogoIndex of ANPR
events.
+Serie uint16 O Vehicle sub-brand. You need to get the 1005
real sub-brand through the mapping
table, which is the same as the
SubBrand of ANPR event.
+CarSeriesMod uint16 O Vehicle model year. You need to get the 12
elYearIndex real model year through the mapping
table, which is the same as BrandYear
of ANPR event..
The model year No. of vehicle head
ranges from 1 to 999; the model year
No. of vehicle tail ranges 1001 to 1999.
0 means unknown, and 1000 is
DA

reserved.
HU

+VehicleColor uint8[4] O Vehicle color. [128, 128, 128, 255]


A_

The first element represents the red


HT

component value.
TP

The second element represents the


_

green component value.


AP

The third element represents the blue


I_

component value.
V3

The fourth element represents the


.3
7

transparency component value


fo

(meaningless).
rV

+VehicleColorS uint8 O Vehicle color status. 0: Unknown; 1: 0


el

tate Known.
se
n

+PlateColor uint8[4] O License plate color. It is the same as [128, 128, 128, 255]
gS

vehicle color.
dn

+PlateColorStat uint8 O License plate color status. 0: Unknown; 0


Bh

e 1: Known.
d

+Name char[64] O Name of the vehicle owner “ZhangSan”


+Sex char[16] O Gender "Male"
"Male"
"Female"
"Unknown” (such as no field)
+CertificateTyp char[16] O ID card type "IC"
e IC: IC card
Passport
Officer: Officer card
Unknown
+ID char[32] O Person ID, employee ID, and other IDs. "123456789"
+Country char[3] O Nationality of vehicle owner (2 bytes), "CN"
conforming to ISO3166.
+Province char[64] O Province "XXX"

Intelligent Traffic APIs 561


+City char[64] O City "YYY"
+HomeAddress char[128] O Home address of the registered person “ZZZ Road”
(IVSS requirement)
+Email char[32] O Email address of the vehicle owner "[email protected]"
+PhoneNo char[128] O Phone No. of the registered vehicle "13xxxxx5678”
owner.
Request Example
{
"vehicle": {
"UID" : 120837,
"GroupID" : "00001",
"GroupName" : "Group1",
"PlateNumber" : "ZA12345",
"PlateCountry" : "CN",
"PlateType" : 12,
"Type" : 2,
DA

"Brand" : 10,
HU

"Serie" : 1005,
A_

"CarSeriesModelYearIndex" : 12,
HT

"VehicleColor" : [128, 128, 128, 255],


TP

"VehicleColorState" : 0,
_

"PlateColor" : [128, 128, 128, 255],


AP

"PlateColorState" : 0,
I_

"Name" : "ZhangSan",
V3

"Sex" : "Male",
.3
7

"CertificateType" : "IC",
fo

"ID" : "123456789",
rV

"Country" : "CN",
el

"Province" : "XXX",
se
n

"City" : "YYY",
gS

"HomeAddress" : "ZZZ Road",


dn

"Email" : "[email protected]",
Bh

"PhoneNo" : "13xxxxx5678",
d

}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
token uint R Obtained search token 23443U
totalCount int R Total number of qualified results 3333
Response Example
{
"token": 23443U,
"totalCount": 3333
}

Intelligent Traffic APIs 562


10.7.9 Obtaining Vehicle Search Results
Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/doFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
condition object R Input parameter of face search
+token uint R Search token 23443U
+beginNumber uint32 R Start number of the search. The search 0
starts from the “beginNumber” records,
and returns predefined number (count)
of records.
0<=beginNumber<= totalCount-1
+count int R Number of entries obtained each time 20
Request Example
DA

{
HU

"condition": {
"token": 23443U,
A_

"beginNumber": 0,
HT

"count": 20
TP

}
_ AP

}
I_
V3

Response Params ( JSON format in body )


.3

Name Type R/O Description Example


7
fo

results object R Output parameter of the search


rV

+found int R Number of searched entries. One 12


el

vehicle can be registered to multiple


se

databases.
ngS

+candidates object[] O Information list of vehicles to be


selected
dn

++Vehicle object R Vehicle information Vehicle


Bh

++DifferentAttr char[16][16 R A collection of attributes that do not ["VehicleColor", "Type"]


d

ibutres ] match the database. The license plate


must be the same, but other elements
might be different for false-registered
vehicle.
Country: License plate registered place
Brand: Vehicle logo
Type: Vehicle type
VehicleColor: Vehicle color
PlateColor: Plate color
Response Example
{
"results": {
"found": 12,

Intelligent Traffic APIs 563


"candidates": [{
"Vehicle": {Vehicle
},
"DifferentAttributres": ["VehicleColor", "Type"]
},…{}]
}
}

10.7.10 Stopping Searching for Vehicles


Request URL http://<server>/cgi-bin/api/VehicleRegisterDB/stopFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
token uint R Search token 23443U
Request Example
DA

{
HU

"token": 23443U
A_

}
HT
TP

Response Params ( JSON format in body )


_

Name Type R/O Description Example


AP

Response Example
I_

{}
V3
.3
7
fo

10.7.11 Add PlateNumberLib Download Task


rV
el

Request URL http://<server>/cgi-bin/api/NetFileTransfer/addPlateNumberLibDownloadTask


se
n

Method POST
gS

Request Params ( JSON format in body )


dn

Name Type R/O Description Example


Bh

PlateNumberL char[32] O PlateNumber Lib Version


d

ibVersion
PacketTotal uint R total package count 10
PacketIndex uint R packet index, starts from 1 3
TaskInfo object[100] R task info
+URLList char[4][256 R resource url list ["sftp://admin:admin@1
] 0.12.4.84:554/media/1.
txt", "xx"]
Request Example
{
"PlateNumberLibVersion": ,
"PacketTotal": 10,
"PacketIndex": 3,
"TaskInfo": [{
"URLList": ["sftp://admin:[email protected]:554/media/1.txt", "xx"]

Intelligent Traffic APIs 564


},…{}]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{} DA
HU
A_
HT
TP
_AP
I_
V3
.3
7
fo
rV
el
se
n
gS
dn
Bh
d

Intelligent Traffic APIs 565


11 Thermography and Radiometry APIs

11.1 Thermography Manager

11.1.1 Get Capability of Thermography


Request URL http://<server>/cgi-bin/ThermographyManager.cgi?action=getCaps
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
channel int R video channel index which starts 1
DA

from 1.
Request Example
HU

http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getCaps&channel=1
A_
HT

Response Params ( key=value format in body )


TP

Name Type R/O Description Example


_ AP

+PresetModes char[][32] O the preset mode. Range is [ "Indoor", "Outdoor"]


I_

{ "Indoor", "Outdoor", "Default" }


V3

+Brightness object O brightness


.3

++Max int O the maximum 100


7

++Min int O the mminimum 0


fo
rV

++Step int O step 1


el

+Sharpness object O Sharpness


se

++Max int O the maximum 100


n gS

++Min int O the mminimum 0


++Step int O step 5
dn

+EZoom object O zoom


Bh

++Max int O the maximum 24


d

++Min int O the mminimum 0


++Step int O step 1
+Thermograph object O ThermographyGamma
yGamma
++Max int O the maximum 8
++Min int O the mminimum -8
++Step int O step 1
+SmartOptimi object O smart optimizer
zer
++Max int O the maximum 100
++Min int O the mminimum 0
++Step int O step 5
+Agc object O agc

Thermography and Radiometry APIs 566


++Max int O the maximum 255
++Min int O the mminimum 0
++Step int O step 5
+AgcMaxGain object O agc max gain
++Max int O the maximum 255
++Min int O the mminimum 0
++Step int O step 5
+AgcPlateau object O agc plateau
++Max int O the maximum 100
++Min int O the mminimum 0
++Step int O step 5
+PresetColoriz enumchar[] O preset colorization mode ["Ironbow2", "IceFire"]
ation [16] enumchar[][16]{
"White Hot"
"Black Hot"
"Fusion"
DA

"Rainbow"
HU

"Globow"
A_

"Ironbow1"
HT

"Ironbow2"
TP

"Sepia"
_

"Color1"
AP

"Color2"
I_

"Icefire"
V3

"Rain"
.3
7

"Red Hot"
fo

"Green Hot"
rV

"Spring"
el

"Summer"
se
n

"Winter"
gS

"Autumn"
dn

"Alarm"
Bh

}
d

+PresetROIM char[][16] O Preset ROI mode. Range is {"Full ["Full Screen",


odes Screen", "Sky", "Ground", "Horizon", "Sky", "Ground",
"Center 75%", "Center 50%", "Horizon",
"Center 25%", "Custom"} "Center 75%", "Center
50%",
"Center 25%", "Custom"]
+FFCPeriod object O FFC period
++MaxN int O Maximum value in N-mode video 1000
mode
++MaxP int O Maximum value in P-mode video 1200
mode
++Min int O the mminimum 5
++Step int O step 1
+FliterMode char[][16] O range is {"RawData","YData"} ["RawData","YData"]

Thermography and Radiometry APIs 567


+CamType enumint8 O enumint8{ 0
0: tau
1: lepton
2: Self-Developed
}
+BaseBrightne object O Base brightness
ss
++Max int O the maximum 100
++Min int O the mminimum 0
++Step int O step 5
+StretchIntens object O Stretch intensity
ity
++Max int O the maximum 100
++Min int O the mminimum 0
++Step int O step 5
+LCEValue object O LCEValue
DA

++Max int O the maximum 128


HU

++Min int O the mminimum 0


A_

++Step int O step 5


HT

+LCESupport bool O LCE false


TP

+HistGramVal object O histogram


_

ue
AP

++Max uint O the maximum 32


I_
V3

++Min uint O the mminimum 0


++Step uint O step 1
.3
7

+WideDynami bool O does support WideDynamic false


fo

cSupport
rV

+SupportGain char[][32] O range is: ["GainModeAuto",


el

Modes { GainModeAuto,GainModeLowTem "GainModeLowTemp",


se
n

p,GainModeHighTemp} "GainModeHighTemp"
gS

]
dn

+HeatMapTyp char[16][32 O range is: "Gray", "Matrix"} ["Gray","Matrix"]


Bh

es ]
d

Response Example
caps.PresetModes = Indoor
caps.Brightness.Max = 100
caps.Brightness.Min = 0
caps.Brightness.Step = 1
caps.Sharpness.Max= 100
caps.Sharpness.Min = 0
caps.Sharpness.Step = 5
caps.EZoom.Max= 24
caps.EZoom.Min = 0
caps.EZoom.Step = 1
caps.ThermographyGamma.Max= 8
caps.ThermographyGamma.Min = -8
caps.ThermographyGamma.Step = 1

Thermography and Radiometry APIs 568


caps.SmartOptimizer.Max= 100
caps.SmartOptimizer.Min = 0
caps.SmartOptimizer.Step = 5
caps.Agc.Max= 255
caps.Agc.Min = 0
caps.Agc.Step = 5
caps.AgcMaxGain.Max= 255
caps.AgcMaxGain.Min = 0
caps.AgcMaxGain.Step = 5
caps.AgcPlateau.Max= 100
caps.AgcPlateau.Min = 0
caps.AgcPlateau.Step = 5
caps.PresetColorization[0]= Ironbow2
caps.PresetROIModes[0]= Full Screen
DA

11.1.2 [Config] Thermography Options


HU
A_

Config Data Params


HT

Name Type R/O Description Example


TP

Thermography object[][] O thermography options config


_
AP

Options It is a two-dimensional array, with the


first dimension representing the
I_
V3

channel
.3

+EZoom int O Range is [0—24]. 12


7

Range and step are got from interface


fo

in "11.1.1 Get Capability of


rV

Thermography".
el
se

+Thermograph int O Gamma 0


n

yGamma -8~8
gS

Range is got from interface in "11.1.1


dn

Get Capability of Thermography".


Bh

+Colorization char[16] O "White Hot", "White Hot"


d

"Black Hot",
"Ironbow2",
"IceFire"
Range is got from interface in "11.1.1
Get Capability of Thermography".
+SmartOptimi int O range is 0 ~100 10
zer
+OptimizedRe object O
gion
++Type char[16] O Range is {"Full Screen", "Full Screen"
"Sky",
"Ground",
"Horizontal",
"Center 75%",

Thermography and Radiometry APIs 569


"Center 50%",
"Center 25%",
"Custom"
}
++Enable bool O true: enable true
false: not enable
++Regions Rect[] O region array [Rect, ]
Range is [0—8191].
+Agc uint8 O Range is [0—255]. 10
Range and step are got from interface
in "11.1.1 Get Capability of
Thermography".
+AgcMaxGain uint8 O Range is [0—255]. 10
Range and step are got from interface
in "11.1.1 Get Capability of
Thermography".
DA

+AgcPlateau uint8 O Range and step are got from interface 10


HU

in "11.1.1 Get Capability of


A_

Thermography".
HT

+HighTempGa object O
TP

inMode
_

++Agc uint8 O 10
AP

++AgcMaxGai uint8 O 10
I_

n
V3

++AgcPlateau uint8 O Agc Plateau 10


.3
7

+Mode char[32] O mode, range is { "HighTemperature"


fo

"HighTemperature", "LowTemperature",
rV

"Auto"}
el

+Auto object O
se
n

++LowToHigh uint32 O 13
gS

++LHROI uint32 O percentage range is[0—100] 15


dn

++LowToHigh uint32 O 10
Bh

Delay
d

++HighToLow uint32 O 12
++HLROI uint32 O percentage range is[0—100] 95
++HighToLow uint32 O 10
Delay
+ContrastRect Rect O region, Range is [0—8191].
+BaseBrightne uint32 O Base brightness 0
ss
+StretchIntens uint32 O Stretch intensity 0
ity

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=ThermographyOptions

Thermography and Radiometry APIs 570


Get Config Response Example
table.ThermographyOptions[0][0].EZoom=0
table.ThermographyOptions[0][0].Colorization=White Hot
table.ThermographyOptions[0][0].SmartOptimizer=10
table.ThermographyOptions[0][0].OptimizedRegion.Type=Custom
table.ThermographyOptions[0][0].OptimizedRegion.Enable= true
table.ThermographyOptions[0][0].OptimizedRegion.Regions[i][0u]=0
table.ThermographyOptions[0][0].OptimizedRegion.Regions[i][1u]=0
table.ThermographyOptions[0][0].OptimizedRegion.Regions[i][2u]=0
table.ThermographyOptions[0][0].OptimizedRegion.Regions[i][3u]=0
table.ThermographyOptions[0][0].Agc=10
table.ThermographyOptions[0][0].AgcMaxGain=10
table.ThermographyOptions[0][0].AgcPlateau=10
table.ThermographyOptions[0][0].Mode="HighTemperature"
table.ThermographyOptions[0][0].Auto.LowToHigh=13
table.ThermographyOptions[0][0].Auto.LHROI=15
DA

table.ThermographyOptions[0][0].Auto.HighToLow=12
HU

table.ThermographyOptions[0][0].Auto.HLROI=95
A_
HT

Set Config Request Example


TP

http://192.168.1.108/cgi-
_

bin/configManager.cgi?action=setConfig&ThermographyOptions[0][0].OptimizedRegion.Type=Gound
AP

Set Config Response Example


I_

OK
V3
.3
7
fo

11.1.3 Get ExternSystem Information


rV
el
se

Request URL http://<server>/cgi-bin/ThermographyManager.cgi?action=getExternSystemInfo


n

Method GET
gS

Request Params (key=value format in URL )


dn

Name Type R/O Description Example


Bh

channel int R video channel index which starts 1


d

from 1.
Request Example
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getCaps&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
sysInfo object R
+SerialNumber char[] O Serial Number "11111"
+SoftwareVersion char[] O Software Version "11111"
+FirmwareVersion char[] O Firmware Version "11111"
+LibVersion char[] O Lib Version "11111"
Response Example
sysInfo.SerialNumber = 11111111123
sysInfo.SoftwareVersion = 2222222222222

Thermography and Radiometry APIs 571


sysInfo.FirmwareVersion= 3333333333333
sysInfo.LibVersion = 4444444444

11.1.4 Get Information of Preset Mode


Request URL http://<server>/cgi-bin/ThermographyManager.cgi?action=getPresetParam
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
channel int R video channel index which starts 1
from 1.
mode char[] R mode, range is got from interface in Default
"11.1.1 Get Capability of
Thermography".
Request Example
http://192.168.1.108/cgi-
DA

bin/ThermographyManager.cgi?action=getPresetParam&channel=1&mode=Default
HU
A_

Response Params ( key=value format in body )


HT

Name Type R/O Description Example


TP

presetInfo object O
_

+Brightness int O Brightness 50


AP

+Sharpness int O Sharpness 50


I_
V3

+EZoom int O EZoom 12


+ThermographyG int O Gamma 0
.3
7

amma
fo

+Colorization char[16 O Colorization "White Hot"


rV

]
el

+SmartOptimizer int O SmartOptimizer 10


se
n

+OptimizedRegion object O
gS

++Type char[16 O OptimizedRegion type "Full Screen"


dn

]
Bh

++Enable bool O enable/disable true


d

++Regions Rect[] O regions [[,0,0,0], ]


+Agc uint32 O agc 10
+AgcMaxGain uint32 O AgcMaxGain 10
+AgcPlateau uint32 O AgcPlateau 10
Response Example
presetInfo.Brightness = 50
presetInfo.Sharpness= 50
presetInfo.EZoom= 12
presetInfo.ThermographyGamma= 0
presetInfo.Colorization= White Hot
presetInfo.SmartOptimizer= 10
presetInfo.OptimizedRegion.Type= Full Screen
presetInfo.OptimizedRegion.Enable=true
presetInfo.OptimizedRegion.Regions[0][0]=0

Thermography and Radiometry APIs 572


presetInfo.OptimizedRegion.Regions[0][1]=0
presetInfo.OptimizedRegion.Regions[0][2]=0
presetInfo.OptimizedRegion.Regions[0][3]=0
presetInfo.Agc= 10
presetInfo.AgcMaxGain=10
presetInfo.AgcPlateau = 10

11.1.5 Get Optimized Region Information


Request URL http://<server>/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
channel int R video channel index which starts 1
from 1.
DA

Request Example
HU

http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion&channel=1
A_
HT

Response Params ( key=value format in body )


TP

Name Type R/O Description Example


_AP

optimizedRegion object O
I_

+Type char[] O OptimizedRegion type Full Screen


V3

+Enable bool O ebable/disable true


.3

+Regions rect[] O the region is a rectangle []


7

Response Example
fo
rV

optimizedRegion.Type= Full Screen


optimizedRegion.Enable= true
el
se

optimizedRegion.Regions[0][0]=0
n

optimizedRegion.Regions[0][1]=0
gS

optimizedRegion.Regions[0][2]=0
dn

optimizedRegion.Regions[0][3]=0
Bh
d

11.1.6 Enable Shutter


Request URL http://<server>/cgi-bin/ThermographyManager.cgi?action=enableShutter
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
channel int R video channel index which starts 1
from 1.
enable bool R true or false, enable or not. true
Request Example
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=enableShutter&channel=1&enable=true

Response Params ( OK in body )


Name Type R/O Description Example

Thermography and Radiometry APIs 573


Response Example
OK

11.1.7 Fix Focus


Request URL http://<server>/cgi-bin/ThermographyManager.cgi?action=fixFocus
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
linkVideoChannel int[] R video channel index which starts [1,2]
from 1.
speed float O range is 0.0-1.0. 0.5
Request Example
http://192.168.1.108/cgi-
bin/ThermographyManager.cgi?action=fixFocus&linkVideoChannel[0]=1&linkVideoChannel[1]=2
DA
HU

Response Params ( OK in body )


A_

Name Type R/O Description Example


HT

Response Example
TP

OK
_AP
I_
V3

11.1.8 Do Flat Field Correction


.3
7
fo

Request URL http://<server>/cgi-bin/ThermographyManager.cgi?action=doFFC


rV

Method GET
el

Request Params (key=value format in URL )


se

Name Type R/O Description Example


ngS

channel int R video channel index which starts 1


dn

from 1.
Request Example
Bh

http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=doFFC&channel=1
d

Response Params ( OK in body )


Name Type R/O Description Example
Response Example
OK

11.2 Radiometry

11.2.1 Get Capability of Radiometry


Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=getCaps

Thermography and Radiometry APIs 574


Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
channel int R video channel index which starts 1
from 1.
Request Example
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getCaps&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
caps object R caapabilities
+TotalNum object O total
++MaxNum uint O max num 8
++Spot object O spot
+++MaxSpots uint O max spot number 8
++Line object O line
DA

+++MaxLines int O max line number 1


HU

++Area object O area


A_

+++MaxAreas int O max area number 8


HT

+TemperPresets object O
TP

++MaxPresets int O max preset number 256


_

+MeterInfo object O meter


AP

++Type char[][1 O range:{"Spot","Line","Area"} ["Spot","Line","Area"]


I_
V3

6]
.3

++ObjectEmissivit object O Emissivity


7

y
fo

+++Max int O the maximum 100


rV

+++Min int O the mminimum 0


el

+++Default int O default 0


se
n

+++Step int O step 1


gS

++ObjectDistance object O distance


dn

Meter
Bh

+++Max int O the maximum 100


d

+++Min int O the mminimum 0


+++Default int O default 0
+++Step int O step 1
++ReflectedTemp object O reflect temperature
erature
+++Max int O the maximum 100
+++Min int O the mminimum 0
+++Default int O default 0
+++Step int O step 1
++RelativeHumidit object O Relative humidity
y
+++Max int O the maximum 100
+++Min int O the mminimum 0
+++Default int O default 0

Thermography and Radiometry APIs 575


+++Step int O step 1
++AtmosphericTe object O Atmospheric temperature
mperature
+++Max int O the maximum 100
+++Min int O the mminimum 0
+++Default int O default 0
+++Step int O step 1
+Statistics object O
++MinPeriod int O Min period 60
+Isotherm object O Isotherm parameters
++MaxTemp int O the maximum 327.0
++MinTemp int O the mminimum -20.0
Response Example
caps.TotalNum.MaxNum=8
caps.TotalNum.Spot.MaxSpots=8
caps.TotalNum.Line.MaxLines=1
DA

caps.TotalNum.Area.MaxAreas=8
HU

caps.TemperPresets.MaxPresets=256
A_

caps.MeterInfo.Type[0u]=Spot
HT

caps.MeterInfo.Type[1u]=Area
TP

caps.MeterInfo.ObjectEmissivity.Max=100
_

caps.MeterInfo.ObjectEmissivity.Min=0
AP

caps.MeterInfo.ObjectEmissivity.Default=0
I_

caps.MeterInfo.ObjectEmissivity.Step=1
V3

caps.MeterInfo.ObjectDistanceMeter.Max=100
.3
7

caps.MeterInfo.ObjectDistanceMeter.Min=0
fo

caps.MeterInfo.ObjectDistanceMeter.Default=0
rV

caps.MeterInfo.ObjectDistanceMeter.Step=1
el

caps.MeterInfo.ReflectedTemperature.Max=100
se
n

caps.MeterInfo.ReflectedTemperature.Min=0
gS

caps.MeterInfo.ReflectedTemperature.Default=0
dn

caps.MeterInfo.ReflectedTemperature.Step=1
Bh

caps.MeterInfo.RelativeHumidity.Max=100
d

caps.MeterInfo.RelativeHumidity.Min=0
caps.MeterInfo.RelativeHumidity.Default=0
caps.MeterInfo.RelativeHumidity.Step=1
caps.MeterInfo.AtmosphericTemperature.Max=100
caps.MeterInfo.AtmosphericTemperature.Min=0
caps.MeterInfo.AtmosphericTemperature.Default=0
caps.MeterInfo.AtmosphericTemperature.Step=1
caps.Statistics.MinPeriod=60
caps.Isotherm.MaxTemp=327.0
caps.Isotherm.MinTemp=-20.0

11.2.2 [Config] Heat Image Thermometry


Config Data Params

Thermography and Radiometry APIs 576


Name Type R/O Description Example
HeatImagingT object O HeatImaging Thermometry
hermometry
+RelativeHumi uint32 O The Relative Humidity range and step are 50
dity got from interface in getCaps.
+Atmospheric float O The Atmospheric Temperature range and 20
Temperature step are got from interface in getCaps.
+ObjectEmissi float O The Object Emissivity range and step are 1.0
vity got from interface in getCaps.
+ObjectDistan uint32 O The Object Distance range and step are 100
ce got from interface in getCaps.
Unit is meter.
+ReflectedTe float O The Reflected Temperature range and 20.1
mperature step are got from interface in getCaps
+Temperature char[16] O "Centigrade"
Range is {Centigrade, Fahrenheit}.
Unit
DA

+Isotherm object O Isotherm


HU

++Enable bool O true or false true


A_

++MinLimitTe int32 O MinValue range is got form interface in 100


HT

mp getCaps. MinValue must be smaller than


TP

MaxVaue.
_

++MediumTe int32 O medium value 120


AP

mp
I_

++MaxLimitTe int32 O 140


V3

MaxValue range is got form interface in


mp
.3

getCaps. MaxValue must be bigger than


7

MinVaue
fo

++SaturationT int32 O Saturation temperature value 160


rV

emp
el

++ColorBarDis bool O true


se

true or false
n

play
gS

++Rect Rect O range: 0-8191


dn

+HotSpotFollo bool O true or false true


Bh

w
d

+TemperEnabl bool O true or false true


e
+HotSpotColor char[16] O range is {"Auto" "Manual" } "Manual"
Mode
+HighCTMake Color O
rColor
+LowCTMaker Color O
Color
+Altitude float O unit: m 150.0
+Visibility float O unit: km 5.0
+RainFallCap float O unit:mm 0.0
acity
+Thermometry int O Temperature measurement mode: 1
Mode 0. Body surface mode

Thermography and Radiometry APIs 577


1. Body temperature mode
+HotSpotOsd bool O Is the hotspot temperature OSD false
Show displayed
+ColdSpotFoll bool O true or false false
ow

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingThermometry
Get Config Response Example
table.HeatImagingThermometry.RelativeHumidity=50
table.HeatImagingThermometry.AtmosphericTemperature=20.0
table.HeatImagingThermometry.HotSpotOsdShow=false

Set Config Request Example


DA

http://10.0.0.8/cgi-
HU

bin/configManager.cgi?action=setConfig&HeatImagingThermometry.RelativeHumidity=50
A_

Set Config Response Example


HT

OK
TP
_

11.2.3 [Config] Thermometry Rule


AP
I_
V3

Config Data Params


Name Type R/O Description Example
.3
7

Thermometry object[][] O Temperature measurement rule


fo

Rule configuration
rV

It is a two-dimensional array, with the


el

first dimension being the channel


se
n

number and the second dimension being


gS

the temperature measurement point


dn

rule, supporting multi-channel and


Bh

multiple types of temperature


d

measurement
+Enable bool O Enable/Disable true
+PresetId int O Range [0—PresetMax] 0
PresetMax is got from interface in
GetCurrentProtocolCaps.
+RuleId int O Range [0—MaxNum] 0
MaxNum is got from interface in
getCaps.
+Name char[64] O Radiometry rule name. "xxxx"
+Type char[16] O Range is {Spot, Line, Area }. "Spot"
+MeterRegion object O position
++Coordinates Point[] O List of temperature measurement point [Point, ]
coordinates

Thermography and Radiometry APIs 578


The point format is [x, y], where x and y
are coordinate values of type int
Using a relative coordinate system, with
a value range of 0~8191
+T int O Temperature Sample period. Unit is 3
Second.
+AlarmSetting object[] O alarm setting
++Id int O Range [0—65535],unique alarm id 0
++Enable bool O Enable/Disable true
++Result char[16] O Depend on the vaule of Type "Max"
Spot : {Vaule}
Line: { Max, Min, Aver}
Area: {Max, Min, Aver, Std, Mid, ISO}
++AlarmCondi char[16] O "Below"
Range is {Below, Match , Above }
tion
++Threshold float O Alarm threshold 20.0
DA

++Hysteresis float O Alarm hysteresis 0.1


HU

++Duration int O The duration time of alarm. 30


A_

Unit is second
HT

++PreThresho float O 10.0


PreAlarm threshold
TP

ld
_

++PreDuration uint32 O The duration time of preAlarm. 30


AP

Unit is second
I_

++SlopeResult enumchar[ O enumchar[16]{ "Aver"


V3

16] "Aver",
.3
7

"Max",
fo

"Min"
rV

}
el

+LocalParame object O Local parameters


se
n

ters
gS

++Enable bool O Enable/Disable true


dn

++ObjectEmis float O Range [0 — 1] 0.95


Bh

sivity Accuracy is 0.01


d

++ObjectDista uint O Object distance 10


nce The range is got from interface in
getCaps.
++ReflectedTe float O Object Reflected Temperature 0
mp The range is got from interface in
getCaps.

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=ThermometryRule
Get Config Response Example
table.ThermometryRule[0][0].Enable = true
table.ThermometryRule[0][0].PresetId =0

Thermography and Radiometry APIs 579


table.ThermometryRule[0][0].RuleId=0
table.ThermometryRule[0][0].Name=SpotName
table.ThermometryRule[0][0].Type=Spot
table.ThermometryRule[0][0].MeterRegion.Coordinates[PointNo][0]= 0
table.ThermometryRule[0][0].MeterRegion.Coordinates[PointNo][1]= 0

table.ThermometryRule[0][0].T=3
table.ThermometryRule[0][0].AlarmSetting[0].Id=0
table.ThermometryRule[0][0].AlarmSetting[0].Enable=true
table.ThermometryRule[0][0].AlarmSetting[0].Result =Max
table.ThermometryRule[0][0].AlarmSetting[0].AlarmSetting[0]Condition=Below
table.ThermometryRule[0][0].AlarmSetting[0].Threshold=20.0
table.ThermometryRule[0][0].AlarmSetting[0].PreThreshold=10.0
table.ThermometryRule[0][0].AlarmSetting[0].PreDuration=30
table.ThermometryRule[0][0].AlarmSetting[0].Hysteresis=0.1
table.ThermometryRule[0][0].AlarmSetting[0].Duration=30
DA

table.ThermometryRule[0][0].LocalParameters.Enable=true
HU

table.ThermometryRule[0][0].LocalParameters.ObjectEmissivity=0.95
A_

table.ThermometryRule[0][0].LocalParameters.ObjectDistance=0.95
HT

table.ThermometryRule[0][0].LocalParameters.RefalectedTemp=0
TP
_

Set Config Request Example


AP

http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&ThermometryRule[0][0].Name=name1
I_

Set Config Response Example


V3

OK
.3
7
fo

11.2.4 [Config] Heat Image Temper Event


rV
el

Config Data Params


se
n

Name Type R/O Description Example


gS

HeatImagingT object[] O Heat Imaging Temper config


dn

emper A one-dimensional array, where the


Bh

subscript of the array represents the


d

channel number
+Enable bool R Enable/Disable Heat Imaging Temper false
feature.
+EventHandle EventHand O Setting of EventHandler is described in
r ler SetEventHandler.

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
specific examples are as follows:
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingTemper
Get Config Response Example
table.HeatImagingTemper[0].Enable=false
table.HeatImagingTemper[0].EventHandler….(output of EventHandler is described in SetEventHandler)
table.HeatImagingTemper[1]….

Thermography and Radiometry APIs 580


Set Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&HeatImagingTemper[0].Enable=true
Set Config Response Example
OK

11.2.5 Get Temperature of Particular Point


Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=getRandomPointTemper
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
channel int R video channel index which starts 1
from 1
coordinate int[2] R Coordinate of temperature [1024,1024]
DA

measurement point
HU

Request Example
A_

http://192.168.1.108/cgi-
HT

bin/RadiometryManager.cgi?action=getRandomPointTemper&channel=1&coordinate[0]=1024&coordina
TP

te[1]=1024
_AP

Response Params ( key=value format in body )


I_
V3

Name Type R/O Description Example


TempInfo object O temperature
.3
7

+Type char[] O type, range is: Spot


fo

{"Spot","Area" ,"Line" }, it is fixed to


rV

spot
el

+TemperAver float O 27.5


se

temperature
n

Response Example
gS

TempInfo.Type=Spot
dn

TempInfo.TemperAver=27.5
Bh
d

11.2.6 Get Temperature of Particular Condition


Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=getTemper
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
condition object O condition
+PresetId int O Range [0- PresetMax] 0
PresetMax is got from interface in
GetCurrentProtocolCaps.
+RuleId int O Range [0- MaxNum] 0
MaxNum is got from interface in
getCaps

Thermography and Radiometry APIs 581


+Type enumchar[ O type. "Spot"
16] enumchar[16]{
"Spot"
"Area"
"Line"
}
+Name char[64] O Name is got from interface in "xxxx"
GetThermometryRuleConfig
+Channel int O Video channel index. Start from 10
Request Example
http://192.168.1.108/cgi-
bin/RadiometryManager.cgi?action=getTemper&condition.PresetId=0&condition.RuleId=0&condition.Typ
e=Spot&condition.Name=Spot1&condition.channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
DA

TempInfo object O temperature info


HU

+Type char[] O type. Spot


A_

enumchar[16]{
HT

"Spot"
TP

"Area"
_

"Line"
AP

}
I_

+TemperAver float O 27.5


V3

temperature
Response Example
.3
7

TempInfo.Type=Spot
fo

TempInfo.TemperAver=27.5
rV
el
se
n

11.2.7 Find Temperature Information


gS
dn

1. Start to query temperature information


Bh

Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=startFind


d

Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
condition object O condition
+StartTime char[] O The start time to find. 2010-04-01%200:00:00
+EndTime char[] O The end time to find. 2010-04-08%200:00:00
+Type char[] O The type of data. Range is {Spot, "Spot"
Line, Area}
+Period int O Range is {5, 10, 15, 30}, minute 5
+channel int O Video channel index. Start from 1 1
Request Example

Thermography and Radiometry APIs 582


http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=startFind&condition.StartTime=2010-04-
01%200:00:00&condition.EndTime=2010-04-
08%200:00:00&condition.Type=Spot&condition.channel=1&condition.Period=5

Response Params ( key=value format in body )


Name Type R/O Description Example
token uint R query token 46878
totalCount uint R total count 333
Response Example
token=46878
totalCount=333

2. Get the data of temperature


Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=doFind
Method GET
DA

Request Params (key=value format in URL )


HU

Name Type R/O Description Example


A_

token uint R query token, get from interface of 46878


HT

the first step above.


TP

beginNumber uint O the begin index in this query 16


_

count uint O the number you want to query. 16


AP

Request Example
I_

http://192.168.1.108/cgi-
V3

bin/RadiometryManager.cgi?action=doFind&token=46878&beginNumber=16&count=16
.3
7
fo

Response Params ( key=value format in body )


rV

Name Type R/O Description Example


el

found int R return info 12


se
n

+info object[] R
gS

++Time char[20] O time "2010-04-08 16:12:46"


dn

++PresetId int O preset id 0


Bh

++RuleId int O rule id 0


d

++Type char[16] O "Spot" "Spot"


"Area"
"Line"
++Name char[64] O name "xxxx"
++Coordinate Point[] O points, up to 8,using the 8192 [ Point,]
relative coordinate system.
++Channel int O Video channel index. Start from 1 1
++TemperatureU char[16] O "Centigrade" "Centigrade"
nit "Fahrenheit"
++QueryTemperI object O
nfo
+++TemperAve float O average temperature 50.1
+++TemperMax float O maximum temperature 50.2
+++TemperMin float O minimum temperature 50.0

Thermography and Radiometry APIs 583


+++MaxPoint Point O Highest temperature point, using [0,0]
the 8192 relative coordinate system.
+++MinPoint Point O lowest temperature point, using the [0,0]
8192 relative coordinate system.
Response Example
found=12
info[i].Time=2010-04-08 16:12:46
info[i].PresetId=0
info[i].RuleId=0
info[i].Type=Spot
info[i].Name=xxxx
info[i].Coordinate[0]=1024
info[i].Coordinate[1]=2048
info[i].Channel=0
info[i].TemperatureUnit=Centigrade
info[i].QueryTemperInfo.TemperAve=50.1
DA

info[i].QueryTemperInfo.TemperMax=50.2
HU

info[i].QueryTemperInfo.TemperMin=50.0
A_
HT

3. Stop finding temperature information


TP
_

Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=stopFind


AP

Method GET
I_

Request Params (key=value format in URL )


V3

Name Type R/O Description Example


.3
7

token uint R query token, get from interface of 46878


fo

the first step.


rV

Request Example
el

http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=stopFind&token=46878
se
n gS

Response Params ( OK in body )


dn

Name Type R/O Description Example


Bh

Response Example
d

OK

11.2.8 Subscribe Temperature Information


Subscribe temperature information
Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=attachTemper
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R Video channel number, starting from 1 1
heartbeat int O Heartbeat interval. The unit is second, 5
and the default value is 5. When the

Thermography and Radiometry APIs 584


device sends temperature data in the
response, it will periodically send a
heartbeat message to keep it alive
according to the heartbeat interval. The
content of the message is the string
"Heartbeat".
Request Example
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=attachTemper&channel=2&heartbeat=5

Response Params ( multipart ; key=value format in body )


Name Type R/O Description Example
info object[] R Temperature information array
char[32 Record time, format: yyyy-MM-dd "2010-04-08 16:12:46"
+Time R
] HH:mm:ss
+PresetId int O Preset number, starting from 1 1
+RuleId int O Rule number 1
DA

Search Type "Spot"


HU

char[16 "Spot": Spot


+Type R
A_

] "Area": Area
HT

"Line": Line
TP

char[64 "xxxx"
+Name O Query item name
_

]
AP

Query the coordinates of [[1024, 2048]]


I_

temperature monitoring point, up to


V3

+Coordinate int[8][2] O
8, using the 8192 relative coordinate
.3
7

system.
fo

Video channel number, starting from 0


rV

+Channel int O
0
el

Temperature unit, value: "Centigrade"


se

char[16
n

+TemperatureUnit R "Centigrade" : Centigrade


gS

]
"Fahrenheit": Fahrenheit
dn

+QueryTemperInfo object R Temperature information


Bh

++TemperAve float R Average temperature 50.1


d

++TemperMax float R Maximum temperature 50.2


++TemperMin float R Minimum temperature 50.0
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: text/plain
Content-Length: <data length>

info[0].Time=2010-04-08 16:12:46
info[0].PresetId=1

Thermography and Radiometry APIs 585


info[0].RuleId=1
info[0].Type=Spot
info[0].Name=xxxx
info[0].Coordinate[0][0]=1024
info[0].Coordinate[0][1]=2048
info[0].Channel=0
info[0].TemperatureUnit=Centigrade
info[0].QueryTemperInfo.TemperAve=50.1
info[0].QueryTemperInfo.TemperMax=50.2
info[0].QueryTemperInfo.TemperMin=50.0
……
--<boundary>
Content-Type: text/plain
Content-Length: 11

Heartbeat
DA

--<boundary>
HU

……
A_
HT

11.2.9 Subscribe Radiometry Data


TP
_

Subscribe temperature distribution data


AP

Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=attachProc


I_
V3

Method GET
.3

Request Params ( key=value format in URL )


7

Name Type R/O Description Example


fo

channel int R Video channel number, starting from 1 1


rV

heartbeat int O Heartbeat interval. The unit is second, 5


el
se

the value range is [1,60], the default


n

value is 5. When the device sends


gS

temperature data in the response, it


dn

will periodically send a heartbeat


Bh

message to keep it alive according to


d

the heartbeat interval. The content of


the message is the string "Heartbeat".
Request Example
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=attachTemper&channel=2&heartbeat=5

Response Params ( multipart ; key=value format in body )


Name Type R/O Description Example
dataInfo object R Temperature distribution data
information
+Width int R Image width, in pixels 1920
+Height int R Image height, in pixels 1080
Video channel number, starting from 0
+Channel int O
0

Thermography and Radiometry APIs 586


Fetching data time, format: yyyy- "2010-04-08 16:12:46"
+Time char[32] R
MM-dd HH:mm:ss
+Length int O Data length 2073600
+sensorType char[16] O Algorithm type, value: "Tau” "Tau"
Decompression parameter, used
+Unzip object O
when sensorType is Tau
O Parameter R required for 1
++ParamR uint
temperature conversion
uint O Parameter B required for 1
++ParamB
temperature conversion
uint O Parameter F required for 1
++ParamF
temperature conversion
uint O Parameter O required for 1
++ParamO
temperature conversion
Response Example
HTTP/1.1 200 OK
DA

Server: Device/1.0
HU

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


A_

Connection: closed
HT
TP

--<boundary>
_

Content-Type: text/plain
AP

Content-Length: <data length>


I_
V3

dataInfo.Width=1920
.3
7

dataInfo.Height=1080
fo

dataInfo.Channel=0
rV

dataInfo.Time=2010-05-25 00:00:00
el

dataInfo.Length=2073600
se
n

dataInfo.sensorType="Tau"
gS

dataInfo.Unzip.ParamR=1
dn

dataInfo.Unzip.ParamB=1
Bh

dataInfo.Unzip.ParamF=1
d

dataInfo.Unzip.ParamO=1
--<boundary>
Content-Type: application/octet-stream
Content-Length: <data length>

<Binary data>
--<boundary>
Content-Type: text/plain
Content-Length: 11

Heartbeat
--<boundary>
……

Thermography and Radiometry APIs 587


11.2.10 Fetch Radiometry Data
Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=toFetch
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
+channel int R video channel index which starts 1
from 1.
Request Example
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=toFetch&channel=2

Response Params ( key=value format in body )


Name Type R/O Description Example
status char[] R Range is {Ready, Busy}. Ready
"Ready"means service available
DA

and "Busy"means service busy.


HU

Response Example
status=Ready
A_
HT
TP

11.2.11 [Config] FireWarning Config


_
AP
I_

Config Data Params


V3

Name Type R/O Description Example


.3
7

FireWarning object[][] O Fire warning configuration, used in


fo

conjunction with FireWarningMode


rV

configuration
el

It is a two-dimensional array. The


se

first dimension represents the video


ngS

input channel.
dn

+SmdFilterEn bool O whether smd filter take effect false


Bh

able
d

+Enable bool O whether fire detect take effect true


+PresetId int O The PresetId 0
+Row int O rows of fire detect area 32
+Col int O cols of fire detect area 40
+Mode char[16] O Range is {"Auto","Normal"}. "Auto"
+Type char[16] O "Fire", "Smoke" "Fire"
+TimeDuration bool O whether include fire detect false
Enable duration,only take effect in
SpaceExClude mode
+FireDuration int O fire last times 60
+MovingTarget bool O whether moving target filter take false
FilterEnable effect
+SunReflectE bool O whether sun reflect filter take effect false
nable

Thermography and Radiometry APIs 588


+EventHandle EventHand O Setting of EventHandler is
r ler described in SetEventHandler.
+DetectWindo object[] O
w
++Regions int64[] O detect area mask [123456789…,
123456789,…]
++Postion float[] O Spatial exclusion zone information, [0.0, 0.0, 1.0]
with the first dimension representing
the spatial coordinate PTZ
Valid when the fire warning mode is'
SpaceExCloud '
++TargetSize int O target size 3
Unit: Pixels
++Sensitivity int O Rage {0,100} 5
++Id int O Rage {0,…} 33
++Name char[32] O detect window name "Region1"
DA
HU

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
A_

specific examples are as follows:


HT

Get Config Request Example


TP

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=FireWarning
_

Get Config Response Example


AP

table.FireWarning[0][0].Enable=true
I_

table.FireWarning[0][0].PresetId=0
V3

table.FireWarning[0][0].Row = 31
.3
7

table.FireWarning[0][0].Col = 40
fo

table.FireWarning[0][0].Mode=Auto
rV

table.FireWarning[0][0].SmdFilterEnable=false
el

table.FireWarning[0][0].MovingTargetFilterEnable=false
se
n

table.FireWarning[0][0].SunReflectEnable=false
gS

table.FireWarning[0][0].TimeDurationEnable=false
dn

table.FireWarning[0][0].FireDuration= 15
Bh

table.FireWarning[0][0].DetectWindow[windowsNum].Regions[0]=123468789
d

table.FireWarning[0][0].DetectWindow[windowsNum].Regions[1]=123468789
table.FireWarning[0][0].DetectWindow[windowsNum].Regions[2]=123468789
table.FireWarning[0][0].DetectWindow[windowsNum].Regions[3]=123468789
table.FireWarning[0][0].DetectWindow[windowsNum].Postion[0]=0
table.FireWarning[0][0].DetectWindow[windowsNum].Postion[1]=0
table.FireWarning[0][0].DetectWindow[windowsNum].Postion[2]=0
table.FireWarning[0][0].DetectWindow[windowsNum].Postion[3]=0
table.FireWarning[0][0].DetectWindow[windowsNum].Sensitivity = 95
table.FireWarning[0][0].DetectWindow[windowsNum].Id=1
table.FireWarning[0][0].DetectWindow[windowsNum].Name=windName
table.FireWarning[0][0].EventHandler=(output of EventHandler is described in GetEventHandler)

Set Config Request Example

Thermography and Radiometry APIs 589


http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&FireWarning[0][0].Eanble=false
Set Config Response Example
OK

11.2.12 [Config] FireWarningMode Config


Config Data Params
Name Type R/O Description Example
FireWarningM object[] O Fire warning mode configuration
ode Is an array representing video
channels, starting from 0 and
supporting a maximum of 32
channels
+Mode char[16] O Rage is "PtzPreset"
{"PtzPreset","SpaceExClude"}
DA

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
HU

specific examples are as follows:


A_

Get Config Request Example


HT

http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=FireWarningMode
TP

Get Config Response Example


_

table.FireWarningMode[0].Mode="PtzPreset"
AP
I_
V3

Set Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&FireWarningMode[0].Mode=SpaceExClude
.3
7

Set Config Response Example


fo

OK
rV
el

11.2.13 Get Current Hot Cold Spot


se
ngS

Request URL http://<server>/cgi-bin/TemperCorrection.cgi?action=getCurrentHotColdSpot


dn

Method GET
Bh

Request Params (key=value format in URL )


d

Name Type R/O Description Example


channel int R video channel index which starts 1
from 1, only thermography channels
are valid.
Request Example
http://192.168.1.108/cgi-bin/TemperCorrection.cgi?action=getCurrentHotColdSpot&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
info object O The current hot code spot info.
+HotPoint int[2] O The hot spot position, must be two [1150,2320]
int, means x and y value, coordinate
remap to 0 — 8192.

Thermography and Radiometry APIs 590


+HotSpotValu float O 35.5
The hot spot temperature value.
e
+ColdPoint int[2] O The cold spot position, must be two [5452,6192]
int, means x and y value, coordinate
remap to 0 — 8192.
+ColdSpotVal float O 24.3
The cold spot temperature value.
ue
+Temperature int O The temperature unit : 0 Centigrade, 0
Unit 1 Fahrenheit
Response Example
info.HotPoint[0]=1150
info.HotPoint[1]=2320
info.HotSpotValue=35.5
info.ColdPoint[0]=5452
info.ColdPoint[1]=6192
info.ColdSpotValue=24.3
DA

info.TemperatureUnit=0
HU
A_
HT

11.2.14 [Config] Heat Image Temper PreAlarm Event


TP
_
AP

Config Data Params


Name Type R/O Description Example
I_
V3

PreAlarmEven object[] O Temperature pre alarm configuration,


.3

t one-dimensional array.Video channel


7

number, starting from 0


fo

+Enable bool R false


rV

Enable/Disable Heat Imaging Temper


el

feature.
se

+EventHandle EventHand O Setting of EventHandler is described in


n

r ler SetEventHandler.
gS
dn

Please refer to "4.2.1 Obtaining and Setting Configuration" to obtain and set the configuration. The
Bh

specific examples are as follows:


d

Get Config Request Example


http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=PreAlarmEvent
Get Config Response Example
table.PreAlarmEvent[0].Enable=false
table.PreAlarmEvent[0].EventHandler….(output of EventHandler is described in SetEventHandler)
table.PreAlarmEvent[1]….

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&PreAlarmEvent[0].Enable=false&PreAlarmEvent[0].EventHan
dler.BeepEnable=false
Set Config Response Example
OK

Thermography and Radiometry APIs 591


11.2.15 Get Heat Map Info
Get Heat Map Info.
Request URL http://<server>/cgi-bin/RadiometryManager.cgi?action=getHeatMapsDirectly
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R video channel index which starts 2
from 1
Request Example
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getHeatMapsDirectly&channel=2

Response Params ( multipart, binary in body )


Name Type R/O Description Example
dataInfo object O Data info
DA

+Height integer O height 0


HU

+Width integer O width 0


A_

+Channel integer O Channel number 0


HT

+Time string O Time of getting data 2010-05-25 00:00:00


TP

+Length integer O Data length 0


_ AP

+sensorType string O Algorithm type "Tau"


+Unzip object O unzip parameters, it works when
I_
V3

sensorType was "Tau".


.3

++ParamR integer O Parameter R for temperature 1


7

conversion
fo
rV

++ParamB integer O Parameter B for temperature 1


conversion
el
se

++ParamF integer O Parameter F for temperature 1


n

conversion
gS

++ParamO integer O Parameter O for temperature 1


dn

conversion
Bh

Response Example
d

HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: text/plain
Content-Length: <data length>

dataInfo.Height=0
dataInfo.Width=0
dataInfo.Channel=0
dataInfo.Time=2010-05-25 00:00:00
dataInfo.Length=0

Thermography and Radiometry APIs 592


dataInfo.sensorType="Tau"
dataInfo.Unzip.ParamR=1
dataInfo.Unzip.ParamB=1
dataInfo.Unzip.ParamF=1
dataInfo.Unzip.ParamO=1

--<boundary>
Content-Type: application/octet-stream
Content-Length: <data length>

<Binary data>

--<boundary>
……
DA

11.2.16 Get Temperature of Particular Region


HU
A_

Request URL http://<server>/cgi-bin/api/RadiometryManager/getRandomRegionTemper


HT

Method POST
TP

Request Params ( JSON format in body )


_

Name Type R/O Description Example


AP

Channel int R Video channel index. Start from 0 1


I_
V3

Polygon int[8][2] R a polygon area. [[0,0], [192,3],[160,80]


the first array is point list, minimum item ]
.3
7

is 3, the second array is point, must be


fo

two int, means x and y value, coordinate


rV

remap to 0 — 8192.
el

Request Example
se
n

{
gS

"Channel": 1,
dn

"Polygon": [[0,0], [192,3],[160,80]]


Bh

}
d

Response Params ( JSON format in body )


Name Type R/O Description Example
RegionTempIn object R Temperature information of the area
fo
+Temperature char[32] R Temperature unit (currently configured "Centigrade"
Unit temperature unit). There are two types of
temperature units supported:
"Centigrade"
"Fahrenheit"
+TemperAver int32 R The parameter value of the average 3100
temperature in the temperature
measurement area, with an accuracy of
0.01 and an increase of 100 times

Thermography and Radiometry APIs 593


+TemperMax int32 R The parameter value of the maximum 3200
temperature in the temperature
measurement area, with an accuracy of
0.01 and an increase of 100 times
+TemperMin int32 R The parameter value of the minimum 3000
temperature in the temperature
measurement area, with an accuracy of
0.01 and an increase of 100 times
+TemperMaxP uint[2] R The point with the highest temperature, [100,300]
oint must be two int, means x and y value,
coordinate remap to 0 — 8192.
+TemperMinP uint[2] R The point with the lowest temperature, [200,600]
oint must be two int, means x and y value,
coordinate remap to 0 — 8192.
+RuleName char[32] O rule name "RuleName"
Response Example
DA

{
HU

"RegionTempInfo": {
A_

"TemperatureUnit": "Centigrade",
HT

"TemperAver": 3100,
TP

"TemperMax": 3200,
_

"TemperMin": 3000,
AP

"TemperMaxPoint": [100,300],
I_

"TemperMinPoint": [200,600],
V3

"RuleName": "RuleName"
.3
7

}
fo

}
rV
el
se

11.3 TemperCustom
ngS
dn

11.3.1 Set Environment Temperature


Bh
d

Request URL http://<server>/cgi-bin/TemperCustom.cgi?action=setEnvTemp


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
environment temperature 2800
EnvironmentTe
int R Magnified 100 times,the unit is
mp
0.01Celsius degree
Request Example
http://192.168.1.108/cgi-bin/TemperCustom.cgi?action=setEnvTemp&EnvironmentTemp=2800

Response Params( OK in body )


Name Type R/O Description Example
Response Example

Thermography and Radiometry APIs 594


OK

DA
HU
A_
HT
TP
_ AP
I_
V3
.3
7
fo
rV
el
se
n
gS
dn
Bh
d

Thermography and Radiometry APIs 595


12 Access Control APIs

12.1 Access Control

12.1.1 Open Door


Open the door
Request URL http://<server>/cgi-bin/accessControl.cgi?action=openDoor
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R the index of door, starts from 1 1
DA

UserID int O remote user ID 101


HU

Type char[16] O the open type, default value is "Remote" "Remote"


A_

Request Example
HT

http://192.168.1.108/cgi-bin/accessControl.cgi?action=openDoor&channel=1&UserID=101&Type=Re
TP

mote
_ AP

Response Params ( OK in body )


I_
V3

Response Example
.3

OK
7
fo

12.1.2 Close Door


rV
el
se

Close the door


ngS

Request URL http://<server>/cgi-bin/accessControl.cgi?action=closeDoor


dn

Method GET
Request Params ( key=value format in URL )
Bh

Name Type R/O Description Example


d

channel int R the index of door, starts from 1. 1


UserID int O remote user ID. 101
Type char[16] O the open type, default value is "Remote". "Remote"
Request Example
http://192.168.1.108/cgi-
bin/accessControl.cgi?action=closeDoor&channel=1&UserID=101&Type=Remote

Response Params ( OK in body )


Response Example
OK

Access Control APIs 596


12.1.3 Get Door Status
Get status of the door
Request URL http://<server>/cgi-bin/accessControl.cgi?action=getDoorStatus
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel int R the index of door, starts from 1 1
Request Example
http://192.168.1.108/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
Info object R door status info
+status char[16] R door status, the range is {Open, "Open"
DA

Break, Close}
HU

Response Example
A_

Info.status=Open
HT

12.1.4 Get Lock Status


TP
_ AP

Request URL http://<server>/cgi-bin/accessControl.cgi?action=getLockStatus


I_

Method GET
V3

Request Params ( key=value format in URL )


.3
7

Name Type R/O Description Example


fo

channel int O the index of lock, starts from 1. 1


rV

Default is 1 if not present.


el

Parameters in Response :
se

Request Example
n gS

http://192.168.1.108/cgi-bin/accessControl.cgi?action=getLockStatus&channel=0
dn
Bh

Response Params ( key=value format in body )


d

Name Type R/O Description Example


Info object O lock info
+onLineStatus char[] O the range is { "OnLine", OnLine
"OffLine" }
+status char[] O the range is {"Open", Close
"Close","Abnormal",
"FakeLocked", "Unknown" }
Response Example
Info.onLineStatus=Online
Info.status=Close

Access Control APIs 597


12.1.5 Capture Fingerprint
Only ID verification terminals such as ASHZ320/520 are supported. Common access control is not
supported.
Capture fingerprint data, then report it via ‘Fingerprint’ event.
Request URL http://<server>/cgi-bin/accessControl.cgi?action=captureFingerprint
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
info object R fingerprint data
+ReaderID char[] R Reader machine ID 101
+FingerPrintNa char[] O Fingerprint name (For smart aaaa
me building products)
+ UserID char[] O User Identity (For smart 10221
building products)
DA

heartbeat int R Heartbeat interval (sec) 10


HU

timeout int R Timeout (sec) 20


A_

Request Example
HT

http://<server>/cgi-
bin/accessControl.cgi?action=captureFingerprint&info.ReaderID=101&info.FingerPrintName=aaaa&in
TP
_

fo.UserID=10221&heartbeat=5&timeout=10
AP
I_

Response Params (multipart , json format in body , Heartbeat in body)


V3

Name Type R/O Description Example


.3
7

Response Example
fo

HTTP/1.1 200 OK
rV

Cache-Control: no-cache
el

Pragma: no-cache
se

Expires: Thu, 01 Dec 2099 16:00:00 GMT


n gS

Connection: close
dn

Content-Type: multipart/x-mixed-replace; boundary=myboundary


Bh
d

--myboundary
Content-Type: text/plain
Content-Length: 238002

Code=Fingerprint;action=Pulse;index=0;data={
"CollectResult": true,
"FingerPrintID": 60,
"RecNo": 1234,
"ReaderID": "1",
"UserID": "001",
"CardNo": "001",
"FingerprintPacket": {
"Length": 512,
"Count": 3

Access Control APIs 598


},
"FingerprintData": "xxx",
"BinaryData": Binary Data
}

--myboundary
Content-Type: text/plain
Content-Length: 9

Heartbeat

--myboundary
……

12.1.6 Capture Face Picture


DA

Only ID verification terminals such as ASHZ320/520 are supported. Common access control is not
HU

supported.
A_

Capture face data, then report it via ‘CitizenPictureCompare’ event.


HT

Request URL http://<server>/cgi-bin/accessControl.cgi?action=captureCmd


TP

Method GET
_ AP

Request Params ( key=value format in URL )


I_

Name Type R/O Description Example


V3

+type int R Capture entity types: 1


.3

0x01 - Face
7
fo

0x02 - Identification card


rV

+UserID string O User ID 10221


el

heartbeat int R Heartbeat interval (sec) 5


se

timeout int R Timeout (sec) 10


n gS

Request Example
dn

http://<server>/cgi-
bin/accessControl.cgi?action=captureCmd&type=1&UserID=10221&heartbeat=5&timeout=10
Bh
d

Response Params (multipart , json format in body , Heartbeat in body)


Name Type R/O Description Example
Response Example
HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Dec 2099 16:00:00 GMT
Connection: close
Content-Type: multipart/x-mixed-replace; boundary=myboundary

--myboundary
Content-Type: text/plain
Content-Length: 2380

Access Control APIs 599


Code=CitizenPictureCompare;action=Pulse;index=0;data={
"UTC": 1999999999,
"CompareResult": true,
"Similarity": 90,
"Threshold": 80,
"Citizen": "ZhangSan",
"Sex": 1,
"Minzu": 1,
"Birth": "1980-01-01",

}

--myboundary
Content-Type: text/plain
Content-Length: 9
DA
HU

Heartbeat
A_
HT

--myboundary
TP

……
_ AP
I_
V3

12.1.7 Query AccessControl Record


.3
7

Request URL http://<server>/cgi-bin/recordFinder.cgi?action=find


fo

Method GET
rV

Request Params ( key=value format in URL )


el
se

Name Type R/O Description Example


n

R The record table name. It should "AccessControlCardR


gS

name string
be "AccessControlCardRec". ec"
dn

O Max result to return, default is 100


count int
Bh

1024.
d

O The start of the record's 123456700


StartTime string
CreateTime.
O The end of the record's 123456800
EndTime string
CreateTime.
condition object O Search condition.
+CardNo string O Access user card number. 123456
Request Example
http://192.168.1.108/cgi-
bin/recordFinder.cgi?action=find&name=AccessControlCardRec&StartTime=123456700&EndTime=1
23456800&condition.CardNo=12001&count=100

Response Params ( key=value format in body )


Name Type R/O Description Example
totalCount int O Total record num that find. 1000

Access Control APIs 600


found int O Record num that returned. 100
records object[] R The records that returned.
+RecNo int R Record id. 12345
+FaceIndex uint8 O 0
+CreateTime int O Record create time, UTC time. 123456789
+CardNo int R Access user card number. 12001
O Access user card name, max ZhangSan
+CardName string
string length is 31.
O The card type: 0
0: Normal Card, 1: VIP Card, 2:
+CardType int Visitor Card, 3: Patrol Card, 4:
Blocklist Card, 5: Stress Card,
0xff: Mother Card
+Password string O The Access card's password. 123456
+UserID string R The user's id. ZhangSan
O The event type. It can be: Exit
DA

+Type string
"Entry", "Exit".
HU

int O Open door result. It can be: 0— 1


A_

failed, 1—success.
+Status
HT

If this param does not exist, that


TP

means success.
_

int R Open door method. It can be: 1


AP

 0: by password
I_

1: by access card
V3


2: by access card and then
.3


7

+Method password
fo

 3: by password and then


rV

access card
el

6: by fingerprint
se


n

 15: by face recognition


gS

int O The index of the door. ( This 5


dn

+Door param is not supported by video


Bh

talk device )
d

O The access user card ID of


+ReaderID string reader. ( This param is not
supported by video talk device )
O The error code, valid only when
+ErrorCode int
Status is 0.
O The picture's URL, max string
length is 127. ( This param is not
+URL string
supported by access control
device )
+AttendanceStat enumint O 1
e
+Similarity uint8 O Similarity 75
+SnapFaceURL char[128] O "/mnt/109/20141104/1.
jpg"

Access Control APIs 601


+CitizenPictureU char[128] O "/mnt/109/20141104/1.
RL jpg "
O The record video's URL, max
string length is 127. ( This param
+RecordURL string
is not supported by access
control device )
+CitizenIDResult bool O citizen ID compare result true
+CitizenIDName string O citizen name Zhangsan
+CitizenIDNo string O citizen ID number 342000000000000000
O sex:{ 1
0: unknow
1: male
+CitizenIDSex int
2: female
9: not stated
}
+CitizenIDMinzu int O citizen ID Minzu 1
DA

+CitizenIDBirth string O birthday, format as "1980-01-01" 1980-01-01


HU

+CitizenIDAddre O BinanRoad
string address
A_

ss
HT

+CitizenIDAutho O gggg
string signing and issuing organization
TP

rity
_

+CitizenIDStart string O Effective date 1996-01-01


AP

string O Expiration date, and "Endless" 2006-01-01


I_

+CitizenIDEnd
mens Long term effectiveness
V3

+HatType int O
.3
7

+HatColor char[16] O enumchar[16]{ "Yellow"


fo

"Unknown"
rV

"Transparent"
el

"Other"
se
n

"White",
gS

"Orange",
dn

"Pink",
Bh

"Black",
d

"Red",
"Yellow",
"Gray",
"Blue",
"Green",
"Purple",
"Brown",
"Silver",
"Darkviolet",
"Maroon",
"Dimgray",
"Whitesmoke",
"Darkorange",
"Mistyrose",

Access Control APIs 602


"Tomato",
"Olive",
"Gold",
"Darkolivegreen",
"Chartreuse",
"Greenyellow",
"Forestgreen",
"Seagreen",
"Deepskyblue",
"Cyan",
"ShadowGreen"
}
+IsOverTempera bool O is over temperature true
ture
+TemperatureUn uint O Temperature unit (0 ° C, 1 ° F, 2 0
it Kelvin)
DA

+CurrentTemper float O current temperature 36.8


HU

ature
A_

+RemainingTim uint O remain time 200


HT

es
TP

+Mask uint8 O default 0 0


_

0: unknow
AP

1 without mask
I_

2 with mask
V3

+Score uint8 O quality 3


.3
7

+ButtonCheck uint8 O 0
fo

+QRCode char[512] O QRCode "111111111111"


rV

VTONumber char[32] 否 VTO number "8001"


el

RoomNumber char[32] 否 VTH room number "9901"


se
n

Notes char[32] 否 comments


gS

ReservedInt int32 否 reserved


dn

ReservedString char[32] 否 reserved


Bh

Response Example
d

totalCount=1000
found=100
records[0].RecNo=12345
records[0].CreateTime=123456789
records[0].CardNo=12001
records[0].CardName=ZhangSan
records[0].UserID=ZhangSan
records[0].Type=Entry
records[0].Method=1

records[1].RecNo=13579
records[1].CreateTime=123456799
records[1].CardNo=12001
records[1].CardName=ZhangSan

Access Control APIs 603


records[1].UserID=ZhangSan
records[1].Type=Exit
records[1].Method=1

12.1.8 Query Access Control Alarm Record


Find the AccessControlAlarmRecord record. ( This api is supported by access control device. )
Request URL http://<server>/cgi-bin/recordFinder.cgi?action=find
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name char[] R fixed to AccessControlAlarmR
"AccessControlAlarmRecord" ecord
DA

StartTime char[] O start time formt: 2014-8- 2014-8-


HU

25%2000:01:32 25%2000:01:32
EndTime char[] O end time formt: 2014-8-
A_

2014-8-
25%2000:02:32 25%2000:02:32
HT

count int O record count 500


TP

StartTimeUTC uint32 O Start time in UTC 123456789


_ AP

EndTimeUTC uint32 O Stop time in UTC 123456789


I_

Request Example
V3

http://192.168.1.108/cgi-
.3

bin/recordFinder.cgi?action=find&name=AccessControlAlarmRecord&StartTime=2014-8-
7
fo

25%2000:02:32&EndTime=2014-8-25%2001:02:32&count=500
rV
el

Response Params ( key=value format in body )


se

Name Type R/O Description Example


ngS

totalCount int R total count 200


dn

found int R return count 100


records object[] R record info
Bh

+RecNo int O record number 1234


d

+CreateTime int O UTC 12345678


+UserID char[] O user ID 1254
+EventCode char[] O Enumchar[32]{ AlarmLocal
DoorNotClosed
BreakIn
RepeatEnter
Duress
AlarmLocal
ChassisIntruded
MaliciousAccessControl
AccessControlBlacklist
}
+DevAddrs int O 1

Access Control APIs 604


+IndexNum int O channel number which starts 0
from 0
+Time char[] O event occurred time 2017-05-10 16:00:01
(UTC with time zone and
daylight saving time deviation)
Response Example
totalCount=1000
found=500
records[0].RecNo=789
records[0].CreateTime=123456789
records[0].UserID=10113
records[0].EventCode=DoorMagnetism
records[0].DevAddrs=1
records[0].IndexNum=0
records[0].Time=2017-05-10 16:00:01

DA
HU
A_

12.1.9 [Event] AccessControl


HT
TP

Event Code AccessControl


_

Event action Pulse


AP

Event index 0
I_

Event Data
V3

Name Type R/O Description Example


.3
7

+RecNo int R The record id 25


fo

+Name string O The name of the door bgs


rV

The event type. It can be: "Entry", Entry


el

+Type string O
"Exit"
se
n

Open door result, can be: 0—failed, 1


gS

1—success
+Status int O
dn

If this param does not exist, that


Bh

means success.
d

Open door method, can be: 0


0: by password
1: by access card
2: by access card and then
password
3: by password and then access
card
+Method int R
6: by fingerprint
7: by password and access card
and fingerprint together
8 : by password and fingerprint
together
9 : by access card and fingerprint
together

Access Control APIs 605


10: reserved
11: by multiple access user
12: by key
13: by duress password
14: by QR code, local
15: by face recognition, local
16: reserved
17: by ID card
18: by face and ID card
19: by Bluetooth
20: by custom password
21: by UserId and password
22: by face and password
23: by fingerprint and password
24: by fingerprint and face
25: by access card and face
DA

26: by face or password


HU

27: by fingerprint or password


A_

28: by fingerprint or face


HT

29: by access card or face


TP

30: by access card or fingerprint


_

31: by fingerprint and face and


AP

password
I_

32: by access card and face and


V3

password
.3
7

33: by access card and fingerprint


fo

and password
rV

34: by access card and fingerprint


el

and face
se

35: by fingerprint or face or


ngS

password
dn

36: by access card or face or


Bh

password
d

37: by access card or fingerprint or


face
38: by access card and fingerprint
and face and password
39: by access card or fingerprint or
face or password
40: by ID card and face, or access
card or face
41: by ID card or QR code or face
42: by DTMF(SIPINFO,RFC2833,
INBAND)
43: by QR code, remote
44: by face recognition, remote

Access Control APIs 606


45: by ID card ( match with
fingerprint in ID card )
46: by temporary password
47: by health code
Card number if the door is opened 123456
+CardNo string O
by card
+UserID string R The user id
+ErrorCode integer O error code
+ObjectProperti O
object Dynamic structure info
es
O is with mask, it can be { 0
0: unknow
+Mask integer 1: without mask
2: with mask
}
+ManTemperatu O
DA

object people’s temperature info


reInfo
HU

++CurrentTempe O 36.7
float people’s current temperature
A_

rature
HT

O temperature unit:{ 0
TP

0: centigrade
++TemperatureU
_

integer 1: Fahrenheit
AP

nit
2: Kelvin
I_

}
V3

++IsOverTemper O false
.3

bool is over temperature


7

ature
fo
rV
el

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
se

4.4.3 snap subscription )


n gS

--<boundary>
dn

Content-Type: text/plain
Content-Length: <length>
Bh
d

Events[0].EventBaseInfo.Code=AccessControl
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].RecNo=123
Events[0].Name=Door1
Events[0].Type=Entry
Events[0].Status=1
Events[0].Method=1
Events[0].CardNo=09DDAABB
Events[0].UserID=101

--<boundary>
Content-Type: image/jpeg

Access Control APIs 607


Content-Length: <image size>

<Jpeg image data>


--<boundary>

12.1.10 [Event] CitizenPictureCompare


Event Code CitizenPictureCompare
Event action Pulse
Event index 0
Event Data
Name Type R/O Description Example
+UTC uint32 O UTC time
+CompareResul bool O compare result. If the similarity is
t greater than or equal to the
threshold, the comparison is
DA

considered successful
HU

+Similarity integer O Similarity of two pictures, Unit:


A_

percentage
HT

range[1, 100]
TP

+Threshold integer O check threshold


_

range[1, 100]
AP

+Citizen String O citzen name


I_

+Sex integer O sex, it can be: {


V3

0 unknow
.3
7

1 male
fo

2 female
rV

9 not stated
el

}
se
n

+Minzu integer O Minzu (refer to CitizenIDCard)


gS

+Birth String O birthday, such as "1980-01-01"


dn

+Address String O address


Bh

+Number String O citizen ID


d

+Authority String O signing and issuing organization


+Start String O Effective date
+End String O Expiration date, and "Endless"
mens Long term effectiveness
+ImageInfo array<object O Picture information, the first for the
> face cutout, the second for the ID
card photo
++Offset integer O the offset in binary data
++Length integer O length of picture, unit: Byte
++Width integer O Picture width, pixels
++Height integer O Picture height, pixels
+ImageInfoEx array<object O extension of picture info, (The total
> number of images uploaded is

Access Control APIs 608


determined by imageinfo and
imageinfoex)
6 at most
++Type integer O picture type
0 Local face database
1 Shooting scene map
++Offset integer O the offset in binary data
++Length integer O length of picture, unit: Byte
++Width integer O Picture width, pixels
++Height integer O Picture height, pixels
+CardNo String O IC card number (for building
products)
+CellPhone String O phone number (input number
before comparison) (for building
products)
+BuildingNumbe String O building number (for building
DA

r products)
HU

+BuildingUnitNu String O building entrance number (for


A_

mber building products)


HT

+BuildingRoom String O room number (for building


TP

Number products)
_

+PersonnelRelat String O relationship (for building products)


AP

ionship
I_

+Method integer O method (refer to


V3

OpenDoorMethod)
.3
7

+EventGroupID integer O event group id, used to associate


fo

different events are with same


rV

action. (Used with


el

AccessControlevents)
se
n

+CallNumber String O phone number to be called.(called


gS

after compare succeed) (for


dn

building products)
Bh

+EventType integer O event type:


d

0: compare result
1: Face acquisition
2: visitor registration
3: Face permission distribution
4: inquirement of ID card face
group
+UserID String O user ID
+FaceIndex integer O face index, range [0,4] 0
+Mask integer O is with mask, it can be { 0
0: unknow
1: without mask
2: with mask
}
default 0.

Access Control APIs 609


Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Events[0].EventBaseInfo.Code= CitizenPictureCompare
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].UTC=1999999999
Events[0].CompareResult=true
Events[0].Similarity=80
Events[0].Threshold=75

--<boundary>
DA

Content-Type: image/jpeg
HU

Content-Length: <image size>


A_
HT

<Jpeg image data>


TP

--<boundary>
_ AP

12.1.11 [Event] Door Status Event


I_
V3

Event Code DoorStatus


.3
7

Event action Pulse


fo

Event index 0
rV

Event Data
el

Name Type R/O Description Example


se
n

+UTC uint32 O Standard UTC time (without DST 1999999999


gS

deviation of time zone). Required


dn

for access control products, and


Bh

optional for intercom products.


d

+Status enumchar[32 O Door status CloseAlways


] Enumchar[32]{
"Open"
"Close"
"CloseAlways"
"OpenAlways"
"Normal"
}

Event Response Example ( multipart , key=value format in body , binary data in body ) ( response to
4.4.3 snap subscription )
--<boundary>
Content-Type: text/plain
Content-Length: <length>

Access Control APIs 610


Events[0].EventBaseInfo.Code= DoorStatus
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].UTC=1999999999
Events[0].Status=CloseAlways
--<boundary>

12.1.12 [Config] Access Control General Setting


Config Data Params
Name Type R/O Description Example
AccessControlG object O AccessControlGeneral config object
eneral
Access property, can be : “unidirect”, bidirect
DA

+AccessPropert
string O “bidirect” ( This param is supported by
HU

y
access control device. )
A_

AB Lock setting ( This param is supported


HT

+ABLock object O
by access control device. )
TP

++Enable bool O Enable AB Lock or not.


_AP

AB Lock groups, each group has several


doors, one door can be opened only
I_

++Doors int[][] O
V3

when all other doors in the AB lock group


.3

are in closed state.


7

Whether to enable custom password.


fo

+CustomPassw
bool O ( This param is supported by video talk
rV

ordEnable
device. )
el
se

+CommonPass The common password. ( This param is


string O
n

word supported by video talk device. )


gS

Whether to enable the open door button.


dn

+ButtonExitEnab
bool O ( This param is supported by video talk
le
Bh

device. )
d

Whether to check the sensor before lock


+CheckSensorB
bool O the door. ( This param is supported by
eforeLock
video talk device. )
+CheckSensorTi The check sensor time, in seconds. ( This
int O
me param is supported by video talk device. )
+DuressPasswo The duress password. ( This param is
string O
rd supported by video talk device. )
Whether to enable duress password.
+DuressEnable bool O ( This param is supported by video talk
device. )
Unlock Record Type,can be {"Password",
+UnlockRecordT Array<string
O "Button", "FingerPrint", "QRCode",
ype >
"Card","Remote", "BlueTooth", "Face"}
+SensorType integer O sensor type,

Access Control APIs 611


0 for always open; 1 for always close.
+CallLiftType string O call lift protocol type
+CallLiftEnable bool O whether to enable call lift
+AccessVoice object O Door opening prompt tone
++CurrentVoiceI the current prompt tone ID, default value
integer O
D 0
voice list, max length is 16
voice ID can be: {
0: Validate succeed
1: door open succeed
2: unlock succeed
array<object
++VoiceList O 3: punch time clocks succeed
>
4: welcome
5: Welcome to come again
6: thank you
7: custom voice
DA

}
HU

+++VoiceID integer O voice id


A_

+++VoiceName string O voice info


HT

+++FileName string O file full path with name


TP
_ AP

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
I_

are as follows :
V3

Get Config Request Example


.3

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AccessControlGeneral
7
fo

Get Config Response Example


rV

table.AccessControlGeneral.AccessProperty=bidirect
el

table.AccessControlGeneral.ABLock.Enable=true
se

table.AccessControlGeneral.ABLock.Doors[0][0]=1
ngS

table.AccessControlGeneral.ABLock.Doors[0][1]=2
dn

table.AccessControlGeneral.ABLock.Doors[0][2]=3
table.AccessControlGeneral.ABLock.Doors[1][0]=4
Bh

table.AccessControlGeneral.ABLock.Doors[1][1]=5
d

table.AccessControlGeneral.ABLock.Doors[1][2]=6
table.AccessControlGeneral.CustomPasswordEnable=true
table.AccessControlGeneral.CommonPassword=123456
table.AccessControlGeneral.ButtonExitEnable=true
table.AccessControlGeneral.CheckSensorBeforeLock=true
table.AccessControlGeneral.CheckSensorTime=30
table.AccessControlGeneral.DuressPassword=654321
table.AccessControlGeneral.DuressEnable=true

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&AccessControlGeneral.AccessProperty=bidirect&AccessContr
olGeneral.ABLock.Enable=true&AccessControlGeneral.ABLock.Doors[0][0]=1&AccessControlGeneral.

Access Control APIs 612


ABLock.Doors[0][1]=2&AccessControlGeneral.ABLock.Doors[0][2]=3&AccessControlGeneral.CustomP
asswordEnable=true&AccessControlGeneral.CheckSensorBeforeLock=true
Set Config Response Example
OK

12.1.13 [Config] Access Control Setting


Config Data Params
Name Type R/O Description Example
AccessControl object[] R The AccessControl config array for every
access control channel
+Enable bool O Whether to enable config for this channel.
Door state, can be : “Normal”,
+State string O “CloseAlways”, “OpenAlways”,
“NoPersonNC”, “NoPersonNO”
Open door method, can be following
DA

value, default is 2 :
HU

0 : only by password
A_

1 : only by access card


HT

2 : by password or access card


TP

3 : by access card first then password


_

4 : by password first then access card


AP

5 : different method in differenct time range


I_
V3

6 : only by fingerprint
.3

7 : by password or access card or


7

fingerprint
fo

8 : by password and access card and


rV

fingerprint together
el
se

9 : by password and fingerprint together


n

10 : by access card and fingerprint


gS

together
dn

+Method int O
11 : by multiple access user
Bh

12 : by face ( match with picture in ID card )


d

13 : by face and ID card


14 : by face ( match with picture in ID card )
or access card or fingerprint
15 : by face and ID card, or access card or
fingerprint
16 : by UserID and password
17 : only by face
18 : by face and password together
19 : by fingerprint and password together
20 : by fingerprint and face together
21 : by access card and face together
22 : by face or password
23 : by fingerprint or password
24 : by fingerprint or face

Access Control APIs 613


25 : by access card or face
26 : by access card or fingerprint
27 : by fingerprint and face and password
together
28 : by access card and face and
password together
29 : by access card and fingerprint and
password together
30 : by access card and fingerprint and
face together
31 : by fingerpint or face or password
32 : by access card or face or password
33 : by access card or fingerprint or face
34 by access card and fingerprint and face
and password together
35 : by access card or fingerprint or face
DA

or password
HU

36 : by face and ID card, or access card or


A_

face
HT

37 : by face ( match with picture in ID card )


TP

or access card or face


_

38 : by access card and password, or


AP

fingerprint and password


I_

39 : by ID card ( match with picture in ID


V3

card ) or face
.3
7

40 : by ID card ( match with fingerprint in


fo

ID card )
rV

41 : by ID card ( match with fingerprint and


el

picture in ID card )
se
n

42 : by ID card or access card or


gS

fingerprint or face or password


dn

43 : by multy user method


Bh

44 : by ID card or health code


d

+OpenAlwaysTi The time range that working, value is index


int O
me in AccessTimeSechdule config.
+CloseAlwaysTi The time range that always closed, value
int O
me is index in AccessTimeSechdule config.
The time range that working in holidays,
+HolidayTime int O value is index in AccessTimeSechdule
config.
The Unlock holding interval, unit is
+UnlockHoldInte milliseconds, value should between 250 to
int O
rval 20000. ( This param is also supported by
video talk device. )
The Unlock reload interval, unit is
+UnlockReloadI
int O milliseconds. ( This param is also
nterval
supported by video talk device. )

Access Control APIs 614


The access control process, can be :
"Local", "Dahua", "Remote", "Private"
+AccessProtocol string O
( This param is also supported by video
talk device. )
+BreakInAlarmE
bool O Whether to enable the breakin alarm.
nable
+RepeatEnterAl
bool O Whether to enable the repeat enter alarm.
arm
+DoorNotClosed Whether to enable the alarm when door
bool O
AlarmEnable not closed.
+DuressAlarmE
bool O Whether to enable the duress alarm.
nable
+FirstEnter object O The first enter setting.
++Enable bool O Whenther to enable the first enter function,
++Status string O The status, can be : “KeepOpen” “Normal”
The time range that enable first enter
DA

++Time int O function, value is index in


HU

AccessTimeSechdule config.
A_

The card number convert setting : 0 – not


HT

+CardNoConvert int O convert, 1 – convert using NOT operation,


TP

2 : use HIDpro convert


_
AP

+MaliciousAcces Whether to enable malicious access


bool O
sControlEnable alarm.
I_
V3

+AutoRemoteCh
object O auto open door remotely
.3

eck
7

++Enable bool whether to enable the function


fo
rV

working period , value is index in


++Time uint
AccessTimeSechdule config.
el
se

+Name string O name


n

+RepeatEnterTi Repeat entry time, unit second, 0 means


gS

integer O
me do not start
dn

+CloseTimeout integer O Closing overtime


Bh

+SensorEnable bool O sensor enable


d

Open the door in different periods


Array<Array<
+TimeSchedule it works when Method is "different method
object>>
in differenct time range".
time section, format as "hh:mm:ss-
++TimeSection string O
hh:mm:ss"
Open door method, can be following
value, default is 2 :
0 : only by password
1 : only by access card
++Method integer O
2 : by password or access card
3 : by access card first then password
4 : by password first then access card
5 : different method in differenct time range

Access Control APIs 615


6 : only by fingerprint
7 : by password or access card or
fingerprint
8 : by password and access card and
fingerprint together
9 : by password and fingerprint together
10 : by access card and fingerprint
together
11 : by multiple access user
17 : only by face
35 : by access card or fingerprint or face
or password
+CustomPasswo
bool O whether to enable admin password
rdEnable
+RemoteCheck bool O Is platform validation required
electric relay mode
DA

+LockMode uint8 O
2: Ring mode
HU
A_

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
HT

are as follows :
TP

Get Config Request Example


_

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AccessControl
AP

Get Config Response Example


I_
V3

table.AccessControl[0].Enable=true
.3

table.AccessControl[0].SN=1C03E08YAZ00020
7

table.AccessControl[0].Name=Door1
fo

table.AccessControl[0].State=Normal
rV

table.AccessControl[0].LocalControlEnable=true
el
se

table.AccessControl[0].RemoteControlEnable=true
n

table.AccessControl[0].Mode= HandProtected
gS


dn
Bh

Set Config Request Example


d

http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&AccessControl[0].Enable=true&AccessControl[0].SN=1C03E0
8YAZ00020&AccessControl[0].State=Normal&AccessControl[0].LocalControlEnable=true
Set Config Response Example
OK

12.1.14 [Config] Wiegand Setting


Config Data Params
Name Type R/O Description Example
Wiegand object[] R Wiegand config
Wiegand mode, 0: wiegand input, 1 : 1
+Mode int R
wiegand output

Access Control APIs 616


+PulseWidth int R The pulse width, unit is microseconds 200
+PulseStep int R The pulse step, unit is microseconds 1000
The transfer mode, 0 : wiegand 34bit 1
transfer, 4 byte card number, 2 bit
checksum, 1 : wiegand 66bit transfer, 8
+TransferMode int R
byte card number, 2 bit checksum, 2 :
wiegand 26bit transfer, 3 byte card
number, 2 bit checksum,
The output type, 0 : output ID, 1 : output 1
+OutType int R
card number
the input type, the value is 32bits. It won’t 3
accept any input when value is 0.
+InputType integer O Bit0: card number input
Bit1: password input
bit2~Bit31:reserved
door index, starts from 0, and 0 means 0
DA

+Doors integer O
door 1
HU
A_

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
HT

are as follows :
TP

Get Config Request Example


_ AP

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Wiegand
I_

Get Config Response Example


V3

table.Wiegand[0].Mode=1
.3

table.Wiegand[0].PulseWidth=200
7
fo

table.Wiegand[0].PulseStep=1000
rV

table.Wiegand[0].TransferMode=1
el

table.Wiegand[0].OutType=1
se

table.Wiegand[0].InputType=3
n gS

table.Wiegand[0].Doors=0
dn

table.Wiegand[1].Mode=1

Bh
d

Set Config Request Example


http://192.168.1.108/cgi-
bin/configManager.cgi?action=setConfig&Wiegand[0].Mode=1&Wiegand[0].PulseWidth=200&
Wiegand[0].PulseStep=1000
Set Config Response Example
OK

12.1.15 [Config] Access Time Schedule Setting


The following Apis are not supported by video talk device.
Config Data Params
Name Type R/O Description Example

Access Control APIs 617


AccessTimeSch AccessTimeSchedule config object
object[] R
edule array
The schedule name, max string length
+Name string O
is 63.
+Enable bool R Whether to enable this time schedule
The time schedule array, first array has
max 8 iterm, refer to 7 day in a week
(the first one is Sunday)and last one is
array< holiday, each item is an array has max
+TimeSechdule array< O 6 time section, each time section is a
string > > string, format is “enable,
hour:minite:second –
hour:minite:second”, for example : "1
00:00:00-12:00:00"
DA

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
HU

are as follows :
Get Config Request Example
A_

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AccessTimeSchedule
HT

Get Config Response Example


TP

table.AccessTimeSchedule[0].Name=TS1
_ AP

table.AccessTimeSchedule[0].Enable=true
I_

table.AccessTimeSchedule[0].TimeSchedule[0][0]=1 00:00:00-12:00:00
V3

table.AccessTimeSchedule[0].TimeSchedule[0][1]=1 15:00:00-20:00:00
.3

table.AccessTimeSchedule[0].TimeSchedule[1][0]=1 00:00:00-12:00:00
7
fo

table.AccessTimeSchedule[0].TimeSchedule[1][1]=1 15:00:00-20:00:00
rV


el
se

Set Config Request Example


n
gS

http://192.168.1.108/cgi-
dn

bin/configManager.cgi?action=setConfig&AccessTimeSchedule[0].Name=TS1&AccessTimeSchedule[0]
.Enable=true
Bh

Set Config Response Example


d

OK

12.1.16 [Config] Special Day Group Setting


The following Apis are not supported by video talk device.
Config Data Params
Name Type R/O Description Example
SpecialDayGrou array<object
R SpecialDayGroup config object array
p >
+Name string O The special day group name SpecialDayGroup1
Whether to enable this special day true
+Enable bool R
group

Access Control APIs 618


array<object
+Days O The special days in group
>
++SpecialDayNa NationalDay
string O The special day name.
me
++StartTime string O The special day start datetime 2017-10-01 00:00:00
++EndTime string O The special day end datetime 2017-10-07 23:59:59

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=SpecialDayGroup
Get Config Response Example
table.SpecialDayGroup[0].Name=SpecialDayGroup1
table.SpecialDayGroup[0].Enable=true
table.SpecialDayGroup[0].Days[0].SpecialDayName=NationalDay
DA

table.SpecialDayGroup[0].Days[0].StartTime=2017-10-01 00:00:00
HU

table.SpecialDayGroup[0].Days[0].StartTime=2017-10-07 23:59:59

A_
HT

Set Config Request Example


TP

http://192.168.1.108/cgi-
_AP

bin/configManager.cgi?action=setConfig&SpecialDayGroup[0].Name=SpecialDayGroup1&SpecialDayG
I_

roup[0].Enable=true
V3

Set Config Response Example


.3

OK
7
fo
rV

12.1.17 [Config] Special Days Schedule Setting


el
se

The following Apis are not supported by video talk device.


n
gS

Config Data Params


dn

Name Type R/O Description Example


Bh

SpecialDaysSch array<object SpecialDaysSchedule config object


R
d

edule > array


+Name string O The special day schedule name
Whether to enable this special day
+Enable bool R
schedule
The special day group number, value
+GroupNo int R is the index of SpecialDayGroup
setting array.
The time section array, the format of
the item is “enable,
+TimeSection array<string> R hour:minite:second –
hour:minite:second”, for example : "1
00:00:00-12:00:00".
+Doors array<int> R The doors array.

Access Control APIs 619


Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=SpecialDaysSchedule
Get Config Response Example
table.SpecialDaysSchedule[0].Name=SpecialDayGroup1
table.SpecialDaysSchedule[0].Enable=true
table.SpecialDaysSchedule[0].GroupNo=1
table.SpecialDaysSchedule[0].TimeSection[0]=1 00:00:00-12:00:00
table.SpecialDaysSchedule[0].TimeSection[1]=1 15:00:00-20:00:00
table.SpecialDaysSchedule[0].Doors[0]=2
table.SpecialDaysSchedule[0].Doors[1]=3

Set Config Request Example


http://192.168.1.108/cgi-
DA

bin/configManager.cgi?action=setConfig&SpecialDaysSchedule[0].Name=SpecialDayGroup1
HU

Set Config Response Example


A_

OK
HT
TP
_

12.1.18 [Config] MeasureTemperature Setting


AP
I_
V3

The following Apis are not supported by video talk device.


.3

Config Data Params


7
fo

Name Type R/O Description Example


rV

MeasureTemper
object R MeasureTemperature config object
el

ature
se

whether to enable measure


n

++Enable bool R
gS

temperature function
dn

mask mode
0: don not detect mask
Bh

+MaskOpt uint R
1: mask prompt
d

2: mask intercept
+OnlyTemperatu whether to enable the single function,
bool O
reMode temperature monitoring
+TemperatureDi
bool R whether to show the temperature
splay
temperature unit:{
+TemperatureUn 0: centigrade
uint O
it 1: Fahrenheit
}
Temperature monitoring method, it can
be:
+Type integer R
0: Single chip microcomputer infrared
temperature monitoring

Access Control APIs 620


1: the thermal imaging principle of
temperature monitoring
2: Temperature monitoring module of
Guide
3: single point temperature monitoring
at wrist
+GuideModuleP param of temperature monitoring
object O
aram module of Guide
++Threshold float O the temprerature threshold, unit is ℃
Calibration Model, it can be:
0: indoor mode
++CalibrationMo
uint32 O 1: wall mounting mode
del
2: Gate mode
3: exclusive floor mode
++Correct Float O temperature correct value, unit is ℃
whether tou enable debug mode of
DA

++DebugModelE
Bool O temperature monitoring, show
nable
HU

temperature on the top of face


A_

++HeatDisplayE
bool O whether to show heat
HT

nbale
TP

the max distance for temperature


++MaxDistance uint32 O
_

monitoring, unit: cm
AP

++ProjectDebug
I_

bool O whether to enable project debug mode


Model
V3

whether to show the rectangle of


.3
7

++RectEnable Bool O temperature monitoring area on the


fo

video.
rV

the threshold under which the


el

++TempRandRe temperature value will be replaced with


se

Float O
n

placeThreshold valid one. When threshold value is 0,


gS

the function won’t work.


dn

++ValidTemperat the lower limit of valid temperature


float O
Bh

ureLowerLimit value
d

+InfraredTemper param of infrared temperature


object O
atureParam monitoring
++Correct float O temperature correct value, unit is ℃
whether tou enable debug mode of
++DebugModelE
bool O temperature monitoring, show
nable
temperature on the top of face
the max distance for temperature
++MaxDistance Uint32 O
monitoring, unit: cm
Maximum distance for reporting high
temperature events,
++OverTemperat In this distance, the high temperature
Uint32 O
ureMaxDistance was measured and reported directly.
Beyond this distance, the high
temperature was measured, it will

Access Control APIs 621


indicates closing to the point, and then
measured again (CM)
whether to show the rectangle of
++RectEnable bool O temperature monitoring area on the
video.
++RetentionTim
Uint32 O temperature retention Time, unit: ms
e
sensor type in temperature monitoring
module
++SensorType string O
"90641",
"90640"
++Threshold Uint32 O temperature threshold, unit : ℃
++ValidTemperat the lower limit of valid temperature
Flaot O
ureLowerLimit value
+ThermalImagin
object O param of thermallmaging
gParam
DA

++RetentionTim
Uint32 O temperature retention Time, unit: ms
HU

e
A_

++Threshold Uint32 O temperature threshold, unit : ℃


HT

+WristTemperat
Object O param of wrist temperature monitoring
TP

ureParam
_

++Correct Float O temperature correct value, unit is ℃


AP

++InvalidTemper
I_

Uint32 O invalid temperature monitoring distance


atureDistance
V3

++TemperatureT timeout of temperature monitoring, unit:


.3

Uint32 O
7

imeout s
fo

++Threshold Float O temperature threshold, unit : ℃


rV

++ValidTemperat
el

Uint32 O valid temperature monitoring distance,


ureDistance
se
n

++ValidTemperat the lower limit of valid temperature


gS

flaot O
ureLowerLimit value
dn
Bh

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
d

are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MeasureTemperature
Get Config Response Example
table.MeasureTemperature.Enable=true
table.MeasureTemperature.GuideModuleParam.CalibrationModel=1
table.MeasureTemperature.GuideModuleParam.Correct=0
table.MeasureTemperature.GuideModuleParam.DebugModelEnable=false
table.MeasureTemperature.GuideModuleParam.HeatDisplayEnbale=false
table.MeasureTemperature.GuideModuleParam.MaxDistance=0
table.MeasureTemperature.GuideModuleParam.ProjectDebugModel=false
table.MeasureTemperature.GuideModuleParam.RectEnable=true
table.MeasureTemperature.GuideModuleParam.TempRandReplaceThreshold=0

Access Control APIs 622


table.MeasureTemperature.GuideModuleParam.Threshold=37.300000
table.MeasureTemperature.GuideModuleParam.ValidTemperatureLowerLimit=30
table.MeasureTemperature.InfraredTemperatureParam.Correct=0
table.MeasureTemperature.InfraredTemperatureParam.DebugModelEnable=false
table.MeasureTemperature.InfraredTemperatureParam.MaxDistance=100
table.MeasureTemperature.InfraredTemperatureParam.OverTemperatureMaxDistance=100
table.MeasureTemperature.InfraredTemperatureParam.RectEnable=true
table.MeasureTemperature.InfraredTemperatureParam.RetentionTime=500
table.MeasureTemperature.InfraredTemperatureParam.SensorType=
table.MeasureTemperature.InfraredTemperatureParam.Threshold=37.300000
table.MeasureTemperature.InfraredTemperatureParam.ValidTemperatureLowerLimit=30
table.MeasureTemperature.MaskOpt=0
table.MeasureTemperature.OnlyTemperatureMode=false
table.MeasureTemperature.TemperatureDisplay=true
table.MeasureTemperature.TemperatureUnit=0
table.MeasureTemperature.ThermalImagingParam.RetentionTime=30
DA

table.MeasureTemperature.ThermalImagingParam.Threshold=60
HU

table.MeasureTemperature.Type=3
A_

table.MeasureTemperature.WristTemperatureParam.Correct=0
HT

table.MeasureTemperature.WristTemperatureParam.InvalidTemperatureDistance=24
TP

table.MeasureTemperature.WristTemperatureParam.TemperatureTimeout=10
_

table.MeasureTemperature.WristTemperatureParam.Threshold=37.300000
AP

table.MeasureTemperature.WristTemperatureParam.ValidTemperatureDistance=5
I_

table.MeasureTemperature.WristTemperatureParam.ValidTemperatureLowerLimit=35
V3


.3
7
fo

Set Config Request Example


rV

http://192.168.1.108/cgi-
el

bin/configManager.cgi?action=setConfig&MeasureTemperature.Enable=true&MeasureTemperature.Gui
se

deModuleParam.CalibrationModel=1
ngS

Set Config Response Example


dn

OK
Bh

12.1.19 [Config] CitizenPictureCompare Setting


d

Config Data Params


Name Type R/O Description Example
CitizenPictureCo
object R CitizenPictureCompare config object
mpare
threshold of citizen picture compare, 90
+Threshold uint8 R
range [1, 100]
whether enable unlock false
+UnlockEnable bool R if false, it won’t unlock, when citizen
picture compare succeed.
whether to enable citizen picture false
+FuncEnable bool O
comparison
+CitizenIDCheck bool O is citizen ID check supported false

Access Control APIs 623


device work mode, it can be: CitizenCompare
{ "FaceCollect" , "VisitorVerify",
+SysMode string O
"CitizenCompare", "CitizenIDCheck",
"Other" }

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=CitizenPictureCompare
Get Config Response Example
table.CitizenPictureCompare.SysMode=CitizenCompare
table.CitizenPictureCompare.Threshold=50
table.CitizenPictureCompare.UnlockEnable=false
table.CitizenPictureCompare.FuncEnable=false
table.CitizenPictureCompare.CitizenIDCheck=false
DA


HU

Set Config Request Example


A_

http://192.168.1.108/cgi-
HT

bin/configManager.cgi?action=setConfig&CitizenPictureCompare.SysMode=CitizenCompare&CitizenPic
TP

tureCompare.Threshold=50
_ AP

Set Config Response Example


I_

OK
V3
.3
7
fo

12.2 Access Control Manager


rV
el
se

12.2.1 Get Access Control Capability


n gS

Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=getCaps


dn

Method GET
Bh

Request Params ( key=value format in URL)


d

Name Type R/O Description Example


Request Example
http://192.168.1.108/cgi-bin/accessControlManager.cgi?action=getCaps

Response Params ( key=value format in body )


Name Type R/O Description Example
caps object R The access control capabilities.
+AccessControl int R The access control channel 5
Channels number.
+AccessControl bool O Support log access control alarm true
AlarmRecord record or not. ( This param is not
supported by video talk device )
+CustomPassw int O The custom password crypt type, 0
ordEncryption 0 : plain text, 1 : MD5

Access Control APIs 624


+SupportFinger int O Support fingerprint type, 0 : 0
Print unknown, 1 : not support, 2 :
support
+OnlySingleDoo int O Support single door auth type, 0 : 0
rAuth not support, 1 : support, ( This
param is not used by video talk
device )
+AsynAuth int O Support async auth type, 0 : not 0
support, 1 : support, ( This param
is not supported by video talk
device )
+SpecialDaysSc object O Special days schedule
hedule capabilities, ( This param is not
supported by video talk device )
++Support bool O Support special days schedule or true
not. ( This param is not supported
DA

by video talk device )


HU

++MaxSpecialD int O Max special days schedule 6


A_

aysSchedules number. ( This param is not


HT

supported by video talk device )


TP

++MaxTimePeri int O Max time periods per day. ( This 6


_

odsPerDay param is not supported by video


AP

talk device )
I_

++MaxSpecialD int O Max special day groups. ( This 6


V3

ayGroups param is not supported by video


.3
7

talk device )
fo

++MaxDaysInSp int O Max special days in special day 16


rV

ecialDayGroup group. ( This param is not


el

supported by video talk device )


se
n

+SupportCallLift enumint O Does it support elevator calling. 0


gS

enumint{
dn

0: Not supported
Bh

1: Support
d

}
Default 0
+SupportUnlocki bool O Does the device support true
ng unlocking function
+HasCardAuth bool O Does the device support card false
swiping permission
Response Example
caps.AccessControlChannels=3
caps.AccessControlAlarmRecord=true
caps.CustomPasswordEncryption=1
caps.SupportFingerPrint=1
caps.OnlySingleDoorAuth=1
caps.AsynAuth=1
caps.SpecialDaysSchedule.Support=true

Access Control APIs 625


caps.SpecialDaysSchedule.MaxSpecialDaysSchedules=5
caps.SpecialDaysSchedule.MaxTimePeriodsPerDay=5
caps.SpecialDaysSchedule.MaxSpecialDayGroups=5
caps.SpecialDaysSchedule.MaxDaysInSpecialDayGroup=5
caps.SupportCallLift=0
caps.SupportUnlocking=true
caps.HasCardAuth=true

12.2.2 Add SubController


Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=addDevice
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
devAddr int R SubController ID, range is [1...255] 1
name char[] R SubController Name Sub1
DA

Request Example
HU

http://192.168.1.108/cgi-bin/accessControlManager.cgi?action=addDevice&devAddr=1&name=Sub1
A_
HT

Response Params ( key=value format in body )


TP

Name Type R/O Description Example


_

FaiedCode int R 0-Success; 1-Already exists; 2-Reach 0


AP

quantity limit; 3-Other reason


I_
V3

Response Example
FaiedCode=0
.3
7
fo

12.2.3 Modify SubController


rV
el

Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=modifyDevice


se
n

Method GET
gS

Request Params ( key=value format in URL )


dn

Name Type R/O Description Example


Bh

devAddr int R SubController ID, range is [1...255] 1


d

name char[] R SubController Name Sub1


Request Example
http://192.168.1.108/cgi-
bin/accessControlManager.cgi?action=modifyDevice&devAddr=1&name=Sub1

Response Params ( OK in body )


Response Example
OK

12.2.4 Remove SubController


Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=removeDevice
Method GET

Access Control APIs 626


Request Params ( key=value format in URL )
Name Type R/O Description Example
devAddrs int[] R SubController ID, range is [1...255] [4,5]
Request Example
http://192.168.1.108/cgi-
bin/accessControlManager.cgi?action=removeDevice&devAddrs[0]=4&devAddrs[1]=5

Response Params ( key=value format in body )


Name Type R/O Description Example
devInfo object[] R result
+DevAddr int R the removed SubController ID 4
+FaiedCode int R 0-Success; 1-Fail; 2-Other 0
Response Example
devInfo[0].DevAddr=4
devInfo[0].FaiedCode=0
devInfo[1].DevAddr=5
DA

devInfo[1].FaiedCode=1
HU
A_
HT

12.2.5 Get SubController Info


TP
_ AP

Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=getSubControllerInfo


I_

Method GET
V3

Request Params ( key=value format in URL )


.3

Name Type R/O Description Example


7

devAddrs int[] R SubController ID, range is [1...255] [4,5]


fo
rV

Request Example
http://192.168.1.108/cgi-
el
se

bin/accessControlManager.cgi?action=getSubControllerInfo&devAddrs[0]=4&devAddrs[1]=5
ngS

Response Params ( key=value format in body )


dn

Name Type R/O Description Example


Bh

devInfo object[] O
d

+DevAddr int O SubController ID, range is [1...255] 1


+Name char[64 O name "xxxxxx"
]
+AccessProperty enumch O "bidirect"
range is [unidirect, bidirect]
ar[32]
+DeviceType char[64 O type "ACS-1202B-S"
]
+VerSion char[64 O version "V1.00428"
]
+DoorToReadID object[] O the door
++Door uint O door index 0
++ReaderID char[][3 O ReaderID used by the door ["1","2"]
2]
Response Example

Access Control APIs 627


devInfo[0].DevAddr=4
devInfo[0].Name=Sub4
devInfo[0].AccessProperty=unidirect
devInfo[0].DeviceType=ACS-1202B-S
devInfo[0].VerSion=V1.00428
devInfo[0].DoorToReadID[0].Door=0
devInfo[0].DoorToReadID[0].ReaderID[0]=1
devInfo[0].DoorToReadID[0].ReaderID[1]=2
devInfo[0].DoorToReadID[1].Door=1
devInfo[0].DoorToReadID[1].ReaderID[0]=3
devInfo[0].DoorToReadID[1].ReaderID[1]=4
devInfo[1].DevAddr=5
devInfo[1].Name=Sub5
devInfo[1].AccessProperty=bidirect
devInfo[1].DeviceType=ACS-1202B-S
devInfo[1].VerSion=V1.00428
DA

devInfo[1].DoorToReadID[0].Door=0
HU

devInfo[1].DoorToReadID[0].ReaderID[0]=11
A_

devInfo[1].DoorToReadID[0].ReaderID[1]=12
HT

12.2.6 Get SubController States


TP
_AP

Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=getSubControllerStates


I_

Method GET
V3

Request Params ( key=value format in URL )


.3
7

Name Type R/O Description Example


fo

devAddrs int[] R SubController ID, range is [1...255] [4,5]


rV

Request Example
el

http://192.168.1.108/cgi-
se
n

bin/accessControlManager.cgi?action=getSubControllerStates&devAddrs[0]=4&devAddrs[1]=5
gS
dn

Response Params ( key=value format in body )


Bh

Name Type R/O Description Example


d

devStates object[] R status


+DevAddr int R SubController ID, range is [1...255] 4
+State int R 0-Offline; 1-Online; 2-Other 0
Response Example
devStates[0].DevAddr=4
devStates[0].State=0
devStates[1].DevAddr=5
devStates[1].State=1

12.2.7 Set RepeatEnter Route


Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=setRepeatEnterRoute
Method GET

Access Control APIs 628


Request Params ( key=value format in URL )
Name Type R/O Description Example
index uint32 O route index 0
routeInfo object O route info
+PointInfo object[] O is an array, stands for points in route
++ReaderID char[][3 O reader id list ["1","2"]
2]
+TimeSections uint O subscript of AccessTimeSchedule 1
+Flag int O 0-Disable this route; 1-Enable this route 0
+Name char[64 O route name "xxxx"
]
Request Example
http://192.168.1.108/cgi-
bin/accessControlManager.cgi?action=setRepeatEnterRoute&index=0&routeInfo.PointInfo[0].ReaderI
D[0]=11&routeInfo.PointInfo[0].ReaderID[1]=22&routeInfo.PointInfo[1].ReaderID[0]=33&routeInfo.Poi
ntInfo[1].ReaderID[1]=44&routeInfo.TimeSections=1&routeInfo.Flag=1&routeInfo.Name=123
DA
HU

Response Params ( OK in body )


A_

Response Example
HT

OK
TP
_ AP

12.2.8 Get RepeatEnter Route


I_
V3
.3

Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=getRepeatEnterRoute


7

Method GET
fo
rV

Request Params ( key=value format in URL )


Name Type R/O Description Example
el
se

index uint32 R route index 0


n

Request Example
gS

http://192.168.1.108/cgi-bin/accessControlManager.cgi?action=addDevice&devAddr=1&name=Sub1
dn
Bh

Response Params ( key=value format in body )


d

Name Type R/O Description Example


routeInfo object O route info
+PointInfo object[] O is an array, stands for points in route
++ReaderID char[][32] O reader id list ["1","2"]
+TimeSections uint O subscript of AccessTimeSchedule 1
+Flag enumint O 0-Disable this route; 1-Enable this 0
route
+Name char[64] O route name 123
Response Example
routeInfo.PointInfo[0].ReaderID[0]=11
routeInfo.PointInfo[0].ReaderID[1]=22
routeInfo.PointInfo[1].ReaderID[0]=33
routeInfo.PointInfo[1].ReaderID[1]=44
routeInfo.TimeSections=1

Access Control APIs 629


routeInfo.Flag=1
routeInfo.Name=123

12.2.9 Set ABLock Route


Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=setABLockRoute
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
index uint32 O route index 0
routeInfo object O route info
+PointInfo object[] O is an array, stands for points in route
++Doors int[] O door list [0,1]
+TimeSections int32 O subscript of AccessTimeSchedule 1
+Flag enumint O 0-Disable this route; 1-Enable this route 1
+Name char[64 O route name "ABLockRoute"
DA

]
HU

Request Example
A_

http://192.168.1.108/cgi-
HT

bin/accessControlManager.cgi?action=setABLockRoute&index=0&routeInfo.PointInfo[0].Doors[0]=11
TP

&routeInfo.PointInfo[0].Doors[1]=22&routeInfo.PointInfo[1].Doors[0]=33&routeInfo.PointInfo[1].Doors[
_

1]=44&routeInfo.TimeSections=1&routeInfo.Flag=1&routeInfo.Name=123
AP
I_
V3

Response Params ( OK in body )


Response Example
.3
7

OK
fo
rV

12.2.10 Get ABLock Route


el
se
n

Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=getABLockRoute


gS

Method GET
dn

Request Params ( key=value format in URL )


Bh

Name Type R/O Description Example


d

index uint32 R route index 0


Request Example
http://192.168.1.108/cgi-bin/accessControlManager.cgi?action=getABLockRoute&index=0

Response Params ( key=value format in body )


Name Type R/O Description Example
routeInfo object O route info
+PointInfo object[] O is an array, stands for points in route
++Doors int[] O door list [0,1]
+TimeSections int32 O subscript of AccessTimeSchedule 1
+Flag enumint O 0-Disable this route; 1-Enable this 1
route
+Name char[64] O route name "ABLockRoute"
Response Example

Access Control APIs 630


routeInfo.PointInfo[0].Doors[0]=11
routeInfo.PointInfo[0].Doors [1]=22
routeInfo.PointInfo[1].Doors [0]=33
routeInfo.PointInfo[1].Doors [1]=44
routeInfo.TimeSections=1
routeInfo.Flag=1
routeInfo.Name=123

12.2.11 Get Log Status


Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=getLogStatus
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
devAddr int R SubController ID, range is [1...255] 1
Request Example
DA

http://192.168.1.108/cgi-bin/accessControlManager.cgi?action=getLogStatus&devAddr=1
HU
A_

Response Params ( OK in body )


HT

Response Example
TP

OK
_ AP

12.2.12 Sync Offline Log


I_
V3

Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=syncOfflineLog


.3
7

Method GET
fo

Request Params ( key=value format in URL )


rV

Name Type R/O Description Example


el

devAddr int R SubController ID, range is [1...255] 1


se
n

Request Example
gS

http://192.168.1.108/cgi-bin/accessControlManager.cgi?action=syncOfflineLog&devAddr=1
dn
Bh

Response Params ( OK in body )


d

Response Example
OK

12.2.13 Sync SubController Time


Request URL http://<server>/cgi-bin/accessControlManager.cgi?action=syncSubControllerTime
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
devAddrs int R SubController ID, range is [1...255] [4, 5]
Request Example
http://192.168.1.108/cgi-
bin/accessControlManager.cgi?action=syncSubControllerTime&devAddrs[0]=4&devAddrs[1]=5

Access Control APIs 631


Response Params ( key=value format in body )
Name Type R/O Description Example
errorDevAddrs int[] R is an array, stands for DevAddr which [4]
failed in sync time
Response Example
errorDevAddrs[0]=4
DA
HU
A_
HT
TP
_AP
I_
V3
.3
7
fo
rV
el
se
ngS
dn
Bh
d

Access Control APIs 632


12.3 Access User Account ( V1 )

12.3.1 Add Access User Face


Request URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=add
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
UserID char[] R The user's id. 10000
Info object R The user's info.
+UserName char[] O The user's name. ZhangSan
O The user's room num list, max array [ "301", "303", … ]
size is 32, max string size is 12.
+RoomNo char[][]
( This param is not supported by
access control. )
DA

O The user's face feature, encode with [ "xxxx", "xxxx", … ]


HU

base64, max array size is 20, and


A_

+FaceData char[][] max string size is 2k.


HT

Note: There must be at least one


TP

between FaceData and PhotoData.


_

O The user's face photo, encode with [ "yyyy", "yyyy", … ]


AP

base64, max array size is 5, and max


I_
V3

+PhotoData char[][] string size is 200k.


.3

Note: There must be at least one


7

between FaceData and PhotoData.


fo

Request Example
rV

POST http://<server>/cgi-bin/FaceInfoManager.cgi?action=add
el
se

Content-Type: application/json
n

Content-Length: <length>
gS
dn

{
Bh

"UserID": "102",
d

"Info": {
"UserName": "ZhangSan",
"RoomNo": [ "301", "303", … ],
"FaceData": [ "xxxx", "xxxx", … ],
"PhotoData": [ "yyyy", "yyyy", … ]
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

Access Control APIs 633


12.3.2 Modify Access User Face
Request URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=update
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
UserID char[] R The user's id. 10000
Info object R The user's info.
+UserName char[] O The user's name. ZhangSan
char[][] O The user's room num list, max [ "301", "303", … ]
array size is 32, max string
+RoomNo
size is 12. ( This param is not
supported by access control. )
char[][] O The user's face feature, [ "xxxx", "xxxx", … ]
encode with base64, max
DA

array size is 20, and max


HU

+FaceData string size is 2k.


Note: There must be at least
A_

one between FaceData and


HT

PhotoData.
TP

char[][] O The user's face photo, encode [ "yyyy", "yyyy", … ]


_ AP

with base64, max array size is


I_

5, max string size is 200k.


+PhotoData
V3

Note: There must be at least


.3

one between FaceData and


7

PhotoData.
fo
rV

Request Example
el

POST http://<server>/cgi-bin/FaceInfoManager.cgi?action=update
se

Content-Type: application/json
n gS

Content-Length: <length>
dn

{
Bh

"UserID": "102",
d

"Info": {
"UserName": "ZhangSan",
"RoomNo": [ "301", "303", … ],
"FaceData": [ "xxxx", "xxxx", … ],
"PhotoData": [ "yyyy", "yyyy", … ]
}
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

Access Control APIs 634


12.3.3 Delete Access User Face
Request URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=remove
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
UserID char[] R The user's id. 10000
Request Example
http://192.168.1.10/cgi-bin/FaceInfoManager.cgi?action=remove&UserID=102

Response Params ( OK in body )


Response Example
OK
DA

12.3.4 Find Access User Face


HU
A_

 Start to find access user face


HT

Request URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=startFind


TP

Method GET
_

Request Params ( key=value format in URL )


AP

Name Type R/O Description Example


I_
V3

Condition object O Search condition.


.3

+UserID char[] O The user's id. 1001


7

Request Example
fo

http://192.168.1.108/cgi-bin/FaceInfoManager.cgi?action=startFind&Condition.UserID=1001
rV
el
se

Response Params ( JSON format in body )


n

Name Type R/O Description Example


gS

O The token of this search, use this 1234


dn

Token int
token to get result and stop search.
Bh

Total int O Result num, return 0 if not found. 20


d

Response Example
{
"Token": 1234,
"Total": 20
}

 Get the find result


Request URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=doFind
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
R The token of this search, use this 1234
Token int
token to get result and stop search.

Access Control APIs 635


Offset int R Offset in the result record set, 1001
range is [0, Total – 1].
Count int R Count of result to get. 100
Request Example
http://192.168.1.108/cgi-bin/FaceInfoManager.cgi?action=doFind&Token=1234&Offset=0&Count=20

Response Params ( JSON format in body )


Name Type R/O Description Example
Info object[] R The face information of user.
+UserID char[] R The user's id. "1001"
char[][] O The user's face photo's MD5 hash ["A12847B24",…]
+MD5 string, max array size is 5, max
string size is 33.
char[][] O An array of maximum 5 items for ["A12847B24",…]
photo's MD5 digest charachters.
+EigenMD5
The array element length is 32
DA

bytes.
HU

Response Example
A_

{
HT

"Info": [ {
TP

"UserID": "102",
_

"MD5": [ "xxxx", "xxxx", … ]


AP

}, …{}]
I_

}
V3
.3
7

 Stop the find session


fo
rV

Request URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=stopFind


el

Method GET
se

Request Params ( key=value format in URL )


ngS

Name Type R/O Description Example


dn

R Token for this search, use this 1234


Token int token to get result and stop
Bh

search.
d

Request Example
http://192.168.1.108/cgi-bin/FaceInfoManager.cgi?action=stopFind&Token=1234

Response Params ( OK in body )


Response Example
OK

12.3.5 Add Access User Card and Fingerprint


 Add Access user card only
Request URL http://<server>/cgi-
bin/recordUpdater.cgi?action=insert&name=AccessControlCard

Access Control APIs 636


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
char[] R Access user card and fingerprint "AccessControlCard"
name record name, should be
"AccessControlCard".
char[] R Access user card name, max ZhangSan
CardName
string length is 32.
CardNo char[] R Access user card number. 12345
UserID char[] R The user's id. 10000
R Card status, 0 means normal, and 0
abnormal status can be sum of
following:
 1 << 0: report the loss of the
card
 1 << 1: the card is
DA

withdrawed
HU

CardStatus int  1 << 2: the card is frozen


A_

 1 << 3: the card is arrearage


HT

 1 << 4: the card exceeds the


TP

time limit
_

 1 << 5: the card is arrearage


AP

but still can open the door,


I_

and there will be voice


V3

prompts.
.3
7

O The card type: 0


fo

0 : Normal Card, 1: VIP Card, 2:


rV

CardType int Visitor Card, 3: Patrol Card, 4:


el

Blocklist Card, 5: Stress Card, 0xff:


se
n

Mother Card
gS

O The Access card's password. 123456


dn

Password char[] ( This param is not supported by


Bh

video talk device )


d

O The index of the doors that this


Doors int[] card can open. ( This param is not
supported by video talk device )
O The index of the time sections of
each door that this card can open.
TimeSections int[]
( This param is not supported by
video talk device )
O VTO position number. ( This param 01018001
VTOPosition char[] is not supported by access control
device )
O The start of valid date, format is 20151022%2009381
ValidDateStart char[]
"yyyyMMdd hhmmss". 1
O The end of valid date, format is 20151222%2009381
ValidDateEnd char[]
"yyyyMMdd hhmmss". 1

Access Control APIs 637


O Is the card still valid. ( This param
IsValid bool is not supported by video talk
device )
Authority uint8 O User Authority 1: Admins;2: Users 2
Request Example
http://192.168.1.108/cgi-
bin/recordUpdater.cgi?action=insert&name=AccessControlCard&CardName=ZhangSan&CardNo=12
345&UserID=102&CardStatus=0&CardType=0&Password=123456&Doors[0]=1&Doors[1]=3&Doors[
2]=5&VTOPosition=01018001&ValidDateStart=20151022%20093811&ValidDateEnd=20151222%20
093811& Authority=1

Response Params ( key=value format in body )


Name Type R/O Description Example
recno int R The record id. 12345
Response Example
recno=12345
DA
HU

 Add access user card with fingerprint


A_

Add access user card with fingerprint. If add only access user card, please use : http://<server>/cgi-
HT

bin/recordUpdater.cgi?action=insert&name=AccessControlCard
TP
_

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=insertEx


AP

Method POST
I_

Request Params ( key=value format in URL )


V3

Name Type R/O Description Example


.3
7

char[] R Access user card and fingerprint "AccessControlCard"


fo

name record name, should be


rV

"AccessControlCard".
el

char[] O Access user card name, max ZhangSan


se

CardName
string length is 32.
n gS

CardNo char[] O Access user card number. 12345


dn

UserID char[] R The user's id. 10000


Bh

O Card status, 0 means normal, and 0


d

abnormal status can be sum of


following:
 1 << 0: report the loss of the
card
 1 << 1: the card is
withdrawed
CardStatus int  1 << 2: the card is frozen
 1 << 3: the card is arrearage
 1 << 4: the card exceeds the
time limit
 1 << 5: the card is arrearage
but still can open the door,
and there will be voice
prompts.

Access Control APIs 638


O The card type: 0
0: Normal Card, 1: VIP Card, 2:
CardType int Visitor Card, 3: Patrol Card, 4:
Blocklist Card, 5: Stress Card, 0xff:
Mother Card
Password char[] O The Access card's password. 123456
O The index of the doors that this
Doors int[]
card can open.
O The index of the time sections of
TimeSections int[]
each door that this card can open.
char[] O VTO position number. ( This param 01018001
VTOPosition is not supported by access control
device )
char[] O The start of valid date, format is 20151022%2009381
ValidDateStart
"yyyyMMdd hhmmss". 1
char[] O The end of valid date, format is 20151222%2009381
DA

ValidDateEnd
"yyyyMMdd hhmmss". 1
HU

IsValid bool O Is the card still valid. true


A_

FingerprintPack O
object The fingerprint packet info.
HT

et
TP

O The length of each fingerprint 500


+Length int
_

packet.
AP

+Count int O The count of fingerprint packet. 3


I_

Request Example
V3

http://192.168.1.108/cgi-
.3
7

bin/recordUpdater.cgi?action=insertEx&name=AccessControlCard&CardName=ZhangSan&CardNo=
fo

12345&UserID=102&CardStatus=0&Password=123456&Doors[0]=1&Doors[1]=3&Doors[2]=5&VTOP
rV

osition=01018001&ValidDateStart=20151022%20093811&ValidDateEnd=20151222%20093811&Fin
el

gerprintPacket.Length=500&FingerprintPacket.Count=3
se
n

Content-Type: application/octet-stream
gS

Content-Length: <length>
dn
Bh

<fingerprint packet binary data>


d

Response Params ( key=value format in body )


Name Type R/O Description Example
recno int R The record id. 12345
Response Example
recno=12345

12.3.6 Modify Access User Card and Fingerprint


 Update Access user card only
Note: You should provide at lease one optional param to update.
Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=update
Method GET

Access Control APIs 639


Request Params ( key=value format in URL )
Name Type R/O Description Example
R Access user card and fingerprint "AccessControlCard"
name char[] record name, should be
"AccessControlCard".
recno int R The record id. 1234
char[] O Access user card name, max ZhangSan
CardName
string length is 31.
char[] O Access user card number. 12345
CardNo Primary key, modification is not
allowed in principle
char[] O The user's id. 10000
UserID Primary key, modification is not
allowed in principle
O Card status, 0 means normal, and 0
abnormal status can be sum of
DA

following:
HU

 1 << 0: report the loss of the


A_

card
HT

 1 << 1: the card is


TP

withdrawed
_

CardStatus int  1 << 2: the card is frozen


AP

 1 << 3: the card is arrearage


I_

1 << 4: the card exceeds the


V3


time limit
.3
7

 1 << 5: the card is arrearage


fo

but still can open the door,


rV

and there will be voice


el

prompts.
se
n

O The card type: 0


gS

0: Normal Card, 1: VIP Card, 2:


dn

CardType int Visitor Card, 3: Patrol Card, 4:


Bh

Blocklist Card, 5: Stress Card, 0xff:


d

Mother Card
Password char[] O The Access card's password. 123456
O The index of the doors that this
Doors int[]
card can open.
O The index of the time sections of
TimeSections int[]
each door that this card can open.
char[] O VTO position number. ( This param 01018001
VTOPosition is not supported by access control
device )
char[] O The start of valid date, format is 20151022%2009381
ValidDateStart
"yyyyMMdd hhmmss". 1
char[] O The end of valid date, format is 20151222%2009381
ValidDateEnd
"yyyyMMdd hhmmss". 1
IsValid bool O Is the card still valid.

Access Control APIs 640


Request Example
http://192.168.1.108/cgi-
bin/recordUpdater.cgi?action=update&name=AccessControlCard&recno=12345&CardName=Zhang
San&CardNo=12345&UserID=102&CardStatus=0&CardType=0&Password=123456&Doors[0]=1&Do
ors[1]=3&Doors[2]=5&ValidDateStart=20151022%20093811&ValidDateEnd=20151222%20093811

Response Params ( OK in body )


Response Example
OK
 Update access user card and fingerprint
Note: You should provide at lease one optional param to update.
Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=updateEx
Method POST
Request Params ( key=value format in URL, binary in body )
Name Type R/O Description Example
DA

R Access user card and fingerprint "AccessControlCard"


HU

name char[] record name, should be


A_

"AccessControlCard".
HT

recno int R The record id. 1234


TP

char[] O Access user card name, max ZhangSan


CardName
_

string length is 32.


AP

CardNo char[] O Access user card number. 12345


I_

UserID char[] O The user's id. 10000


V3

O Card status, 0 means normal, and 0


.3
7

abnormal status can be sum of


fo

following:
rV

 1 << 0: report the loss of the


el

card
se

1 << 1: the card is


n


gS

withdrawed
dn

CardStatus int  1 << 2: the card is frozen


Bh

 1 << 3: the card is arrearage


d

 1 << 4: the card exceeds the


time limit
 1 << 5: the card is arrearage
but still can open the door,
and there will be voice
prompts.
O The card type: 0
0: Normal Card, 1: VIP Card, 2:
CardType int Visitor Card, 3: Patrol Card, 4:
Blocklist Card, 5: Stress Card, 0xff:
Mother Card
Password char[] O The Access card's password. 123456
O The index of the doors that this
Doors int[]
card can open.

Access Control APIs 641


O The index of the time sections of
TimeSections int[]
each door that this card can open.
char[] O VTO position number. ( This param 01018001
VTOPosition is not supported by access control
device )
char[] O The start of valid date, format is 20151022%2009381
ValidDateStart
"yyyyMMdd hhmmss". 1
char[] O The end of valid date, format is 20151222%2009381
ValidDateEnd
"yyyyMMdd hhmmss". 1
IsValid bool O Is the card still valid. true
FingerprintPack O
object The fingerprint packet info.
et
O The length of each fingerprint 500
+Length int
packet.
+Count int O The count of fingerprint packet.
3
Request Example
DA

http://192.168.1.108/cgi-
HU

bin/recordUpdater.cgi?action=updateEx&name=AccessControlCard&recno=12345&CardName=Zhan
A_

gSan&CardNo=12345&UserID=102&CardStatus=0&CardType=0&Password=123456&Doors[0]=1&D
HT

oors[1]=3&Doors[2]=5&ValidDateStart=20151022%20093811&ValidDateEnd=20151222%20093811&
TP

FingerprintPacket.Length=500&FingerprintPacket.Count=3
_

Content-Type: application/octet-stream
AP

Content-Length: <length>
I_
V3

<fingerprint packet binary data>


.3
7
fo

Response Params ( OK in body )


rV

Response Example
el

OK
se
n gS
dn

12.3.7 Delete Access User Card and Fingerprint


Bh
d

 Delete Access user card and fingerprint record by recno


The video talk device can not delete fingerprint data.
Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=remove
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
R Access user card and fingerprint record "AccessControlCard"
name char[] name, should be
"AccessControlCard".
recno int R The record id. 12345
Request Example
http://192.168.1.108/cgi-
bin/recordUpdater.cgi?action=remove&name=AccessControlCard&recno=12345

Access Control APIs 642


Response Params ( OK in body )
Response Example
OK

 Delete all Access user card and fingerprint records


The video talk device can not delete fingerprint data.
Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=clear
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
R Access user card and fingerprint "AccessControlCard"
name char[] record name, should be
"AccessControlCard".
Request Example
DA

http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControlCard
HU
A_

Response Params ( OK in body )


HT

Response Example
TP

OK
_ AP
I_
V3

12.3.8 Find Access User Card and Fingerprint


.3
7
fo

 Find Access user card by condition


rV

Request URL http://<server>/cgi-bin/recordFinder.cgi?action=find


el

Method GET
se

Request Params ( key=value format in URL )


n
gS

Name Type R/O Description Example


dn

R Record Name, should be "AccessControlCard"


name char[]
Bh

"AccessControlCard".
d

O Max result to return, default is 100


count int
1024.
char[] O The start of the record's 123456700
StartTime
CreateTime.
char[] O The End of the record's 123456800
EndTime
CreateTime.
condition object O Search condition.
+CardNo char[] O Access user card number. 1234
+UserID char[] O The user's id. 12345
+IsValid bool O The access card valid or not. true
Request Example
http://192.168.1.108/cgi-
bin/recordFinder.cgi?action=find&name=AccessControlCard&condition.UserID=103&StartTime=1234
56700&EndTime=123456800&count=100

Access Control APIs 643


Response Params ( key=value format in body )
Name Type R/O Description Example
totalCount int O The total record num that find. 1000
found int O The record num that returned. 100
array<object R
records The records that returned.
>
+RecNo int R The record id.
+CreateTime int O The create time of record.
char[] R The access user card name, max ZhangSan
+CardName
string length is 32.
+CardNo char[] R The access user card number. 12345
+UserID char[] R The user's id. 10000
R Card status, 0 means normal, and 0
abnormal status can be sum of
following:
DA

 1 << 0: report the loss of the


HU

card
A_

 1 << 1: the card is


HT

withdrawed
TP

+CardStatus int  1 << 2: the card is frozen


_

 1 << 3: the card is arrearage


AP

 1 << 4: the card exceeds the


I_

time limit
V3

1 << 5: the card is arrearage


.3


7

but still can open the door,


fo

and there will be voice


rV

prompts.
el

O The card type: 0


se
n

0: Normal Card, 1: VIP Card, 2:


gS

+CardType int Visitor Card, 3: Patrol Card, 4:


dn

Blocklist Card, 5: Stress Card, 0xff:


Bh

Mother Card
d

O The Access card's password. 123456


+Password char[] ( This param is not supported by
video talk device )
O The index of the doors that this
+Doors int[] card can open. ( This param is not
supported by video talk device )
O The index of the time sections of
each door that this card can open.
+TimeSections int[]
( This param is not supported by
video talk device )
char[] O VTO position number. ( This param 01018001
+VTOPosition is not supported by access control
device )

Access Control APIs 644


char[] O The start of valid date, format is 20151022%2009381
+ValidDateStart
"yyyyMMdd hhmmss". 1
char[] O The end of valid date, format is 20151222%2009381
+ValidDateEnd
"yyyyMMdd hhmmss". 1
O Is the card still valid. ( This param true
+IsValid bool is not supported by video talk
device )
+Handicap bool O is the cad of extend time true
O 3420000000000000
+CitizenIDNo char[] citizen card id
00
+RepeatEnterRo uint[12] O [1,2]
ute
+RepeatEnterRo O timeout of repeater enter route, 300
int
uteTimeout unit: s
O user type, it can be { 0
1: normal user
DA

+UserType int
2: user in Blocklist
HU

}
A_

+FirstEnter bool O is with first enter authority true


HT

+DynamicCheck O 235843758
char[] dynamic check code
TP

Code
_

+UseTime int O count of use 10


AP

+SpecialDaysSc uint[] O Holiday plan identification. The [1,2]


I_

hedule value is the subscript number


V3

configured by
.3
7

SpecialDaysSchedule
fo

+Section char[64] O Section name "XXXX"


rV

+SectionID uint32 O Section ID "123"


el

+Authority uint8 O 1: Admin; 2


se
n

2: General user
gS

+UserName char[32] O "9901"


(deprecated)
dn
Bh

+PersonId char[32] O "101"


(deprecated)
d

Response Example
totalCount=1000
found=100
records[0].RecNo=12345
records[0].CreateTime=123456789
records[0].CardName=ZhangSan
records[0].CardNo=300
records[0].UserID=103
records[0].CardStatus=0
records[0].CardType=0
records[0].Doors[0]=1
records[0].Doors[1]=3
records[0].Doors[2]=5

Access Control APIs 645


records[0].VTOPosition=01018001
records[0].ValidStart=20151022 093811
records[0].ValidEnd=20151222 093811
records[0].IsValid=true
records[0].Handicap=false
records[0].CitizenIDNo=
records[0].RepeatEnterRouteTimeout=4294967295
records[0].UserType =0
records[0].FirstEnter=false
records[0].DynamicCheckCode=
records[0].UseTime=0

records[1].RecNo=13579
records[1].CreateTime=123456799
records[1].StaticsticsTime=123456799
records[1].CardName=ZhangSan
DA

records[1].CardNo=302
HU

records[1].UserID=103
A_

records[1].CardStatus=0
HT

records[1].CardType=0
TP

records[1].Doors[0]=2
_

records[1].Doors[1]=4
AP

records[1].Doors[2]=6
I_

records[1].VTOPosition=01018002
V3

records[1].ValidStart=20151022 093811
.3
7

records[1].ValidEnd=20151222 093811
fo

records[1].IsValid=true
rV

records[1].Handicap=false
el

records[1].CitizenIDNo=
se

records[1].RepeatEnterRouteTimeout=4294967295
ngS

records[1].UserType=0
dn

records[1].FirstEnter=false
Bh

records[1].DynamicCheckCode=
d

records[1].UseTime=0

 Find Access user card by recno


Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=get
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
R Record Name, should be "AccessControlCard"
name char[]
"AccessControlCard".
recno int R The record id. 12345
Request Example
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=get&name=AccessControlCard&recno=12345

Access Control APIs 646


Response Params ( key=value format in body )
Name Type R/O Description Example
record object R The record that returned.
+RecNo int R The record id.
+CreateTime int R The create time of record.
char[] R The access user card name, max ZhangSan
+CardName
string length is 32.
+CardNo char[] R The access user card number. 12345
+UserID char[] R The user's id. 10000
R Card status, 0 means normal, and 0
abnormal status can be sum of
following:
 1 << 0: report the loss of the
card
 1 << 1: the card is
DA

withdrawed
HU

+CardStatus int  1 << 2: the card is frozen


A_

 1 << 3: the card is arrearage


HT

 1 << 4: the card exceeds the


TP

time limit
_

 1 << 5: the card is arrearage


AP

but still can open the door,


I_

and there will be voice


V3

prompts.
.3
7

O The card type: 0


fo

0: Normal Card, 1: VIP Card, 2:


rV

+CardType int Visitor Card, 3: Patrol Card, 4:


el

Blocklist Card, 5: Stress Card, 0xff:


se
n

Mother Card
gS

O The Access card's password. 123456


dn

+Password char[] ( This param is not supported by


Bh

video talk device )


d

O The index of the doors that this


+Doors int[] card can open. ( This param is not
supported by video talk device )
O The index of the time sections of
each door that this card can open.
+TimeSections int[]
( This param is not supported by
video talk device )
char[] O VTO position number. ( This param 01018001
+VTOPosition is not supported by access control
device )
char[] O The start of valid date, format is 20151022%2009381
+ValidDateStart
"yyyyMMdd hhmmss". 1
char[] O The end of valid date, format is 20151222%2009381
+ValidDateEnd
"yyyyMMdd hhmmss". 1

Access Control APIs 647


O Is the card still valid. ( This param true
+IsValid bool is not supported by video talk
device )
+Handicap bool O is the cad of extend time true
O 3420000000000000
+CitizenIDNo char[] citizen card id
00
+RepeatEnterRo O timeout of repeater enter route, 300
int
uteTimeout unit: s
O user type, it can be { 0
1: normal user
+UserType int
2: user in Blocklist
}
+FirstEnter bool O is with first enter authority true
+DynamicCheck O 235843758
char[] dynamic check code
Code
+UseTime int O count of use 10
DA

Response Example
HU

record.RecNo=4
A_

record.CreateTime=123456789
HT

record.CardName=ZhangSan
TP

record.CardNo=300
_

record.UserID=103
AP

record.CardStatus=0
I_

record.CardType=0
V3

record.Doors[0]=1
.3
7

record.Doors[1]=3
fo

record.Doors[2]=5
rV

record.VTOPosition=01018001
el

record.ValidStart=20151022 093811
se
n

record.ValidEnd=20151222 093811
gS

record.IsValid=true
dn

records.Handicap=false
Bh

records.CitizenIDNo=
d

records.RepeatEnterRouteTimeout=4294967295
records.UserType=0
records.FirstEnter=false
records.DynamicCheckCode=
records.UseTime=0

 Find Access user card and fingerprint by recno


This api is not supported by video talk device
Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=getEx
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example

Access Control APIs 648


R Record Name, should be "AccessControlCard"
name char[]
"AccessControlCard".
recno int R The record id. 12345
Request Example
http://192.168.1.108/cgi-
bin/recordUpdater.cgi?action=getEx&name=AccessControlCard&recno=12345

Response Params ( key=value format in body )


Name Type R/O Description Example
record object R The record that returned.
+RecNo int R The record id.
+CreateTime int R The create time of record.
char[] R The access user card name, max ZhangSan
+CardName
string length is 32.
+CardNo char[] R The access user card number. 12345
+UserID char[] R The user's id. 10000
DA

R Card status, 0 means normal, and 0


HU

abnormal status can be sum of


A_

following:
HT

 1 << 0: report the loss of the


TP

card
_

 1 << 1: the card is


AP

withdrawed
I_

+CardStatus int 1 << 2: the card is frozen


V3


1 << 3: the card is arrearage
.3


7

 1 << 4: the card exceeds the


fo

time limit
rV

 1 << 5: the card is arrearage


el

but still can open the door,


se
n

and there will be voice


gS

prompts.
dn

O The card type: 0


Bh

0: Normal Card, 1: VIP Card, 2:


d

+CardType int Visitor Card, 3: Patrol Card, 4:


Blocklist Card, 5: Stress Card, 0xff:
Mother Card
O The Access card's password. 123456
+Password char[] ( This param is not supported by
video talk device )
O The index of the doors that this
+Doors int[] card can open. ( This param is not
supported by video talk device )
O The index of the time sections of
each door that this card can open.
+TimeSections int[]
( This param is not supported by
video talk device )

Access Control APIs 649


char[] O VTO position number. ( This param 01018001
+VTOPosition is not supported by access control
device )
char[] O The start of valid date, format is 20151022%2009381
+ValidDateStart
"yyyyMMdd hhmmss". 1
char[] O The end of valid date, format is 20151222%2009381
+ValidDateEnd
"yyyyMMdd hhmmss". 1
O Is the card still valid. ( This param true
+IsValid bool is not supported by video talk
device )
+Handicap bool O is the cad of extend time true
O 3420000000000000
+CitizenIDNo char[] citizen card id
00
+RepeatEnterRo O timeout of repeater enter route, 300
int
uteTimeout unit: s
O user type, it can be { 0
DA

1: normal user
+UserType int
HU

2: user in Blocklist
A_

}
HT

+FirstEnter bool O is with first enter authority true


TP

+DynamicCheck O 235843758
char[] dynamic check code
_

Code
AP

+UseTime int O count of use 10


I_

+FingerprintPac O 500
V3

object The fingerprint packet info.


ket
.3
7

O The length of each fingerprint 3


fo

++Length int
packet.
rV

++Count int O The count of fingerprint packet.


el

Response Example
se
n

HTTP/1.1 200 OK
gS

Server: Device/1.0
dn

Content-Type: multipart/x-mixed-replace; boundary=<boundary>


Bh

Content-Length: <length>
d

--<boundary>
Content-Type: text/plain
Content-Length: <length>

record.RecNo=4
record.CreateTime=123456789
record.CardName=ZhangSan
record.CardNo=300
record.UserID=103
record.CardStatus=0
record.CardType=0
record.Doors[0]=1
record.Doors[1]=3

Access Control APIs 650


record.Doors[2]=5
record.VTOPosition=01018001
record.ValidStart=20151022 093811
record.ValidEnd=20151222 093811
record.IsValid=true
records.Handicap=false
records.CitizenIDNo=
records.RepeatEnterRouteTimeout=4294967295
records.UserType=0
records.FirstEnter=false
records.DynamicCheckCode=
records.UseTime=0

record.FingerprintPacket.Length=500
record.FingerprintPacket.Count=3
--<boundary>
DA

Content-Type: application/octet-stream
HU

Content-Length: <length>
A_
HT

<fingerprint packet binary data>


TP

--<boundary>--
_
AP
I_

12.3.9 Get the Total Number of Records of Access User Card and
V3
.3

Fingerprint
7
fo
rV

Request URL http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize


el

Method GET
se
n

Request Params ( key=value format in URL )


gS

Name Type R/O Description Example


dn

Access user card and fingerprint


Bh

name char[] R record name, should be "AccessControlCard"


d

"AccessControlCard".
Request Example
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCard

Response Params ( key=value format in body )


Name Type R/O Description Example
count int R The total number of records. 150
Response Example
count=150

Access Control APIs 651


12.4 Access User Account ( V2 )

12.4.1 Add Access User


Insert or update multiple new users. Update when the current user exists. This only applies to the
AccessUser entity here.
Request URL http://<server>/cgi-bin/AccessUser.cgi?action=insertMulti
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
UserList object[] R User list, with up to 10 entries
+UserID string R User ID
+UserName string O User name
0: General user, by default; 1: Blocklist 0
user (report the blocklist event
DA

+UserType uint16 O
ACBlocklist); 2: Guest user; 3: Patrol
HU

user; 4: VIP user; 5: Extend time user


A_

+UseTime uint16 O Limit of passing times for guest users


HT

First user authority or not. false: No; true


+IsFirstEnter bool O
TP

true: Yes
_

+FirstEnterDo
AP

int16[] O -1 indicates all channels.


ors
I_

+UserStatus uint16 O 0: Normal; 1: Frozen 0


V3

User authority (attendance machine


.3

+Authority uint8 O
7

field). 1: Admin; 2: General user


fo

+CitizenIDNo string O ID card number


rV

The password when unlocking by card


el

+Password string O + password. The password when


se
n

unlocking by User ID + password


gS

Door authority. The index in the


dn

controller is used with TimeSections,


+Doors int16[] O
Bh

and the value corresponds to the


d

subscript of the AC configuration.


The door authority corresponds to the [1,2,3,4]
period index. For example, door 3
+TimeSections uint16[] O
corresponds to period 2. Each element
corresponds to the door in Doors.
Holiday plan identification. The value is [1,2]
+SpecialDays the subscript number configured by
uint32[64] O
Schedule SpecialDaysSchedule (defined in the
configuration).
"yyyy-MM-dd HH:mm:ss", start of
+ValidFrom string O validity period. Note: The original
"ValidDateStart" is deprecated.

Access Control APIs 652


"yyyy-MM-dd HH:mm:ss", end of
+ValidTo string O validity period. Note: The original
"ValidDateEnd" is deprecated.
Request Example
{
"UserList": [{
"UserID": "100013",
"UserName": "",
"UserType": 0,
"UseTime": 1,
"IsFirstEnter": true,
"FirstEnterDoors": [0, 1],
"UserStatus": 0,
"Authority": 1,
"CitizenIDNo": "123456789012345678",
"Password": "xxxxxxxxxx",
DA

"Doors": [1,3,5,7],
HU

"TimeSections": [1,2,3,4],
A_

"SpecialDaysSchedule": [1,2],
HT

"ValidFrom": "2018-01-02 00:00:00",


TP

"ValidTo": "2018-01-02 01:00:00",


_

},…,{}]
AP

}
I_
V3

Response Params ( OK in body )


.3
7

Response Example
fo

OK
rV
el
se
n

12.4.2 Modify Access User


gS
dn

Update information of multiple users.


Bh

Request URL http://<server>/cgi-bin/AccessUser.cgi?action=updateMulti


d

Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
UserList object[] R User list, with up to 10 entries
+UserID string R User ID
+UserName string O User name
0: General user, by default; 1: Blocklist 0
user (report the blocklist event
+UserType uint16 O
ACBlocklist); 2: Guest user; 3: Patrol
user; 4: VIP user; 5: Extend time user
+UseTime uint16 O Limit of passing times for guest users 4
First user authority or not. false: true
+IsFirstEnter bool O
No; true: Yes

Access Control APIs 653


+FirstEnterDo [0, 1]
int16[] O -1 indicates all channels.
ors
+UserStatus uint16 O 0: Normal; 1: Frozen 0
User authority (attendance machine 1
+Authority uint8 O
field). 1: Admin; 2: General user
"1234567890123456
+CitizenIDNo string O ID card number
78"
The password when unlocking by card
+Password string O + password. The password when
unlocking by User ID + password
Door authority. The index in the
controller is used with TimeSections,
+Doors int16[] O
and the value corresponds to the
subscript of the AC configuration.
The door authority corresponds to the [1,2,3,4]
period index. For example, door 3
DA

+TimeSections uint16[] O
corresponds to period 2. Each element
HU

corresponds to the door in Doors.


A_

Holiday plan identification. The value is [1,2]


HT

+SpecialDays the subscript number configured by


uint32[64] O
TP

Schedule SpecialDaysSchedule (defined in the


_

configuration).
AP

"yyyy-MM-dd HH:mm:ss", start of


I_

+ValidFrom string O validity period. Note: The original


V3

"ValidDateStart" is deprecated.
.3
7

"yyyy-MM-dd HH:mm:ss", end of


fo

+ValidTo string O validity period. Note: The original


rV

"ValidDateEnd" is deprecated.
el

Request Example
se
n

{
gS

"UserList": [{
dn

"UserID": "100013",
Bh

"UserName": "",
d

"UserType": 0,
"UseTime": 1,
"IsFirstEnter": true,
"FirstEnterDoors": [0, 1],
"UserStatus": 0,
"Authority": 1,
"CitizenIDNo": "123456789012345678",
"Password": "xxxxxxxxxx",
"Doors": [1,3,5,7],
"TimeSections": [1,2,3,4],
"SpecialDaysSchedule": [1,2],
"ValidFrom": "2018-01-02 00:00:00",
"ValidTo": "2018-01-02 01:00:00",
},…,{}]

Access Control APIs 654


}

Response Params ( OK in body )


Response Example
OK

12.4.3 Delete All Access User


Delete all user information.
Request URL http://<server>/cgi-bin/AccessUser.cgi?action=removeAll
Method GET
Request Params ( none )
Name Type R/O Description Example
Request Example
DA

http://192.168.1.108/cgi-bin/AccessUser.cgi?action=removeAll
HU

Response Params ( OK in body )


A_

Response Example
HT

OK
TP
_AP
I_

12.4.4 Delete Multiple Access Users


V3
.3
7

Delete information of multiple users.


fo

Request URL http://<server>/cgi-bin/AccessUser.cgi?action=removeMulti


rV

Method GET
el
se

Request Params ( key=value format at URL)


n

Name Type R/O Description Example


gS

UserIDList char[][] R User ID list, with up to 10 entries ["103", "102"]


dn

Request Example
Bh

http://192.168.1.108/cgi-bin/AccessUser.cgi?action=removeMulti&UserIDList[0]=103&UserIDList
d

[1]=102

Response Params ( OK in body )


Response Example
OK

12.4.5 Find Multiple Access Users


Search for information of multiple users.
Request URL http://<server>/cgi-bin/AccessUser.cgi?action=list
Method GET
Request Params ( key=value format at URL)

Access Control APIs 655


Name Type R/O Description Example
UserIDList char[][] R User ID list, with up to 10 entries ["103", "102"]
Request Example
http://192.168.1.108/cgi-bin/AccessUser.cgi?action=list&UserIDList[0]=103&UserIDList [1]=102

Response Params ( key=value format in body )


Name Type R/O Description Example
Users object[] R The records that returned
+ UserID string R User ID 1
+UserName string O User name
0: General user, by default; 1:
Blocklist user (report the blocklist
+UserType uint16 O event ACBlocklist); 2: Guest user;
3: Patrol user; 4: VIP user; 5:
Extend time user
Limit of passing times for guest
DA

+UseTime uint16 O
users
HU

First user authority or not. false:


+IsFirstEnter bool O
A_

No; true: Yes


HT

+FirstEnterDoor
int16[] O -1 indicates all channels
TP

s
_

+UserStatus uint16 O 0: Normal; 1: Frozen


AP

User authority (attendance


I_
V3

+Authority uint8 O machine field). 1: Admin;


2: General user
.3
7

+CitizenIDNo string O ID card number


fo

The password when unlocking by


rV

card + password. The password


el

+Password string O
when unlocking by UserID +
se
n

password
gS

Door authority. The index in the


dn

controller is used with


Bh

+Doors int16[] O TimeSections, and the value


d

corresponds to the subscript of the


AC configuration.
The door authority corresponds to
the period index. For example,
+TimeSections uint16[] O door 3 corresponds to period 2.
Each element corresponds to the
door in Doors.
Holiday plan identification. The
value is the subscript number
+SpecialDaysSc
uint32[64] O configured by
hedule
SpecialDaysSchedule (defined in
the configuration).

Access Control APIs 656


"yyyy-MM-dd HH:mm:ss", start of
+ValidFrom string O validity period. Note: The original
"ValidDateStart" is deprecated.
"yyyy-MM-dd HH:mm:ss", end of
+ValidTo string O validity period. Note: The original
"ValidDateEnd" is deprecated.
Response Example
Users[0].UserID=100013
Users[0].UserName=Name
Users[0].UserType=1
Users[0].UseTime=1
Users[0].IsFirstEnter=ZhangSan
Users[0].FirstEnterDoors=0
Users[0].UserStatus=12345678
Users[0].Authority=1
Users[0].CitizenIDNo=1
DA

Users[0].Password=ZhangSan
HU

Users[0].Doors=0
A_

Users[0].TimeSections=12345678
HT

Users[0].SpecialDaysSchedule=1
TP

Users[0].ValidFrom=1
_

records[0].ValidTo=ZhangSan
AP


I_
V3

12.4.6 Start Find Access User Related Information


.3
7
fo

Start searching for user related information.


rV

Request URL http://<server>/cgi-bin/AccessUser.cgi?action=startFind


el
se

Method GET
n

Request Params ( key=value format at URL)


gS

Name Type R/O Description Example


dn

Search conditions. Users can perform


Bh

Condition object R conditional search according to the


d

user information field.


+UserID string O User ID
+UserName string O User name
0: General user, by default; 1: Blocklist
user (report the blocklist event
+UserType uint16 O
ACBlocklist); 2: Guest user; 3: Patrol
user; 4: VIP user; 5: Extend time user
+UseTime uint16 O Limit of passing times for guest users
First user authority or not. false:
+IsFirstEnter bool O
No; true: Yes
+FirstEnterDo
int16[] O -1 indicates all channels.
ors
+UserStatus uint16 O 0: Normal; 1: Frozen

Access Control APIs 657


User authority (attendance machine
+Authority uint8 O
field). 1: Admin; 2: General user
+CitizenIDNo string O ID card number
The password when unlocking by card
+Password string O + password. The password when
unlocking by UserID + password
Door authority. The index in the
controller is used with TimeSections,
+Doors int16[] O
and the value corresponds to the
subscript of the AC configuration.
The door authority corresponds to the
period index. For example, door 3
+TimeSections uint16[] O
corresponds to period 2. Each element
corresponds to the door in Doors.
Holiday plan identification. The value is
+SpecialDays the subscript number configured by
DA

uint32[64] O
Schedule SpecialDaysSchedule (defined in the
HU

configuration).
A_

"yyyy-MM-dd HH:mm:ss", start of


HT

+ValidFrom string O validity period. Note: The original


TP

"ValidDateStart" is deprecated.
_

"yyyy-MM-dd HH:mm:ss", end of


AP

+ValidTo string O validity period. Note: The original


I_

"ValidDateEnd" is deprecated.
V3

Request Example
.3
7

http://192.168.1.108/cgi-bin/AccessUser.cgi?action=startFind&Condition.UserID=1
fo
rV

Response Params ( JSON format in body )


el

Name Type R/O Description Example


se
n

Token uint32 R Search token. 1234


gS

Total number of entries 20


dn

Total uint32 R
found this time
Bh

Search capability: 20
d

Maximum number of
Caps uint32 R
records that can be returned
each time.
Response Example
{
"Token": 1234,
"Total": 20,
"Caps ": 20
}

12.4.7 Get Find Result of Access User Related Information


Get user related information.

Access Control APIs 658


Request URL http://<server>/cgi-bin/AccessUser.cgi?action=doFind
Method GET
Request Params ( key=value format at URL)
Name Type R/O Description Example
Token int R Search token 1234
Offset int R Offset 0
Count int R Number of entries obtained this time 20
Request Example
http://192.168.1.108/cgi-bin/AccessUser.cgi?action=doFind&Token=1234&Offset=0&Count=20

Response Params ( JSON format in body )


Name Type R/O Description Example
info object[] R user info
+UserID string R User ID 102
+UserName string O User name
0: General user, by default; 1: Blocklist 0
DA

user (report the blocklist event


HU

+UserType uint16 O
ACBlocklist); 2: Guest user; 3: Patrol
A_

user; 4: VIP user; 5: Extend time user


HT

+UseTime uint16 O Limit of passing times for guest users


TP

First user authority or not. false: Yes


+IsFirstEnter bool O
_

No; true: Yes


AP

+FirstEnterDo
I_

int16[] O -1 indicates all channels.


V3

ors
+UserStatus uint16 O 0: Normal; 1: Frozen
.3
7

User authority (attendance machine 2


fo

+Authority uint8 O
field). 1: Admin; 2: General user
rV

+CitizenIDNo string O ID card number


el

The password when unlocking by card


se
n

+Password string O + password. The password when


gS

unlocking by UserID + password


dn

Door authority. The index in the


Bh

controller is used with TimeSections,


+Doors int16[] O
d

and the value corresponds to the


subscript of the AC configuration.
The door authority corresponds to the
period index. For example, door 3
+TimeSections uint16[] O
corresponds to period 2. Each element
corresponds to the door in Doors.
Holiday plan identification. The value is
+SpecialDays the subscript number configured by
uint32[64] O
Schedule SpecialDaysSchedule (defined in the
configuration).
"yyyy-MM-dd HH:mm:ss", start of
+ValidFrom string O validity period. Note: The original
"ValidDateStart" is deprecated.

Access Control APIs 659


"yyyy-MM-dd HH:mm:ss", end of
+ValidTo string O validity period. Note: The original
"ValidDateEnd" is deprecated.
Response Example
{
"Info": [ {
"UserID": "102",
"UserName": "",
"UserType": 0,
"UseTime": 1,

}, { … }, … ]
}

12.4.8 Stop Find Access User Related Information


DA
HU

Get user related information.


A_

Request URL http://<server>/cgi-bin/AccessUser.cgi?action=stopFind


HT

Method GET
TP

Request Params ( key=value format at URL)


_
AP

Name Type R/O Description Example


I_

Token int R Search token. 1234


V3

Request Example
.3

http://192.168.1.108/cgi-bin/AccessUser.cgi?action=stopFind&Token=1234
7
fo
rV

Response Params ( OK in body )


el

Response Example
se

OK
ngS
dn

12.4.9 Add Multiple Access Cards


Bh
d

Send information of multiple card numbers.


Request URL http://<server>/cgi-bin/AccessCard.cgi?action=insertMulti
Method POST
Request Params ( JSON format in body)
Name Type R/O Description Example
CardList object[] R User list, with up to 10 entries
+CardNo string R Card No.
+UserID string R User ID
Card type
Enumint{
+CardType uint16 O 0: Ordinary card
1: VIP card
2: Guest card

Access Control APIs 660


3: Patrol card
4: Blocklist card
5: Duress card
+CardName string O Card name
Card status. Different card status
results in different person status.
0: Normal
1<<0: Reported for loss
+CardStatus uint32 O
1<<1: Canceled
1<<2: Frozen
1<<3: Arrearage
1<<4: Overdue
Request Example
{
"CardList":[{
"UserID" : "100013"
DA

"CardNo" : ""
HU

"CardType" : 0
A_

"CardName" : "201-zhangSan"
HT

"CardStatus" : 0
TP

} ,…,{}]
_

}
AP
I_

Response Params ( OK in body )


V3

Response Example
.3
7

OK
fo
rV
el
se

12.4.10 Modify Multiple Access Cards


ngS

Update information of multiple card numbers.


dn

Request URL http://<server>/cgi-bin/AccessCard.cgi?action=updateMulti


Bh

Method POST
d

Request Params ( JSON format in body)


Name Type R/O Description Example
CardList object[] R User list, with up to 10 entries
+CardNo string R Card No.
+UserID string R User ID
Card type
Enumint{
0: Ordinary card
1: VIP card
+CardType uint16 O
2: Guest card
3: Patrol card
4: Blocklist card
5: Duress card

Access Control APIs 661


+CardName string O Card name
Card status. Different card status
results in different person status.
0: Normal
1<<0: Reported for loss
+CardStatus uint32 O
1<<1: Canceled
1<<2: Frozen
1<<3: Arrearage
1<<4: Overdue
Request Example
{
CardList[{
"UserID" : "100013"
"CardNo" : ""
"CardType" : 0
"CardName" : "201-ZhangSan"
DA

"CardStatus" : 0
HU

} ,…,{}]
A_

}
HT
TP

Response Params ( OK in body )


_

Response Example
AP

OK
I_
V3
.3
7

12.4.11 Delete All Access Cards


fo
rV

Remove all card number information.


el
se

Request URL http://<server>/cgi-bin/AccessCard.cgi?action=removeAll


ngS

Method GET
dn

Request Params ( none )


Name Type R/O Description Example
Bh

Request Example
d

http://192.168.1.108/cgi-bin/AccessCard.cgi?action=removeAll

Response Params ( OK in body )


Response Example
OK

12.4.12 Delete Multiple Access Cards


Remove information of multiple card numbers.
Request URL http://<server>/cgi-bin/AccessCard.cgi?action=removeMulti
Method GET
Request Params ( key=value format at URL)

Access Control APIs 662


Name Type R/O Description Example
CardNoList char[10][] User card number list, with up to 10 ["12345678",
R
entries "12345687"]
Request Example
http://192.168.1.108/cgi-
bin/AccessCard.cgi?action=removeMulti&CardNoList[0]=12345678&CardNoList[1]=12345687

Response Params ( OK in body )


Response Example
OK

12.4.13 Find Multiple Access Cards


Search for information of multiple card numbers.
DA

Request URL http://<server>/cgi-bin/AccessCard.cgi?action=list


HU

Method GET
Request Params ( key=value format at URL)
A_

Name Type R/O Description Example


HT

CardNoList char[10][] User card number list, with up to 10 ["12345678",


TP

R
entries "12345687"]
_
AP

Request Example
I_

http://192.168.1.108/cgi-
V3

bin/AccessCard.cgi?action=list&CardNoList[0]=12345678&CardNoList[1]=12345687
.3
7
fo

Response Params ( key=value format in body )


rV

Name Type R/O Description Example


el

Cards object[] R The cards that returned.


se

+CardNo string R Card No. 12345687


n gS

+UserID string R User ID 1


dn

Card type 0
Enumint{
Bh

0: Ordinary card
d

1: VIP card
+CardType uint16 O
2: Guest card
3: Patrol card
4: Blocklist card
5: Duress card
+CardName string O Card name xxx
Card status. Different card status 0
results in different person status.
0: Normal
+CardStatus uint32 O
1<<0: Reported for loss
1<<1: Canceled
1<<2: Frozen

Access Control APIs 663


1<<3: Arrearage
1<<4: Overdue
Response Example
Cards[0].CardNo=12345678
Cards[0].UserID=1
Cards[0].CardType=1
Cards[0].CardName=ZhangSan
Cards[0].CardStatus=0

Cards[1].CardNo=12345679
Cards[1].UserID=2
Cards[1].CardType=1
Cards[1].CardName=LiSi
Cards[1].CardStatus=0

DA
HU

12.4.14 Start Find Access User Card Related Information


A_
HT

Start searching for card number related information.


TP

Request URL http://<server>/cgi-bin/AccessCard.cgi?action=startFind


_AP

Method GET
I_

Request Params ( key=value format at URL)


V3

Name Type R/O Description Example


.3

Search conditions. Users can perform


7
fo

Condition object R conditional search according to the


rV

user information field.


el

+UserID string O User ID 1


se

+CardNo string O User card number 1234


n
gS

Card type 0
dn

Enumint{
0: Ordinary card
Bh

1: VIP card
d

+CardType uint16 O
2: Guest card
3: Patrol card
4: Blocklist card
5: Duress card
+CardName string O Card name aaa
Card status Different card status 0
results in different person status.
0: Normal
1<<0: Reported for loss
+CardStatus uint32 O
1<<1: Canceled
1<<2: Frozen
1<<3: Arrearage
1<<4: Overdue

Access Control APIs 664


Request Example
http://192.168.1.108/cgi-bin/AccessCard.cgi?action=startFind&Condition.UserID=1

Response Params ( JSON format in body )


Name Type R/O Description Example
Token uint32 R Search token. 1234
Total uint32 R Total number of entries found this time 20
Search capability: Maximum number 20
Caps uint32 R of records that can be returned each
time.
Response Example
{
"Token": 1234,
"Total": 20,
"Caps ": 20
}
DA
HU
A_

12.4.15 Get Find Result of Access User Card Related Information


HT
TP

Get card number related information.


_ AP

Request URL http://<server>/cgi-bin/AccessCard.cgi?action=startFind


I_

Method GET
V3

Request Params ( key=value format at URL)


.3

Name Type R/O Description Example


7
fo

Token int R Search token. 1234


rV

Offset int R Offset 0


el

Count int R Number of entries obtained this time 20


se

Request Example
ngS

http://192.168.1.108/cgi-bin/AccessCard.cgi?action=doFind&Token=1234&Offset=0&Count=20
dn

Response Params ( JSON format in body )


Bh

Name Type R/O Description Example


d

info object[] R info


+UserID string O User ID 1
+CardNo string O User card number 1234
Card type 0
Enumint{
0: Ordinary card
1: VIP card
+CardType uint16 O
2: Guest card
3: Patrol card
4: Blocklist card
5: Duress card
+CardName string O Card name aaa

Access Control APIs 665


Card status Different card status results 0
in different person status.
0: Normal
1<<0: Reported for loss
+CardStatus uint32 O
1<<1: Canceled
1<<2: Frozen
1<<3: Arrearage
1<<4: Overdue
Response Example
{
"Info": [ {
"UserID": "102",

}, { … }, … ]
}
DA
HU

12.4.16 Stop Find Access User Card Related Information


A_
HT

Stop searching for card number related information.


TP

Request URL http://<server>/cgi-bin/AccessCard.cgi?action=stopFind


_
AP

Method GET
I_

Request Params ( key=value format at URL)


V3

Name Type R/O Description Example


.3

Token int R Search token. 1234


7
fo

Request Example
rV

http://192.168.1.108/cgi-bin/AccessCard.cgi?action=stopFind&Token=1234
el
se

Response Params ( OK in body )


n gS

Response Example
dn

OK
Bh
d

12.4.17 Add Multiple Access User Fingerprint


Insert multiple fingerprint information.
Request URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=insertMulti
Method POST
Request Params ( JSON format in body)
Name Type R/O Description Example
vecPackets char[][] R Fingerprint feature data [ "xxxx", "xxxx", … ]
AccessFingerp
object[] R Fingerprint list
rints
+UserID char[] R User ID "102"
+FingerprintPa
object R Send fingerprint information list.
cket

Access Control APIs 666


++Length uint32 R Length of a single fingerprint package 810
++Count uint32 R Number of fingerprint packages 3
Either cloud storage URL of fingerprint
data or Length. If the Length exists and
++DataURL char[][] O is not 0, this field is invalid when it is
subject to Length. Only HTTP URL is
available now.
Duress fingerprint number, with a value 2
range of [1, count]. This field is invalid if
++DuressInde
uint8 R the value is illegal. That is, there is no
x
duress fingerprint. For example, 0
indicates no duress fingerprint.
Request Example
{
“vecPackets“: [ "xxxx", "xxxx", … ],
“AccessFingerprints”:[
DA

{
HU

"UserID": "102",
A_

"FingerprintPacket" :
HT

{
TP

"Length" : 810,
_

"Count" : 3,
AP

"DuressIndex" : 2
I_

}
V3

}
.3
7

]
fo

}
rV
el

Response Params ( OK in body )


se
n

Response Example
gS

OK
dn
Bh
d

12.4.18 Modify Access User Fingerprint


Update multiple fingerprint information.
Request URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=updateMulti
Method POST
Request Params ( JSON format in body)
Name Type R/O Description Example
vecPackets char[][] R Binary fingerprint data (Binary Data). [ "xxxx", "xxxx", … ]
AccessFingerp
object[] R Fingerprint list
rints
+UserID char[] R User ID "102"
+FingerprintPa
object R Send fingerprint information list.
cket

Access Control APIs 667


++Length uint32 R Length of a single fingerprint package 802
++Count uint32 R Number of fingerprint packages 3
Either cloud storage URL of fingerprint
data or Length. If the Length exists and
++DataURL char[][] O is not 0, this field is invalid when it is
subject to Length. Only HTTP URL is
available now.
Duress fingerprint number, with a value 2
range of [1, count]. This field is invalid if
++DuressInde
uint8 R the value is illegal. That is, there is no
x
duress fingerprint. For example, 0
indicates no duress fingerprint.
Request Example
{
"vecPackets": [ "xxxx", "xxxx", … ],
"AccessFingerprints":[{
DA

"UserID": "102",
HU

"FingerprintPacket" : {
A_

"Length" : 810,
HT

"Count" : 3,
TP

"DuressIndex" : 2
_

}
AP

}
I_

]
V3

}
.3
7
fo

Response Params ( OK in body )


rV

Response Example
el

OK
se
n gS
dn

12.4.19 Delete All Access User Fingerprint


Bh
d

Delete all fingerprint information.


Request URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=removeAll
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/AccessFingerprint.cgi?action=removeAll

Response Params ( OK in body )


Response Example
OK

Access Control APIs 668


12.4.20 Delete Multiple Access User Fingerprint
Delete fingerprint information.
Request URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=removeMulti
Method GET
Request Params ( key=value format at URL )
Name Type R/O Description Example
UserIDList char[][] R User card number list ["101"]
Request Example
http://192.168.1.108/cgi-bin/AccessFingerprint.cgi?action=removeMulti&UserIDList[0]=101

Response Params ( OK in body )


Response Example
OK
DA
HU

12.4.21 Find Access User Fingerprint


A_
HT

Search for user fingerprint information.


TP

Request URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=get


_
AP

Method GET
I_

Request Params ( key=value format at URL)


V3

Name Type R/O Description Example


.3

UserID string R user ID 1


7

Request Example
fo
rV

http://192.168.1.108/cgi-bin/AccessFingerprint.cgi?action=get&UserID=1
el
se

Response Params ( key=value format in body )


n gS

Name Type R/O Description Example


Binary fingerprint data (Binary xxx
dn

FingerprintData BinaryData R
Data).
Bh

FingerprintPack
d

object R Description of fingerprint data


et
Length of a single fingerprint 810
+Length uint32 R
package
+Count uint32 R Number of fingerprint packages 3
Either cloud storage URL of
fingerprint data or Length. If the
Length exists and is not 0, this field
+DataURL char[][] O
is invalid when it is subject to
Length. Only HTTP URL is
available now.
Duress fingerprint number, with a 1
value range of [1, count]. This field
+DuressIndex Uint8 R
is invalid if the value is illegal. That
is, there is no duress fingerprint.

Access Control APIs 669


For example, 0 indicates no
duress fingerprint.
Response Example
FingerprintPacket.Length=810
FingerprintPacket.Count=3
FingerprintPacket.DuressIndex=1
FingerprintData=xxx

12.4.22 Add Multiple Access User Face


Insert multiple face information.
Request URL http://<server>/cgi-bin/AccessFace.cgi?action=insertMulti
Method POST
Request Params ( JSON format in body)
DA

Name Type R/O Description Example


HU

FaceList object[] R Face list, with up to 10 entries


User ID "102"
A_

+UserID char[] R
char[][] Base64 of red light face templates, [ "xxxx", "xxxx", … ]
HT

+FaceData O
8192 Bytes/per face, maximum 20.
TP

char[][] Base64 of white light face images, [ "yyyy", "yyyy", … ]


_

+PhotoData O
AP

200kx5.
I_

Either cloud storage URL of white light [ "yyyy", "yyyy", … ]


V3

face images or PhotoData. If PhotoData


.3

+PhotoURL char[][] O exists, this field is invalid when it is


7
fo

subject to PhotoData. Only HTTP URL


rV

is available now.
el

Request Example
se

{
n gS

"FaceList":[
dn

{
"UserID": "102",
Bh

"FaceData": [ "xxxx", "xxxx", … ],


d

"PhotoData": [ "yyyy", "yyyy", … ],


"PhotoURL": [ "yyyy", "yyyy", … ],
},
….
]
}

Response Params ( OK in body )


Response Example
OK

Access Control APIs 670


12.4.23 Update Multiple Access User Face
Update multiple face information.
Request URL http://<server>/cgi-bin/AccessFace.cgi?action=updateMulti
Method POST
Request Params ( JSON format in body)
Name Type R/O Description Example
FaceList object[] R Face list, with up to 10 entries
+UserID char[] R User ID "102"
char[][] Base64 of red light face templates, [ "xxxx", "xxxx", … ]
+FaceData O
8192 Bytes/per face, maximum 20.
char[][] Base64 of white light face images, [ "yyyy", "yyyy", … ]
+PhotoData O
200kx5.
char[][] Either cloud storage URL of white light [ "yyyy", "yyyy", … ]
face images or PhotoData. If PhotoData
DA

+PhotoURL O exists, this field is invalid when it is


HU

subject to PhotoData. Only HTTP URL


A_

is available now.
HT

Request Example
{
TP
_

"FaceList":[{
AP

"UserID": "102",
I_

"FaceData": [ "xxxx", "xxxx", … ],


V3

"PhotoData": [ "yyyy", "yyyy", … ],


.3
7

" PhotoURL": [ "yyyy", "yyyy", … ]


fo

},
rV

….
el

]
se

}
n gS
dn

Response Params ( OK in body )


Bh

Response Example
OK
d

12.4.24 Delete All Access User Face


Delete all face information.
Request URL http://<server>/cgi-bin/AccessFace.cgi?action=removeAll
Method GET
Request Params ( none)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/AccessFace.cgi?action=removeAll

Response Params ( OK in body )

Access Control APIs 671


Response Example
OK

12.4.25 Delete Multiple Access User Face


Delete multiple face information.
Request URL http://<server>/cgi-bin/AccessFace.cgi?action=removeMulti
Method GET
Request Params ( key=value format at URL)
Name Type R/O Description Example
UserIDList char[][] User card number list, with up to 10 ["101", "102"]
R
entries
Request Example
http://192.168.1.108/cgi-
DA

bin/AccessFace.cgi?action=removeMulti&UserIDList[0]=101&UserIDList[1]=102
HU

Response Params ( OK in body )


A_

Response Example
HT

OK
TP
_ AP
I_

12.4.26 Find Access User Face


V3
.3
7

Search for access user face information.


fo

Request URL http://<server>/cgi-bin/AccessFace.cgi?action=list


rV

Method GET
el
se

Request Params ( key=value format at URL)


n

Name Type R/O Description Example


gS

UserIDList char[][] R User ID list, with up to 10 entries ["101", "102"]


dn

Request Example
Bh

http://192.168.1.108/cgi-bin/AccessFace.cgi?action=list&UserIDList[0]=101&UserIDList[1]=102
d

Response Params ( key=value format in body )


Name Type R/O Description Example
FaceDataList object[] R The records that returned.
+UserID char[] R User ID "101"
char[][] Base64 of red light face templates, [ "xxxx", "xxxx", … ]
+FaceData O 8192 Bytes/per face, maximum
20.
char[][] Base64 of white light face images, [ "yyyy", "yyyy", … ]
+PhotoData O
200kx5.
char[][] Either cloud storage URL of white [ "yyyy", "yyyy", … ]
light face images or PhotoData. If
+PhotoURL O
PhotoData exists, this field is
invalid when it is subject to

Access Control APIs 672


PhotoData. Only HTTP URL is
available now.
Response Example
FaceDataList[0].UserID=1
FaceDataList[0].PhotoData[0]="xxxx",
FaceDataList[0].PhotoData[1]="xxxx", ,
FaceDataList[0].FaceData[0]="xxxx"
FaceDataList[0].FaceData[1]="xxxx",

FaceDataList[1].UserID=2
FaceDataList[1].PhotoData[0]="xxxx",
FaceDataList[1].PhotoData[1]="xxxx", ,
FaceDataList[1].FaceData[0]="xxxx"
FaceDataList[1].FaceData[1]="xxxx",

DA
HU

12.4.27 Start Find Access User Face Related Information


A_
HT

Start searching for face related information.


TP

Request URL http://<server>/cgi-bin/AccessFace.cgi?action=startFind


_ AP

Method GET
I_

Request Params ( key=value format at URL)


V3

Name Type R/O Description Example


.3

Search conditions. Users can perform


7
fo

Condition object R conditional search according to the


rV

user information field.


el

+UserID char[] R User ID 1


se

Request Example
ngS

http://192.168.1.108/cgi-bin/AccessFace.cgi?action=startFind&Condition.UserID=1
dn

Response Params ( JSON format in body )


Bh

Name Type R/O Description Example


d

Token uint32 R Search token. 1234


Total number of entries found this 20
Total uint32 R
time
Search capability: Maximum 20
Caps uint32 R number of records that can be
returned each time.
Response Example
{
"Token": 1234,
"Total": 20,
"Caps ": 20
}

Access Control APIs 673


12.4.28 Get Find Result of Access User Face Related Information
Get face related information.
Request URL http://<server>/cgi-bin/AccessFace.cgi?action=doFind
Method GET
Request Params ( key=value format at URL)
Name Type R/O Description Example
Token int R Search token. 1234
Offset int R Offset 0
Number of entries obtained this 20
Count int R
time
Request Example
http://192.168.1.108/cgi-bin/AccessFace.cgi?action=doFind&Token=1234&Offset=0&Count=20

Response Params ( JSON format in body )


DA

Name Type R/O Description Example


HU

info object[] R The Person information that


A_

returned.
HT

+UserID char[] R User ID 1


TP

char[][] Base64 of red light face templates, [ "xxxx", "xxxx", … ]


_

+FaceData O 8192 Bytes/per face, maximum


AP

20.
I_

char[][] Base64 of white light face images, [ "yyyy", "yyyy", … ]


V3

+PhotoData O
200kx5.
.3
7

char[][] Either cloud storage URL of white [ "yyyy", "yyyy", … ]


fo

light face images or PhotoData. If


rV

PhotoData exists, this field is


el

+PhotoURL O
invalid when it is subject to
se

PhotoData. Only HTTP URL is


ngS

available now.
dn

Response Example
Bh

{
d

"Info": [ {
"UserID": "102",

}, { … }, … ]
}

12.4.29 Stop Find Access User Face Related Information


Stop searching for face related information.
Request URL http://<server>/cgi-bin/AccessFace.cgi?action=stopFind
Method GET
Request Params ( key=value format at URL)

Access Control APIs 674


Name Type R/O Description Example
Token int R Search token. 1234
Request Example
http://192.168.1.108/cgi-bin/AccessFace.cgi?action=stopFind&Token=1234

Response Params ( OK in body )


Response Example
OK

12.4.30 Access Control Protocol Capability Query


Second-Generation Access Control Protocol Capability Query
Request URL http://<server>/cgi-bin/api/AC/getCaps
Method POST
Request Params ( JSON format in body )
DA

Name Type R/O Description Example


HU

WantMethods bool O Whether to request to return the Methods true


A_

list, please obtain according to actual


HT

needs.
TP

WantCaps bool O Whether to request to return to the true


_

capability item list, please obtain


AP

according to actual needs.


I_
V3

Request Example
{
.3
7

"WantMethods": True
fo

}
rV
el

Response Params
se
n

Name Type R/O Description Example


gS

Caps object R Capability set


dn

+AC object O AC capability set


Bh

++Channels uint32 O Number of supported access control 4


d

channels. The former is


"AccessControlChannels”.
++HasAlarmR bool O Supports recording access control alarm False
ecord logs. The former is
“AccessControlAlarmRecord”.
++Encryption uint8 O The storage method of passwords in the 0
Method ACCustomPassword record set. The
former is "CustomPasswordEncryption”.
0: Plaintext, the default value is 0.
1: MD5.
++HasFingerp uint8 O Whether fingerprint authentication is 0
rintAuth supported. The former is
"SupportFingerprint”.

Access Control APIs 675


0: Unknown, compatible with previous
one (default);
1: Not supported; 2: Supported.
++HasCardAu bool O Whether card authentication is False
th supported.
False: Not supported; true: Supported.
++HasBTCard Bool O Whether supporting Bluetooth card false
Auth authentication
False- no; true- yes
++HasFaceAu bool O Whether ** identification authentication False
th is supported.
False: Not supported; true: Supported.
++OnlySingle uint8 O Whether only single-door authorization 0
DoorAuth (card issuing) multi-door controller is
supported.
0: Not supported; 1: Supported
DA

++IsAsynAuth uint8 O Whether asynchronous return 0


HU

authentication is supported.
A_

0: Not supported; 1: Supported


HT

++IsUserIsolat uint8 O Whether it is a person-card separation 0


TP

e scheme. In the person-card separation


_

scheme, one person can have several


AP

cards.
I_

0: No; 1: Yes
V3

++MaxInsertR uint16 O The general maximum number of data 10


.3
7

ate can be sent at a time. Default


fo

conservative set value similar to BIOS.


rV

++ScheduleC object O The schedule capability of the device,


el

aps corresponding to the former


se
n

SpecialDaysSchedules.
gS

+++Support bool O Whether the new schedule is supported. False


dn

False: Not supported; true: Supported.


Bh

+++MaxSched uint16 O The maximum number of holiday plan 6


d

ules capabilities supported by one access


controller.
+++MaxTimeP uint8 O The maximum number of time periods 6
eriodsPerDay that can be defined in a day.
+++MaxSpeci uint16 O The maximum number of holiday plan 6
alDayGroups groups supported by the access
controller.
+++MaxDaysI uint16 O The maximum number of holidays 16
nSpecialDayG supported by a holiday group.
roup
++UnlockMod uint16[128] O The combination of unlocking modes [1, 2, ...]
es supported by the device. The element
value corresponds to the former

Access Control APIs 676


"Opening Method", namely the Method
value in the AccessControl configuration.
++SupportBac bool O Whether the AI identification mode is True
kendAI supported.
True: Supported; false: Not supported.
++SupportFas enumint O Supports fast import function 0
tImport Enumint {
0: Not supported
1: Supported
}
Not supported if it does not exist.
++SupportFas enumint O Supports quick review function (only 0
tCheck compare userID)
Enumint {
0: Not supported
1: Supported
DA

}
HU

Not supported if it does not exist.


A_

++SupportRap enumint O Supports rapid review function 0


HT

idCheck Enumint {
TP

0: Not supported
_

1: Supported
AP

}
I_

Not supported if it does not exist.


V3

++IncrementI enumint O Supports incremental delivery 0


.3
7

mport Enumint {
fo

0: Not supported
rV

1: Supported
el

} Not supported if it does not exist.


se
n

++FingerCom uint8 O HasFingerprintAuth supports fingerprint 2


gS

pareMode authentication function, this field is valid.


dn

0: Unknown, meaningless
Bh

1: The device only supports front-end


d

fingerprint comparison.
2: The device only supports back-end
fingerprint comparison.
3: Indicates that the device supports
both front-end and back-end fingerprint
comparison.
++SupportHel enumint O Supports safety helmet function. 0
met ( Takend from IsSupportHelmet)
Enumint{
0: Not supported
1: Supported
} Not supported if it does not exist.
++UserName uint32 O Supports limiting name length on the 32
MaxLen device.

Access Control APIs 677


++SupportAS bool O Supports turnstile business components True
GManager (the turnstile was previously hung on the
access controller as a sub-device, and
the related configuration of the turnstile
was written in the access control. Now
divide the turnstile from the access
control.)
true: supported.
False: Not supported.
++SnapPicPat char[512] O The local storage directory of the door- "/mnt/data/userpic/"
h opening snapshots; the file name is
stored in the door-opening record
database, and the absolute path of the
snapshot can be obtained by appending
this directory.
++FaceImage char[512] O ** The local storage directory of base "/mnt/data/FaceImag
DA

Path pictures. e/"


HU

++HasIrisAuth bool O Whether ** identification authentication False


A_

is supported.
HT

++IrisImagePa char[512] O Added ** opening authentication type, "/mnt/data/Image/"


TP

th and added ** base storage path.


_

+AccessUser object O AccessUser capability set.


AP

++MaxInsertR uint16 O Maximum number of inserts per time. 10


I_

ate
V3

++MaxUsers uint32 O Maximum number of users that can be 600


.3
7

recorded and processed.


fo

++MaxFingerP uint8 O Maximum number of fingerprints that 5


rV

rintsPerUser can be recorded per person.


el

++MaxCardsP uint8 O Maximum number of card that can be 5


se
n

erUser recorded per person.


gS

++MaxFacesP uint8 O Maximum number of ** photo that can 1


dn

erUser be recorded per person.


Bh

+AccessCard object O AccessCard capability set.


d

++MaxInsertR uint16 O Maximum number of inserts per time. 10


ate
++MaxCards uint32 O Maximum storage number of cards. 600
+AccessFinge object O - -
rprint
++MaxInsertR uint16 O Maximum number of inserts per time. 10
ate
++MaxFingerp uint16 O Maximum bytes number of single 810
rintSize fingerprint data.
++MaxFingerp uint32 O Fingerprint storage limit. 600
rints
++AlgorithmVe uint32 O Fingerprint algorithm manufacturer; 0
ndor 0: Unknown;1: Dahua; 2: Brmicro.

Access Control APIs 678


++AlgorithmVe uint32 O Fingerprint algorithm version number;
rsion each 8 bit represents a version from
high to low according to Major/Minor, for
example, 1.5.2 represents as
0x0001050.
+AccessFace object O AccessFace capability set.
++MaxInsertR uint16 O Maximum number of inserts per time. 10
ate
++MaxFaces uint32 O ** Storage Limit. 600
++Recognition uint8 O ** Recognition Type. 1
Type
++Recognition uint16 O ** Identification algorithm provider. 0
AlgorithmVend 0: Unknown; 1: Dahua; 2: SenseTime; 3:
er Yitu; 4: Hanvon; 5: Huoyan.
++Recognition uint32 O ** Identification algorithm (model)
Version version number, if the version number
DA

has multiple digits, each 8 bit represents


HU

a version from high to low according to


A_

Major/Minor, for example, 1.5.2


HT

represents as 0x00010502.
TP

++MinPhotoSi uint16 O Minimum size of white light photo, KB. 20


_

ze
AP

++MaxPhotoSi uint16 O Maximum size of white light photo, KB. 20


I_

ze
V3

++MaxGetPho uint16 O The maximum amount of acquisitions 20


.3
7

toRate per time by the white light list method.


fo

Unit (number/per time).


rV

++IsSupportG bool O Whether the list interface is supported to True


el

etPhoto obtain white light photos.


se
n

++IsSupportO bool O Whether only sending the characteristic True-


gS

nlyIssueFaceE value is supported.


dn

igen
Bh

++MultiFaceD object O -
d

etect
+++Support bool O Whether multi-detection identification is True
supported.
+++MaxNums uint32 O The maximum number of detections 3
supported at a time.
+AccessIris object O AccessIris capability set.
++MaxInsertR uint16 O Maximum number of inserts per time. 10
ate
++MinIrisPhot uint16 O Minimum size of the image, unit KB. 1
oSize
++MaxIrisPhot uint16 O Maximum size of the image, unit KB. 50
oSize
++MaxIrisGro uint16 O Maximum number of groups supported 1
up by each user**.

Access Control APIs 679


++Recognition uint16 O ** Identification algorithm provide 0
AlgorithmVend identification, 0: Unknown; 1: Dahua.
er
++Recognition uint32 O ** The algorithm (model) version
Version number, if the version number has
multiple digits, every 8 bit represents a
version from high to low according to
Major/Minor, for example, 1.5.2
represents as 0x00010502.
++MaxIrisesC uint32 O ** Storage Limit. 10000
ount
+ object O Capability set of the Bluetooth card
AccessBTCar
d
++ uint32 O Maximum number of each insertion 5
MaxInsertRate
DA

++MaxCards uint32 O Maximum number of storage cards 5000


HU

Response Example
A_

{
HT

"Caps": {
TP

"AC": {
_


AP

}
I_

}
V3

}
.3
7
fo
rV

12.4.31 Inserting Bluetooth Card Information


el
se
n

Request URL http://<server>/cgi-bin/api/AccessBTCard/insertMulti


gS

Method POST
dn

Request Params ( JSON format in body )


Bh

Name Type R/O Description Example


d

BTCardList object[] R
+AKID uint64 R The sequence number of the Bluetooth 123456
card
+UserID char[32] R User ID "123"
+BTCardNo char[32] R Bluetooth card number "1234567"
Request Example
{
"BTCardList": [, ....]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

Access Control APIs 680


12.4.32 Searching for Information on Bluetooth Card

Request URL http://<server>/cgi-bin/api/AccessBTCard/list


Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
CardAKIDList uint64[5] R List of Bluetooth card sequence number [1,2,3,4,5]
Request Example
{
"CardAKIDList": [1,2,3,4,5]
}

Response Params ( JSON format in body )


DA

Name Type R/O Description Example


HU

BTCards object[] O The list of searched Bluetooth card


A_

information.
HT

+AKID uint64 R Sequence number of the Bluetooth card. 12345


TP

+UserID char[32] R User ID "123"


_

+BTCardNo char[32] R Bluetooth card number. "1234567"


AP

Response Example
I_
V3

{
"BTCards": [, ....]
.3
7

}
fo
rV
el

12.4.33 Deleting All Bluetooth Card Information


se
n gS

Request URL http://<server>/cgi-bin/api/AccessBTCard/removeAll


dn

Method POST
Bh

Request Params ( JSON format in body )


d

Name Type R/O Description Example


Request Example
{}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

12.4.34 Deleting Bluetooth Card Information


Request URL http://<server>/cgi-bin/api/AccessBTCard/removeMulti
Method POST

Access Control APIs 681


Request Params ( JSON format in body )
Name Type R/O Description Example
CardAKIDList uint64[5] R List of Bluetooth card sequence number [1,2,3,4,5]
Request Example
{
"CardAKIDList": [1,2,3,4,5]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

12.4.35 Searching for Information on Access Control Bluetooth Card


DA

Search for information on access control Bluetooth card.


HU

Request URL http://<server>/cgi-bin/api/AccessBTCard/startFind


A_

Method POST
HT

Request Params ( JSON format in body )


TP

Name Type R/O Description Example


_

Condition object O Search conditions


AP

+UserID char[32] O User ID "123"


I_
V3

+AKID uint64 O Sequence number of the Bluetooth card 123456


+BTCardNo char[32] O Bluetooth card number "1234567"
.3
7

Request Example
fo

{
rV

"Condition": {
el

}
se
n

}
gS
dn

Response Params ( JSON format in body )


Bh

Name Type R/O Description Example


d

Token uint32 R Search token


Total uint32 R Total number of entries returned 10
Caps uint32 R Search capability. Maximum number of
entries provided by doFind each time.
Response Example
{
"Token": ,
"Total": 10,
"Caps":
}

Access Control APIs 682


12.4.36 Acquiring the Search Results of Bluetooth Card
Request URL http://<server>/cgi-bin/api/AccessBTCard/doFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Token uint32 R Search token 123
Offset uint32 R The offset position of the search 12
Count uint32 R The number of entries required for this 6
search, which cannot exceed the Caps
of the startFind.
Request Example
{
"Token": 123,
"Offset": 12,
DA

"Count": 6
HU

}
A_

Response Params ( JSON format in body )


HT

Name Type R/O Description Example


TP

Info AccessBT R Bluetooth card information [, ....]


_ AP

Card[1000]
I_

Response Example
V3

{
.3

"Info": [, ....]
7
fo

}
rV
el
se

12.4.37 Ending the Bluetooth Card Search


n gS

End the Bluetooth card search.


dn

Request URL http://<server>/cgi-bin/api/AccessBTCard/stopFind


Bh

Method POST
d

Request Params ( JSON format in body )


Name Type R/O Description Example
Token uint32 R Search token 2342
Request Example
{
"Token": 2342
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

Access Control APIs 683


12.5 Admin Password

12.5.1 Add Access Control Admin Password


Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=insert
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name char[] R Access control admin password AccessControlCu
record name, should be stomPassword
"AccessControlCustomPassword".
UserID char[] R The user's id. 101
OpenDoorPass char[] R 123456
Ths user’s open door password.
word
AlarmPassword char[] O
DA

Ths user’s alarm password. ( This


param is not supported by video talk
HU

device )
A_
HT

Doors int[] O The index of the doors that admin


TP

password can open. ( This param is


_

not supported by video talk device )


AP

TimeSections int[] O The index of the time sections of each


I_

door that this card can open. ( This


V3

param is not supported by video talk


.3
7

device )
fo

VTOPosition char[] O VTO position number. ( This param is


rV

not supported by access control


el

device )
se
n

ValidDateStart char[] O The start of valid date, format is


gS

"yyyyMMdd hhmmss".
dn

ValidDateEnd char[] O The end of valid date, format is


Bh

"yyyyMMdd hhmmss".
d

ValidCounts int O The password’s valid counts.


OriginSmartGate char[] O The origin smart gateway address.
Way ( Video talk device customize. )
Request Example
http://192.168.1.108/cgi-
bin/recordUpdater.cgi?action=insert&name=AccessControlCustomPassword&UserID=102&OpenDoo
rPassword=123456&Doors[0]=1&Doors[1]=3&Doors[2]=5&VTOPosition=01018001&ValidDateStart=
20151022%20093811&ValidDateEnd=20151222%20093811&ValidCounts=30

Response Params ( key=value format in body )


Name Type R/O Description Example
recno int R The record id. 1234
Response Example
recno=12345

Access Control APIs 684


12.5.2 Modify Access Control Admin Password
Note: You should provide at lease one optional param to update.
Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=update
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name string R Access control admin password AccessControlCust
record name, should be omPassword
"AccessControlCustomPassword
".
recno int R The record id. 1234
UserID string R The user's id. 101
OpenDoorPass string R 123456
DA

Ths user’s open door password.


word
HU

AlarmPassword string O Ths user’s alarm password. ( This


A_

param is not supported by video talk


HT

device )
TP

Doors int[] O The index of the doors that admin


_AP

password can open.


TimeSections int[] O The index of the time sections of
I_
V3

each door that this card can open.


.3

( This param is not supported by


7

video talk device )


fo

VTOPosition string O VTO position number. ( This param


rV

is not supported by access control


el
se

device )
n

ValidDateStart string O The start of valid date, format is


gS

"yyyyMMdd hhmmss".
dn

ValidDateEnd string O The end of valid date, format is


Bh

"yyyyMMdd hhmmss".
d

ValidCounts int O The password’s valid counts.


OriginSmartGate string O The origin smart gateway address.
Way ( Video talk device customize. )
Request Example
http://192.168.1.108/cgi-
bin/recordUpdater.cgi?action=update&name=AccessControlCustomPassword&recno=12345&UserID
=102&OpenDoorPassword=123456&Doors[0]=1&Doors[1]=3&Doors[2]=5&ValidDateStart=20151022
%20093811&ValidDateEnd=20151222%20093811

Response Params ( OK in body )


Name Type R/O Description Example
Response Example
OK

Access Control APIs 685


12.5.3 Delete Access Control Admin Password
 Delete access control admin password record by recno
Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=remove
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name string R Access control admin password AccessControlCu
record name, should be stomPassword
"AccessControlCustomPassword".
recno int R The record id. 12345
Request Example
http://192.168.1.108/cgi-
bin/recordUpdater.cgi?action=remove&name=AccessControlCustomPassword&recno=12345
DA
HU

Response Params ( OK in body )


A_

Name Type R/O Description Example


HT

Response Example
TP

OK
_AP
I_

Delete all the access control admin password records


V3


.3

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=clear


7

Method GET
fo

Request Params ( key=value format in URL )


rV

Name Type R/O Description Example


el
se

name string R Access control admin password AccessControlCust


n

record name, should be omPassword


gS

"AccessControlCustomPassword".
dn

Request Example
Bh

http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControlCustomPassword
d

Response Params ( OK in body )


Name Type R/O Description Example
Response Example
OK

12.5.4 Find Access Control Admin Password


 Find Access control admin password by condition
Request URL http://<server>/cgi-bin/recordFinder.cgi?action=find
Method GET
Request Params ( key=value format in URL )

Access Control APIs 686


Name Type R/O Description Example
name string R Record Name, should be AccessControlCu
"AccessControlCustomPassword". stomPassword
count int O Max result to return, default is 1024. 1024
StartTime string O The start of the record's CreateTime. 123456700
EndTime string O The End of the record's CreateTime. 123456800
condition object O Search condition.
+UserID string O The user's id. 101
Request Example
http://192.168.1.108/cgi-
bin/recordFinder.cgi?action=find&name=AccessControlCustomPassword&condition.UserID=103&Sta
rtTime=123456700&EndTime=123456800&count=100

Response Params ( key=value format in body )


Name Type R/O Description Example
totalCount int O The total record num that find. 2
DA

found int O The record num that returned. 2


HU

records array<object R
The records that returned.
A_

>
HT

+RecNo int R The record id. 1234


TP

+CreateTime int O The create time of record.


_

+UserID string R The user's id. 101


AP

+OpenDoorPass string R 123456


I_

Ths user’s open door password.


V3

word
+AlarmPassword string O
.3

Ths user’s alarm password. ( This


7
fo

param is not supported by video talk


rV

device )
el

+Doors Int[] O The index of the doors that admin


se
n

password can open. ( This param is


gS

not supported by video talk device )


dn

+TimeSections Int[] O The index of the time sections of


Bh

each door that this card can open.


d

( This param is not supported by


video talk device )
+VTOPosition string O VTO position number. ( This param is
not supported by video talk device )
+ValidDateStart string O The start of valid date, format is 20151022 093811
"yyyyMMdd hhmmss".
+ValidDateEnd string O The end of valid date, format is 20151023 093811
"yyyyMMdd hhmmss".
+ValidCounts int O The password’s valid counts.
+OriginSmartGat string O The origin smart gateway address.
eWay ( Video talk device customize. )
Response Example
totalCount=1000
found=100

Access Control APIs 687


records[0].RecNo=12345
records[0].CreateTime=123456789
records[0].UserID=103
records[0].OpenDoorPassword=123456
records[0].Doors[0]=1
records[0].Doors[1]=3
records[0].Doors[2]=5
records[0].VTOPosition=01018001
records[0].ValidStart=20151022 093811
records[0].ValidEnd=20151222 093811

records[1].RecNo=13579
records[1].CreateTime=123456799
records[1].UserID=103
records[0].OpenDoorPassword=123456
records[1].Doors[0]=2
DA

records[1].Doors[1]=4
HU

records[1].Doors[2]=6
A_

records[1].VTOPosition=01018002
HT

records[1].ValidStart=20151022 093811
TP

records[1].ValidEnd=20151222 093811
_


AP
I_
V3

 Find Access control admin password by recno


.3
7

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=get


fo

Method GET
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Example


se

name string R Record Name, should be AccessControlCu


ngS

"AccessControlCustomPassword". stomPassword
dn

recno int R The record id. 1024


Bh

Request Example
d

http://192.168.1.108/cgi-
bin/recordUpdater.cgi?action=get&name=AccessControlCustomPassword&recno=3

Response Params ( key=value format in body )


Name Type R/O Description Example
record object R The record that returned.
+RecNo int R The record id. 1234
+CreateTime int O The create time of record.
+UserID string R The user's id. 101
+OpenDoorPass string R 123456
word Ths user’s open door password.
+AlarmPassword string O
Ths user’s alarm password. ( This
param is not supported by video talk
device )

Access Control APIs 688


+Doors Int[] O The index of the doors that admin
password can open. ( This param is not
supported by video talk device )
+TimeSections Int[] O The index of the time sections of each
door that this card can open. ( This
param is not supported by video talk
device )
+VTOPosition string O VTO position number. ( This param is not
supported by video talk device )
+ValidDateStart string O The start of valid date, format is 20151022 093811
"yyyyMMdd hhmmss".
+ValidDateEnd string O The end of valid date, format is 20151023 093811
"yyyyMMdd hhmmss".
+ValidCounts int O The password’s valid counts.
+OriginSmartGat string O The origin smart gateway address.
eWay ( Video talk device customize. )
DA

Response Example
HU

record.RecNo=3
A_

record.CreateTime=123456789
HT

record.UserID=103
TP

record.OpenDoorPassword=123456
_

record.Doors[0]=1
AP

record.Doors[1]=3
I_

record.Doors[2]=5
V3

record.VTOPosition=01018001
.3
7

record.ValidStart=20151022 093811
fo

record.ValidEnd=20151222 093811
rV


el
se
ngS

12.5.5 Get the Total Number of Records of Access Control Admin


dn
Bh

Password
d

Request URL http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name string R Access control admin password AccessControlCust
record name, should be omPassword
"AccessControlCustomPassword
".
Request Example
http://192.168.1.108/cgi-
bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCustomPassword

Response Params ( key=value format in body )

Access Control APIs 689


Name Type R/O Description Example
count string R The total number of records. 150
Response Example
count=150

DA
HU
A_
HT
TP
_ AP
I_
V3
.3
7
fo
rV
el
se
n gS
dn
Bh
d

Access Control APIs 690


13 Intelligent Building APIs

13.1 Video Talk


The following Apis are supported by VTT / VTA products.

13.1.1 Subscribe Video Talk Status


Subscribe the video talk status. When client disconnect, it will unsubscribe.
Request URL http://<server>/cgi-bin/VideoTalkPeer.cgi?action=attachState
Method GET
Request Params ( key=value format in URL )
DA

Name Type R/O Description Example


HU

Request Example
A_

http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=attachState
HT

Response Params ( multipart ; key=value format in body )


TP

Name Type R/O Description Example


_ AP

SID integer No Server subscription ID 13606


I_

state object No Called state


V3

+State string No Call state Answer


.3

Enumchar[32]{
7
fo

"Ringing": passive call


rV

"Inviting": active call


el

"Answer"
se

"Refuse"
n gS

"Cancel"
dn

"Hangup"
"Busying"
Bh

}
d

+Talkback object No Transmission method, audio and


video encoding format, listening
port and other session description
information
++Pack string No Packing Mode RTP
It only supports "RTP” currently.
++Protocol string No Transport protocol type UDP
Enumchar[32]{
TCP
UDP
}
++Type string No Talk type Talk
Enumchar[32]{

Intelligent Building APIs 691


"Talk": Talk
"Broadcast": Broadcast
}
++Audio object No Audio Description
+++Format object[] No Supported audio decoding formats
++++Compressi string No Audio compression format PCM
on Enumchar[32]{
PCM
ADPCM
"G.711A"
"G.711Mu"
"G.726"
"G.729"
"MPEG2"
AMR
AAC
DA

}
HU

++++Frequency integer No Audio Sampling Frequency 44000


A_

++++Depth integer No Sampling depth 16


HT

++Video object No Video description


TP

+++VideoPort integer No Receive video stream port 7000


_

When receiving multiple video


AP

channels, use different ports


I_

respectively.
V3

+++Format object[] No Supported video decoding formats


.3
7

++++Compressi string No Video compression format H.264


fo

on Enumchar[32]{
rV

"MPEG4"
el

"MPEG2"
se
n

"MPEG1"
gS

"MJPG"
dn

"H.263"
Bh

"H.264"
d

}
++++Frequency integer No Video sampling frequency 9000
++MediaAddr string No Streaming address 224.10.10.10
It can be an intercom or broadcast
address
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: text/plain
Content-Length: <data length>

Intelligent Building APIs 692


SID=315
state.State=Answer
state.Talkback.Pack=RTP
state.Talkback.Protocol=UDP
state.Talkback.Type=Talk
state.Talkback.Audio.AudioPort=6000
state.Talkback.Audio.Format[0].Compression=PCM
state.Talkback.Audio.Format[0].Frequency=44000
state.Talkback.Audio.Format[0].Depth=16
state.Talkback.Audio.Format[1].Compression=G.711A
state.Talkback.Audio.Format[1].Frequency=44000
state.Talkback.Audio.Format[1].Depth=16
state.Talkback.Video.VideoPort=7000
state.Talkback.Video.Format[0].Compression=H.264
state.Talkback.Video.Format[0].Frequency=90000
DA

state.Talkback.Video.Format[1].Compression=MJPG
HU


A_

state.Talkback. MediaAddr=224.10.10.10
HT

--<boundary>
TP


_ AP

13.1.2 Unsubscribe Video Talk Status


I_
V3

Unsubscribe the video talk status.


.3
7

Request URL http://<server>/cgi-bin/VideoTalkPeer.cgi?action=detachState


fo

Method GET
rV

Request Params ( key=value format in URL )


el
se

Name Type R/O Description Example


n

SID int R the subscribe id, which is the response of 13606


gS

attachState
dn

Request Example
Bh

http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=detachState&SID=101
d

Response Params ( OK in body )


Response Example
OK

13.1.3 Invite Server on Video Talk


Start the video talk conversation.
Request URL http://<server>/cgi-bin/VideoTalkPeer.cgi?action=invite
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Talkback integer R Channel number, starting from 1 1

Intelligent Building APIs 693


+Pack string O Packing Mode RTP
It only supports "RTP” currently.
+Protocol string O Transport protocol type UDP
Enumchar[32]{
TCP
"UDP"
}
+Type string O Talk type Talk
Enumchar[32]{
"Talk": Talk
"Broadcast": Broadcast
}
+Audio object O Audio Description
++Format object[] O Supported audio decoding formats
+++Compressio string O Audio compression format PCM
n Enumchar[32]{
DA

PCM
HU

"ADPCM"
A_

"G.711A"
HT

"G.711Mu"
TP

"G.726"
_

"G.729"
AP

"MPEG2"
I_

"AMR"
V3

"AAC"
.3
7

}
fo

+++Frequency integer O Audio Sampling Frequency 44000


rV

+++Depth integer O Sampling depth 16


el

+Video object O Video description


se
n

++VideoPort integer O Receive video stream port 7000


gS

When receiving multiple video channels,


dn

use different ports respectively.


Bh

++Format object[] O Supported video decoding formats


d

+++Compressio string O Video compression format H.264


n Enumchar[32]{
"MPEG4"
"MPEG2"
"MPEG1"
"MJPG"
"H.263"
"H.264"
}
+++Frequency integer O Video sampling frequency 9000
+MediaAddr string O Streaming address 224.10.10.10
It can be an intercom or broadcast
address
Request Example

Intelligent Building APIs 694


http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=invite&Talkback.Protocol=UDP&Talkback.Type
=Talk&Talkback.MediaAddr=224.10.10.10

Response Params ( OK in body )


Response Example
OK

13.1.4 Cancel the Video Talk


Cancel video talk conversation.
Request URL http://<server>/cgi-bin/VideoTalkPeer.cgi?action=cancel
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Request Example
DA

http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=cancel
HU
A_

Response Params ( OK in body )


HT

Response Example
TP

OK
_ AP

13.1.5 Answer the Invitation


I_
V3

Answer the call.


.3
7

Request URL http://<server>/cgi-bin/VideoTalkPeer.cgi?action=answer


fo

Method GET
rV

Request Params ( key=value format in URL )


el
se

Name Type R/O Description Example


n

Talkback integer R Channel number, starting from 1 1


gS

+Pack string O Packing Mode RTP


dn

It only supports "RTP” currently.


Bh

+Protocol string O Transport protocol type UDP


d

Enumchar[32]{
TCP
"UDP"
}
+Type string O Talk type Talk
Enumchar[32]{
"Talk": Talk
"Broadcast": Broadcast
}
+Audio object O Audio Description
++Format object[] O Supported audio decoding formats
+++Compressio string O Audio compression format PCM
n Enumchar[32]{
PCM

Intelligent Building APIs 695


"ADPCM"
"G.711A"
"G.711Mu"
"G.726"
"G.729"
"MPEG2"
"AMR"
"AAC"
}
+++Frequency integer O Audio Sampling Frequency 44000
+++Depth integer O Sampling depth 16
+Video object O Video description
++VideoPort integer O Receive video stream port 7000
When receiving multiple video
channels, use different ports
respectively.
DA

++Format object[] O Supported video decoding formats


HU

+++Compressio string O Video compression format H.264


A_

n Enumchar[32]{
HT

"MPEG4"
TP

"MPEG2"
_

"MPEG1"
AP

"MJPG"
I_

"H.263"
V3

"H.264"
.3
7

}
fo

+++Frequency integer O Video sampling frequency 9000


rV

+MediaAddr string O Streaming address 224.10.10.10


el

It can be an intercom or broadcast


se
n

address
gS

Example
dn

http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=answer&Talkback.Protocol=UDP&Talkback.Ty
Bh

pe=Talk&Talkback.MediaAddr=224.10.10.10
d

Response Params ( OK in body )


Response Example
OK

13.1.6 Refuse to Answer the Video Talk Invitation


Refuse answer the call.
Request URL http://<server>/cgi-bin/VideoTalkPeer.cgi?action=refuse
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Request Example

Intelligent Building APIs 696


http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=refuse

Response Params ( OK in body )


Response Example
OK

13.1.7 Hang Up
Close it when the conversation is over.
Request URL http://<server>/cgi-bin/VideoTalkPeer.cgi?action=hangup
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=hangup
DA

Response Params ( OK in body )


HU

Response Example
A_

OK
HT
TP

13.2 Intelligent Building Record


_ AP
I_

13.2.1 Query Video Talk Log Record


V3
.3
7

This Api is supported by VTO products.


fo

Request URL http://<server>/cgi-bin/recordFinder.cgi?action=find


rV

Method GET
el
se

Request Params ( key=value format in URL )


n

Name Type R/O Description Example


gS

name string R It is fixed to "VideoTalkLog" VideoTalkLog


dn

condition object O condition


Bh

+CallType string O call type, range is: {"Incoming", Outgoing


d

"Outgoing"}.
+EndState string O end state of the call Missed
Enumchar[32]{
"Missed"
"Received"
}
+count int O the number of records to get 100
Request Example
http://192.168.1.108/cgi-
bin/recordFinder.cgi?action=find&name=VideoTalkLog&condition.CallType=Incoming&condion.EndSt
ate=Missed&count=500

Response Params (key=value format in body)


Name Type R/O Description Example

Intelligent Building APIs 697


totalCount int O the record count which match 2
condition
found int O the record count to return 2
records object[] O records
+RecNo int O record id 1234
+CreateTime int O create time
+CallType string O all type. The range is { Incoming
"Incoming"
"Outgoing"
}
+EndState string O the range is {"Missed" , Missed
"Received"}
+PeerNumber string O peer number 501
+PeerType string O peer type VTO
Enumchar[32]{
"VTO"
DA

"VTH"
HU

"VTS"
A_

}
HT

+OfflineCall int O Whether to call out when 0


TP

disconnected from the platform


_

0: Online call out,


AP

1: Offline call out,


I_

Other: Undefined
V3

+LocalNumber string O local number 8001


.3
7

+TalkTime int O Talk time, unit: S 550


fo

+MessageTime int O Message time, unit: S 100


rV

+PicturePath string O picture path /picutre


el

+RecordPath string O record path /record


se
n

+CallIdEx string O extern id 123456


gS

+ReadFlag int O Has it been read 0


dn

+Name string O peer name 东门 VTT


Bh

Response Example
d

totalCount=1000
found=500
records[0].RecNo=789
records[0].CreateTime=123456789
records[0].CallType=Incoming
records[0].EndState=Received
records[0].PeerNumber=501

13.2.2 Insert Announcement Record


This api is supported by VTO products.
Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=Announcement
Method GET

Intelligent Building APIs 698


Request Params ( key=value format in URL )
Name Type R/O Description Example
Content string O Announcement Content stringData
ExpirTime string O the time when the 2012-01-
Announcement expire, format: 01%2012:00:00
2012-01-01%2012:00:00
IssueTime string O Announcement issue time, 2012-01-
format: 2012-01- 01%2012:00:00
01%2012:00:00
Title string O title of the announcement Anounce1
User string O the number the Announcement 101
issued to
State int O the state of the Announcement. 1
0 init, 1 send , 2 overdue
ReadFlag int O the read flag. 0 not read, 1 read. 0
BackgroundPict uint32 O 0: background1, 0
DA

ure 1: background2,
HU

2: background3
A_

Request Example
HT

http://192.168.1.108/cgi-
TP

bin/recordUpdater.cgi?action=insert&name=Announcement&Content=stringData&ExpirTime=2012-
_

01-01%2012:00:00&IssueTime=2012-01-
AP

01%2012:00:00&Title=Anounce1&User=101&State=0&ReadFlag=0
I_
V3

Response Params ( key=value format in body )


.3
7

Name Type R/O Description Example


fo

recno int R the record index of the new 232


rV

record
el

Response Example
se
n

recno=232
gS
dn
Bh

13.2.3 Query Alarm Record


d

Find the AlarmRecord record. ( This api is supported by video talk device. )
Request URL http://<server>/cgi-bin/recordFinder.cgi?action=find
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name string R It is fixed to "AlarmRecord" AlarmRecord
StartTime string O The start time ,format : 2014-8- 2014-8-
25%2000:01:32 25%2000:01:32
EndTime string O The end time, format: 2014-8- 2014-8-
25%2000:02:32 25%2000:02:32
count int O the number of records to get, 500
The record count, default 1024

Intelligent Building APIs 699


Request Example
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AlarmRecord&StartTime=2014-8-
25%2000:02:32&EndTime=2014-8-25%2001:02:32&count=500

Response Params ( key=value format in body )


Name Type R/O Description Example
totalCount int R the record count which match 200
condition
found int R the record count to return 100
records object[] R records
+RecNo int O record id 1234
+CreateTime int O create time 12345678
UTC
+Channel int O channel 12
+SenseMethod string O the range is: { "DoorMagnetism", DoorMagnetism
"PassiveInfrared", "GasSensor",
DA

"SmokingSensor",
HU

"WaterSensor", "ActiveInfrared",
A_

"CallButton", "UrgencyButton",
HT

"Steal", "Perimeter",
TP

"PreventRemove", "DoorBell" }
_

+RoomNumber string O room number 101


AP

+ReadFlag int O Enumint{ 1


I_

0: read
V3

1: unread
.3
7

}
fo

+Comment string O remark friend


rV

Response Example
el
se

totalCount=1000
n

found=500
gS

records[0].RecNo=789
dn

records[0].CreateTime=123456789
Bh

records[0].Channel=0
d

records[0].SenseMethod=DoorMagnetism
records[0].RoomNumber=501
records[0].ReadFlag=0
records[0].Comment=Friend

13.3 SIP
The user needs to connect video intercom through CGI protocol, but do not know how to use this
protocol to configure the device. This document provides the corresponding CGI protocol according
to the configuration data format involved in the specific service.

Intelligent Building APIs 700


13.3.1 [Config] SIP Configuration
Config Data Params
Name Type R/O Description Example
SIP object R Configuration name
+AccoutName string O Account name
SIP server
+SIPServer string R
IP address or domain name
+SIPServerPort int R SIP server port number
+OutboundProx Proxy server IP address or
string O
y domain name
+OutboundProx
string O Proxy server ID
yID
+OutboundProx
Int O Proxy server port number
yPort
DA

User account ID
+UserID String R
HU

Generally a phone number


+UserType int O User type
A_

+AuthID String R Authentication ID 8001


HT

+AuthPassword String R Authentication password pass123456


TP

STUN (Simple Traversal of UDP


_ AP

+STUNServer String O over NATs) server


I_

IP address or domain name


V3

+RegisterRealm String R Registration domain


.3

+RegExpiration int O Registration interval, in seconds


7
fo

Local SIP port


+LocalSIPPort Int R
rV

0-65535
el

Local RTP port


+LocalRTPPort int R
se

0-65535
ngS

Restart to delete registration true


+UnregisterOnR information.
dn

bool O
eboot true: Delete
Bh

false: Not delete


d

+DefaultCallNu
string O Default call number
mber
+MediaDetail Object O Media configuration
Video stream Main
enumchar[32]{
"Main": Main stream
++VideoStream string O "Extra1": Sub stream 1
"Extra2": Sub stream 2
"Extra3": Sub stream 3
}
Audio stream Main
++AudioStream string O enumchar[32]{
"Main": Main stream

Intelligent Building APIs 701


"Extra1": Sub stream 1
"Extra2": Sub stream 2
"Extra3": Sub stream 3
}
+RouteEnable bool O Enable SIP cross-router or not.
Router address, which can be IP
+Route string O
address or domain name.
+SIPServerLogi Username to log in to VTNC
string O
nUserName For intelligent building only
+SIPServerLogi Password to log in to VTNC
string O
nPWD For intelligent building only
Whether the door station is a
+IsMainVTO string O standby server
For intelligent building only
+SIPServerRed Standby server IP address
string O
undancy For intelligent building only
DA

+SIPServerRed
Standby server login username
HU

undancyUserNa string O
For intelligent building only
A_

me
HT

+SIPServerRed
Standby server login password
TP

undancyPassWo string O
For intelligent building only
_

rd
AP

The start number of the analog


I_

+AnalogNumber indoor monitor supported in the


V3

string O
Start analog system
.3
7

For intelligent building only


fo

The end number of the analog


rV

+AnalogNumber indoor monitor supported in the


el

string O
End analog system
se
n

For intelligent building only


gS

Enable registration true


dn

For intelligent building only


Bh

+UserEnable bool R true: Register to the SIP server.


d

false: Not register to the SIP


server.

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=SIP
Get Config Response Example
table.SIP.AuthID=8001
table.SIP.AuthPassword=pass123456
table.SIP.IsMainVTO=0
table.SIP.LocalRTPPort=15000
table.SIP.LocalSIPPort=5060
table.SIP.OutboundProxy=192.168.1.111

Intelligent Building APIs 702


table.SIP.OutboundProxyID=8000
table.SIP.OutboundProxyPort=5060
table.SIP.RegisterRealm=VDP
table.SIP.Route[0]=sip:10.30.1.2:5060;lr
table.SIP.RouteEnable=true
table.SIP.SIPServer=192.168.1.111
table.SIP.SIPServerID=8000
table.SIP.SIPServerLoginPWD=pass123456
table.SIP.SIPServerLoginUserName=admin
table.SIP.SIPServerPort=5060
table.SIP.SIPServerRedundancyPassWord=pass123456
table.SIP.SIPServerRedundancyUserName=admin
table.SIP.UserEnable=true
table.SIP.UserID=8001
table.SIP.UserType=2
DA

Set Config Request Example


HU

http://10.0.0.8/cgi-
A_

bin/configManager.cgi?action=setConfig&SIP.SIPServer=192.168.1.108&SIP.SIPServerPort=5060&SIP.
HT

RegisterRealm=VDP&SIP.RouteEnable=true
TP

Set Config Response Example


_

OK
AP
I_

13.3.2 [Config] Registar Configuration


V3
.3
7

Config Data Params


fo

Name Type R/O Description Example


rV

Registar object[] R One-dimensional array. Each


el

subscript represents a registration


se
n

server.
gS

+RegistarName char[] O Registration server name, which


dn

must be unique.
Bh

(Note: For VTH, use the IP address


d

and port in the configuration to


connect VTO.)
+Enable bool O Register to the registration server or true
not.
+ServerType enumchar[3 R Server type, which is used only for VTO
2] SIP video talk, instead of VT video
talk.
Enumchar[32]{
"VTO"
"H500"
"VTNC"
"ZYCOO"
"ThirdParty"
"3CXSystem"

Intelligent Building APIs 703


"Asterisk"
}
+GeneralServerI object O
nfo
++Address char[40] O IP address
++Port uint O Registration port number
++Password char[64] O Password registered to the register
server, which will be used when
registration authentication is
required.

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=SIP
Get Config Response Example
DA

table.Registar[0].ServerType=VTO
HU

table.Registar[0].Enable =true
A_

table.Registar[0].RegistarName =xxx
HT

table.Registar[0].GeneralServerInfo.Address=10.0.0.15
TP

table.Registar[0].GeneralServerInfo.Port=61255
_

table.Registar[0].GeneralServerInfo.Password=123456
AP


I_
V3

Set Config Request Example


.3
7

http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&Registar.ServerType=VTO
fo

Set Config Response Example


rV

OK
el
se
ngS

13.4 Room Number Database Management


dn
Bh

13.4.1 Adding Room Number


d

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=insert


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name char[] R it is fixed to VideoTalkContact VideoTalkContact
CreateTime uint O Start time
UTC seconds, read only
FirstName char[] O First name
FamilyName char[] O Last name
VTShortNumb char[] R Short number for video intercom 123
er

Intelligent Building APIs 704


VTMiddleNum char[] O Middle number for video intercom
ber
VTLongNumbe char[] O Long number for video intercom or serial 3301030011010101
r number of analog indoor monitor 51
VTNetAddress char[] O Network address for video intercom
MacAdress char[] O MAC address
VTOPosition char[] O Door number linked with indoor monitor
VTSlaveBindM enumint O Mode when accessing to the analog
ode indoor monitor for video talk
Enumint{
0: SubAddress
1: SubID+SubPort
}
VTSlaveId uint32 O Allocator address when accessing to the
analog indoor monitor for video talk
(Change string to uint32 for consistency)
DA

VTSlavePort uint32 O Allocator port when accessing to the


HU

analog indoor monitor for video talk


A_

(Change string to uint32 for consistency)


HT

VTSlaveAddre char[] O Address of the analog indoor monitor for


TP

ss video talk
_

NickName char[] O Nickname


AP

Notes char[] O Notes


I_

Type enumcha O User type VTH


V3

r[32] Enumchar[32]{
.3
7

"VTH": Indoor monitor


fo

"VTO": Door station


rV

}
el

RegisterType enumcha R Registration method public


se
n

r[32] Enumchar[32]{
gS

"public"
dn

"local"
Bh

}
d

VTHPassword char[] R Registration password pass123456


VTOBuilding char[] O Building number
VTOUnit char[] O Unit number
GroupNumber char[] O Group
Channel uint32 O Channel number, based on which the
mobile phone subscribes to the call
notification message.
Floors char[256] O Floor number (lift control requirements),
[4] with up to 256 characters
LiftControlByV bool O Lift control is triggered by the indoor false
TH monitor opening the door.
Request Example

Intelligent Building APIs 705


http://<server>/cgi-
bin/recordUpdater.cgi?action=insert&name=VideoTalkContact&VTShortNumber=101&RegisterType=
public&VTHPassword=pass123456

Response Params ( key=value format in body )


Name Type R/O Description Example
recno int R Record ID of successfully creation 12345
Response Example
recno=12345

13.4.2 Getting Records by Video Talk short number


Request URL http://<server>/cgi-bin/recordFinder.cgi?action=find
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
DA

name char[] R It is fixed to VideoTalkContact VideoTalkContact


HU

cout int O Maximum record number of search 10


A_

result
HT

condition object R search condition


TP

+VTShortNum char[] R video talk short number 101


_

ber
AP

Request Example
I_
V3

http://<server>/cgi-
bin/recordFinder.cgi?action=find&name=VideoTalkContact&count=10&condition.VTShortNumber=10
.3
7

1
fo
rV

Response Params ( key=value format in body )


el

Name Type R/O Description Example


se
n

totalCount int O total record number of search result 10


gS

found int O Number of records returned 1


dn

records object[] R Records returned


Bh

+RecNo int R Record ID 12345


d

+CreateTime uint O Start time


UTC seconds, read only
+FirstName char[] O First name dafei
+FamilyName char[] O Last name liu
+VTShortNum char[] R Short number for video intercom 123
ber
+VTMiddleNu char[] O Middle number for video intercom
mber
+VTLongNumb char[] O Long number for video intercom or serial 33010300110101015
er number of VTH analog indoor monitor 1
+VTNetAddres char[] O Network address for video intercom
s
+MacAdress char[] O MAC address
+VTOPosition char[] O Door number linked with indoor monitor

Intelligent Building APIs 706


+VTSlaveBind enumint O Mode when accessing to the analog
Mode indoor monitor for video talk
Enumint{
0: SubAddress
1: SubID+SubPort
}
+VTSlaveId uint32 O Allocator address when accessing to the
analog indoor monitor for video talk
(Change string to uint32 for consistency)
+VTSlavePort uint32 O Allocator port when accessing to the
analog indoor monitor for video talk
(Change string to uint32 for consistency)
+VTSlaveAddr char[] O Address of the analog indoor monitor for
ess video talk
+NickName char[] O Nickname
+Notes char[] O Notes
DA

+Type enumcha O User type


HU

r[32] Enumchar[32]{
A_

"VTH": Indoor monitor


HT

"VTO": Door station


TP

}
_

+RegisterType enumcha R Registration method


AP

r[32] Enumchar[32]{
I_

"public"
V3

"local"
.3
7

}
fo

+VTHPasswor char[] R Registration password 123456


rV

d
el

+VTOBuilding char[] O Building number


se
n

+VTOUnit char[] O Unit number


gS

+GroupNumbe char[] O Group


dn

r
Bh

+LiftControlBy bool O Lift control is triggered by the indoor false


d

VTH monitor opening the door.


Response Example
totalCount=10
found=1
records[0].RecNo=12345
records[0].CreateTime=123456789
records[0].FirstName=San
records[0].FamilyName=Zhang
records[0].VTShortNumber=0101
records[0].VTMiddleNumber=11010101
records[0].VTLongNumber=330103001101010151
records[0].VTNetAddress=127.0.0.1
records[0].MacAdress=0A:3E:FF:2A:50:41
records[0].VTOPosition=01018001

Intelligent Building APIs 707


records[0].VTSlaveBindMode=0
records[0].VTSlaveId=1258421
records[0].VTSlavePort=1258421
records[0].VTSlaveAddress=04:b3:01:f7
records[0].NickName=Nick
records[0].Notes=Friend
records[0].Type=VTH
records[0].RegisterType=public
records[0].VTHPassword=123456
records[0].VTOBuilding=01
records[0].VTOUnit=01
records[0].GroupNumber=301
records[0].Channel=1
records[0].Floors[0]=1
records[0].LiftControlByVTH=true
DA

13.4.3 Getting Records by recno


HU
A_
HT

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=get


TP

Method GET
_ AP

Request Params ( key=value format in URL )


Name Type R/O Description Example
I_
V3

name char[] R It is fixed to VideoTalkContact VideoTalkContact


.3

recno int R record id 123


7

Request Example
fo

http://<server>/cgi-bin/recordUpdater.cgi?action=get&name=VideoTalkContact&recno=12345
rV
el
se

Response Params ( key=value format in body )


n

Name Type R/O Description Example


gS

record object R record


dn

+RecNo int R Record ID


Bh

+CreateTime uint O Start time


d

UTC seconds, read only


+FirstName char[] O First name
+FamilyName char[] O Last name
+VTShortNum char[] R Short number for video intercom
ber
+VTMiddleNu char[] O Middle number for video intercom
mber
+VTLongNumb char[] O Long number for video intercom or serial 33010300110101015
er number of VTH analog indoor monitor 1
+VTNetAddres char[] O Network address for video intercom
s
+MacAdress char[] O MAC address
+VTOPosition char[] O Door number linked with indoor monitor

Intelligent Building APIs 708


+VTSlaveBind enumint O Mode when accessing to the analog
Mode indoor monitor for video talk
Enumint{
0: SubAddress
1: SubID+SubPort
}
+VTSlaveId uint32 O Allocator address when accessing to the
analog indoor monitor for video talk
(Change string to uint32 for consistency)
+VTSlavePort uint32 O Allocator port when accessing to the
analog indoor monitor for video talk
(Change string to uint32 for consistency)
+VTSlaveAddr char[] O Address of the analog indoor monitor for
ess video talk
+NickName char[] O Nickname
+Notes char[] O Notes
DA

+Type enumcha O User type


HU

r[32] Enumchar[32]{
A_

"VTH": Indoor monitor


HT

"VTO": Door station


TP

}
_

+RegisterType enumcha R Registration method


AP

r[32] Enumchar[32]{
I_

"public"
V3

"local"
.3
7

}
fo

+VTHPasswor char[] R Registration password


rV

d
el

+VTOBuilding char[] O Building number


se
n

+VTOUnit char[] O Unit number


gS

+GroupNumbe char[] O Group


dn

r
Bh

+LiftControlBy bool O Lift control is triggered by the indoor false


d

VTH monitor opening the door.


Response Example
record.RecNo=12345
record.CreateTime=123456789
record.FirstName=三
record.FamilyName=张
record.VTShortNumber=0101
record.VTMiddleNumber=11010101
record.VTLongNumber=330103001101010151
record.VTNetAddress=127.0.0.1
record.MacAdress=0A:3E:FF:2A:50:41
record.VTOPosition=01018001
record.VTSlaveBindMode=0
record.VTSlaveId=1258421

Intelligent Building APIs 709


record.VTSlavePort=1258421
record.VTSlaveAddress=04:b3:01:f7
record.NickName=Nick
record.Notes=Friend
record.Type=VTH
record.RegisterType=public
record.VTHPassword=123456
record.VTOBuilding=01
record.VTOUnit=01
record.GroupNumber=301
record.Channel=1
record.Floors[0]=1
record.LiftControlByVTH=true

13.4.4 Updating Room Number Records


DA

Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=update


HU

Method GET
A_

Request Params ( key=value format in URL )


HT

Name Type R/O Description Example


TP

name char[] R It is fixed to VideoTalkContact VideoTalkContact


_

recno int R Record ID 12


AP

CreateTime uint O Start time


I_

UTC seconds, read only


V3

FirstName char[] O First name


.3
7

FamilyName char[] O Last name


fo

VTShortNumb char[] R Short number for video intercom 123


rV

er
el

VTMiddleNum char[] O Middle number for video intercom


se
n

ber
gS

VTLongNumbe char[] O Long number for video intercom or serial


dn

r number of VTH analog indoor monitor


Bh

VTNetAddress char[] O Network address for video intercom


d

MacAdress char[] O MAC address


VTOPosition char[] O Door number linked with indoor monitor
VTSlaveBindM enumint O Mode when accessing to the analog
ode indoor monitor for video talk
Enumint{
0: SubAddress
1: SubID+SubPort
}
VTSlaveId uint32 O Allocator address when accessing to the
analog indoor monitor for video talk
(Change string to uint32 for consistency)
VTSlavePort uint32 O Allocator port when accessing to the
analog indoor monitor for video talk
(Change string to uint32 for consistency)

Intelligent Building APIs 710


VTSlaveAddre string O Address of the analog indoor monitor for
ss video talk
NickName char[] O Nickname
Notes char[] O Notes
Type enumcha O User type VTH
r[32] Enumchar[32]{
"VTH": Indoor monitor
"VTO": Door station
}
RegisterType enumcha R Registration method public
r[32] Enumchar[32]{
"public"
"local"
}
VTHPassword char[] R Registration password pass123456
VTOBuilding char[] O Building number
DA

VTOUnit char[] O Unit number


HU

GroupNumber char[] O Group


A_

Channel uint32 O Channel number, based on which the


HT

mobile phone subscribes to the call


TP

notification message.
_

Floors char[256] O Floor number (lift control requirements),


AP

[4] with up to 256 characters


I_

LiftControlByV bool O Lift control is triggered by the indoor


false
V3

TH monitor opening the door.


.3
7

Request Example
fo

http://<server>/cgi-
rV

bin/recordUpdater.cgi?action=update&name=VideoTalkContact&recno=12345&FirstName=Green&F
el

amilyName=Jim&VTHPassword=654321
se
ngS

Response Params ( OK in body )


dn

Response Example
Bh

OK
d

13.4.5 Deleting Records by recno


Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=remove
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name char[] R It is fixed to VideoTalkContact VideoTalkContact
recno int R record id 12345
Request Example
http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=VideoTalkContact&recno=12345

Response Params ( OK in body )

Intelligent Building APIs 711


Response Example
OK

13.4.6 Clearing All Room Numbers


Request URL http://<server>/cgi-bin/recordUpdater.cgi?action=clear
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
name char[] R Database name, which must be VideoTalkContact
VideoTalkContact.
Request Example
http://<server>/cgi-bin/recordUpdater.cgi?action=clear&name=VideoTalkContact

Response Params ( OK in body )


Response Example
DA

OK
HU
A_

13.4.7 Getting Total Quantity of Room Number


HT
TP

Request URL http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize


_

Method GET
AP

Request Params ( key=value format in URL )


I_
V3

Name Type R/O Description Example


name char[] R Database name, which must be VideoTalkContact
.3
7

VideoTalkContact.
fo

Request Example
rV

http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize&name=VideoTalkContact
el
se
n

Response Params ( key=value format in body )


gS

Name Type R/O Description Example


dn

count int R Total number of records 200


Bh

Response Example
d

count=200

13.5 ElevatorFloorCounter

13.5.1 Set Elevator Floor Info


Request URL http://<server>/cgi-bin/ElevatorFloorCounter.cgi?action=setElevatorFloorInfo
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
Channel int R ChannelNo, start from 1, default 1 1
CheckBaseFloor char[] R Calibrate base floor, unit floor, It's not 5
necessarily numbers

Intelligent Building APIs 712


Request Example
http://192.168.1.108/cgi-
bin/ElevatorFloorCounter.cgi?action=setElevatorFloorInfo&CheckBaseFloor=5&Channel=1

Response Params ( OK in body )


Response Example
OK

13.5.2 Get Elevator WorkInfo


Request URL http://<server>/cgi-bin/ElevatorFloorCounter.cgi?action=getElevatorWorkInfo
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
Channel int R ChannelNo, start from 1, default 1 1
DA

Request Example
HU

http://192.168.1.108/cgi-bin/ ElevatorFloorCounter.cgi?action=getElevatorWorkInfo&Channel=1
A_
HT

Response Params (key=value format in body )


TP

Name Type R/O Description Example


_ AP

table object R Current elevator operation


I_

information
V3

+ElevatorFloor int O floor 20


.3

+ElevatorWorkState int O state 1


7
fo

+ElevatorWorkSpeed int O speed 20


rV

+IsCheckFloor bool O whether to calibrate true


el

Response Example
se

table.ElevatorFloor=20
n gS

table.ElevatorWorkState=1
dn

table.ElevatorWorkSpeed=20
table.IsCheckFloor=true
Bh
d

13.5.3 Get Capability


Request URL http://<server>/cgi-bin/ElevatorFloorCounter.cgi?action=getCaps
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
Channel int R ChannelNo, start from 1, default 1 1
Request Example
http://192.168.1.108/cgi-bin/ ElevatorFloorCounter.cgi?action=getCaps&Channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example

Intelligent Building APIs 713


caps object R elevator floor capacities
+IsElevatorFloor bool R Whether the floor configuration true
Counter function is supported
Response Example
caps.IsElevatorFloorCounter=true

13.6 Elevator Control

13.6.1 Lift Control Interface


Lift control interface.
Request URL http://<server>/cgi-bin/api/AccessCallLiftControl/callLift
Method POST
Request Parameters (JSON format in body)
DA

Name Type R/O Description Example


HU

SrcFloor char[11] R Start address (floor + room "0100"


A_

number).
HT

DstFloor char[11] R Destination address (floor + room "9901"


number).
TP
_

CallLiftCmd enumint R Lift call command. 0


AP

enumint{
I_

0: Call the lift to arrive on a certain


V3

floor and unlock any other floors.


.3
7

1: Call the lift to arrive on a certain


fo

floor, and users inside can only


rV

press the button for the target floor.


el

2: Call the lift to arrive on a certain


se

floor and require swiping card for


ngS

further operation; the lift goes


dn

upward by default, which is only


achieved through lift control
Bh

protocol of Dahua.
d

3: Call the lift to a certain floor and


enable the lift to automatically
arrive on the target floor without
pressing the button by users.
4: Call the lift to arrive on a certain
floor and require swiping card for
further operation; the lift goes
downward by default, which is only
achieved through lift control
protocol of Dahua.
5: Call the lift to arrive on a certain
floor, and users inside can press

Intelligent Building APIs 714


the buttons for the floors with
access permission.
6: Perform authentication inside
the lift. After the authentication,
users can press the buttons for the
floors with access permission.
}
CallLiftAction enumint R Method to call the lift. 0
enumint{
0: Users unlock the unit door
through the voice talk extension
and call the lift to arrive at the unit
door at the same time.
1: Users call the lift to arrive on the
floors they are on.
2: Users call the lift to arrive on a
DA

certain floor with a stopover on


HU

another floor.
A_

3: Unlock the unit door and call the


HT

lift to arrive at the unit door at the


TP

same time.
_

4: Call the lift to activate the


AP

buttons for all floors. Users can


I_

press any button for the lift to


V3

arrive at the corresponding floor.


.3
7

5: Call the lift and do not activate


fo

any buttons. Users need to


rV

perform some operation, such as


el

swipe the card, for the lift to arrive


se

at the corresponding floor.


n gS

6: Grant the access permission of


dn

multiple floors to the lift.


Bh

}
d

CallLiftInfo object R Lift control information.


+MultiFloor object[128] R Information on multiple floors.
When CallLiftAction is 6, this
parameter takes effect.
++Floors char[128] R Floor information. "1001"
Request Example
{
"SrcFloor": "0100",
"DstFloor": "9901",
"CallLiftCmd": 0,
"CallLiftAction": 0,
"CallLiftInfo": {
"MultiFloor": [{
"Floors": "1001"

Intelligent Building APIs 715


},…{}]
}
}
Response Parameters (JSON format in body)
Name Type R/O Description Example
Response Example
{}

13.6.2 Getting Lift Control Capability Set


Get the lift control capability set.
Request URL http://<server>/cgi-bin/api/AccessCallLiftControl/getCaps
Method POST
Request Parameters (JSON format in body)
Name Type R/O Description Example
DA

Request Example
HU

{}
A_

Response Parameters (JSON format in body)


HT

Name Type R/O Description Example


TP

Caps object R Capability set.


_

+MaxNum int32 R Maximum number of supported 16


AP

scripts.
I_
V3

+Count int32 R Current number of scripts.


Response Example
.3
7

{
fo

"Caps": {
rV

"MaxNum": 16,
el

"Count":
se
n

}
gS

}
dn
Bh
d

13.6.3 Getting Lift Control Protocol List


Get the list of lift control protocols.
Request URL http://<server>/cgi-bin/api/AccessCallLiftControl/getProtocolList
Method POST
Request Parameters (JSON format in body)
Name Type R/O Description Example
Request Example
{}
Response Parameters (JSON format in body)
Name Type R/O Description Example
Protocols object R Search results. One-dimensional
array with up to 32 elements.

Intelligent Building APIs 716


+ID uint32 R Unique protocol ID used to identify 1
the protocol.
+Name char[64] R Protocol name. "Dahua"
+IsUsing bool R The using status of the script. true false
indicates in use.
+IsPreloaded bool R Whether the script is preinstalled. false
+Type enumchar[ R Enumchar[32]{ "485"
32] "485": Lift control protocol for RS-
485 serial port.
"HTTP": HTTP network Lift control
protocol.
}
+SupportFunc enumchar[ R Enumchar[32][32]{ ["OpenAllFloors","OpenDes
List 32][32] "OpenAllFloors": Grant the tFloor"]
permission of all floors.
"OpenDestFloor": Grant the
DA

permission of the target floor.


HU

"OpenAccessFloors": Call the lift to


A_

arrive on a floor and swipe the card


HT

for the lift to a certain floor.


TP

"OpenAccessFloorsAuto": Call the


_

lift to a certain floor and enable the


AP

lift to automatically arrive on the


I_

target floor without pressing the


V3

button by users.
.3
7

"MultiFloorsCallLift": Call the lift to


fo

multiple floors.
rV

"PeakPeriodControl": Call the lift at


el

peak times.
se
n

}
gS

Response Example
dn

{
Bh

"Protocols": {
d

"ID": 1,
"Name": "Dahua",
"IsUsing": false,
"IsPreloaded": false,
"Type": "485",
"SupportFuncList": ["OpenAllFloors","OpenDestFloor"]
}
}

13.6.4 Inserting Lift Control Protocol


Insert the lift control protocol.
Request URL http://<server>/cgi-bin/api/AccessCallLiftControl/insert

Intelligent Building APIs 717


Method POST
Request Parameters (JSON format in body)
Name Type R/O Description Example
Name char[32] R Lift control protocol name. "Dahua"
Request Example
{
"Name": "Dahua"
}
Response Parameters (JSON format in body)
Name Type R/O Description Example
Response Example
{}

13.6.5 Deleting Lift Control Protocol


DA

Delete the specified lift control protocol.


HU

Request URL http://<server>/cgi-bin/api/AccessCallLiftControl/remove


A_

Method POST
HT

Request Parameters (JSON format in body)


TP

Name Type R/O Description Example


_

ID uint32 R The ID of the rule to be deleted. 1


AP

Request Example
I_
V3

{
"ID": 1
.3
7

}
fo

Response Parameters (JSON format in body)


rV

Name Type R/O Description Example


el

Response Example
se
n

{}
gS
dn
Bh
d

Intelligent Building APIs 718


14 DVR Custom APIs

14.1 File Finder

14.1.1 Create a File Finder


Example:
File 1:
items[0].Channel =1
items[0].StartTime =2011-1-1 12:00:00
items[0].EndTime =2011-1-1 13:00:00
items[0].Events[0]=AlarmLocal
DA

items[0].VideoStream=Main
HU

items[0].Length =790
A_

items[0].Duration = 3600
HT
TP

File 2:
_

items[0].Channel =1
AP

items[0].StartTime =2011-1-1 13:00:00


I_
V3

items[0].EndTime =2011-1-1 14:00:00


.3

items[0].Events[0]=AlarmLocal
7

items[0].VideoStream=Main
fo

items[0].Length =790
rV

items[0].Duration = 3600
el
se
n

file1 and file2 will be combined to file3


gS

File 3:
dn

items[0].Channel =1
Bh

items[0].StartTime =2011-1-1 12:00:00


d

items[0].EndTime =2011-1-1 14:00:00


items[0].Events[0]=AlarmLocal
items[0].VideoStream=Main
items[0].Length =1580
items[0].Duration = 7200
Request URL http://<server>/cgi-bin/FileFindHelper.cgi?action=startFind
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
condition object R query condition
+channel uint32 R video channel index which starts 1
from 1.

DVR Custom APIs 719


+startTime char[20] R start time when recording. format: "2010-05-25 00:00:00"
yyyy-mm-dd hh:mm:ss
+endTime char[20] R end time when recording. format: "2010-05-25 23:59:59"
yyyy-mm-dd hh:mm:ss
+streamType char[32] R which video stream type you want "Main"
to find. The range of stream is
{"Main", "Extra1", "Extra2",
"Extra3"}.
+flags char[64][32 O which flags of the file you want to ["Timing", "Event", "Marked"
] find. It is an array. The index starts ,… ]
from 0. The range of flag is
{"Timing", "Marked", "Event",
"Restrict"}. If omitted, find files with
all the flags.
+events char[64][32 O by which event the record file is ["AlarmLocal",
] triggered. It is an array. The index "VideoMotion"]
DA

starts from 0. The range of event


HU

is {"AlarmLocal", "VideoMotion",
A_

"VideoLoss"}. This condition can


HT

be omitted. If omitted, find files of


TP

all the events.


_

combineMode object O combine info


AP

+granularity uint32 O by which granularity to combine 16


I_

files
V3
.3

+types char[][] O which types of the file you want to ["AlarmLocal",


7

combined. It is an array. The index "VideoMotion"]


fo

starts from 0. The range of


rV

combine type is {"AlarmLocal",


el
se

"VideoMotion", "Timing",
n

"VideoLoss"}. This condition can


gS

be omitted. If omitted, file will not


dn

be combined.
Bh

Request Example
d

http://172.23.1.66/cgi-
bin/fileFindHelper.cgi?action=startFind&condition.channel=1&condition.startTime=2014-1-
1%2012:00:00&condition.endTime=2015-1-
10%2012:00:00&condition.streamType=Main&condition.flags[0]=Event&condition.events[0]=AlarmLocal
&condition.events[1]=VideoMotion&combineMode.granularity=16&combineMode.types[0]=AlarmLocal&
combineMode.types[0]=VideoMotion

Response Params (key=value format in body )


Name Type R/O Description Example
result int R The find Id 08137
Response Example
result=08137

DVR Custom APIs 720


14.1.2 Create a Motion File Finder
Request URL http://<server>/cgi-bin/FileFindHelper.cgi?action=startMotionFind
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
condition object R query condition
+channel uint32 R video channel index which starts from 1
1.
+startTime char[20] R start time when recording. format: "2010-05-25 00:00:00"
yyyy-mm-dd hh:mm:ss
+endTime char[20] R end time when recording. format: "2010-05-25 23:59:59"
yyyy-mm-dd hh:mm:ss
+streamType char[32] R which video stream type you want to "Main"
find. The range of stream is {"Main",
DA

"Extra1", "Extra2", "Extra3"}.


HU

motionRegion object R
+senseLevel uint32 R the motion sensitive level, range is 0– 16
A_

6, 0 represent all level


HT

+rects int[4] O relative coordinates, rect0 and rect2 ["AlarmLocal",


TP

range is 0—21, rect1 and rect3 range "VideoMotion"]


_ AP

is 0—17. {0,0,0,0} top—left,


I_

{21,0,0,0} top—right, {0,17,0,0}


V3

bottom—left, {21,17,0,0} bottom—


.3

right
7
fo

Request Example
rV

http://172.23.1.66/cgi-
el

bin/fileFindHelper.cgi?action=startMotionFind&condition.channel=1&condition.startTime=2014-1-
se

1%2012:00:00&condition.endTime=2015-1-
ngS

10%2012:00:00&condition.streamType=Main&condition.flags[0]=Event&condition.events[0]=AlarmLocal
&condition.events[1]=VideoMotio&motionRegion.senseLevel=1&motionRegion.rects[1][0]=0&motionReg
dn

ion.rects[1][1]=0&motionRegion.rects[1][2]=21&motionRegion.rects[1][3]=17
Bh
d

Response Params (key=value format in body )


Name Type R/O Description Example
result int R The find Id 08137
Response Example
result=08137

14.1.3 Get the File Information Found by the Finder


Request URL http://<server>/cgi-bin/FileFindHelper.cgi?action=findNext
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example

DVR Custom APIs 721


findId int R The find Id is created by API Create 08137
a file finder or API Create a motion
file finder. Must create a finder
before finding files.
count int R count to show 100
Request Example
http://192.168.1.108/cgi-bin/FileFindHelper.cgi?action=findNext&findId=08137&count=100

Response Params (key=value format in body )


Name Type R/O Description Example
found int R found items 1
items object[] R results
+channel int O video channel index which starts 1
from 1.
+startTime char[20] O start time when recording. format: "2010-05-25 00:00:00"
yyyy-mm-dd hh:mm:ss
DA

+endTime char[20] O end time when recording. format: "2010-05-25 23:59:59"


HU

yyyy-mm-dd hh:mm:ss
A_

+fileType char[] O file type, range: {"dav","jpg" } "dav"


HT

+events char[][] O event type list ["AlarmLocal"]


TP

+streamType char[32] O The range of stream is {"Main", "Main"


_

"Extra1", "Extra2", "Extra3"}.


AP

+length int O record length,unit:Byte 790


I_
V3

+duration int O record duration, unit: s 3600


Response Example
.3
7

found=1
fo

items[0]. channel =1
rV

items[0]. startTime =2011-1-1 12:00:00


el

items[0]. endTime =2011-1-1 13:00:00


se
n

items[0]. fileType =dav


gS

items[0]. events[0]=AlarmLocal
dn

items[0]. streamType=Main
Bh

items[0]. length =790


d

items[0]. duration = 3600

14.1.4 Stop the Finder


Request URL http://<server>/cgi-bin/FileFindHelper.cgi?action=stopFind
Method GET
Request Params ( none )
Name Type R/O Description Example
findId int R The find Id is created by API Create a 08137
file finder or API Create a motion file
finder. Must create a finder before
finding files.

DVR Custom APIs 722


Request Example
http://192.168.1.108/cgi-bin/FileFindHelper.cgi?action=stopFind&findId =08137

Response Params ( OK in body )


Response Example
OK

14.1.5 Get Bound Files


Request URL http://<server>/cgi-bin/FileFindHelper.cgi?action=getBoundFile
Method GET
Request Params (key=value format in URL )
Name Type R/O Description Example
condition object R query condition
R video channel index which starts
DA

+channel uint32 1
from 1.
HU

+startTime char[20] R start time when recording. format: "2010-05-25 00:00:00"


A_

yyyy-mm-dd hh:mm:ss
HT

+endTime char[20] R end time when recording. format: "2010-05-25 23:59:59"


TP

yyyy-mm-dd hh:mm:ss
_ AP

+streamType char[32] R which video stream type you want "Main"


I_

to find. The range of stream is


V3

{"Main", "Extra1", "Extra2",


.3

"Extra3"}.
7

+flags char[64][32 O which flags of the file you want to ["Timing", "Event", "Marke
fo
rV

] find. It is an array. The index starts d",… ]


from 0. The range of flag is
el
se

{"Timing", "Marked", "Event",


n

"Restrict"}. If omitted, find files with


gS

all the flags.


dn

+events char[64][] O event type list ["AlarmLocal"]


Bh

Request Example
d

http://<server>/cgi-
bin/FileFindHelper.cgi?action=getBoundFile&condition.channel=1&condition.startTime=2014-1-
1%2012:00:00&condition.endTime=2015-1-
10%2012:00:00&condition.streamType=Main&condition.flags[0]=Timing

Response Params (key=value format in body )


Name Type R/O Description Example
found int R found items 2
items object[] R results
+channel int O video channel index which starts 1
from 1.
+startTime char[20] O start time when recording. format: "2010-05-25 00:00:00"
yyyy-mm-dd hh:mm:ss

DVR Custom APIs 723


+endTime char[20] O end time when recording. format: "2010-05-25 23:59:59"
yyyy-mm-dd hh:mm:ss
+flags char[64][32 O which flags of the file you want to ["Timing", "Event", "Marke
] find. It is an array. The index starts d",… ]
from 0. The range of flag is
{"Timing", "Marked", "Event",
"Restrict"}. If omitted, find files with
all the flags.
+events char[64][] O event type list ["AlarmLocal"]
+streamType char[32] O video stream type. "Main"
The range of stream is {"Main",
"Extra1", "Extra2", "Extra3"}.
+length int O record length,unit:Byte 790
+duration int O record duration, unit: s 3600
Response Example
found=2
DA

items[0]. channel =1
HU

items[0]. startTime =2011-1-1 12:00:00


A_

items[0]. endTime =2011-1-1 13:00:00


HT

items[0]. flags [0]= Timing


TP

items[0]. streamType=Main
_

items[0]. length =790


AP

items[0]. duration = 3600


I_

items[1]. channel =1
V3

items[1]. startTime =2011-1-1 13:00:00


.3
7

items[1]. endTime =2011-1-1 14:00:00


fo

items[1]. events[0]= Timing


rV

items[1]. streamType=Main
el

items[1]. length =790


se
n

items[1]. duration = 3600


gS
dn
Bh

14.2 BandLimit
d

14.2.1 Get Bandwidth Limit State


Request URL http://<server>/cgi-bin/BandLimit.cgi?action=getLimitState
Method GET
Request Params ( key=value format in url)
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/bandLimit.cgi?action=getLimitState

Response Params ( key=value format in body )


Name Type R/O Description Example
limit bool R true/false true

DVR Custom APIs 724


Response Example
limit=true

14.3 Record Files Protection

14.3.1 Add Protection


Request URL http://<server>/cgi-bin/FileManager.cgi?action=addConditionList
Method GET
Request Params ( key=value format in url)
Name Type R/O Description Example
condition object R query condition
+Channel uint32[] R Video channel index which starts 1
from 1.
DA

+startTime char[20] R The time format is "Y-M-D H-m-S", "2010-05-25 00:00:00"


HU

example 2011-7-3%2021:02:32
A_

+endTime char[20] R The time format is "Y-M-D H-m-S" "2010-05-25 23:59:59"


HT

+Types char[][] R An array. The range is ["RecordProtect",


TP

{ "RecordProtect", "RecordRestrict"]
_

"RecordRestrict" }.
AP

Request Example
I_

http://192.168.1.108/cgi-
V3

bin/FileManager.cgi?action=addConditionList&condition.Types[0]=RecordRestrict&condition.Types[1]
.3
7

=RecordProtect&condition.StartTime=2014-7-3%2021:02:32&condition.EndTime=2014-7-
fo

3%2023:02:32&condition.Channel[0]=1&condition.Channel[1]=3
rV
el

Response Params ( OK in body )


se

Response Example
n gS

OK
dn

14.3.2 Cancel Protection


Bh
d

Request URL http://<server>cgi-bin/FileManager.cgi?action=cancelConditionList


Method GET
Request Params ( key=value format in url)
Name Type R/O Description Example
condition object R query condition
+Channel uint32[] R Video channel index which starts 1
from 1.
+startTime char[20] R The time format is "Y-M-D H-m-S", "2010-05-25 00:00:00"
example 2011-7-3%2021:02:32
+endTime char[20] R The time format is "Y-M-D H-m-S" "2010-05-25 23:59:59"
+Types char[][] R An array. The range is ["RecordProtect",
{ "RecordProtect", "RecordRestrict"]
"RecordRestrict" }.

DVR Custom APIs 725


Request Example
http://192.168.1.108/cgi-
bin/FileManager.cgi?action=cancelConditionList&condition.Types[0]=RecordRestrict&condition.Type
s[1]=RecordProtect&condition.StartTime=2014-7-3%2021:02:32&condition.EndTime=2014-7-
3%2023:02:32&condition.Channel[0]=1&condition.Channel[1]=3

Response Params ( OK in body )


Response Example
OK

14.3.3 Remove Protection


Request URL http://<server>/cgi-bin/FileManager.cgi?action=removeConditionList
Method GET
Request Params ( key=value format in url)
Name Type R/O Description Example
DA

condition object R query condition


HU

+Channel uint32[] R Video channel index which starts 1


A_

from 1.
HT

+startTime char[20] R The time format is "Y-M-D H-m-S", "2010-05-25 00:00:00"


TP

example 2011-7-3%2021:02:32
_

+endTime char[20] R The time format is "Y-M-D H-m-S" "2010-05-25 23:59:59"


AP

+Types char[][] R An array. The range is ["RecordProtect",


I_
V3

{ "RecordProtect", "RecordRestrict"]
.3

"RecordRestrict" }.
7

Request Example
fo

http://192.168.1.108/cgi-
rV

bin/FileManager.cgi?action=removeConditionList&condition.Types[0]=RecordRestrict&condition.Type
el
se

s[1]=RecordProtect&condition.StartTime=2014-7-3%2021:02:32&condition.EndTime=2014-7-
n

3%2023:02:32&condition.Channel[0]=0&condition.Channel[1]=3
gS
dn

Response Params ( OK in body )


Bh

Response Example
d

OK

14.3.4 DownloadFile
download file
Request URL http://<server>/cgi-bin/FileManager.cgi?action=downloadFile
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
fileName string R filename or path download.jpg
Request Example
http://192.168.1.108/cgi-bin/FileManager.cgi?action=downloadFile&fileName=download.jpg

DVR Custom APIs 726


Response Params (multipart binary data )
Name Type R/O Description Example
Response Example
HTTP/1.1 200 OK
Content-type: text/plain;charset=utf-8
CONNECTION: close
Set-Cookie:secure; HttpOnly
CONTENT-LENGTH: <length>

<Binary Data>

14.3.5 UploadFile
Upload radar photos
http://<server>/cgi-bin/FileManager.cgi?action=uploadFile&fileName=<FileName>&Pat
Request URL
h=<Path>
DA

Method POST
HU

Request Params ( key=value format in url )


A_

Name Type R/O Description Example


HT

File name, only the types bmp and


fileName string R "xxxxxx.bmp"
TP

jpg are available for radars.


_ AP

Path string R The file path to store /upload_pic


I_

Request Example
V3

POST http://192.168.1.108/cgi-bin/FileManager.cgi?action=uploadFile&fileName=xxxxxx.bmp&fileLengt
.3

h=124879 HTTP/1.1
7

Host: 192.168.1.108
fo
rV

Connection: keep-alive
Content-Type: multipart/form-data;boundary=---------------------------8655433224198
el
se

Content-Length: xxxxxxxxx
n
gS

-----------------------------8655433224198
dn

Content-Disposition:form-data;name="upload"; filename="xxxxxx.bmp"
Bh

Content-Type: image/jpeg or application/x-MS-bmp


d

photo data….

-----------------------------8655433224198--

Response Params ( OK in body )


Parameter Type Required Description Example
Response Example
OK

DVR Custom APIs 727


14.3.6 List all elements in the specified directory
Request URL http://<server>/cgi-bin/api/FileManager/list
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
path char[260] R To get the path, there will be internal "/mnt/dvr/sda0/2010
security verification. For files uploaded /8/11/dav"
externally, such as obtaining the SFTP
directory, you can obtain the NAS
configuration and find the corresponding
directory for query.
Request Example
{
"path": "/mnt/dvr/sda0/2010/8/11/dav"
DA

}
HU

Response Params ( JSON format in body )


A_

Name Type R/O Description Example


HT

elementInfo object[] R File element information


TP

+type enumchar[ O File element type "File"


_
AP

16] enumchar[16]{
I_

"File"
V3

"Directory"
.3

}
7
fo

+file object O File info(valid when Type="File" )


rV

++FileType char[64] O file node type "Wireshark/tcpdump


el

"Wireshark/tcpdump", See Wireshark "


se

packet capture file type


ngS

++CreateTime char[20] O Creation time "2010-4-15 9:58:32"


++ModifyTime char[20] O Modification time "2010-4-15 9:58:32"
dn

++Size double O File size, the decimal part is meaningless. 1873.0


Bh

Unit: byte
d

++path char[260] O Absolute path "/mnt/dvr/sda0/2010


/8/11/dav.jpg"
++Desc char[128] O File Custom Description "xxxxxxx"
+directory object O directory information ,it works when
Type="Directory"
++CreateTime char[20] O Creation time, formatted as "Y-M-D H-m- "2010-4-15 9:58:32"
S"
++path char[260] O Absolute path "/mnt/dvr/sda0/2010
/8/11/dav"
Response Example
{
"elementInfo": [{
"type": "File",

DVR Custom APIs 728


"file": {
"FileType": "Wireshark/tcpdump",
"CreateTime": "2010-4-15 9:58:32",
"ModifyTime": "2010-4-15 9:58:32",
"Size": 1873.0,
"path": "/mnt/dvr/sda0/2010/8/11/dav.jpg",
"Desc": "xxxxxxx"
},
"directory": {
"CreateTime": "2010-4-15 9:58:32",
"path": "/mnt/dvr/sda0/2010/8/11/dav"
}
},…{}]
}

14.3.7 DownloadFile By Condition


DA
HU

ITC custom use. Search for downloaded files according to condition, no other response, only the found
A_

file Packet that meets the condition。


HT

Request URL http://<server>/cgi-bin/api/FileManager/findDownload


TP

Method POST
_

Request Params ( JSON format in body )


AP

Name Type R/O Description Example


I_

Condition object R
V3

+Channel int R Channel number, -1


.3
7

starting from 0, -1
fo

indicates querying all


rV

channels
el

+StartTime char[20] R StartTime "2010-05-25 12:05:00"


se
n

+EndTime char[20] R EndTime "2010-05-25 12:10:00"


gS

+Types char[][8] O List files of type ["jpg"]


dn

It is an array that can


Bh

query multiple file types


d

at once. Without the


Types field, it means
querying any type.
"Jpg" refers to images in
general
+DB object O Database query criteria
++TrafficCar object O Traffic vehicle query,
when adding new
protocols in the future,
multiple query criteria
are combined with AND
+++PlateNum char[2][16] O Query condition: ["==","*8888"]
ber

DVR Custom APIs 729


The last four digits of
the license plate are
8888
To maintain format
neutrality and support *
as a wildcard, SQL
class databases will
replace * with % during
implementation
'Unknown' indicates that
the query is unknown
+++Event char[][16] O Event Type List ["TrafficGate"]
It is an array that can
query multiple event
types at once. Without
an Event field, it means
DA

querying the TrafficGate


HU

type.
A_

Request Example
HT

{
TP

"Condition": {
_

"Channel": -1,
AP

"StartTime": "2010-05-25 12:05:00",


I_

"EndTime": "2010-05-25 12:10:00",


V3

"Types": ["jpg"],
.3
7

"DB": {
fo

"TrafficCar": {
rV

"PlateNumber": ["==","*8888"],
el

"Event": ["TrafficGate"]
se

}
n gS

}
dn

}
Bh

}
d

Response Params ( multipart, binary in body )


Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Connection: keep-alive
Content-Type: multipart/ form-data; boundary=<boundary>

--<boundary>
Content-Type: application/octet-stream
Content-Disposition: form-data; name="name of file1"

<bytes of file1>
--<boundary>

DVR Custom APIs 730


Content-Type: application/octet-stream
Content-Disposition: form-data; name="name of file2"

<bytes of file2>
--<boundary>
……

14.4 Daylight

14.4.1 Get Daylight


Request URL http://<server>/cgi-bin/global.cgi?action=getDST
DA

Method GET
HU

Request Params ( none)


Name Type R/O Description Example
A_

Request Example
HT

http://192.168.1.108/cgi-bin/global.cgi?action=getDST
TP
_
AP

Response Params ( key=value format in body )


I_

Name Type R/O Description Example


V3

result int R 1/0, yes or not in daylight saving time 1


.3
7

Response Example
fo

result = 1
rV
el
se
ngS
dn
Bh
d

DVR Custom APIs 731


15 Other APIs

15.1 Discover Devices

15.1.1 Discover Devices on Internet


Request URL http://<server>/cgi-bin/deviceDiscovery.cgi?action=attach
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
DeviceClass char[64] R range: {VTO, VTH, VTT, VTS, VTO
VTNC, SHG}
DA

Request Example
HU

http://192.168.1.108/cgi-bin/deviceDiscovery.cgi?action=attach&DeviceClass=VTO
A_
HT

Response Params (key=value format in body )


TP

Name Type R/O Description Example


_

deviceInfo object[] O device info


AP

+MachineName char[64] O name "IPC1"


I_

+DeviceClass char[64] O class "IPC"


V3

+DeviceType char[64] O type "IPC-HF3300"


.3
7

+SerialNo char[64] O serial number "123456789"


fo

+Version char[64] O software version "1.1.1.1"


rV

+Mac char[18] O MAC "00:10:5C:F2:1C:B4"


el

+VideoInputChannels uint O video input channels 32


se
n

+RemoteVideoInputC uint O remote video input channels 32


gS

hannels
dn

+VideoOutputChann uint O video output channels 32


Bh

els
d

+AlarmInputChannel uint O alarm input channels 16


s
+AlarmOutputChann uint O alarm output channels 16
els
+Port uint16 O port 37777
+Vendor char[64] O vendor info "Private"
+IPv4Address object O Ipv4 address info
++IPAddress char[40] O IP "192.168.1.112"
++SubnetMask char[40] O mask "255.255.255.0"
++DefaultGateway char[40] O default gateway "192.168.1.1"
++DhcpEnable bool O enable/disable DHCP true
+IPv6Address object O Ipv6 address info
++DhcpEnable bool O enable/disable DHCP true
++IPAddress char[40] O IP "2001::123:123/64"

Other APIs 732


++DefaultGateway char[40] O default gateway "2001::123:1"
+HttpPort uint O http service port 80
Response Example
deviceInfo[index].AlarmInputChannels=8
deviceInfo[index].AlarmOutputChannels=0
deviceInfo[index].DeviceClass=VTO
deviceInfo[index].DeviceType=VTO2000A
deviceInfo[index].HttpPort=80
deviceInfo[index].IPv4Address.DefaultGateway=172.12.0.1
deviceInfo[index].IPv4Address.DhcpEnable=false
deviceInfo[index].IPv4Address.IPAddress=172.12.7.102
deviceInfo[index].IPv4Address.SubnetMask=255.255.0.0
deviceInfo[index].IPv6Address.DefaultGateway=2008::1
deviceInfo[index].IPv6Address.DhcpEnable=false
deviceInfo[index].IPv6Address.IPAddress=2008::6/112
deviceInfo[index].Mac=00:01:5b:01:44:77
DA

deviceInfo[index].MachineName=YZZ4DZ008D00031
HU

deviceInfo[index].Port=37777
A_

deviceInfo[index].RemoteVideoInputChannels=0
HT

deviceInfo[index].SerialNo=YZZ4DZ008D00031
TP

deviceInfo[index].Vendor=Multi
_

deviceInfo[index].Version=1.200.0.0
AP

deviceInfo[index].VideoInputChannels=1
I_

deviceInfo[index].VideoOutputChannels=16
V3
.3

15.2 Open Platform


7
fo
rV

15.2.1 Application Start and Stop


el
se
n

Start Application
gS


dn

Request URL http://<server>/cgi-bin/installManager.cgi?action=start


Method GET
Bh

Request Params ( key=value format in URL )


d

Name Type R/O Description Example


appname char[128] R the application name "FaceDemo"
appid uint O the application id 1234
Request Example
http://192.168.1.108/cgi-bin/installManager.cgi?action=start&appname=FaceDemo&appid=1234

Response Params ( OK in body )


Response Example
OK

 Stop Application
Request URL http://<server>/cgi-bin/installManager.cgi?action= stop

Other APIs 733


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
appname char[128] R the application name "FaceDemo"
appid uint O the application id 1234
Request Example
http://192.168.1.108/cgi-bin/installManager.cgi?action=stop&appname=FaceDemo&appid=1234

Response Params ( OK in body )


Response Example
OK

15.2.2 Install Application


Install application with app data
DA


HU

Request URL http://<server>/cgi-bin/dhop.cgi?action=uploadApp


Method POST
A_

Request Params ( multipart, binary in body )


HT

Name Type R/O Description Example


TP

Request Example
_ AP

POST /cgi-bin/dhop.cgi?action=uploadApp HTTP/1.1


I_

Host: 172.29.2.176
V3

Content-Length: 413124
.3

Content-Type:multipart/form-data;boundary=<boundary>
7
fo
rV

--<boundary>
el

Content-Disposition: form-data; name="dev_upgrade"; filename="demo.bin"


se

Content-Type: application/octet-stream
ngS
dn

<app data>
--<boundary>--
Bh
d

Response Params ( OK in body )


Response Example
OK
 Install Application with app download url
Request URL http://<server>/cgi-bin/dhop.cgi?action=installAppByUrl
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Url char[] R The app download url https://aaa/bbb/ccc/app.bin
Request Example
http://192.168.1.108/cgi-bin/dhop.cgi?action=installAppByUrl&Url=https://aaa/bbb/ccc/app.bin

Response Params ( OK in body )

Other APIs 734


Response Example
OK

15.2.3 Update Application and License


 Update Application with app download url
Request URL http://<server>/cgi-bin/dhop.cgi?action=updateAppByUrl
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
https://aaa/bbb/ccc/app.bi
Url char[] R The app name
n
appName char[] R The app download url xxx
Request Example
DA

http://192.168.1.108/cgi-
HU

bin/dhop.cgi?action=updateAppByUrl&appName=xxx&Url=https://aaa/bbb/ccc/app.bin
A_

Response Params ( OK in body )


HT

Response Example
TP

OK
_
AP
I_
V3

 Update firmware with firmware download url


.3

Request URL http://<server>/cgi-bin/dhop.cgi?action=updateFirmwareByUrl


7
fo

Method GET
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Example


se

https://aaa/bbb/ccc/firmwa
n

Url char[] R The firmware download url


gS

re.bin
Request Example
dn

http://192.168.1.108/cgi-
Bh

bin/dhop.cgi?action=updateFirmwareByUrl&Url=https://aaa/bbb/ccc/firmware.bin
d

Response Params ( OK in body )


Response Example
OK

 Update application license with license download url


Request URL http://<server>/cgi-bin/dhop.cgi?action=updateLicenseByUrl
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
appName char[] R The app name xxx

Other APIs 735


https://aaa/bbb/ccc/firmwa
Url char[] R The license download url
re.bin
Request Example
http://192.168.1.108/cgi-
bin/dhop.cgi?action=updateLicenseByUrl&appName=xxx&Url=https://aaa/bbb/ccc/license.bin

Response Params ( OK in body )


Response Example
OK

 Update application license with license data


Request URL http://<server>/cgi-bin/dhop.cgi?action=uploadLicense
Method POST
Request Params ( multipart, binary in body )
Name Type R/O Description Example
DA

appName char[] R The app name xxx


HU

Request Example
A_

POST /cgi-bin/dhop.cgi?action=uploadLicense&appName=xxx HTTP/1.1


HT

Host: 172.29.2.176
TP

Content-Type: application/octet-stream
_

Content-Length: <length>
AP
I_

<app license data>


V3
.3
7

Response Params ( OK in body )


fo

Response Example
rV

OK
el
se
n gS

15.2.4 Uninstall Application


dn
Bh

Request URL http://<server>/cgi-bin/dhop.cgi?action=uninstall


d

Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
appName char[] R The app name xxx
Request Example
http://192.168.1.108/cgi-bin/dhop.cgi?action=uninstall&appName=xxx

Response Params ( OK in body )


Response Example
OK

15.2.5 Download Application Log


Request URL http://<server>/cgi-bin/dhop.cgi?action=downloadLog

Other APIs 736


Method GET
Request Params ( multipart, binary in body )
Name Type R/O Description Example
appName string R The app name xxx
Request Example
http://192.168.1.108/cgi-bin/dhop.cgi?action=downloadLog&appName=xxx

Response Params ( log file content )


Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: Application/octet-stream
Content-Length: <length>

<log file data>


DA
HU

15.3 GPS
A_
HT

15.3.1 Get Capablity


TP
_ AP

Get the capability of position system.


I_
V3

Request URL http://<server>/cgi-bin/GpsControl.cgi?action=getCaps


.3

Method GET
7

Request Params ( key=value format in URL )


fo

Name Type R/O Description Example


rV

Request Example
el
se

http://192.168.1.108/cgi-bin/GpsControl.cgi?action=getCaps
ngS

Response Params (key=value format in body )


dn

Name Type R/O Description Example


Bh

caps object O caps


d

+SUPPORTMODE char[][32] O range: { ["GPS", "BEIDOU"]


"GPS"
"BEIDOU"
"GLONASS"
"MIXGB": GPS and BEIDOU
"MIXGG": GPS and GLONASS
}
Response Example
caps.SUPPORTMODE[0]=GPS
caps.SUPPORTMODE[1]=BEIDOU

Other APIs 737


15.3.2 [Config] GPS config
Config Data Params
Name Type R/O Description Example
GPS object[] O
+Enable bool O true/false false
+SyncTime bool O true/false false
+CurMode char[32] O "GPS" "BEIDOU" "GPS"

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=GPS
Get Config Response Example
Table.GPS[0].Enable=true
DA

Table.GPS[0].CurMode="GPS"
HU

Table.GPS[0].SyncTime=true
Table.GPS[1].Enable=false
A_

Table.GPS[1].CurMode="BEIDOU"
HT

Table.GPS[1].SyncTime=false
TP
_ AP

Set Config Request Example


I_

http://192.168.1.108/cgi-
V3

bin/configManager.cgi?action=setConfig&GPS[0].Enable=true&GPS[0].CurMode=GPS&GPS[0].Sync
.3

Time=true
7
fo

Set Config Response Example


rV

OK or ERROR
el
se
ngS

15.3.3 Get GPS Status


dn
Bh

Request URL http://<server>/cgi-bin/positionManager.cgi?action=getStatus


d

Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Request Example
http://192.168.1.108/cgi-bin/positionManager.cgi?action=getStatus

Response Params (key=value format in body )


Name Type R/O Description Example
status object R GPS
+Time char[20] O time, ex: 2012-01-04 23:30:30. 2012-01-04 23:30:30
+Longitude double O Longitude, in degrees, positive 120.175556
East, negative West
+Latitude double O Latitude, in degrees, positive 30.186389
north, negative South

Other APIs 738


+Altitude double O Altitude, unit: m 45.0
+Speed double O speed, unit: km/h 30.00
+Bearing double O Direction angle,unit: degree 45.3
+WorkStatus int O GPS working status,0= 2
unlocated,1= un-differenced
positioning,2= differential
positioning,3= invalid PPS,6=
estimating
+SatelliteCount int O Satellite number 11
Response Example
status.Time=2011-07-03 21:02:32
status.Longitude=120.175556
status.Latitude=30.186389
status.Speed=30.00
status.Altitude=45.0
status.Bearing=45.3
DA

status.SatelliteCount=11
HU

status.WorkStatus=1
A_
HT
TP

15.4 Lens Function


_ AP
I_

15.4.1 Get Lens Capability


V3
.3

Request URL http://<server>/cgi-bin/LensFunc.cgi?action=getCaps


7
fo

Method GET
rV

Request Params ( key=value format in URL )


el

Name Type R/O Description Example


se

Video channel index which 1


n

Channel uint R
gS

starts from 1.
dn

Request Example
Bh

http://192.168.1.108/cgi-bin/LensFunc.cgi?action=getCaps&Channel=1
d

Response Params (key=value format in body )


Name Type R/O Description Example
Caps object R The capacity.
Whether support depth field 1
+DepthField uint8 R adjust, 0 : not support, 1 :
support
+AngleAdjust object O The angel adjust capacity.
Whether support angel adjust, 3
0 : not support, 1 : only support
horizontal adjust, 2 : only
++Support uint8 R
support vertical adjust, 3 :
support both horizontal and
vertical adjust.

Other APIs 739


The max velocity, range from 1 8
++MaxVelocity uint8 R
to 8
Response Example
Caps.DepthField=1
Caps.AngelAdjust.Support=3
Caps.AngelAdjust.MaxVelocity=8

15.4.2 Adjust Angle Continuously


Request URL http://<server>/cgi-bin/LensFunc.cgi?action=adjustAngleContinuously
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which starts from 1
Channel uint R
1.
DA

The moving direction, 0 : negative X 2


HU

axis direction, 1 : positive X axis


A_

Direction uint8 R
direction, 2 : negative Y axis direction,
HT

3 : positive Y axis direction


TP

The adjust velocity, range from 1 to 2


_

Velocity uint8 R
AP

MaxVelocity
I_

Request Example
V3

http://192.168.1.108/cgi-
.3

bin/LensFunc.cgi?action=adjustAngleContinuously&Channel=1&Direction=2&Velocity=2
7
fo
rV

Response Params ( OK in body )


Response Example
el
se

OK
n gS
dn

15.4.3 Stop Adjusting Angle


Bh
d

Request URL http://<server>/cgi-bin/LensFunc.cgi?action=stopAdjustingAngle


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which starts from 1
Channel uint R
1.
Request Example
http://192.168.1.108/cgi-bin/LensFunc.cgi?action=stopAdjustingAngle&Channel=1

Response Params ( OK in body )


Response Example
OK

Other APIs 740


15.4.4 Adjust Depth Field
Request URL http://<server>/cgi-bin/LensFunc.cgi?action=adjustDepthField
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which starts 1
Channel uint R
from 1.
The sensor depth position, range 0.3
DepthField float R
from 0 to 1, -1 means reset.
Request Example
http://192.168.1.108/cgi-bin/LensFunc.cgi?action=adjustDepthField&Channel=1&DepthField=0.3

Response Params ( OK in body )


Response Example
DA

OK
HU
A_

15.4.5 Adjust Depth Field Continuously


HT
TP
_

Request URL http://<server>/cgi-bin/LensFunc.cgi?action=adjustDepthFieldContinuously


AP

Method GET
I_

Request Params ( key=value format in URL )


V3

Name Type R/O Description Example


.3
7

Video channel index which starts 1


Channel uint R
fo

from 1.
rV

The sensor depth position adjust 0.03


el

DepthFieldSp velocity, range from -1 to 1, positive


se

float R
eed and negative value means difference
n gS

direction, 0 means stop adjust.


dn

Request Example
Bh

http://192.168.1.108/cgi-
d

bin/LensFunc.cgi?action=adjustDepthFieldContinuously&Channel=1&DepthFieldSpeed=0.03

Response Params ( OK in body )


Response Example
OK

15.4.6 Get Depth Field Status


Request URL http://<server>/cgi-bin/LensFunc.cgi?action=getDepthFieldStatus
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example

Other APIs 741


Video channel index which 1
Channel uint R
starts from 1.
Request Example
http://192.168.1.108/cgi-bin/LensFunc.cgi?action=getDepthFieldStatus&Channel=1

Response Params (key=value format in body )


Name Type R/O Description Example
Status object R The depth position status.
The depth position status, Normal
“Normal” : normal status,
+Status string R
“AutoDepthField” : adjusting
depth position.
The sensor board relative 0.3
+DepthField float R
position, range from 0 to 1
+DepthFieldSteps uint R The depth position total step. 1000
The depth position reset result, Success
DA

only valid when reset.


HU

+ResetResult string O
“Success” : reset
A_

success, ”Failed” : reset failed


HT

Response Example
TP

Status.Status=Normal
_

Status.DepthField=0.3
AP

Status.DepthFieldSteps=1000
I_

Status.ResetResult=Success
V3
.3
7
fo

15.4.7 Auto Adjust Depth Field


rV
el
se

Request URL http://<server>/cgi-bin/LensFunc.cgi?action=autoAdjustDepthField


n

Method GET
gS

Request Params ( key=value format in URL )


dn

Name Type R/O Description Example


Bh

Channel uint R Video channel index which starts from 1. 1


d

Request Example
http://192.168.1.108/cgi-bin/LensFunc.cgi?action= autoAdjustDepthField&Channel=1

Response Params ( OK in body )


Response Example
OK

15.4.8 Scene Correction


Request URL http://<server>/cgi-bin/api/LensFunc/correctScene
Method POST
Request Params (JSON format in body)

Other APIs 742


Name Type R/O Description Example
Channel int R Channel number, starting from 1. 1
Type enumint R Correction type. 1
enumint{
0: Automatic correction
1: Manual correction
}
Direction enumint O Rotation direction. This parameter is 1
only valid when the correction
method is manual correction.
enumint{
0: Clockwise
1: Counter clockwise
}
Step int O Speed (range: 0–8). 5
0 means stop rotation. When the
DA

rotation mode is continuous rotation,


HU

it means the rotation speed. When


A_

the rotation mode is point-based


HT

rotation, it means the speed of each


TP

rotation. This parameter is only valid


_

when the correction mode is manual


AP

correction.
I_

Rotation mode. This parameter is


V3

Mode enumint O 1
only valid when the correction mode
.3

is manual correction.
7

enumint{
fo

0: Continuous rotation
rV

1: Point-based rotation
el

}
se

Request Example
n gS

{
dn

"Channel": 1,
"Type": 1,
Bh

"Direction": 1,
d

"Step": 5,
"Mode": 1
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

15.4.9 Reset Angle


Reset camera lens angle
Request URL http://<server>/cgi-bin/LensManager.cgi?action=resetAngle

Other APIs 743


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Channel uint R Video channel index which starts from 1. 1
Request Example
http://192.168.1.108/cgi-bin/LensManager.cgi?action=resetAngle&Channel=1

Response Params ( OK in body )


Response Example
OK

15.5 FishEye

15.5.1 Get FishEye Capability


DA
HU

The method described in the Section “4.5.12 Get video input capability” should be used first.In the
A_

response, it will contain these message "caps.FishEye=false", if the value of the FishEye is true,
HT

Then you can use the method described below to get the detail capability.
TP

Request URL http://<server>/cgi-bin/devVideoInput.cgi?action=getCapsEx


_

Method GET
AP

Request Params ( key=value format in URL )


I_
V3

Name Type R/O Description Example


.3

Video channel index which 1


channel uint R
7

starts from 1.
fo

name char[] R it is fixed to VideoInFishEye VideoInFishEye


rV

Request Example
el
se

http://192.168.1.108/cgi-
n

bin/devVideoInput.cgi?action=getCapsEx&channel=1&name=VideoInFishEye
gS
dn

Response Params ( key=value format in body )


Bh

Name Type R/O Description Example


d

caps object R capabilities


+Type char[16] O it can be Chip, Plugin, and "Chip"
ChipAndPlugin.
Chip means only support
calibrate by device.
Plugin means only support
calibrate by plugin.
ChipAndPlugin means support
both.
+MountMode char[][32] O It can be: ["WallMode"]
"WallMode", "CeilMode", "Floor
Mode", "180CeilMode"
+CalibrateMode char[][32] O It can be:"Original", "Config", ["Original"]
"Panorama",

Other APIs 744


"DoublePanorama",
"OriginalPlusThreeEPtzRegion",
"Single", "FourEPtzRegion",
"TwoEPtzRegion", "Normal"
+EPtzCmd char[][32] O It can be ZoomIn, ZoomOut, Up, ["Up"]
Down, Left, Right, RotateClock,
RotateAntiClock, Stop, TapView,
and ShowRegion.
Response Example
caps.Type=Chip
caps.MountMode[0]=WallMode
caps.MountMode[1]=CeilMode
……
caps.CalibrateMode[0]=Original
caps.CalibrateMode[1]=Config
caps.CalibrateMode[2]=Panorama
DA

……
HU

caps.EPtzCmd[0]=Up
A_

caps.EPtzCmd[1]=Down
HT

…….
TP
_
AP

15.5.2 [Config] FishEye Setting


I_
V3
.3

Fisheye camera configuration, currently used to save user set window coordinate information and
7

fisheye resolution information.


fo
rV

Config Data Params


el

Name Type R/O Description Example


se

FishEye object[] O Each channel corresponds to a


n gS

configuration.
+Position object O Window position information
dn

++FourEPtzR object[] O Window coordinate information set by


Bh

egion the user in 4-screen mode


d

+++WinID uint8 O Window ID 1


[1,4]
+++X uint16 O The abscissa of the focus of the Etz 1
(electronic pan tilt) in the image before
correction.
The value range is the abscissa range
of the fish eye circle
+++Y uint16 O The ordinate of the focus of the Etz 1
(electronic pan tilt) in the image before
correction.
The value range is the ordinate range
of the fish eye circle
+++Horizontal int O Horizontal angle of EPtz 90
Angle 0~360

Other APIs 745


+++VerticalAn int O Vertical angle of EPtz 90
gle 0~90
++OriginalPlus object[3] O The window coordinate information set
ThreeEPtzReg by the user in 1+3 mode, in the same
ion format as FourEPtzRegion mode
++TwoEPtzRe object[2] O Same format as FourEPtzRegion
gion mode
++Single object[1] O Same format as FourEPtzRegion
mode
+PlaceHolder uint8 O Lens installation method 1
1(CeilMode),
2(WallMode),
3(FloorMode).
+CalibrateMod char[16] O Fish eye correction mode "Original"
e Original,
Config,
DA

Panorama,
HU

DoublePanorama,
A_

OriginalPlusThreeEPtzRegion,
HT

Single,
TP

FourEPtzRegion,
_

TwoEPtzRegion,
AP

and Normal.
I_

+FocusPostio object O Fish eye focal point position (X-ray


V3

n machine requirement)
.3
7

++CircularOffs int32 O The deflection angle of a circle. 0


fo

et
rV

++PanoramaO int32 O Panoramic offset 0


el

ffset
se
n

++Valid int32 O Fish eye focal position. 0


gS

0 indicates invalid, 1 indicates valid


dn
Bh

Examples of reading and modifying configurations are as follows:


d

Get Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=FishEye
Get Config Response Example
table.FishEye[0].CalibrateMode=DoublePanorama
table.FishEye[0].PlaceHolder=1
table.FishEye[0].Position.FourEPtzRegion[0].HorizontalAngle=120
table.FishEye[0].Position.FourEPtzRegion[0].VerticalAngle=120
table.FishEye[0].Position.FourEPtzRegion[0].WinID=1
table.FishEye[0].Position.FourEPtzRegion[0].X=2648
table.FishEye[0].Position.FourEPtzRegion[0].Y=2648
table.FishEye[0].Position.FourEPtzRegion[1].HorizontalAngle=120
table.FishEye[0].Position.FourEPtzRegion[1].VerticalAngle=120
table.FishEye[0].Position.FourEPtzRegion[1].WinID=2
table.FishEye[0].Position.FourEPtzRegion[1].X=5544

Other APIs 746


table.FishEye[0].Position.FourEPtzRegion[1].Y=2648
table.FishEye[0].Position.FourEPtzRegion[2].HorizontalAngle=120
table.FishEye[0].Position.FourEPtzRegion[2].VerticalAngle=120
table.FishEye[0].Position.FourEPtzRegion[2].WinID=3
table.FishEye[0].Position.FourEPtzRegion[2].X=2648
table.FishEye[0].Position.FourEPtzRegion[2].Y=5544
table.FishEye[0].Position.FourEPtzRegion[3].HorizontalAngle=120
table.FishEye[0].Position.FourEPtzRegion[3].VerticalAngle=120
table.FishEye[0].Position.FourEPtzRegion[3].WinID=4
table.FishEye[0].Position.FourEPtzRegion[3].X=5544
table.FishEye[0].Position.FourEPtzRegion[3].Y=5544
table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[0].HorizontalAngle=60
table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[0].VerticalAngle=60
table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[0].WinID=2
table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[0].X=5544
table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[0].Y=2648
DA

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[1].HorizontalAngle=60
HU

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[1].VerticalAngle=60
A_

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[1].WinID=3
HT

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[1].X=2648
TP

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[1].Y=5544
_

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[2].HorizontalAngle=60
AP

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[2].VerticalAngle=60
I_

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[2].WinID=4
V3

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[2].X=5544
.3
7

table.FishEye[0].Position.OriginalPlusThreeEPtzRegion[2].Y=5544
fo

table.FishEye[0].Position.Single[0].HorizontalAngle=60
rV

table.FishEye[0].Position.Single[0].VerticalAngle=60
el

table.FishEye[0].Position.Single[0].WinID=1
se

table.FishEye[0].Position.Single[0].X=4096
ngS

table.FishEye[0].Position.Single[0].Y=4096
dn
Bh

Set Config Request Example


d

http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&FishEye[0].PlaceHolder=3&
FishEye[0].CalibrateMode=FourEPtzRegion
Set Config Response Example
OK

15.6 Radar Adaptor

15.6.1 Get Radar Capability


Note: This interface is deprecated. Please use the interface getCapsEx.
Radar equipment detection capability request
Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=getCaps

Other APIs 747


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel index which starts 1
channel uint R
from 1.
Request Example
http://192.168.1.108/cgi-bin/radarAdaptor.cgi?action=getCaps&channel=1

Response Params (key=value format in body )


Name Type R/O Description Example
caps object R capabilities
+DetectionRang int O Zoom in 100 times, while the 5000
e true value is 50.00
+DetectionAngle int O Zoom in 100 times 8003
+DetectionHuma int O Zoom in 100 times 4000
n
DA

Response Example
HU

caps.DetectionRange = 5000
A_

caps.DetectionAngle = 8003
HT

caps.DetectionHuman = 4000
TP
_AP

15.6.2 Get Radar Capbility ( Enhanced )


I_
V3
.3

Radar equipment caps request


7
fo

Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=getCapsEx


rV

Method GET
el

Request Params ( key=value format in URL )


se

Name Type R/O Description Example


n gS

channel index which starts 1


channel uint R
dn

from 1.
Request Example
Bh

http://192.168.1.108/cgi-bin/radarAdaptor.cgi?action=getCapsEx&Channel=1
d

Response Params (key=value format in body )


Name Type R/O Description Example
caps object R capabilities
+DetectionRang int O Radar detection range 5000
e Zoom in 100 times
unit: meter
+DetectionAngle int O Radar detection angle 8003
Zoom in 100 times
unit: degree
+DetectionHuma int O Radar human detection range 4000
n Zoom in 100 times
unit: meter

Other APIs 748


+Capacity object O
++Support bool O Power setting enable true
++List int[24] O Power allows setting list, no more [150, 300]
than 24 choices
+RadarScene object O
++Support bool O Scene setting enable true
+RadarChannel object O
++Support bool O Radar channel setting enable true
++List uint[24] O Channel allows setting list, no [1, 2]
more than 24 choices
+MovedDetect object O
++Support bool O Device motion detection setting true
enabled
Response Example
caps.DetectionRange = 5000
caps.DetectionAngle = 8003
DA

caps.DetectionHuman = 4000
HU

caps.Capacity.Support = true
A_

caps.Capacity.List[0] = 150
HT

...
TP

caps.Capacity.List[23] = 300
_

caps.RadarScene.Support = true
AP

caps.RadarChannel.Support = true
I_

caps.RadarChannel.List[0] = 1
V3


.3
7

caps.RadarChannel.List[23] = 2
fo

caps.MovedDetect.Support = true
rV
el

15.6.3 Get Status


se
n gS

Radar Equipment Status Request


dn

Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=getStatus


Bh

Method GET
d

Request Params ( key=value format in URL )


Name Type R/O Description Example
channel index which starts 1
channel uint R
from 1.
Request Example
http://192.168.1.108/cgi-bin/radarAdaptor.cgi?action=getStatus&channel=1

Response Params (key=value format in body )


Name Type R/O Description Example
status object R
+State char[] R Radar state, the range is Normal
{ "Normal" , "Abnormal" }
Response Example
status.State = Normal

Other APIs 749


15.6.4 Calculate Real Size
Radar real map size calculation
Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=calculateRealSize
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel index which starts 1
channel uint R
from 1.
distance double R Segment distance, Unit: m 10.01
R Line segment start [10,20]
startPoint int[2]
coordinates
R Line segment end [30,40]
endPoint int[2]
coordinates
DA

Request Example
HU

http://192.168.0.108/cgi-
A_

bin/radarAdaptor.cgi?action=calculateRealSize&channel=1&distance=10.01&startPoint[0]=10&startP
HT

oint[1]=20&endPoint[0]=30&endPoint[1]=40
TP
_ AP

Response Params (key=value format in body )


I_

Name Type R/O Description Example


V3

realSize object R
.3

+realMap int[2] R Length and width of actual map, [300,400]


7

unit:meter
fo
rV

Response Example
status.State = Normal
el
se
n gS

15.6.5 Subscribe Alarm Point Info


dn
Bh

Radar track point request; A detach occurs when the connection is disconnected.
d

Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=attachAlarmPointInfo


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
Video channel index which 1
Channel uint R
starts from 1
O Send heartbeat interval, 5
range is [1, 60],unit is second.
If the URL contains this
heartbeat int parameter, and the value is 5,
it means every 5 seconds the
device should send the
heartbeat message to the

Other APIs 750


client, the heartbeat meaage
are "Heartbeat". If this
parameter is not present, its
default value is 60.
Request Example
http://192.168.0.108/cgi-bin/radarAdaptor.cgi?action=attachAlarmPointInfo&Channel=1& heartbeat=5

Response Params (multipart format in body )


Name Type R/O Description Example
Channel int O Video channel number, radar 0
equipment does not pay
attention to the channel
The channel number starts from
0 and defaults to 0
info object[] O Up to 64 points
+PointType int O Mask for point type 0x08
DA

Bit0: Invalid
HU

Bit1: The current point is a


A_

vanishing trajectory point


HT

Bit2: The current point is being


TP

monitored through linkage


_

Bit3: The current point is the


AP

alarm point in the alarm area


I_

Note: There may be multiple


V3

states of points, for example,


.3
7

when the value is 0xC, it


fo

indicates that the current point is


rV

both the point being monitored


el

and the alarm point in the alarm


se
n

area
gS

+RegionNumber int O 1
dn

+ObjectType int O Mask of the type of object the 0x00


Bh

point refers to
d

0x00 Unrecognized target


0x01 Target is a person
0x02 Target is transportation
0x03 Target is Tree
0x04 Target is a building
0x05 Target is screen
0x06 Target is an animal
0x07 Target is a large ship
0x08 Target is China
Shipbuilding Corporation
0x09 Target is a small boat
0x10 Target is a stationary target
type
+TrackID int O range [0,63] 10

Other APIs 751


+Distance int O The polar coordinate value of the 1500
current point pixel - distance,
multiplied by 100 times the result,
in meters
+Angle int O The polar coordinate value of the 26
current point - angle, multiplied
by 100 times the result, in
degrees
+Longitude int32 O Longitude, transmitted in integer 120125400
form, 1000000 times, valid to 6
decimal places, for example,
120125400 represents
120.1254;
Positive numbers represent the
east longitude, negative
numbers represent the west
DA

longitude
HU

+Latitude int32 O Latitude, transmitted in integer 120125400


A_

form, 1000000 times, valid to 6


HT

decimal places, and filled with 0


TP

if less than 6 decimal places, for


_

example, 120125400 represents


AP

120.1254;
I_

Positive numbers represent


V3

north latitude, negative numbers


.3
7

represent south latitude


fo

+Speed int O The result of increasing the 14


rV

current point speed by 100 times,


el

in meters per second


se
n

+TrackerIP uint32 O inet_addr("192.168.1.109") 0


gS

+CoordinatesPo int O Horizontal coordinate, 1024


dn

sX normalized to 8192
Bh

+CoordinatesPo int O Vertical coordinate, normalized 1024


d

sY to 8192
Rule object[] O rule
+Id int O rule id
+PointNumber int O count 0
RealUTC int32 O 4646496
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed

--<boundary>
Content-Type: application/octet-stream
Content-Length: <length>

Other APIs 752


Channel=1
info[0].PointType=0x80
info[0].RegionNumber=1
info[0].ObjectType=1
info[0].TrackID=1
info[0].Distance=1001 //Zoom in 100 times, while the true value is 10.01
info[0].Angle=2010 //Zoom in 100 times
info[0].Speed=501 //Zoom in 100 times
……
info[3].PointType=0x80
……

--<boundary>
Content-Type: text/plain
Content-Length: 11
DA
HU

Heartbeat
A_

-<boundary>
HT

Content-Type: application/octet-stream
TP

Content-Length: <length>
_ AP

Channel=1
I_

info[0].PointType=0x80
V3

……
.3
7
fo

--<boundary>
rV


el
se
n gS

15.6.6 Manual Locate


dn
Bh

Radar manual positioning request


d

Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=manualLocate


Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel uint R channel index which starts from 1. 1
point int[2] R Pixel coordinates in the code stream [10,10]
Request Example
http://192.168.1.108/cgi-
bin/radarAdaptor.cgi?action=manualLocate&channel=1&point[0]=10&point[1]=10

Response Params ( OK in body )


Response Example
OK

Other APIs 753


15.6.7 Start Radar Calibration
Radar equipment calibration
Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=startRadarCalibration
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel uint R channel index which starts from 1. 1
Calibration mode, 0:auto, 1: 1
mode uint R
manual,2:init
Calibration direction, effective in manual 1
mode , 0:invalid, 1:top, 2:bottom,
direction uint R
3:left, 4: right, 5: left_top, 6:
DA

right_top, 7: left_bottom, 8: right_bottom


step uint R step size 5
HU

Request Example
A_

http://192.168.1.108/cgi-
HT

bin/radarAdaptor.cgi?action=startRadarCalibration&channel=1&mode=1&direction=1&step=5
TP
_
AP

Response Params ( OK in body )


I_

Response Example
V3

OK
.3
7
fo
rV

15.6.8 Add Radar Link SD


el
se

Radar link SD added


n gS

Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=addRadarLinkSD


dn

Method GET
Bh

Request Params ( key=value format in URL )


d

Name Type R/O Description Example


Devices array<o R Add or update the added device login
bject> information
+PassWord char[32 R password, plaintext "123456"
]
+UserName char[12 R user name "admin"
8]
+Port integer R port 5000
+SDLinkIP char[32 R device ip adress "192.168.1.108"
]
Channel integer R video channel, which starts from 1. 1
Request Example

Other APIs 754


http://192.168.1.108/cgi-
bin/radarAdaptor.cgi?action=addRadarLinkSD&Devices[0].SDLinkIP=10.11.17.98&Devices[0].Port=5
000&Devices[0].Usename=admin&Devices[0].PassWord=123456&Channel=1

Response Params ( key=value format in body )


Name Type R/O Description Example
SD object R dome camera
+Info object R information
++ErrorCode integer R errorcode 0
0:normal
1:overtime
2:Wrong user name or password
3:The device does not support linkage
Response Example
SD.Info.ErrorCode=0
DA

15.6.9 Del Radar Link SD


HU
A_

Remove radar link SD


HT

Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=delRadarLinkSD


TP

Method GET
_ AP

Request Params ( key=value format in URL )


I_

Name Type R/O Description Example


V3

Devices array<obje R Delete the SD added in radar equipment


.3

ct> Empty array will delete all linkage


7

equipment by default
fo
rV

+SDLinkIP char[32] R device to be deleted "192.168.1.108"


Channel integer R video channel, which starts from 1. 1
el
se

Request Example
n

http://192.168.1.108/cgi-
gS

bin/radarAdaptor.cgi?action=delRadarLinkSD&Devices[0].SDLinkIP=10.11.17.98&Channel=1
dn
Bh

Response Params ( key=value format in body )


d

Name Type R/O Description Example


Response Example
OK

15.6.10 Get Link SD State


Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=getLinkSDState
Method GET
Request Params ( key=value format in URL )
Name Type R/O Description Example
channel index which starts 1
channel uint R
from 1.

Other APIs 755


IP address of the linkage ["192.168.1.115",
ip char[24][] O
device "192.168.1.116"]
Request Example
http://192.168.0.108/cgi-
bin/radarAdaptor.cgi?action=getLinkSDState&channel=1&ip[0]=192.168.1.115&ip[1]=192.168.1.116

Response Params (key=value format in body )


Name Type R/O Description Example
state object[] R device state
+SDLinkIP char[32] O device ip "192.168.1.108"
+State uint8 O 0: out of time 0
1: offline
2: disconnected
+Channel int O virtual channel,starts from 1 1
Response Example
state[0].SDLinkIP=192.168.1.115
DA

state[0].State=0
HU

state[0].Channel=1
A_

state[1].SDLinkIP=192.168.1.116
HT

state[1].State=0
TP

state[1].Channel=2
_AP

15.6.11 [Config] MapPara


I_
V3
.3

Config Data Params


7

Name Type R/O Description Example


fo

MapPara object[] R One-dimensional array, with one


rV

configuration for each video channel


el
se

+RadarCoordi object R Configuration of radar position on the null


n

nate map
gS

++RadarDirect double R 70.5


dn

Configuration of radar direction (°)


ionAngle
Bh

++RadarPixel int[] R [10, 20]


Pixel coordinates of radar on the map
d

Point
+MapSize object R Configuration of map size null
++PixelLine int[][] R Pixel coordinates of line segment in [[10,10], [20,20]]
the image
++Distance double R The actual length represented by the 10.1
line segment in the image (m)

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MapPara
Get Config Response Example
table.MapPara.RadarCoordinate.RadarDirectionAngle=70.5

Other APIs 756


table.MapPara.RadarCoordinate.RadarPixelPoint[0]=10
table.MapPara.RadarCoordinate.RadarPixelPoint[1]=20
table.MapPara.MapSize.PixelLine[0][0]=10
table.MapPara.MapSize.PixelLine[0][1]=10
table.MapPara.MapSize.PixelLine[1][0]=20
table.MapPara.MapSize.PixelLine[1][1]=20
table.MapPara.MapSize.Distance=10.1

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&MapPara.MapSize.Distance=10.1&MapPara.RadarCoordinate
.RadarDirectionAngle=70.5
Set Config Response Example
OK
DA

15.6.12 [Config] RadarAnalyseRule


HU
A_

RadarAnalyseRule parameters:
HT

Config Data Params


TP
_

Name Type R/O Description Example


AP

RadarAnalyse object[][24] R Radar alarm linkage configuration


I_

Rule object[][24]
V3

Two-dimensional array. The first


.3
7

dimension indicates video channel,


fo

and the second dimension indicates


rV

multiple linkage configurations.


el

+EventHandle object R null


se

Alarm linkage configuration


r
n gS

++LogEnable bool R Whether to record alarm logs. The type false


dn

is fixed to
Bh

EventStart/EventStop/EventPulse and
d

the original event type is recorded in


the Detail.Code field in the log.
++TimeSectio TimeSectio R [[
n n[][] Alarm period. "1 00:00:00-23:59:59",
TimeSection is used for the filtering of "0 00:00:00-23:59:59",
notify action. No data is sent if it is not "0 00:00:00-23:59:59",
within the period. "0 00:00:00-23:59:59",
All fields except this one are used for "0 00:00:00-23:59:59",
listener response. "0 00:00:00-23:59:59",
]]
++SnapshotC int[] R List of snapshot channel numbers. [0]
hannels One-dimensional array. Each member
indicates that the corresponding

Other APIs 757


channel needs to take snapshot, and
the channel number starts from 0.
++SnapshotE bool R false
Enable snapshotg
nable
++RecordLatc int R Record delay time (second) 10
h Range [10, 300]
++RecordCha int[] R List of record channel numbers. [0]
nnels One-dimensional array. Each member
indicates that the corresponding
channel needs to record, and the
channel number starts from 0.
++RecordEna bool R Record enabling, with false
ble RecordChannels. Record is enabled if
it is true; start recording when the
event action is start and stop recording
when it is stop. Record is not enabled if
DA

it is false.
HU

++VoiceEnabl bool R false


Voice prompt
A_

e
HT

++BeepEnabl bool R false


Buzzer
TP

e
_

++MessageEn bool R false


AP

Upload to the alarm center server.


able
I_
V3

++MailEnable bool R Send email. false


.3

++TipEnable bool R Local message box prompt false


7

++AlarmOutLa int R Output delay time (second) after the 10


fo

tch alarm output stops.


rV

Range [10, 300]


el
se

++AlarmOutE bool R false


Enable alarm output
n

nable
gS

++AlarmOutC int[] R List of alarm output channel numbers. [0]


dn

hannels One-dimensional array. Each member


Bh

indicates that the corresponding


d

channel needs to output alarm, and the


channel number starts from 0.
+Enable bool R Enable alarm enabling false
+AlarmOutNu int R Alarm configuration number, which is 1
mber unique.
+SDLinkIP char[32] O Controlled device IP (which is optional "192.168.1.108"
and reserved. Ignore this field due to
business adjustment).

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarAnalyseRule

Other APIs 758


Get Config Response Example
table.RadarAnalyseRule.Enable=true
table.RadarAnalyseRule.SDLinkIP=192.168.1.108
table.RadarAnalyseRule.EventHandler=….(output of EventHandler is described in GetEventHandler)

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&RadarAnalyseRule.Enable=true&RadarAnalyseRule.SDLinkIP
=192.168.1.108
Set Config Response Example
OK

15.6.13 [Config] RadarCalibration


DA

Config Data Params


HU

Parameter Type R/O Description Example


Configuration of radar and PTZ
A_

cameras calibration.
HT

RadarCalibration object[] R
One-dimensional array, with one
TP

configuration for each video channel.


_ AP

+SlopeAngle double R Slope compensation angle. 10.0


I_

+InstallHeight double R Radar installation height (m). 10.5


V3

+CalibrationParas object[] R Calibration parameter. null


.3

R Vertical compensation angle of linked


7
fo

PTZ camera.
rV

The range is -90° to 90°; 0° in the


++TiltRecoupAngle double 5.0
el

horizontal direction; 0 to 90° below the


se

horizontal direction; -90° to 0° above the


n gS

horizontal direction.
dn

R Installation height of linked PTZ camera


++LinkSDHeight double 10.5
(m).
Bh

++CalibrationPos object[] R Array of calibration points. null


d

R PTZ value (normalized value) of


calibration points.
The first element is the horizontal angle,
which is normalized to -1 to 1.
+++Ptz float[3] [0.95, 0.43, 0.12]
The second element is the vertical
angle, which is normalized to -1 to 1.
The third element is the zoom times,
which is normalized to 0 to 1.
+++AlarmPixelPoint int[2] R Pixel coordinates of calibration points. [10, 20]
++SDLinkIP char[32] R Controlled device IP. "192.168.1.108"

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :

Other APIs 759


Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarCalibration
Get Config Response Example
table.RadarCalibration[0].SlopeAngle=10.0
table.RadarCalibration[0].InstallHeight=10.5
table.RadarCalibration[0].CalibrationParas[0].TiltRecoupAngle=5.0

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&RadarCalibration[0].SlopeAngle=10.0&RadarCalibration[0].Cal
ibrationParas[0].TiltRecoupAngle=5.0
Set Config Response Example
OK
DA

15.6.14 [Config] RadarGuardLine


HU
A_

Config Data Params


HT

Parameter Type R/O Description Example


TP

R Two-dimensional array. The first


_AP

dimension indicates video channel, and


RadarGuardLine object[][10]
I_

the second dimension indicates multiple


V3

rule lines (up to 10).


.3

R Alarm output configuration. Configure the


7
fo

+AlarmOutNumber integer AlarmOutNumber field according to 1


rV

RadarAnalyseRule.
el

R Target filtering
se

bit0: Reserved
n gS

bit1: Human.
+TargetFilter integer 0x01
dn

bit2: Vehicle.
bit3: Animal
Bh

(Enable by setting it to 1)
d

R Rule point, pixel coordinates [width,


[[0, 0], [128,
+Polygon integer height].
128],…,[]]
Range of number of points [3, 24]
R Rule type, alarm or shield type.
High Alarm
+Type char[32] "Alarm"
Alarm
Shield
+Enable bool R Whether to enable the rules true
R Rule line number
+RegionNumber integer 1
Range [1, 10]
+Name char[128] R Rule name, which cannot be repeated. "GuardLine1"

Other APIs 760


Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarGuardLine
Get Config Response Example
table.RadarGuardLine[0][0].AlarmOutNumber =1
table.RadarGuardLine[0][0].Enable=true
table.RadarGuardLine[0][0].Type=Alarm
table.RadarGuardLine[0][0].RegionNumber=1

Set Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&RadarGuardLine[0][0].AlarmOutNumber
=1&RadarGuardLine[0][0].Enable=true
Set Config Response Example
OK
DA
HU
A_

15.6.15 [Config] RadarLink


HT
TP

Config Data Params


_
AP

Name Type R/O Description Example


I_

RadarLink object[] R One-dimensional array, with one


V3

configuration for each video channel


.3

+RadarLink bool R Enable radar-PTZ linkage true


7
fo
rV

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
el
se

Get Config Request Example


n

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarLink
gS

Get Config Response Example


dn

table.RadarLink[0].RadarLink=true
Bh

table.RadarLink[1].RadarLink=true
d

Set Config Request Example


http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&RadarLink[0].RadarLink=true
Set Config Response Example
OK

15.6.16 [Config] RadarLinkDevice


Config Data Params
Name Type R/O Description Example

Other APIs 761


RadarLinkDevi object[][] R Remote device linkage configuration.
ce object[][24]
Two-dimensional array. The first
dimension indicates video channel,
and the second dimension indicates
multiple remote linkage devices.
+DeviceName char[128] R Device name "XXX northdoor"
+DeviceType char[32] R Device type "200w sd"
+Vendor char[32] R Device source "VVV"
+SDLinkIP char[32] R Controlled device IP "192.168.1.108"

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarLinkDevice
Get Config Response Example
DA

table.RadarLinkDevice[0][0].DeviceName=NorthDoor
HU

table.RadarLinkDevice[0][0].DeviceType=xxx
A_

table.RadarLinkDevice[0][0].Vendor=VVV
HT

table.RadarLinkDevice[0][0].SDLinkIP=192.168.1.108
TP


_AP

Set Config Request Example


I_

http://10.0.0.8/cgi-
V3

bin/configManager.cgi?action=setConfig&RadarLinkDevice[0][0].DeviceName=NorthDoor&RadarLinkDe
.3
7

vice[0][0].DeviceType=xxx
fo

Set Config Response Example


rV

OK
el
se

15.6.17 [Config] RadarPara


ngS
dn

RadarPara
Bh

Config Data Params


d

Parameter Type R/O Description Example


Radar function configuration.
RadarPara object[] R One-dimensional array, with one
configuration for each video channel.
+Sensitivity object O Recognition sensitivity information. null
Optional. Skip if this field does not
exist. The range is -5 to 5; 0 is the
default value; the smaller the value,
++Level integer O 0
the higher the human recognition rate;
the larger the value, the higher the
vehicle recognition rate.
R Tracking screen ratio for radar-PTZ
+TargetRatio object null
linkage.
++Ratio integer R Reciprocal of screen ratio. 1

Other APIs 762


Required. Calculate the reciprocal. For
example, when the screen ratio is 0.5,
Ratio = 2; when the screen ratio is
0.25, Ratio = 4.
+RadarChannel object R Radar channel configuration. null
R Channel selection.
++Route integer 1: Channel 1 1
2: Channel 2
R Configuration of radar transmitting
+Capacity object null
power.
R Radar transmitting power is measured
++Power integer 300
by detection distance (m).
+Structured object R Structured information configuration null
++TrackDisplayT O
integer Range [1, 30] (s). 5
ime
O 0: Disable 1: Trajectory box 2:
DA

++TrackType integer 0
Trajectory
HU

++Enable bool R Enable structured information display false


A_

+Scene object R Scene configuration null


HT

R Scene selection.
TP

1: Default.
_

++Type integer 2: Shrub. 1


AP

3: Spacious.
I_

4: Custom.
V3
.3
7

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
fo

are as follows :
rV

Get Config Request Example


el

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarPara
se
n

Get Config Response Example


gS

table.RadarPara[0].Sensitivity.Level=1
dn

table.RadarPara[0].TargetRatio.Ratio=1
Bh

table.RadarPara[0].Scene.Type=1
d

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&RadarPara[0].Sensitivity.Level=1&RadarPara[0].Scene.Type=
1
Set Config Response Example
OK

15.6.18 [Config] RadarTrackGlobal


Config Data Params
Name Type R/O Description Example

Other APIs 763


RadarTrackGlobal object[] R One-dimensional array, with one
configuration for each video
channel
+TrackSwitchMode char[32] R Tracking switching mode "Rotation"
Tour/time priority/distance priority
Rotation/TimePriority/DistancePri
ority
+TrackSwitchTime int R Tracking switching time (s) 5
Range [1, 15]
+TrajectoryTime int R Trajectory time (s) 5
Range [3, 30]
+SectorDisable bool R Enable protection area hiding false

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example
DA

http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarTrackGlobal
HU

Get Config Response Example


A_

table.RadarTrackGlobal[0].TrackSwitchMode=Rotation
HT

table.RadarTrackGlobal[0].TrackSwitchTime=5
TP

table.RadarTrackGlobal[0].TrajectoryTime=5
_

table.RadarTrackGlobal[0].SectorDisable=false
AP


I_
V3

Set Config Request Example


.3
7

http://10.0.0.8/cgi-
fo

bin/configManager.cgi?action=setConfig&RadarTrackGlobal[0].SectorDisable=false&RadarTrackGlobal[
rV

0].TrackSwitchMode=Rotation&RadarTrackGlobal[0].TrackSwitchTime=5
el

Set Config Response Example


se
n

OK
gS
dn

15.6.19 [Config] RemoteSDLink


Bh
d

Config Data Params


Name Type R/O Description Example
RemoteSDLin object[][24] R Remote device linkage enabling
k configuration.
Two-dimensional array. The first
dimension indicates video channel,
and the second dimension indicates
multiple remote linkage devices.
+RadarLink bool R Enable linkage. true
+SDLinkIP char[32] R Controlled device IP. "192.168.1.108"

Please refer to "4.2.1 Get and Set Configure" for configuration getting and setting. Specific examples
are as follows :
Get Config Request Example

Other APIs 764


http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RemoteSDLink
Get Config Response Example
table.RemoteSDLink[0][0].RadarLink=true
table.RemoteSDLink[0][0].SDLinkIP=192.168.1.108
table.RemoteSDLink[0][1].RadarLink=true
table.RemoteSDLink[0][1].SDLinkIP=192.168.1.107

Set Config Request Example


http://10.0.0.8/cgi-
bin/configManager.cgi?action=setConfig&RemoteSDLink[0][0].RadarLink=true&RemoteSDLink[0][0].SD
LinkIP=192.168.1.108
Set Config Response Example
OK

15.7 Water Radar


DA
HU

15.7.1 Acquire Radar Capability


A_
HT

Request URL http://<server>/cgi-bin/api/WaterRadar/getCaps


TP

Method POST
_ AP

Request Params ( JSON format in body )


I_

Name Type R/O Description Example


V3

Request Example
.3

{}
7
fo
rV

Response Params ( JSON format in body )


el

Name Type R/O Description Example


se

Support bool R Whether the water conservancy radar true


n

function is supported.
gS

false: Not Supported


dn

true: Supported
Response Example
Bh

{
d

"Support": true
}

15.7.2 Get Radar Detection Target Data


Request URL http://<server>/cgi-bin/api/WaterRadar/getObjectInfo
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Request Example
{}

Response Params ( JSON format in body )

Other APIs 765


Name Type R/O Description Example
WaterLevel float R Water level, CM 1000.0
Response Example
{
"WaterLevel": 1000.0
}

15.8 Water Quality Detection

15.8.1 Get Capability


Acquiring the interface for water quality detection.
Request URL http://<server>/cgi-bin/api/WaterDataStatServer/getCaps
Method POST
DA

Request Params ( JSON format in body )


HU

Name Type R/O Description Example


A_

Request Example
HT

{}
TP
_

Response Params ( JSON format in body )


AP

Name Type R/O Description Example


I_
V3

Support enumint O Supports water quality detection 0


.3

currently. enumint{
7

0: No
fo

1: Yes
rV

}
el
se

SupportLocal enumint O Supports local storage. 0


n

DataStore enumint{
gS

0: No
dn

1: Yes
Bh

}
d

Response Example
{
"Support": 0,
"SupportLocalDataStore": 0
}

15.8.2 Get Real-time Detection Data


The water quality detection data is refreshed every minute, and you can acquire the data in real
time.
Request URL http://<server>/cgi-bin/api/WaterDataStatServer/getWaterData
Method POST
Request Params ( JSON format in body )

Other APIs 766


Name Type R/O Description Example
Type enumchar[ O enumchar[32][32]{ ["PH"," NTU ", …]
32][32] "Quality": Water quality category
"PH": pH value
“NTU": Turbidity value
"NH3-N": Ammonia nitrogen value
}
Request Example
{
"Type": ["PH"," NTU ", …]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Quality enumint O The smaller the category value, the 1
better the water quality.
DA

enumint {
HU

1: I Category
A_

2: II Category
HT

3: III Category
TP

4: IV Category
_

5: V Category
AP

}
I_

UploadInfo object O Reported data of water quality detection.


V3

Reports all water quality detection data


.3
7

when an alarm is triggered.


fo

+PH float O pH (1–14) 5.2


rV

+NTU float O Turbidity (0–500 NTU) 200.0


el

+NH3-N float O Ammonia nitrogen (0–50 mg/L) 20.0


se
n

+TN float O Ammonia nitrogen (0–50 mg/L) 25.0


gS

+SD float O Transparency (0–30 m) 20.0


dn

+COD float O Chemical oxygen demand (0–100 mg/ L) 50.0


Bh

+NN float O Nitrite-nitrogen (0-500 mg/ L) 20.0


d

+DO float O Dissolved oxygen (0–10 mg/L) 5.0


+Chl-a float O Chlorophyll A (0–300 ug/ L) 200.0
+TP float O Total phosphorus (0–5 mg/L) 2.5
+CODMn float O Permanganate index (0–100 mg/L) 20.0
+SS float O Floating objects (0–1000 mg/ L) 20.0
+BOD5 float O Biochemical oxygen demand for 5 days 25.0
(0–50 mg/L)
+NO3-N float O Nitrate (0–500 mg/ L) 20.0
+TSI float O Eutrophic index (no range) 20.0
+BlackSmellyL enumchar[ O Black and odorous level "Light"
evel 32] enumchar[32]{
"Normal”
"Light”
"Heavy”

Other APIs 767


}
FlunkType enumchar[ O Parameter value exceeds its threshold ["PH"," NTU ", …]
32][32] enumchar[32][32]{
"PH": pH value
“NTU": Turbidity value
"NH3-N": Ammonia nitrogen value
}
Response Example
{
"Quality": 1,
"UploadInfo": {
"PH": 5.2,
"NTU": 200.0,
"NH3-N": 20.0,
"TN": 25.0,
"SD": 20.0,
DA

"COD": 50.0,
HU

"NN": 20.0,
A_

"DO": 5.0,
HT

"Chl-a": 200.0,
TP

"TP": 2.5,
_

"CODMn": 20.0,
AP

"SS": 20.0,
I_

"BOD5": 25.0,
V3

"NO3-N": 20.0,
.3
7

"TSI": 20.0,
fo

"BlackSmellyLevel": "Light"
rV

},
el

"FlunkType": ["PH"," NTU ", …]


se

}
ngS
dn

15.8.3 Start Find Water Quality Report


Bh
d

Searching for water quality report.


Request URL http://<server>/cgi-bin/api/WaterDataStatServer/startFind
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
condition Object O Search conditions of water quality
detection
+StartTime char[20] O Start time (temporarily accurate to the "5/25/2010 00:00:00"
hour)
+Type enumchar[ O enumchar[32][32]{ ["PH"," NTU"]
32][32] "Quality": Water quality category
"PH": pH value
“NTU": Turbidity value
"NH3-N": Ammonia nitrogen value

Other APIs 768


}
+PresetID int[] O Preset ((one-dimensional array) [1]
+EndTime char[20] O End time (temporarily accurate to the "2010-05-25 00:00:00"
hour)
Request Example
{
"condition": {
"StartTime": "2010-05-25 00:00:00",
"Type": ["PH"," NTU"],
"PresetID": [1],
"EndTime": "2010-05-25 00:00:00"
}
}

Response Params ( JSON format in body )


DA

Name Type R/O Description Example


HU

token uint32 O Obtained search token 2342343


totalCount uint32 O Total number of qualified results 233
A_

Response Example
HT

{
TP

"token": 2342343,
_ AP

"totalCount": 233
I_

}
V3
.3

15.8.4 Get Find Water QUality Report Search Results


7
fo
rV

Searching for water quality report.


el

Request URL http://<server>/cgi-bin/api/WaterDataStatServer/doFind


se

Method POST
ngS

Request Params ( JSON format in body )


dn

Name Type R/O Description Example


Bh

token uint32 O Search token 46878


d

beginNumber uint32 O Starting sequence number of the 0


search. It means that the search
starts from the beginNumber records,
and returns count records. 0 ≤
beginNumber ≤ totalCount-1.
count int32 O Number of traffic statistics for each 24
search
Request Example
{
"token": 46878,
"beginNumber": 0,
"count": 24
}

Other APIs 769


Response Params ( JSON format in body )
Name Type R/O Description Example
found uint32 O Number of searched entries 12
info object[] O Traffic statistics. It is an array and
each element represents a traffic
record that satisfies the condition.
+StartTime char[20] O Start time 2018-03-03 00:00:00",
+Quality enumint O enumint { 1
1: I Category
2: II Category
3: III Category
4: IV Category
5: V Category
}
+PH float O pH (1–14) 5.5
+NTU float O Turbidity (0–500 NTU) 250.0
+NH3-N float O Ammonia nitrogen (0–50 mg/L) 25.0
DA

+TN float O Total nitrogen (0–50 mg/L) 25.0


+SD float O Transparency (0–30 m) 20.0
HU

+COD float O Chemical oxygen demand (0–100 20.0


A_

mg/ L)
HT

+NN float O Nitrite-nitrogen (0–500 mg/ L) 250.0


TP

+Chl-a float O Chlorophyll A (0–300 ug/ L) 20.0


_ AP

+TP float O Total phosphorus (0–5 mg/L) 2.5


I_

+CODMn float O Permanganate index (0–100 mg/L) 20.0


V3

+SS float O Floating objects (0–1000 mg/ L) 500.0


.3

+BOD5 float O Biochemical oxygen demand for 5 25.0


7

days (0–50 mg/L)


fo
rV

+NO3-N float O Nitrate (0–500 mg/ L) 250.0


el

+TSI float O Eutrophic index (no range) 25.0


se

+BlackSmellyL enumchar[ O Black and odorous level "Light"


n gS

evel 32] enumchar[32]{


"Normal”
dn

"Light”
Bh

"Heavy”
d

}
+DO float O Dissolved oxygen (0–10 mg/L) 20.0
Response Example
{
"found": 12,
"info": [{
"StartTime": "2012-03-14 00:00:00",
"Quality": 1,
"PH": 5.5,
"NTU": 250.0,
"NH3-N": 25.0,
"TN": 25.0,
"SD": 20.0,
"COD": 20.0,

Other APIs 770


"NN": 250.0,
"Chl-a": 20.0,
"TP": 2.5,
"CODMn": 20.0,
"SS": 500.0,
"BOD5": 25.0,
"NO3-N": 250.0,
"TSI": 25.0,
"BlackSmellyLevel": "Light",
"DO": 20.0
},…{}]
}

15.8.5 Stop Find Water Quality Report


Stopping the search of water quality detection database.
DA

Request URL http://<server>/cgi-bin/api/WaterDataStatServer/stopFind


HU

Method POST
A_

Request Params ( JSON format in body )


HT

Name Type R/O Description Example


TP

token uint32 O Search token 46284


_ AP

Request Example
{
I_
V3

"token": 46284
.3

}
7
fo

Response Params ( JSON format in body )


rV

Name Type R/O Description Example


el
se

Response Example
n

{}
gS
dn

15.9 Advertisement
Bh
d

15.9.1 Modifying the Display Duration of Image Advertisments


Modify the display duration of image advertisments.
Request URL http://<server>/cgi-bin/api/VideoOutput/changeSustain
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Sustain int R Display duration of each image 20
Request Example
{
"Sustain": 20
}
Response Params ( JSON format in body )

Other APIs 771


Name Type R/O Description Example
Response Example
{}

15.9.2 Releasing Advertisements


Request URL http://<server>/cgi-bin/api/VideoOutput/deliveryFile
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
Number of the configuration information
Port int O 0
of the video output port
Number of the current advertisement
Number int O plan. Call the parameter to configure 0
different advertisement plans.
DA

Advertisement playing period. It is a two-


HU

dimensional array in which the first


A_

seven elements correspond to seven [ ["1 00:00:00-


HT

days of a week, and the eighth element 07:00:00", "2


TimeSched
TP

TimeSection O corresponds to holidays, with a 09:00:00-17:30:00",


ule
_

maximum of six periods per day. The "3 17:30:00-


AP

eighth element can be left blank or 23:59:59" ], …, [ ], ]


I_

entered as null, indicating that the


V3

holiday period is not supported.


.3
7

Enable bool O Enable the play true


fo

Name char[128] O Advertisement name "Happy National Day"


rV

"2016-08-10
el

StartTime char[20] O Start time of the play


10:00:00"
se
n

End time of the play "2016-08-10


gS

EndTime char[20] O
Effective only for loop play 12:00:00"
dn

Video play mode


Bh

Once: Only play each video once


d

Mode char[16] O Repeat: Loop play the videos until the "Once"
Endtime
Alone: Cut-in play (solely)
Operation type If the value is not
entered, perform Replace by default.
Send the advertisement again after
Type char[16] R Replace is cleared. "Replace"
Add: Add files
Remove: Delete files
Clear: Clear the files
FileList object[] O Video file list
File type
enumchar[
+FileType O enumchar[16]{ "Video"
16]
"Video": Video files

Other APIs 772


"Image": Image files
"Audio": Audio files
}
The default value is 1.
File mode:
1: Recognition Mode
2: Information publishing mode
3: Home page mode
The files are played only under the
+PlayWithMod
int O corresponding mode The recognition 1
e
mode is the standard function of the
program, which will automatically
preform face recognition when detecting
a human face. The information release
mode requires human-device interaction
before recognition.
DA

"ftp://192.168.1.108/1
+URL char[128] O File resource address
HU

.dav"
A_

Address of the file extension resource:


HT

The original URL field is too short, and


TP

not enough for the supporting ICC


_

platform (currently it has reached 160


AP

"http://10.35.81.187:8
bytes), which needs to be increased.
I_

927/1952fdd7-48e8-
Compatibility logic of platform: When the
V3

11eb-b015-
Support field of the device capability
.3

08eded28a344/20210
7

interface
315/1/cdce2e98-
fo

+URLEx char[512] O VideoOutput.getAdvertisementCaps


rV

855d-11eb-ac3f-
returns true, the real download address
el

08eded28a344.jpg?to
is filled in the URLEx field, and the URL
se

ken=fe65ac56-ff42-
field is filled with an empty string.
n

4597-80f4-
gS

Compatibility logic of device: If the URL


33e571deab22"
dn

is not an empty string, the URL is used


Bh

directly; only when the URL field is an


d

empty string and URLEx is not an empty


string, the URLEx field is used.
Stay time of each Image, which is valid
+Sustain int O only when FileType is Image. Unit: 5
Second
Advertisement playing period. It is a two-
dimensional array in which the first
seven elements correspond to seven [ ["1 00:00:00-
days of a week, and the eighth element 07:00:00", "1
TimeSched
+TimeSection O corresponds to holidays, with a 09:00:00-17:30:00",
ule
maximum of six periods per day. The "1 17:30:00-
eighth element can be left blank or 23:59:59" ], …, [ ], ]
entered as null, indicating that the
holiday period is not supported.

Other APIs 773


Files size. Unit: Byte. It is convenient to
verify whether the file can be
downloaded successfully before
downloading. The actual download might
+Size int O fail, because the space limit of the 102400
device folder (used to save
advertisements) has been reached If
there is no such field, no verification is
performed.
+ID int O File No. 3
Request Example
{
"Port": 0,
"Number": 0,
"TimeSection": [ ["1 00:00:00-07:00:00", "2 09:00:00-17:30:00", "3 17:30:00-23:59:59" ], …, [ ], ],
"Enable": true,
DA

"Name": "Happy National Day",


HU

"StartTime": "2016-08-10 10:00:00",


A_

"EndTime": "2016-08-10 12:00:00",


HT

"Mode": "Once",
TP

"Type": "Replace",
_

"FileList": [{
AP

"FileType": "Video",
I_

"PlayWithMode": 1,
V3

"URL": "ftp://192.168.1.108/1.dav",
.3
7

"URLEx": "http://10.35.81.187:8927/1952fdd7-48e8-11eb-b015-
fo

08eded28a344/20210315/1/cdce2e98-855d-11eb- ac3f-08 eded28a344.jpg?token=fe65ac56-ff42-4597-


rV

80f4-33e571deab22",
el

"Sustain": 5,
se

"TimeSection": [ ["1 00:00:00-07:00:00", "1 09:00:00-17:30:00", "1 17:30:00-23:59:59" ], …,


n gS

[ ], ],
dn

"Size": 102400,
Bh

"ID": 3
d

},…{}]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

15.9.3 Getting the List of Advertisement Resources


Get the list of advertisement resources
Request URL http://<server>/cgi-bin/api/VideoOutput/list
Method POST

Other APIs 774


Request Params ( JSON format in body )
Name Type R/O Description Example
"/PublishFilePath/
path char[260] R Path to get the files
2010/8/11/dav"
Request Example
{
"path": "/PublishFilePath/2010/8/11/dav"
}

Response Params ( JSON format in body )


Name Type R/O Description Example
elementInfo object[] O File element information
File element type
enumchar[16]{
enumchar[
+type O "File": File "File"
16]
"Directory": Directory
DA

}
HU

File information (Effective when


+file object O
A_

Type="File")
HT

Type of the file node


TP

++FileType char[64] O "Wireshark/tcpdump", see "Wireshark/tcpdump"


_

Wireshark capture file type


AP

++CreateTime char[20] O Time of creation "2010-4-15 9:58:32"


I_

++ModifyTime char[20] O Time of modification "2010-4-15 9:58:32"


V3

File size, in bytes. The figures after


.3
7

++Size double O the decimal point do not make 1873.0


fo

sense.
rV

"/PublishFilePath/
el

++path char[260] O Relative path


2010/8/11/dav.jpg"
se
n

++Desc char[128] O Custom description of the file "xxxxxxx"


gS

Directory information, effective


+directory object O
dn

when the type is Directory.


Bh

Time of creation, in the form of Y-M-


++CreateTime char[20] O "2010-4-15 9:58:32"
d

D H-m-S
"/PublishFilePath/
++path char[260] O Relative path
2010/8/11/dav"
Response Example
{
"elementInfo": [{
"type": "File",
"file": {
"FileType": "Wireshark/tcpdump",
"CreateTime": "2010-4-15 9:58:32",
"ModifyTime": "2010-4-15 9:58:32",
"Size": 1873.0,
"path": " /PublishFilePath/2010/8/11/dav.jpg",
"Desc": "xxxxxxx"

Other APIs 775


},
"directory": {
"CreateTime": "2010-4-15 9:58:32",
"path": " /PublishFilePath/2010/8/11/dav"
}
},…{}]
}

15.9.4 Searching for the Released Advertisements


Used with deliveryFile for intercom in buildings
Request URL http://<server>/cgi-bin/api/VideoOutput/queryDeliveredFile
Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
DA

Request Example
HU

{}
A_
HT

Response Params ( JSON format in body )


TP

Name Type R/O Description Example


_

Info Object[] R Information of the transferred file


AP

+Enable bool O Enable the play true


I_

+Number int R Number of the current advertisement 0


V3

plan. Call the parameter to configure


.3
7

different advertisement plans.


fo

+TimeSection TimeSched R Advertisement playing period. It is a [ ["1


rV

ule two-dimensional array in which the first 00:00:00-07:00:00", "2


el

seven elements correspond to seven 09:00:00-17:30:00", "3


se
n

days of a week, and the eighth element 17:30:00-


gS

corresponds to holidays, with a 23:59:59" ], …, [ ], ]


dn

maximum of six periods per day. The


Bh

eighth element can be left blank or


d

entered as null, indicating that the


holiday period is not supported.
+Name char[128] O Advertisement name "Happy National Day"
+StartTime char[20] O Start time of the play "2016-08-10 10:00:00"
+EndTime char[20] O End time of the play "2016-08-10 12:00:00"
+Mode char[16] O Video play mode "Once"
Once: Only play each video once
Repeat: Loop play the videos until the
Endtime
Alone: Cut-in play (solely)
+PlayTimes int O Playing times When in "Once" mode. 0
+FileList object[] O List of the video files Supports up to 20
videos

Other APIs 776


++Downloade bool O Whether the file has been downloaded true
d to the device
++FileType enumchar[ O File type "Video"
16] enumchar[16]{
"Video": Video files
"Image": Image files
"Audio": Audio files
}
++LocalPath char[128] O Path that the file is saved to the device "/PublishFilePath/1.dav
"
++Sustain int O Display duration of each image, 5
effective only when FileType is Image.
Unit: Second
++URL char[512] O File resource address, and the "ftp://192.168.1.108/1.d
maximum length is 512 bytes. It has av"
the same length requirement with
DA

VideoOutput.deliveryFile (release at
HU

the same time for intercom in


A_

buidlings).
HT

++TimeSectio TimeSched O Advertisement playing period. It is a [ ["1 00:00:00-


TP

n ule two-dimensional array in which the first 07:00:00", "1 09:00:00-


_

seven elements correspond to seven 17:30:00", "1 17:30:00-


AP

days of a week, and the eighth element 23:59:59" ], …, [ ], ]


I_

corresponds to holidays, with a


V3

maximum of six periods per day. The


.3
7

eighth element can be left blank or


fo

entered as null, indicating that the


rV

holiday period is not supported.


el

++Status int O File status, 1


se
ngS

0: normal;
dn

1: not support file;


Bh
d

2: file format error;

3: file damaged;

4: file too large;

5: file too small;

6: file already removed;

7: file in deleting;

8: file saved;

9: file in saving;

Other APIs 777


10: file in editing
++Size int O Files size, in byte. 102400
++ID int O File No. 3
Response Example
{
"Info":
[{"Enable": true,
"Number": 0,
"TimeSection": [ ["1
00:00:00-07:00:00", "2 09:00:00-17:30:00", "3
17:30:00-23:59:59" ], …, [ ], ],
"Name": " Happy National Day ",
"StartTime": "2016-08-10 10:00:00",
"EndTime": "2016-08-10 12:00:00",
"Mode": "Once",
"FileList": [{Up to 20
DA

"Downloaded": true,
HU

"FileType": "Video",
A_

"LocalPath": "/PublishFilePath/1.dav",
HT

"Sustain": 5,
TP

"URL": "ftp://192.168.1.108/1.dav",
_

"TimeSection": [ ["1 00:00:00-07:00:00", "1 09:00:00-17:30:00", "1 17:30:00-23:59:59" ], …,


AP

[ ], ],
I_

"Size": 102400,
V3

"ID": 3
.3
7

},…{}]
fo

},{},…{}]}
rV
el
se

15.9.5 Deleting Advertisement Resources


n gS
dn

Delete the advertisement resources


Bh

Request URL http://<server>/cgi-bin/api/VideoOutput/removeFiles


d

Method POST
Request Params ( JSON format in body )
Name Type R/O Description Example
fileName char[32][12 R File name ["a.dav", "b.dav" ]
8]
Request Example
{
"fileName": ["a.dav", "b.dav" ]
}

Response Params ( JSON format in body )


Name Type R/O Description Example
Response Example
{}

Other APIs 778


Other APIs 779
d
Bh
dn
ngS
se
el
rV
fo
7
.3
V3
I_
_AP
TP
HT
A_
HU
DA

You might also like