Professional Documents
Culture Documents
hu
aH
TT
P
V2.89
2020-12-03
Cybersecurity Recommendations
Mandatory actions to be taken towards cybersecurity
Da
recommended to change default passwords immediately and choose a strong password whenever
aH
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.
TT
2. Update Firmware
As is standard procedure in the tech-industry, we recommend keeping NVR, DVR, and IP camera
P
firmware up-to-date to ensure the system is current with the latest security patches and fixes.
AP
Regularly change the credentials to your devices to help ensure that only authorized users are able to
2.
reduces the risk of outsiders being able to guess which ports you are using.
00
3. Enable HTTPS/SSL:
Set up an SSL Certificate to enable HTTPS. This will encrypt all communication between your devices
M
and recorder.
EG
4. Enable IP Filter:
Enabling your IP filter will prevent everyone, except those with specified IP addresses, from accessing
A
the system.
Di
On older IP Camera firmware, the ONVIF password does not change when you change the system's
credentials. You will need to either update the camera's firmware to the latest revision or manually
rib
● You do not need to forward any ports for individual cameras if they are all connected to a recorder on
s.r
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:
Da
Disable SNMP if you are not using it. If you are using SNMP, you should do so only temporarily, for
hu
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.
TT
If you suspect 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
AP
accessed.
IV
this is to install the recorder in a lockbox, locking server rack, or in a room that is behind a lock and key.
89
computer network. This will prevent any visitors or unwanted guests from getting access to the same
network the security system needs in order to function properly.
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
Cybersecurity Recommendations II
Foreword
Purpose
Da
Reader
aH
Project managers
P
Product managers
AP
Safety Instructions
IV
The following categorized signal words with defined meaning might appear in the Manual.
2.
Indicates a high potential hazard which, if not avoided, will result in death
DANGER or serious injury.
fo
r1
TIPS Provides methods to help you solve a problem or save you time.
A
NOTE
text.
st
Revision History
rib
ut
2 V2.60 Add find media file with TrafficCar info. September 12, 2018
s.r
3 V2.61 Add the "16 AI APIs " chapter. October 24, 2018
.o
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
Da
13 V2.71 Add get the max and min temperature values June 3, 2019
hu
16 V2.74 Balance, Day-Night, Zoom and Focus, Lighting, Video July 25, 2019
in Options config.
P
17 V2.75 Add adjust angle and depth field August 13, 2019
AP
20 V2.78 Add face recognition event handler config October 30, 2019
89
Add ObjectPlacementDetection
28 V2.86 November 5,2020
ObjectRemovalDetection
Di
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
.o
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
visible identification to inform data subject the existence of surveillance area and providing related
contact.
Foreword IV
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
Da
website. If there is inconsistency between paper manual and the electronic version, the
hu
updates might cause some differences between the actual product and the Manual. Please
contact the customer service for the latest program and supplementary documentation.
TT
There still might be deviation in technical data, functions and operations description, or
errors in print. If there is any doubt or dispute, please refer to our final explanation.
P
Upgrade the reader software or try other mainstream reader software if the Manual (in PDF
AP
occurred when using the device.
89
Foreword V
Table of Contents
Cybersecurity Recommendations ........................................................................................................... I
Da
2 References........................................................................................................................................... 2
3 Definitions ........................................................................................................................................... 3
aH
3.1 Abbreviations................................................................................................................................. 3
3.2 Syntax Convention ........................................................................................................................ 3
TT
4.4.1 Snap.................................................................................................................................. 13
st
Table of Contents VI
4.5.12 Get Video Input Capability .............................................................................................. 30
4.5.13 Get Coordinates of Current Window .............................................................................. 33
4.5.14 Set Coordinates of Current Window ............................................................................... 34
4.5.15 Video Out ........................................................................................................................ 34
4.5.16 Smart Code ..................................................................................................................... 36
4.5.17 Get Decoder Caps .......................................................................................................... 36
4.5.18 [Config] PrivacyMasking ................................................................................................. 37
Da
4.11.14 Encrypted Download Media File with the File Name .................................................. 135
4.12 User management .................................................................................................................. 136
2.
Table of Contents IX
5.1.2 Sharpness ....................................................................................................................... 147
5.1.3 Flip, Mirror and Rotate90 ................................................................................................ 148
5.2 Exposure ................................................................................................................................... 149
5.2.1 Exposure Config ............................................................................................................. 149
5.3 Backlight .................................................................................................................................... 151
5.3.1 Backlight Config .............................................................................................................. 151
5.4 White Balance ........................................................................................................................... 152
Da
Table of Contents X
7.3.2 Enable Tour ..................................................................................................................... 181
7.3.3 Monitor Collection ........................................................................................................... 181
8 Video Analyse APIs ........................................................................................................................... 183
8.1 Video Analyse ........................................................................................................................... 183
8.1.1 Get Video Analyse Capability ......................................................................................... 183
8.1.2 Video Analyse Global...................................................................................................... 184
8.1.3 Video Analyse Rule......................................................................................................... 185
Da
Table of Contents XI
10 Thermography and Radiometry APIs ............................................................................................ 217
10.1 Thermography Manager ......................................................................................................... 217
10.1.1 Get Capability of Thermography .................................................................................. 217
10.1.2 Thermography Options ................................................................................................. 218
10.1.3 Get ExternSystem Information ..................................................................................... 220
10.1.4 Get Information of Preset Mode ................................................................................... 220
10.1.5 Get Optimized Region Information ............................................................................... 221
Da
11.2.5 Get the Total Number of Records of Access Control Custom Password ..................... 243
s.r
controlling camera functions (for example, PTZ and focus), and getting and setting internal
parameter values.
hu
The video products serve as a server. The client sends requests to server, and then server handles
aH
Overview 1
[1] RFC 2616 Hypertext Transfer Protocol-HTTP/1.1
2 References
[2] RFC 2617 HTTP Authentication: Basic and Digest Access Authentication
Da
References 2
3 Definitions
3.1 Abbreviations
Da
In URL syntax and in descriptions of API parameters, text in italic within angle brackets
P
denotes content that should be replaced with either a value or a string. When replacing the
AP
text string, the angle brackets must also be replaced. For example, <server> in URL syntax
is replaced with the IP number of server, e.g., 192.168.1.108.
IV
String shown in bold face denotes a brief explanatory note of the string close to it.
Name-value pair in square brackets denotes content that is optional. For example,
2.
"http ://<server>/cgi-bin/snapshot.cgi[?channel=1]" can be like this
89
"http ://<server>/cgi-bin/snapshot.cgi".
The API syntax must follow the standard of URI. (RFC 3986: Uniform Resource Identifiers
fo
(URI) Generic Syntax); that is, spaces and other reserved characters (e.g, ":", "/", "?", "@",
r1
";", "=", "+", ",", "$", "&") within a name-value pair should be replaced with %< ASCII hex>.
For example, the blank should be replaced with %20.
00
To describe the range of a variable, we use some symbols such as "[]" and "{}". For
example, "[0-100]" denotes an integer not less than 0 and not larger than 100. "{0, 1, 2, 3}"
M
"[]" following a string denotes an array. The index is an integer and starts from 0. For
example, "Snap[channel]" may be "Snap[0]" "Snap[0]" etc.
A
The variable may be different types: string, integer, bool or float. Integer is 32 bits. The
Di
"O"means optional.
rib
<protocol>://<server><abs_path>[?query]
s.r
protocol: URL scheme for the particular request. The http and https protocols are both supported in
.o
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.
Definitions 3
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".
query: The query field is a string of information to be interpreted by the resource. It consists of
resource-related parameters. And it must be listed in name-value pair syntax
(p1=v1&p2=v2&…&pn=vn).
For example: http://192.168.1.108/cgi-bin/snapshot.cgi?channel=1
Da
Return:
HTTP/1.1 <HTTP code> <HTTP text>\r\n
TT
Table 3-1
AP
200 OK
resource will be returned in the HTTP text.
The request had bad syntax or was inherently
2.
service.
The server has not found anything matching the
00
501 Not Implemented The server has not implemented the service.
A
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 a json object, or just a line with a word
Di
"OK".
st
HTTP/1.1 200 OK
Server: xxx
ut
Content-Length: <length>
io
status.Focus=0.5
n
status.Zoom=0.5
s.r
…
.o
HTTP/1.1 200 OK
Server: xxx
Content-Length: <length>
OK
Definitions 4
If the HTTP code is not 200, means the API execute failed, and the response data in http body
maybe empty, or just two line, first line is a word "Error"to indicate error happened, the second line
contain error detail.
Example: request does not fit with syntax.
HTTP/1.1 404 Not Found
Server: xxxx
Example: Request spells wrong.
Da
Server: xxx
Content-Length: <length>
aH
Error
TT
Bad Request!
Example: If the request fits with syntax but an error occurs while the server handles it, the response
P
Server: xxx
Content-Length: <length>
2.
Error
89
3.5 Authentication
r1
Video products support either basic authentication or digest authentication, see RFC 2617 for detail.
00
If the http request sent by client does not provide valid "Authorization" header information, video
M
products would return HTTP status code 401 and some information for authentication, then client
should calculate authentication information according RFC 2617, and sent request again with
EG
authentication information using “Authorization” header. Video products return the required resource
only if authorization information correct.
A
For example:
Di
The client calculates the digest authorization using information like username, password, nonce,
HTTP method and URI with MD5, and then sends it to server.
For example:
Definitions 5
Authorization: Digest username="admin", realm="DH_00408CA5EA04", nc=00000001,
cnonce="0a4f113b", qop="auth",
nonce="000562fdY631973ef04f77a3ede7c1832ff48720ef95ad",
uri="/cgi-bin/magicBox.cgi?action=getLanguageCaps",
response="65002de02df697e946b750590b44f8bf"
Da
3.6 Conventions
hu
aH
3.6.1 Channels
TT
http://<server>/cgi-bin/mjpg/video.cgi[?channel=<ChannelNo>
AP
ChannelNo: integer, must starts from 1. Default is 1 if not present. But for response, the ‘ChannelNo’
should start from 0. In other words, the request channel 1 equals response channel 0.
IV
2.
89
fo
r1
00
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
Definitions 6
4
The APIs specified in this section are supported by all video products.
General APIs
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 also
TT
supplies basic authentication and digest authentication ways. The authentication process is similar with
P
"3.5 Authentication".
AP
The rtsp url parameters format is in following table. If the stream does not exist or not enabled, it will
response with error result.
IV
URL rtsp://<server>:[port]/cam/realmonitor
2.
subtype int O be :
EG
0 : main stream
1 : extra stream 1
A
2 : extra stream 2
URL Example
Di
rtsp://192.168.1.108:554/cam/realmonitor?channel=1&subtype=1
st
rib
It's similar with "4.1.1 Get Real-Time Stream". Except there are parameters "starttime" and
io
"endtime".
n
URL rtsp://<server>:[port]/cam/playback
s.r
General APIs 7
rtsp://192.168.1.108:554/cam/playback?channel=1&starttime=2012_09_15_12_37_05&endtime=2012_
09_15_18_34_14
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
P
Method GET
89
1-Extra Stream 1
EG
2-Extra Stream 2
Request Example
A
http://192.168.1.108/cgi-bin/mjpg/video.cgi?channel=1&subtype=0
Di
Response Example
HTTP/1.1 200 OK
ut
Server: Device/1.0
io
--<boundary>
Content-Type: image/jpeg
.o
Content-Length:<image size>
.
General APIs 8
<JPEG image data>
--<boundary>
4.2 Common
Da
Get Configure
aH
Get configure detail by name. Each configure name has it’s specific configure detail. Please refer to
configure detail APIs in later chapters.
TT
Method GET
AP
Request Example
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=SmartEncode
89
fo
Response Example
table.SmartEncode.Enable=true
Di
table.SmartEncode.Extra[0]=true
st
table.SmartEncode.Extra[1]=false
rib
Set Configure
ut
Set configure detail by name. Each configure name has it’s specific configure detail. Please refer to
io
Method GET
Request Params ( key=value format in URL )
.o
General APIs 9
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&SmartEncode.Enable=true&SmartEn
code.Extra[0]=true&SmartEncode.Extra[1]=false
4.3 Audio
hu
aH
Method GET
Request Params ( key=value format in URL )
IV
http://192.168.1.108/cgi-bin/devAudioInput.cgi?action=getCollect
89
Response Example
M
result=1
EG
Method GET
rib
Request Example
io
http://192.168.1.108/cgi-bin/devAudioOutput.cgi?action=getCollect
n
s.r
General APIs 10
4.3.3 Post Audio Stream
Table 4-1
http://<server>/cgi-bin/audio.cgi?action=postAudio&<paramName>=<paramValue>[&
Syntax
<paramName>=<paramValue>…]
Method POST
Da
The URL of transmit a single part, channel 1 audio stream(encoded with G.711 A-law)
is:
aH
http://192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=
1
TT
example:
POST /cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1 HTTP/1.1
P
Content-Type: Audio/G.711A
AP
Content-Length: 9999999
IV
<Audio data>
2.
<Audio data>
89
http://192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=multipart&channel=
r1
1
00
example:
M
--<boundary>
Content-Type: Audio/G.711A
A
Content-Length: 800
Di
st
<Audio data>
rib
--<boundary>
Success
OK
ut
Return
Parameters in URL:
io
Comment
The paramName and paramValue are in the table below.
n
General APIs 11
MIME 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
Da
Audio/MPEG2 MPEG2
Audio/AMR AMR
hu
Audio/AAC AAC
aH
Table 4-2
P
http://<server>/cgi-bin/audio.cgi?action=getAudio&<paramName>=<paramValue>[&<
Syntax
AP
paramName>=<paramValue>…]
Method GET
IV
The URL of Request a single part, channel 1 audio stream(encoded with G.711 A-law)
89
is:
http://192.168.1.108/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=
fo
1
r1
If the request was successful, the server returns a continuous flow of audio packets.
00
Content-Type: Audio/G.711A
Body:
A
<Audio data>
Di
<Audio data>
Example
st
The URL of Request a multipart, channel 1 audio stream(encoded with G.711 A-law) is:
ut
http://192.168.1.108/cgi-bin/audio.cgi?action=getAudio&httptype=multipart&channel=1
io
If the request was successful, the server returns a continuous flow of audio packets.
n
The content type is "multipart/x-mixed-replace" and each audio packet ends with a
s.r
boundary string.
Return:
.o
General APIs 12
<Audio data>
--<boundary>
Success
OK
Return
Parameters in URL:
Comment
The paramName and paramValue are in the table below.
Da
Appendix:
4.4 Snapshot
AP
4.4.1 Snap
IV
2.
Table 4-3
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Snap
fo
Method GET
r1
table.Snap[0].HolidayEnable=false
table.Snap[0].TimeSection[0][0]=6 00:00:00-23:59:59
M
table.Snap[0].TimeSection[0][1]=0 00:00:00-23:59:59
EG
table.Snap[0].TimeSection[0][2]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[0][3]=0 00:00:00-23:59:59
A
table.Snap[0].TimeSection[0][4]=0 00:00:00-23:59:59
Di
table.Snap[0].TimeSection[1][1]=0 00:00:00-23:59:59
rib
table.Snap[0].TimeSection[1][2]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[1][3]=0 00:00:00-23:59:59
ut
table.Snap[0].TimeSection[1][4]=0 00:00:00-23:59:59
io
table.Snap[0].TimeSection[1][5]=0 00:00:00-23:59:59
n
…
s.r
Response format:
table. Snap[channelNo].TimeSection[weekday][configNo]=1 00:00:00-23:59:59
.o
channelNo: integer, array index starts from 0, which means video channel (equals to
Comment
.
General APIs 13
Table 4-4
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set snap config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Snap[0].TimeSection
Example
[0][0]=1%2012:00:00-18:00:00
Da
Success
OK
Return
hu
In table below,
aH
ch: integer, array index starts from 0, which means video channel (equals to video
Comment channel index -1, and so 0 means channel 1).
wd: week day index, range is [0—6] (Sunday — Saturday).
TT
Appendix:
AP
Bit4,Bit4,Bit7~Bit31-reserved。
Di
Table 4-5
Syntax http://<server>/cgi-bin/ snapshot.cgi[?channel=<ChannelNo>]
ut
Method GET
io
Example http://192.168.1.108/cgi-bin/snapshot.cgi or
http://192.168.1.108/cgi-bin/snapshot.cgi?channel=1
.o
Success
Image of jpg format.
.
Return
Comment ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
General APIs 14
4.4.3 Subscribe to Snapshot
Table 4-6
http://<server>/cgi-bin/snapManager.cgi?action=attachFileProc&Flags[0]=Event&Event
Syntax s=[<eventCode>,<eventCode>...][&channel=<ChannelNo>][&heartbeat=<Heartbeat
>]
Method GET
Da
http://192.168.1.108/cgi-bin/snapManager.cgi?action=attachFileProc&Flags[0]=Event&
Example
Events=[VideoMotion%2CVideoLoss]&heartbeat=5
aH
--<boundary>\r\n
Content-Type: text/plain\r\n
TT
Events[0].CountInGroup=1
AP
Events[0].IndexInGroup=1
Events[0].Lane=1
IV
Events[0].Data.PTS= 42949485818.0
2.
Events[0].TrafficCar.PlateNumber=Z A12345
Events[0].TrafficCar. DeviceAddress=Hangzhou
89
Success ……
Return Events[1].Code=TrafficJunction
fo
……
r1
--<boundary>
Content-Type: image/jpeg
00
Content-Length:<image size>
M
Content-Type: text/plain
Content-Length:<data length>
A
Heartbeat
Di
--<boundary>
st
rib
ut
io
n
s.r
.o
.
General APIs 15
ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
Heartbeat: integer,range is [1,60],unit is second.If the URL 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 meaage is the string "Heartbeat".
eventCode: it can be any one of the standard codes defined in DHIIF.
eventCode includes:
VideoMotion: motion detection event
Da
TrafficSuspiciousCar: when the vehicle is in the blacklist, it wiil produce this event.
FaceRecognition: face recognition event.
fo
Parameters in Response:
GroupID: string, the ID of the snapshot event
M
IndexInGroup: integer, the index of the snapshots. For example, the CountInGroup is
3, the IndexInGroup is 1,it means there are 3 pictures in this snapshot event, and this is
A
Table 4-7
io
http://<server>/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStre
Syntax
n
am
s.r
Method GET
Description Get max extra stream count.
.o
http://192.168.1.108/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExt
Example
.
raStream
Success
table.MaxExtraStream=1
Return
Comment MaxExtraStream: max extra stream numbers. It can be 1, 2 or 3.
General APIs 16
4.5.2 Get Encode Capability
Table 4-8
Syntax http://<server>/cgi-bin/encode.cgi?action=getCaps
Method GET
Description Get encode capabilities.
Da
Example http://192.168.1.108/cgi-bin/encode.cgi?action=getCaps
Success caps.PlaybackCompressSplitNumList[0]=1
hu
Return caps.PlaybackCompressSplitNumList[1]=2
caps.PlaybackCompressSplitNumList[2]=4
aH
caps.PreviewMode=SplitSnap
caps.VideoEncodeDevices[0].CoverAreaPercent=100
TT
caps.VideoEncodeDevices[0].CoverCount=4
caps.VideoEncodeDevices[0].LadenBitrate=162201600
P
caps.VideoEncodeDevices[0].MaxCIFPFrameSize=40
AP
caps.VideoEncodeDevices[0].MaxExtraStream=1
caps.VideoEncodeDevices[0].MinCIFPFrameSize=7
IV
caps.VideoEncodeDevices[0].RecordIndividualResolution=true
2.
caps.VideoEncodeDevices[0].SupportIndividualResolution=true
caps.VideoEncodeDevices[0].TitleCount=4
89
Comment —
fo
Table 4-9
00
http://<server>/cgi-bin/encode.cgi?action=getConfigCaps[&channel=<ChannelNo>&<p
Syntax
M
aramName>=<paramValue>&<paramName>=<paramValue>...]
Method GET
EG
http://192.168.1.108/cgi-bin/encode.cgi?action=getConfigCaps&channel=1&Encode[0].
Example
MainFormat[0].Video.Width=1920&Encode[0].MainFormat[0].Video.Height=1080
Di
headMain.Video.BitRateOptions=448,2560
st
headMain.Video.CompressionTypes=H.264,MJPG
rib
headMain.Video.FPSMax=25
headMain.Video.ResolutionTypes=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
ut
Success headExtra.Video.BitRateOptions=80,448
io
Return headExtra.Video.CompressionTypes=H.264,MJPG
headExtra.Video.FPSMax=25
n
headExtra.Video.ResolutionTypes=D1,CIF
s.r
headSnap.Video.CompressionTypes=H.264,MJPG
headSnap.Video.ResolutionTypes=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
.o
.
General APIs 17
Parameters in URL:
ChannelNo: integer,video channel index which starts from 1.it is a optional parameter, if
it is not present in the URL, the value of the channelno will be regarded as 1.
The description of <paramName> and <paramValue> is the same as 4.5.5(Set encode
config).
Parameters in Response:
headMain= caps[Channel].MainFormat[RecordType]
Da
headExtra = caps[Channel].ExtraFormat[ExtraStream]
headSnap = caps[Channel].SnapFormat[SnapType]
hu
Channel: integer, array index starts from 0, which means video channel (equals to video
aH
0 = regular record
P
ExtraStream:
IV
0 = extra stream 1
1 = extra stream 2
2.
2 = extra stream 3
89
SnapType:
0 = regular snapshot
fo
ResolutionTypes string
Range is in below Resolution list.
.o
General APIs 18
Fixed Resolution Name Size in PAL Size in NTSC
"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 —
Da
800 x 592
"SVGA1" 800 x 600 —
aH
1600 x 1200
"WUXGA" 1920 x 1200 —
r1
1280 x 720
"1080P" 1920 x 1080 —
M
General APIs 19
Fixed Resolution Name Size in PAL Size in NTSC
"3072x2048" 3072x2048 —
Table 4-10
Syntax
P
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Encode
Method GET
AP
table.Encode[0].MainFormat[0].Audio.Bitrate=64
2.
table.Encode[0].MainFormat[0].Audio.Channels[0]=0
89
table.Encode[0].MainFormat[0].Audio.Compression=G.711A
table.Encode[0].MainFormat[0].Audio.Depth=16
fo
table.Encode[0].MainFormat[0].Audio.Frequency=8000
table.Encode[0].MainFormat[0].Audio.Mode=0
r1
table.Encode[0].MainFormat[0].Audio.Pack=DHAV
00
table.Encode[0].MainFormat[0].AudioEnable=true
table.Encode[0].MainFormat[0].Video.resolution=1920x1080
M
table.Encode[0].MainFormat[0].Video.BitRate=4096
EG
table.Encode[0].MainFormat[0].Video.BitRateControl=CBR
table.Encode[0].MainFormat[0].Video.Compression=H.264
A
table.Encode[0].MainFormat[0].Video.CustomResolutionName=1080P
table.Encode[0].MainFormat[0].Video.FPS=18
Di
Success
table.Encode[0].MainFormat[0].Video.GOP=36
Return
st
table.Encode[0].MainFormat[0].Video.Height=1080
rib
table.Encode[0].MainFormat[0].Video.Pack=DHAV
table.Encode[0].MainFormat[0].Video.Profile=High
ut
table.Encode[0].MainFormat[0].Video.Quality=4
io
table.Encode[0].MainFormat[0].Video.QualityRange=6
table.Encode[0].MainFormat[0].Video.SVCTLayer=1
n
table.Encode[0].MainFormat[0].Video.Width=1920
s.r
table.Encode[0].MainFormat[0].Video.Priority=0
.o
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
General APIs 20
table.Encode[0].MainFormat[1].Audio.Mode=0
table.Encode[0].MainFormat[1].Audio.Pack=DHAV
table.Encode[0].MainFormat[1].AudioEnable=true
table.Encode[0].MainFormat[1].Video.resolution=1920x1080
table.Encode[0].MainFormat[1].Video.BitRate=4096
table.Encode[0].MainFormat[1].Video.BitRateControl=CBR
table.Encode[0].MainFormat[1].Video.Compression=H.264
Da
table.Encode[0].MainFormat[1].Video.CustomResolutionName=1080P
table.Encode[0].MainFormat[1].Video.FPS=18
hu
table.Encode[0].MainFormat[1].Video.GOP=36
aH
table.Encode[0].MainFormat[1].Video.Height=1080
table.Encode[0].MainFormat[1].Video.Pack=DHAV
table.Encode[0].MainFormat[1].Video.Profile=High
TT
table.Encode[0].MainFormat[1].Video.Quality=4
P
table.Encode[0].MainFormat[1].Video.QualityRange=6
AP
table.Encode[0].MainFormat[1].Video.SVCTLayer=1
table.Encode[0].MainFormat[1].Video.Width=1920
IV
table.Encode[0].MainFormat[1].Video.Priority=0
table.Encode[0].MainFormat[1].VideoEnable=true
2.
table.Encode[0].MainFormat[2].Audio.Bitrate=64
89
table.Encode[0].MainFormat[2].Audio.Channels[0]=0
table.Encode[0].MainFormat[2].Audio.Compression=G.711A
fo
table.Encode[0].MainFormat[2].Audio.Depth=16
r1
table.Encode[0].MainFormat[2].Audio.Frequency=8000
table.Encode[0].MainFormat[2].Audio.Mode=0
00
table.Encode[0].MainFormat[2].Audio.Pack=DHAV
table.Encode[0].MainFormat[2].AudioEnable=true
M
table.Encode[0].MainFormat[2].Video.resolution=1920x1080
EG
table.Encode[0].MainFormat[2].Video.BitRate=4096
table.Encode[0].MainFormat[2].Video.BitRateControl=CBR
A
table.Encode[0].MainFormat[2].Video.Compression=H.264
Di
table.Encode[0].MainFormat[2].Video.CustomResolutionName=1080P
table.Encode[0].MainFormat[2].Video.FPS=18
st
table.Encode[0].MainFormat[2].Video.GOP=36
rib
table.Encode[0].MainFormat[2].Video.Height=1080
table.Encode[0].MainFormat[2].Video.Pack=DHAV
ut
table.Encode[0].MainFormat[2].Video.Profile=High
io
table.Encode[0].MainFormat[2].Video.Quality=4
n
table.Encode[0].MainFormat[2].Video.QualityRange=6
table.Encode[0].MainFormat[2].Video.SVCTLayer=1
s.r
table.Encode[0].MainFormat[2].Video.Width=1920
.o
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
General APIs 21
table.Encode[0].MainFormat[3].Audio.Frequency=8000
table.Encode[0].MainFormat[3].Audio.Mode=0
table.Encode[0].MainFormat[3].Audio.Pack=DHAV
table.Encode[0].MainFormat[3].AudioEnable=true
table.Encode[0].MainFormat[3].Video.resolution=704x576
table.Encode[0].MainFormat[3].Video.BitRate=2048
table.Encode[0].MainFormat[3].Video.BitRateControl=VBR
Da
table.Encode[0].MainFormat[3].Video.Compression=H.264
table.Encode[0].MainFormat[3].Video.FPS=25
hu
table.Encode[0].MainFormat[3].Video.GOP=50
aH
table.Encode[0].MainFormat[3].Video.Height=576
table.Encode[0].MainFormat[3].Video.Pack=DHAV
table.Encode[0].MainFormat[3].Video.Profile=Main
TT
table.Encode[0].MainFormat[3].Video.Quality=4
P
table.Encode[0].MainFormat[3].Video.QualityRange=6
AP
table.Encode[0].MainFormat[3].Video.SVCTLayer=1
table.Encode[0].MainFormat[3].Video.Width=704
IV
table.Encode[0].MainFormat[3].Video.Priority=0
table.Encode[0].MainFormat[3].VideoEnable=true
2.
table.Encode[0].ExtraFormat[0].Audio.Bitrate=64
89
…
table.Encode[0].SnapFormat[0].Audio.Bitrate=64
fo
…
r1
Parameters in Response:
The format of the config is head.configItems. The head can be:
00
Channel: integer, array index starts from 0, which means video channel (equals to video
A
Type:
Comment
0 = regular encode
st
2 = alarm encode
3= emergency encode
ut
ExtraStream:
io
0 = extra stream 1
n
1 = extra stream 2
2 = extra stream 3
s.r
Table 4-11
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>...]
Method GET
General APIs 22
Description Set encode config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Encode[1].MainForm
Example
at[0].Video.Compression=MPEG4&
Success
OK
Return
Parameters in URL:
In table below,
Da
head=Encode[Channel].MainFormat[RecordType] (or)
Encode[Channel].ExtraFormat[ExtraStream]
hu
aH
Channel: integer, array index starts from 0, which means video channel(equals to video
channel index -1, and so 0 means channel 1).
Comment
TT
RecordType:
0 = regular record
P
2 = alarm record
ExtraStream:
IV
0 = extra stream 1
1 = extra stream 2
2.
2 = extra stream 3
89
Unit is Kbps
head.Video.BitRate integer
Range depends on capability in GetVideoConfigCaps
00
per frame.
rib
head.Video.FPS float
>1.0: several frames/second. FPS=3: 3 frames per
second.
ut
Range is [1—100].
n
General APIs 23
ParamName ParamValue type Description
Range is [1—6].
Image Quality, available when
head.Video.Quality integer Video.BitRateControl=VBR
1: worst quality
6: best quality
Range is 0 or 1
Da
Unit is kbps
P
GetAudioConfigCaps
Range depends on capacity in
head.Audio.Compression string
IV
GetAudioConfigCaps
head.Audio.Depth integer Audio sampling depth
2.
Range is {0,1,2,3,4,5,6,7}
Audio encode mode.
fo
0: 4.75kbps,
r1
1: 5.15 kbps,
2: 5.9 kbps,
head.Audio.Mode integer
00
3: 6.7 kbps,
4: 7.4 kbps,
M
5: 7.95 kbps,
EG
6: 10.2 kbps,
7: 12.2 kbps,
A
Table 4-12
io
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoEncodeROI
Method GET
n
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoEncode
Example
.o
ROI
head.Regions[0][0]=0
.
head.Regions[0][1]=0
Success
head.Regions[0][2]=0
Return
head.Regions[0][3]=0
head.Regions[1][0]=0
General APIs 24
…
head.Quality=4,
head.Main=true,
head.Extra1=true,
head.Extra2=true,
head.Extra3=true,
head.Snapshot=true
Da
head.DynamicTrack=true,
head.DynamicDelayTime=60
hu
Parameters in Response:
head=table.VideoEncodeROI[ChannelNo]
aH
Comment
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
TT
Table 4-13
AP
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
IV
Method GET
2.
Example
DynamicTrack=true
Success
fo
OK
Return
r1
Parameters in URL:
paramName and paramValue are as table below.
00
In table below,
Comment
M
head = VideoEncodeROI[ChannelNo]
ChannelNo: integer, array index starts from 0, which means video channel(equals to
EG
Appendix:
ParamName ParamValue type Description
Di
Table 4-14
n
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ChannelTitle
s.r
Method GET
Description Get the title of the video channel.
.o
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ChannelTitle
.
Success
table.ChannelTitle[Channel].Name=CAM1|123
Return
General APIs 25
Parameters in Response:
Channel: integer, array index starts from 0, which means video channel (equals to
Comment
video channel index -1, and so 0 means channel 1).
Name: string, which means title content. character '|' means newlines.
Set channel title
Table 4-15
Da
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>
hu
Method GET
Description Set the title of the channel.
aH
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ChannelTitle[1].Nam
Example
e= test1|test2
TT
Success
OK
Return
P
video frames.
Please refer to SetVideoWidgetConfig.
IV
2.
Parameters in URL:
Channel Name Format:
89
Comment
ChannelTitle[Channel].Name
Channel: integer, array index starts from 0, which means video channel(equals to video
fo
Name: string, which means title content. Character '|' means newlines.
00
Table 4-16
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=getCollect
Di
Method GET
st
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCollect
Success
result=1
ut
Return
io
Comment —
n
Table 4-17
Syntax http://<server>/cgi-bin/devVideoOutput.cgi?action=getCollect
.
Method GET
Description Get the video output channel numbers.
Example http://192.168.1.108/cgi-bin/devVideoOutput.cgi?action=getCollect
Success result=2
General APIs 26
Return
Comment —
nputChannels
Method GET
hu
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxRe
moteInputChannels
TT
Success table.MaxRemoteInputChannels=16
Return
P
Table 4-19
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoStandard
fo
Method GET
Description Get video standard config.
r1
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoStandar
00
d
Success table.VideoStandard=PAL
M
Return
EG
Comment —
Set video standard
A
Table 4-20
Di
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&VideoStandard=<paramV
st
alue>
Method GET
rib
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoStandard=PAL
Success OK
io
Return
n
Table 4-21
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget
Method GET
General APIs 27
Description Video widget config contains Channel Title, User-defined Title, Covers and Time Title
parameters, defines the background color, front color and positions of channel title and
time title, User-defined title and defines the regions which are not visible (cover).
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget
Success head.BackColor[0]=0
Return head.BackColor[1]=0
head.BackColor[2]=0
Da
head.BackColor[3]=128
head.EncodeBlend=true
hu
head.FrontColor[0]=255
aH
head.FrontColor[1]=255
head.FrontColor[2]=255
head.FrontColor[3]=0
TT
head.Rect[0]=0
P
head.Rect[1]=8191
AP
head.Rect[2]=0
head.Rect[3]=8191
IV
…
Comment Parameters in Response:
2.
head=table.VideoWidget[Channel].ChannelTitle (or)
89
table.VideoWidget[Channel].Covers[CoReg] (or)
table.VideoWidget[Channel].TimeTitle
fo
table.VideoWidget[Channel].UserDefinedTitle[Index]
r1
Channel: integer, array index starts from 0, which means video channel (equals to
00
0 = region 1
EG
1 = region 2
2 = region 3
A
3 = region 4
Di
Index: integer, User-defined title index, now only index 0 is valid, others are reserved.
Set video widget config
st
rib
Table 4-22
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
ut
alue>[&<paramName>=<paramValue>…]
Method GET
io
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[1].Cov
s.r
Example ers[0].BackColor[0]=128&VideoWidget[1].Covers[0].BackColor[1]=128&VideoWidget[1]
.Covers[0].BackColor[2]=128&VideoWidget[1].Covers[0].BackColor[3]=0
.o
Success
.
OK
Return
Parameters in URL:
Comment In table below,
headChannelTitle = VideoWidget[Channel].ChannelTitle
General APIs 28
headCover = VideoWidget[Channel].Covers[CoReg]
headTimeTitle = VideoWidget[Channel].TimeTitle
headUserDefinedTitle = VideoWidget[Channel].UserDefinedTitle[Index]
Channel: integer, array index starts from 0, which means video channel(equals to video
channel index -1, and so 0 means channel 1).
CoReg: Cover region index. Covers is an array which contains multiple cover regions
Da
0 = region 1
1 = region 2
hu
2 = region 3
3 = region 4
aH
Index: integer, User-defined title index, now only index 0 is valid, others are reserved.
TT
Appendix:
P
Range is [0—255].
headCover.BackColor[0]
BackColor[0]:red value
headCover.BackColor[1]
IV
headCover.BackColor[3]
BackColor[3]: alpha value
89
FrontColor[0]:red value
headCover.FrontColor[1]
r1
(bottom)
headChannelTitle.BackColor[0]
st
headChannelTitle.BackColor[1]
rib
integer
headChannelTitle.BackColor[2]
headChannelTitle.BackColor[3]
ut
headChannelTitle.FrontColor[0]
n
headChannelTitle.FrontColor[1]
integer
headChannelTitle.FrontColor[2]
s.r
headChannelTitle.FrontColor[3]
.o
General APIs 29
ParamName ParamValue type Description
newlines.
Limit: Support 2 lines at most.
headUserDefinedTitle.TextAlign integer Range is the same with
headUserDefinedTitle.BackColor[0] headChannelTitle
headUserDefinedTitle.BackColor[1] These are configs about User-defined
integer
headUserDefinedTitle.BackColor[2] title.
Da
headUserDefinedTitle.BackColor[3]
headUserDefinedTitle.EncodeBlend bool
hu
headUserDefinedTitle.FrontColor[0]
aH
headUserDefinedTitle.FrontColor[1]
integer
headUserDefinedTitle.FrontColor[2]
headUserDefinedTitle.FrontColor[3]
TT
headUserDefinedTitle.Rect[0]
P
headUserDefinedTitle.Rect[1]
integer
AP
headUserDefinedTitle.Rect[2]
headUserDefinedTitle.Rect[3]
IV
headTimeTitle.BackColor[0]
headTimeTitle.BackColor[1]
2.
integer
headTimeTitle.BackColor[2]
89
headTimeTitle.BackColor[3]
headTimeTitle.EncodeBlend bool
fo
headTimeTitle.FrontColor[1] headChannelTitle.
integer
headTimeTitle.FrontColor[2] These are configs about time title.
00
headTimeTitle.FrontColor[3]
headTimeTitle.Rect[0]
M
headTimeTitle.Rect[1]
integer
EG
headTimeTitle.Rect[2]
headTimeTitle.Rect[3]
A
Table 4-23
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=getCaps&channel=<ChannelNo>
ut
Method GET
io
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCaps&channel=1
s.r
caps.AutoSyncPhase=false
caps.Backlight=2
.o
caps.BrightnessCompensation=true
Success
.
caps.ChipID=0
Return
caps.CoverCount=4
caps.CoverType=1
caps.CustomManualExposure=true
General APIs 30
caps.DayNightColor=true
caps.DayNightColorIO=false
caps.DoubleExposure=0
caps.DownScaling=false
caps.EEModeRange=100
caps.ElectricFocus=false
caps.Exposure=16
Da
caps.ExposureMode=31
caps.ExternalSyncInput=false
hu
caps.FishEye=false
caps.FlashAdjust=false
aH
caps.Flip=true
caps.FormatCount=5
TT
caps.Gain=true
P
caps.GainAuto=true
caps.Gamma=true
AP
caps.GammaModeRange=100
IV
caps.GlareInhibition=1
caps.HorizontalBinning=0
2.
caps.IRCUT=true
89
caps.ImageEnhancement.LevelRange[0]=0
caps.ImageEnhancement.LevelRange[1]=100
fo
caps.ImageEnhancement.Support=true
caps.InfraRed=true
r1
caps.Iris=true
00
caps.IrisAuto=true
caps.LadenBitrate=972000
M
caps.LimitedAutoExposure=true
EG
caps.MaxExposureTime=300.0
caps.MaxExposureTime1=0.0
A
caps.MaxHeight=1080
caps.MaxMultiProfile=3
Di
caps.MaxWidth=1920
st
caps.MeteringRegionCount=0
rib
caps.MinExposureTime=1.0
caps.MinExposureTime1=0.0
ut
caps.Mirror=true
io
caps.MultiOptions=false
caps.NightOptions=true
n
caps.ReferenceLevel=false
s.r
caps.Rotate90=true
.o
caps.SetColor=true
caps.SignalFormats=Inside
.
caps.SignalType[0]=VGA
caps.SnapshotExposure=false
caps.SupportProfile=false
caps.SupportWhiteLevel=true
General APIs 31
caps.SupportWriteLevel=false
caps.SyncChipChannels=false
caps.SyncFocus=false
caps.TitleCount=4
caps.TridimDenoise=2
caps.TridimDenoiseDetails=0
caps.UTC=0
Da
caps.UpScaling=false
caps.Version=0
hu
caps.VerticalBinning=0
caps.VideoInDenoise.2D.LevelRange[0]=0
aH
caps.VideoInDenoise.2D.LevelRange[1]=100
caps.VideoInDenoise.2D.Support=true
TT
caps.VideoInDenoise.3D.3DAutoType.ModRange[0]=0
P
caps.VideoInDenoise.3D.3DAutoType.ModRange[1]=100
caps.VideoInDenoise.3D.Support=true
AP
caps.VideoInDenoise.Support=true
IV
caps.WhiteBalance=3
caps.WideDynamicRange=1
2.
Parameters in URL:
89
Appendix:
00
CustomManualExposur
bool, true: support use defined manual exposure time
e
ut
DayNightColor bool true: support color alternate between day and night.
io
DownScaling bool true: support down scaling, binning mode not included.
n
General APIs 32
Field in response Value type Description
1 — support 2 pixel binning,
2 — support 3 pixel binning
VerticalBinning integer 4 — support 4 pixel binning
…
2^n — support n+2 pixel binning
InfraRed bool true: support Infra compensation
Da
Unit is Kbps.
aH
1_3M — 1280*960
Di
balance
.
General APIs 33
http://<server>/cgi-bin/devVideoInput.cgi?action=getCurrentWindow&channel=<Chann
Syntax
elNo>
Method GET
Description Get the coordinates of the current window.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCurrentWindow&channel=1
rect[0]=500
Success rect[1]=500
Da
Return rect[2]=5000
rect[3]=5000
hu
Parameters in URL:
aH
Table 4-25
http://<server>/cgi-bin/devVideoInput.cgi?action=setCurrentWindow&channel=<Chann
2.
Syntax
elNo>&rect[0]=<rect0>&rect[1]=<rect1>&rect[2]=<rect2>&rect[3]=<rect3>
89
Method GET
Description Set the coordinates of the current window.
fo
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=setCurrentWindow&channel=1&
Example
r1
rect[0]=0&rect[1]=0&rect[2]=5000&rect[3]=5000
Success
OK
00
Return
Parameters in URL:
M
rect0 & rect1 & rect2 & rect3: relative coordinates, range is 0-8192.{0,0,0,0} top-left,
{8192,0,0,0} top-right, {0,8192,0,0} bottom-left, {8192,8192,0,0} bottom-right
A
Di
Table 4-26
ut
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoOut
io
Method GET
Description Get video out config.
n
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoOut
s.r
head.Margin[0]=0
.o
head.Margin[1]=0
head.Margin[2]=0
.
Success
head.Margin[3]=0
Return
head.Color.Brightness=50
head.Color. Contrast =50
head.Color. Satuation =50
General APIs 34
head.Color. Hue =50
head.Mode. Width =800
head.Mode. Height=600
head.Mode. BPP =16
head.Mode. Format ="Auto"
head.Mode. RefreshRate =60
…
Da
Parameters in Response:
head = table.VideoOut[ChannelNo].
hu
Comment
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
aH
Table 4-27
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
P
Syntax
alue>[&<paramName>=<paramValue>…]
AP
Method GET
Description Set video out config.
IV
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&table.VideoOut[1].Co
Example
2.
lor.Brightness=50
Success
89
OK
Return
Parameters in URL:
fo
In table below,
r1
Appendix:
EG
head. Margin[0]
head. Margin[1]
Di
integer Margin.
head. Margin[2]
st
head. Margin[3]
rib
integer Resolution.
head. Mode.Height=600
s.r
General APIs 35
4.5.16 Smart Code
Get Smart Code config
Table 4-28
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=SmartEncode
Method GET
Da
Success head.Enable=false
aH
Return head.Extra[0]=false
Parameters in Response:
head = table.SmartEncode[ChannelNo].
TT
Comment
ChannelNo: integer, array index starts from 0, which means video channel (equals to
P
Table 4-29
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
2.
alue>[&<paramName>=<paramValue>…]
89
Method GET
Description Set smart code config.
fo
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&SmartEncode[0].Ena
Example
ble=true
r1
Success
OK
Return
00
Parameters in URL:
M
In table below,
Comment head = SmartEncode[ChannelNo].
EG
ChannelNo: integer, array index starts from 0, which means video channel(equals to
A
Appendix:
st
head.Enbale bool Open or close the smart code of the main stream.
head.Extra[0] bool Open or close the smart code of the extra stream.
ut
io
URL http://<server>/cgi-bin/DevVideoDec.cgi?action=getCaps
s.r
Method GET
.o
General APIs 36
The stream types that the device supports, ex : h264, h265
+StreamType array<string> R
etc.
The maximum decoding capability that the device supports
+LadenBitrate int R (w * h * FPS * 16)/1024, uint: kbps, ex : 7680*4320*30*8/1024
= 7776000
[ Example ]
Request GET http://192.168.1.108/cgi-bin/DevVideoDec.cgi?action=getCaps
Da
Video.StreamType[0]=h264
Response Video.StreamType[1]=h265
hu
Video.LadenBitrate=7776000
aH
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=PrivacyMasking
Method GET
IV
Size is 3
M
++Rect Array<int> O right point, each point has x and y value, oordinate
st
remap to 0 — 8192.
rib
0: no mosaic
8: mosaic size 8*8
.o
++Mosaic int O
16: mosaic size 16*16
.
General APIs 37
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=PrivacyMaskin
Request
g
table.PrivacyMasking[0][0].Enable=true
table.PrivacyMasking[0][0].Postion[0]=0.0
table.PrivacyMasking[0][0].Postion[1]=0.0
table.PrivacyMasking[0][0].Postion[2]=1.0
table.PrivacyMasking[0][0].ShapeType=Rect
Da
table.PrivacyMasking[0][0].Rect[0]=0
table.PrivacyMasking[0][0].Rect[1]=0
hu
table.PrivacyMasking[0][0].Rect[2]=50
Response table.PrivacyMasking[0][0].Rect[3]=100
aH
table.PrivacyMasking[0][0].Color[0]=128
table.PrivacyMasking[0][0].Color[1]=128
TT
table.PrivacyMasking[0][0].Color[2]=128
P
table.PrivacyMasking[0][0].Color[3]=255
AP
table.PrivacyMasking[0][0].Mosaic=8
table.PrivacyMasking[0][0].ViewAngle=30.0
IV
table.PrivacyMasking[0][1].Enable=true
…
2.
89
Method GET
r1
PrivacyMasking Array<Array<object>> R
masking region
EG
remap to 0 — 8192.
io
General APIs 38
Mosaic type, Range is {0, 8, 16, 24, 32}
0: no mosaic
8: mosaic size 8*8
+Mosaic int O
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: degree
Da
[ Response Params ] ( OK )
[ Example ]
hu
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&PrivacyMasking[0][0].En
aH
able=true&PrivacyMasking[0][0].Postion[0]=0.0&PrivacyMasking[0][0].Postion[1]=0.0&Priv
acyMasking[0][0].Postion[2]=1.0&PrivacyMasking[0][0].ShapeType=Rect&PrivacyMasking
Request
[0][0].Rect[0]=0&PrivacyMasking[0][0].Rect[1]=0&PrivacyMasking[0][0].Rect[2]=50&Privac
TT
yMasking[0][0].Rect[3]=100&PrivacyMasking[0][0].Mosaic=8&PrivacyMasking[0][0].ViewA
P
ngle=30.0
AP
Response OK
IV
Syntax http://<server>/cgi-bin/PrivacyMasking.cgi?action=getPrivacyMasking
Method GET
fo
offset int R Offset in the result record set, range is [0, Total – 1].
limit int R Count of result to get.
EG
remap to 0 — 8192.
s.r
General APIs 39
Mosaic type, Range is {0, 8, 16, 24, 32}
0: no mosaic
8: mosaic size 8*8
+Mosaic int O
16: mosaic size 16*16
24: mosaic size 24*24
32: mosaic size 32*32
[ Example ]
Da
http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=getPrivacyMasking&channel=1&
Request
offset=2&limit =5
hu
total=5
aH
PrivacyMasking[0].Index=0
PrivacyMasking[0].Name=Privacy Masking1
PrivacyMasking[0].Enable=1
TT
PrivacyMasking[0].ShapeType=Polygon
P
PrivacyMasking[0].Polygon[0][0]= 0
AP
PrivacyMasking[0].Polygon[0][1]=0
PrivacyMasking[0].Polygon[1][0]=128
IV
PrivacyMasking[0].Polygon[1][1]=128
PrivacyMasking[0].Polygon[2][0]=256
2.
Response
PrivacyMasking[0].Polygon[2][1]=200
89
…
PrivacyMasking[0].Color[0]=128,
fo
PrivacyMasking[0].Color[1]=128,
PrivacyMasking[0].Color[2]=128,
r1
PrivacyMasking[0].Color[3]=255,
00
PrivacyMasking[0].Mosaic=8,
PrivacyMasking[1].Index =1,
M
PrivacyMasking[1].Enable=1,
EG
…
A
Di
Syntax http://<server>/cgi-bin/PrivacyMasking.cgi?action=setPrivacyMasking
rib
Method GET
Description Set privacy masking
ut
General APIs 40
It is valid if ShapeType is Rect , top left and
+Rect Array<int> O bottom right point, 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
+Polygon Array<Array<int>> O
second array is point, must be two int, means x
and y value, coordinate remap to 0 — 8192.
Da
0: no mosaic
aH
[ Response Params ] ( OK )
AP
[ Example ]
http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=setPrivacyMasking&channel=2&
IV
PrivacyMasking.Index=3&PrivacyMasking.Name=Privacy%20Masking1&PrivacyMasking.
Request Enable=1&PrivacyMasking.ShapeType=Rect&PrivacyMasking.Rect[0]=0&PrivacyMaskin
2.
g.Rect[1]=0&PrivacyMasking.Rect[2]=50&PrivacyMasking.Rect[3]=100&PrivacyMasking.
89
Mosaic=8
Response OK
fo
r1
Syntax http://<server>/cgi-bin/PrivacyMasking.cgi?action=gotoPrivacyMasking
M
Method GET
EG
[ Response Params ] ( OK )
[ Example ]
ut
http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=gotoPrivacyMasking&channel=
Request
2&index=3
io
Response OK
n
s.r
Syntax http://<server>/cgi-bin/PrivacyMasking.cgi?action=deletePrivacyMasking
Method GET
Description Delete privacy masking
[ Request Params ] (key=value format at URL)
General APIs 41
Name Type R/O Param Description
channel int R video channel index which starts from 1
index int R Index of PrivacyMasking which starts from 0
[ Response Params ] ( OK )
[ Example ]
http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=deletePrivacyMasking&channel
Request
=2&index=3
Da
Response OK
hu
aH
Syntax http://<server>/cgi-bin/PrivacyMasking.cgi?action=clearPrivacyMasking
Method GET
P
[ Response Params ] ( OK )
[ Example ]
89
Request http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=clearPrivacyMasking&channel=2
Response OK
fo
r1
Syntax http://<server>/cgi-bin/PrivacyMasking.cgi?action=getRealRect
EG
Method GET
Description Get privacy masking rect
A
Rect, top left and bottom right point, each point has x and y
Rect Array<int> R
io
[ Example ]
s.r
Request http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=getRealRect&channel=2&index=1
Rect[0]=0
.o
Rect[1]=0
Response
.
Rect[2]=50
Rect[3]=100
General APIs 42
4.5.25 [Config] SmartMotionDetect
Get smart motion detection setting
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=SmartMotionDete
Syntax
ct
Method GET
Da
Array<object> R
t config object
++Enable bool R Enable/Disable
P
++Sensitivity string R
"High"
IV
[ Example ]
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=SmartMotionDe
Request
fo
tect
table.SmartMotionDetect[0].Enable=true
r1
table.SmartMotionDetect[0].Sensitivity=Middle
00
Response table.SmartMotionDetect[0].ObjectTypes.Human=true
table.SmartMotionDetect[0].ObjectTypes.Vejhicle=true
M
…
EG
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig
Method GET
Di
Array<object> R
ect one config object
io
General APIs 43
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&SmartMotionDetect[0].E
Request nable=true&SmartMotionDetect[0].Sensitivity=Middle&SmartMotionDetect[0].ObjectTypes.
Human=true&SmartMotionDetect[0].ObjectTypes.Vejhicle=true
Response OK
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=LAEConfig
aH
Method GET
Description Get LAE Configs.
TT
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=LAEConfig
Success table.LAEConfig.Enable=true
P
Return table.LAEConfig.ManulEn=1
AP
table.LAEConfig.YSIGMA =1
table.LAEConfig.Dethr =1
IV
table.LAEConfig.STS =1
table.LAEConfig.GauFilter0=1
2.
table.LAEConfig.GauFilter1=1
89
table.LAEConfig.GauFilter2=1
table.LAEConfig.UVGauFilter0=1
fo
table.LAEConfig.UVGauFilter1=1
r1
table.LAEConfig.UVGauFilter2=1
table.LAEConfig.UVSigma =1
00
table.LAEConfig.EEGauFilter0=1
table.LAEConfig.EEGauFilter1=1
M
table.LAEConfig.EEGauFilter2=1
EG
table.LAEConfig.EEratio =1
table.LAEConfig.GEnable =1
A
table.LAEConfig.GainLevel =1
Di
table.LAEConfig.DebugPin =1
Comment
st
rib
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramVal
ue>[&<paramName>=<paramValue>…]
io
Method GET
n
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LAEConfig.Enable=tru
e&LAEConfig.ManulEn=1
.o
Success OK
.
Return
Comment
Appendix:
General APIs 44
ParamName ParamValue type Description
turn on/off LAE fuction
table.LAEConfig.Enable bool The following parameters will take effacts when
it’s on
whether use manual mode, 1 for manual mode,
table.LAEConfig.ManulEn integer
0 for alternative plan
absolute strength of Y channel Grinding,
Da
table.LAEConfig.YSIGMA integer
The smaller the stronger(fuzzier)
relative strength of Y channel Grinding,
hu
table.LAEConfig.Dethr integer
The smaller the stronger(fuzzier)
aH
256
P
integer
The smaller the stronger
r1
integer
stronger
table.LAEConfig.GEnable integer Brightening switch, default false
A
Syntax http://<server>/cgi-bin/PrivacyMasking.cgi?action=setPrivacyMaskingEnable
Method GET
io
[ Response Params ] ( OK )
[ Example ]
http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=setPrivacyMaskingEnable&ch
Request
annel=2&Enable=true
General APIs 45
Response OK
http://192.168.1.108/cgi-bin/PrivacyMasking.cgi?action=getPrivacyMaskingEnable&ch
Request
AP
annel=2
Response Enable=false
IV
2.
4.6 System
89
fo
4.6.1 General
r1
Table 4-30
M
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=General
Method GET
EG
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=General
table.General.LocalNo=8,
Di
table.General.MachineID=20832748927,
st
table.General.MachineName=Dahua001,
rib
table.General.MachineAddress=滨江区.江南大道.伟业路口,
table.General.MachineGroup=交警一队,
ut
table.General.LockLoginEnable=true,
table.General.CheckDuration=30,
io
Success
table.General.LockLoginTimes=3,
n
Return
table.General.LoginFailLockTime=1800,
s.r
table.General.MaxOnlineTime=1800,
table.General.LocalPolicy.LockLoginEnable=true,
.o
table.General.LocalPolicy.CheckDuration=30,
.
table.General.LocalPolicy.LockLoginTimes=3,
table.General.LocalPolicy.LoginFailLockTime=1800
table.General.ActivationTime=2000-01-01 00:00:00
Comment —
General APIs 46
Set general config
Table 4-31
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set general config.
Da
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&General.MachineNa
Example
me=MyIPC
hu
Success
OK
Return
aH
Comment —
Appendix:
TT
Table 4-32
Syntax http://<server>/cgi-bin/global.cgi?action=getCurrentTime
r1
Method GET
00
Success
result = 2011-7-3 21:02:32
EG
Return
The time format is "Y-M-D H-m-S". It's not be effected by Locales. TimeFormat in
Comment
A
SetLocalesConfig.
Di
Table 4-33
Syntax http://<server>/cgi-bin/global.cgi?action=setCurrentTime&time=2011-7-3%2021:02:32
ut
Method GET
io
http://192.168.1.108/cgi-bin/global.cgi?action=setCurrentTime&time=2016-01-01%202
Example
1:02:32
s.r
Success
OK
.o
Return
.
The time format is "Y-M-D H-m-S". It's not be effected by Locales. TimeFormat in
Comment
SetLocalesConfig.
General APIs 47
4.6.4 Locales
Get locales config
Table 4-34
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Locales
Method GET
Da
table.Locales.DSTEnable=false
aH
table.Locales.DSTEnd.Day=1
table.Locales.DSTEnd.Hour=0
table.Locales.DSTEnd.Minute=0
TT
table.Locales.DSTEnd.Month=1
P
table.Locales.DSTEnd.Week=2
AP
Success table.Locales.DSTEnd.Year=2011
Return table.Locales.DSTStart.Day=0
IV
table.Locales.DSTStart.Hour=0
table.Locales.DSTStart.Minute=0
2.
table.Locales.DSTStart.Month=1
89
table.Locales.DSTStart.Week=1
table.Locales.DSTStart.Year=2011
fo
table.Locales.TimeFormat=yyyy-MM-dd HH:mm:ss
r1
Comment —
Set locales config
00
Table 4-35
M
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
EG
Method GET
A
Example
=false
st
Success
OK
rib
Return
Comment —
ut
Appendix:
io
General APIs 48
ParamName ParamValue type Description
Locales.DSTEnd.Month integer Range is [1—12]
Range is {1, 2, 3, 4, -1, 0}.
0 = Use month day
Locales.DSTEnd.Week Integer [1, 2, 3, 4, -1]: use week day.
1 = first week, 2 = second, 3 = third, 4 = fourth, -1 =
last.
Da
Locales.DSTStart.Hour
Range is the same with items in Locales.DSTEnd.
aH
Locales.DSTStart.Minute
Integer Locales.DSTStart table and Locales.DSTEnd table
Locales.DSTStart.Month
define the time range of DST.
TT
Locales.DSTStart.Week
Locales.DSTStart.Year
P
Example:
A
yyyy-MM-dd HH:mm:ss or
Di
MM-dd-yyyy HH:mm:ss or
dd-M-yy hh:mm:ss
st
rib
Table 4-36
io
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getLanguageCaps
n
Method GET
s.r
Success
Languages=SimpChinese,English,French
.
Return
response is a string contains languages with comma separated.
Comment Languages include { English, SimpChinese, TradChinese, Italian, Spanish, Japanese,
Russian, French, German }
General APIs 49
4.6.6 Language
Get language config
Table 4-37
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Language
Method GET
Da
Success
table.Language=SimpChinese
aH
Return
Comment —
Set language config
TT
P
Table 4-38
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
AP
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
IV
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Language=SimpChi
Example
89
nese
Success
OK
fo
Return
Comment NOTE: After changing language setting, system will automatically reboot!
r1
Appendix:
00
GetLanguageCaps
A
Table 4-39
st
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AccessFilter
rib
Method GET
Description Get access filter config.
ut
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AccessFilter
io
Success table.AccessFilter.Enable=false
n
Return table.AccessFilter.TrustList[0]=10.6.10.23
table.AccessFilter.TrustList[1]=10.6.10.62
s.r
table.AccessFilter.Type=TrustList
.o
Appendix:
General APIs 50
ParamName ParamValue type Description
AccessFilter.BannedList[index] string Banned IP address list
AccessFilter.TrustList[index] string Trusted IP address list
AccessFilter.Enable bool Enable/Disable access filter function
Range is {TrustList, BannedList},
TrustList: Trust list is used, banned list
AccessFilter.Type string is not used.
Da
Table 4-40
P
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AutoMaintain
AP
Method GET
Description Get Auto Maintain config.
IV
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AutoMaintain
2.
table.AutoMaintain.AutoRebootDay=3
89
table.AutoMaintain.AutoRebootHour=0
table.AutoMaintain.AutoRebootMinute=0
fo
table.AutoMaintain.AutoShutdownDay=1
Success
table.AutoMaintain.AutoShutdownHour=0
r1
Return
table.AutoMaintain.AutoShutdownMinute=0
table.AutoMaintain.AutoStartUpDay=1
00
table.AutoMaintain.AutoStartUpHour=2
M
table.AutoMaintain.AutoStartUpMinute=0
Comment —
EG
Table 4-41
Di
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
st
Method GET
rib
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AutoMaintain.AutoR
Example
ebootDay=7
io
Success
OK
n
Return
s.r
Comment —
.o
Appendix:
.
General APIs 51
ParamName ParamValue type Description
Range is [-1—7].
Auto restart day.
AutoMaintain.AutoRebootDay integer -1 = never auto restart
0—6 = Sunday—Saturday
7 = restart every day
Range is [0—23].
Da
AutoMaintain.AutoRebootHour integer
Auto restart hour
Range is [0—59].
hu
AutoMaintain.AutoRebootMinute integer
Auto restart minute
aH
Table 4-42
fo
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Holiday
Method GET
r1
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Holiday
table.Holiday.MonthMask[0]=3
M
table.Holiday.MonthMask[1]=0
EG
table.Holiday.MonthMask[2]=0
table.Holiday.MonthMask[3]=0
A
table.Holiday.MonthMask[4]=0
Success table.Holiday.MonthMask[5]=0
Di
Return table.Holiday.MonthMask[6]=0
st
table.Holiday.MonthMask[7]=0
rib
table.Holiday.MonthMask[8]=0
table.Holiday.MonthMask[9]=1610612739
ut
table.Holiday.MonthMask[10]=0
io
table.Holiday.MonthMask[11]=0
Comment —
n
Table 4-43
.o
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
.
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set holiday config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Holiday.MonthMask[
General APIs 52
0]=3
Success
OK
Return
Parameters in URL:
In table below,
Comment
monthIndex presents the index of a month. 0 presents January, 1 presents February,
11 presents December.
Da
Appendix:
hu
Holiday.MonthMask[monthIndex] integer
second day of a month is holiday, 0x0003
P
month is holiday.
IV
Table 4-44
89
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getDeviceType
Method GET
fo
Description Get the device type displaying which is not the real type.
r1
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getDeviceType
Success
type=DVR
00
Return
Comment —
M
EG
Table 4-45
Di
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getHardwareVersion
st
Method GET
Description Get the device hardware version.
rib
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getHardwareVersion
ut
Success
version=1.00
Return
io
Comment —
n
s.r
Table 4-46
.
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getSerialNo
Method GET
Description Get the device serial number.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getSerialNo
General APIs 53
Success
sn=YZC0GZ05100020
Return
Comment —
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getMachineName
Method GET
hu
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getMachineName
Success
name=YZC0GZ05100020
TT
Return
Comment —
P
AP
Table 4-48
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getSystemInfo
2.
Method GET
89
serialNumber=PA1FQ15900207
Success
r1
deviceType=27
Return
processor=ST7108
00
Comment —
M
Table 4-49
A
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getVendor
Di
Method GET
st
Success
vendor=TTT
ut
Return
Comment —
io
n
Table 4-50
.o
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getSoftwareVersion
.
Method GET
Description Get the software information.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getSoftwareVersion
Success version=2.212.0000.0.R,build:2013-11-14
General APIs 54
Return
Comment —
Method GET
Description Get onvif version.
hu
Example http://192.168.1.108/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=Onvif
aH
Success
version=2.4.2
Return
TT
Comment —
P
Table 4-52
IV
Syntax http://<server>/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=CGI
Method GET
2.
Example http://192.168.1.108/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=CGI
Success
fo
version=2.0.0
Return
r1
Comment —
00
Table 4-53
EG
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getDeviceClass
Method GET
A
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getDeviceClass
st
Success
class=HDVR
rib
Return
Comment —
ut
Table 4-54
.o
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=UserGlobal
.
Method GET
Description Get user global config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=UserGlobal
Success
table.UserGlobal.OnvifLoginCheck=false
Return
General APIs 55
If "OnvifLoginCheck" is false, you can get Onvif service directly; if true, you should enter
Comment
your ID/username and password.
Set config of Onvif service authorization
Table 4-55
http://<server>/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCh
Syntax
eck=<flag>
Da
Method GET
Description Enable onvif login check or not.
hu
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLog
Example
inCheck=true
aH
Success
OK
Return
TT
Parameters in URL:
Comment
flag : range is {true, false}.
P
AP
Table 4-56
2.
Syntax http://<server>/cgi-bin/Config.backup?action=All
89
Method GET
Description Download all the settings of a device as a file named Config.Backup by default.
fo
Example http://192.168.1.108/cgi-bin/Config.backup?action=All
Success HTTP/1.1 200 OK
r1
CONNECTION: close
Content-type: application/binarytet-stream; charset=utf-8
M
{
EG
"ATM" : {
A
"DataSource" : "RS232",
"DisplayPostion" : "lefttop",
Di
"EncodeBlend" : true,
st
"PreviewBlend" : true,
rib
"ProtocolAbility" : [ "POS" ],
"ProtocolName" : "ATM\/POS",
ut
"RecordChannels" : [ 0, 1, 2, 3 ]
io
}
……
n
}
s.r
Comment —
.o
Table 4-57
http://<server>/cgi-bin/configManager.cgi?action=restore&names[0]=<xxx>&names[1]=
Syntax
<yyy>[&…]
General APIs 56
Method GET
Description Restore config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=restore&names[0]=UPnP
Success
OK
Return
Parameters in URL:
Comment
xxx and yyy is config name which need to be restore
Da
Table 4-58
Syntax http://<server>/cgi-bin/configManager.cgi?action=restoreExcept&names[0]=<xxx>&na
mes[1]=<yyy>[&…]
TT
Method GET
P
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=restoreExcept&names[0]=UPnP
Success OK
IV
Return
Comment Parameters in URL:
2.
All the config file but xxx and yyy will be restored.
89
4.6.24 Reboot
fo
r1
Table 4-59
Syntax http://<server>/cgi-bin/magicBox.cgi?action=reboot[&delay=<paramValue>]
00
Method GET
Description Reboot the device.
M
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=reboot
EG
Success
OK
Return
A
4.6.25 Shutdown
st
rib
Table 4-60
ut
Syntax http://<server>/cgi-bin/magicBox.cgi?action=shutdown
Method GET
io
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=shutdown
s.r
Success
OK
Return
.o
4.6.26 FactoryReset
Table 4-61
General APIs 57
Syntax http://<server>/cgi-bin/magicBox.cgi?action=resetSystemEx[&type=<type>]
Method GET
Description Reset the configuration for the device to the factory default.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=resetSystemEx&type=0
Success
OK
Return
Parameters in URL:
Da
1 means all parameters are set to their factory default value expect the specific
aH
Comment parameters;
The specific parameters of different device types are different. But it always contains the
network settings and user settings. After resetting, the device is reachable on the same
TT
When the Type parameter is not present in the URL, the default value of the Type is 0.
AP
Table 4-62
2.
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getTracingCode
89
Method GET
Description Get the tracing code of the device.
fo
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getTracingCode
r1
Success
tc=0001...1101
Return
00
4.7 Network
A
Table 4-63
rib
Syntax http://<server>/cgi-bin/netApp.cgi?action=getInterfaces
Method GET
ut
Example http://192.168.1.108/cgi-bin/netApp.cgi?action=getInterfaces
n
netInterface[0].Name=eth0
netInterface[0].Type=Normal
s.r
netInterface[0].Valid=true
.o
Success …
Return netInterface[1].Name=3g
.
netInterface[1].Type=Auto,WCDMA,TD-SCDMA,TD-LTE,FDD-LTE
netInterface[1].Valid=true
…
Comment result item value:
General APIs 58
Name: network interface name.
"eth0" - wired network interface
"eth2" - wireless network interface
"3G" - 3G network interface
"bond0" - bond network interface
"bond1" - bond network interface
Not listed in detail
Da
Table 4-64
89
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Network
Method GET
fo
Get network basic config. The basic config contains basic network parameters (default
Description
r1
interface, domain name, host name), and configuration of each network interface.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Network
00
table.Network.DefaultInterface=eth0
M
table.Network.Domain=ttt
table.Network.Hostname=badak
EG
table.Network.interface.DefaultGateway=10.7.0.1
table.Network.interface.DhcpEnable=false
A
Success
table.Network.interface.DnsServers[0]=221.123.33.228
Di
Return
table.Network.interface.DnsServers[1]=221.12.1.228
st
table.Network.interface.IPAddress=10.7.2.3
rib
table.Network.interface.MTU=1500
table.Network.interface.PhysicalAddress=00:10:5c:f2:1c:b4
ut
table.Network.interface.SubnetMask=255.255.0.0
Comment interface in response is network interface name, such as eth0, eth2…
io
Table 4-65
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
.o
alue>[&<paramName>=<paramValue>…]
.
Method GET
Description Set network basic config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetWork.Domain=ttt
Example
&NetWork.eth0.DhcpEnable=true
Success OK
General APIs 59
Return
Comment interface in below ParamName is network interface name, such as eth0 and eth2
Appendix:
Network.DefaultInterface string
Range of interfaces is depends on
GetInterfaces.
hu
xx:xx:xx:xx:xx:xx.
Network.interface.PhysicalAddress string Range of x is [0-9, a-f, A-F]
fo
Example:
r1
00:10:5c:f2:1c:b4
00:10:5C:F2:1C:B5
00
Network.interface.SubnetMask string
Example:
EG
255.255.255.0
Enable/Disable
A
Network.interface.EnableDhcpReserv
bool when dhcp failed, it will continue sending
edIP
Di
4.7.3 PPPoE
rib
ut
Table 4-66
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=PPPoE
n
Method GET
s.r
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=PPPoE
table.PPPoE.Enable=true,
.
table.PPPoE.AuthType[0]=PAP,
Success
table.PPPoE.UserName=hz150260,
Return
table.PPPoE.Password=Dont Know,
table.PPPoE.Mode=Default,
General APIs 60
table.PPPoE.Eth=eth0,
table.PPPoE.DefaultPPPoEInterface=ppp0,
table.PPPoE.PPPOE1.Enable=true,
table.PPPoE.PPPOE1.AuthType[0]=PAP,
table.PPPoE.PPPOE1.UserName=hz150260,
table.PPPoE.PPPOE1.Password=Don’t Know,
table.PPPoE.PPPOE1.Mode=Custom,
Da
table.PPPoE.PPPOE1.Eth=eth1
Comment —
hu
Table 4-67
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
TT
Syntax
alue>[&<paramName>=<paramValue>…]
P
Method GET
AP
user1&PPPoE.Password=123456
Success
2.
OK
Return
89
Comment —
fo
Appendix:
r1
4.7.4 DDNS
A
Table 4-68
st
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=DDNS
rib
Method GET
Description Get DDNS config.
ut
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=DDNS
io
Success table.DDNS[index].Address=www.ttt.com
n
Return table.DDNS[index].Enable=true
table.DDNS[index].HostName=www.ttt.com
s.r
table.DDNS[index].KeepAlive=10
.o
table.DDNS[index].Password=none
table.DDNS[index].Port=5050
.
General APIs 61
Comment index in response is the DDNS protocol table index, start from 0.
The meaning of parameters can refer to SetDDNSConfig chapter.
Set DDNS config
Table 4-69
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
alue>[&<paramName>=<paramValue>…]
Da
Method GET
Description Set DDNS config.
hu
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&DDNS[0].Address=w
ww.ttt.com&DDNS[0].Enable=true
aH
Success OK
Return
TT
Comment index in below ParamName is the DDNS protocol table index, start from 0.
P
Appendix:
AP
Range is [1—65535].
DDNS[index].KeepAlive integer
Unit is minutes.
r1
Range is [1—65535].
DDNS[index].Port integer
Port of DDNS server
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
General APIs 62
ParamName ParamValue type Description
DDNS protocol type.
Range is {
"PRIVATE DDNS": 大华一代
"Private DDNS": 大华二代(使用 quickddns 域
名)
"CN99 DDNS"
Da
"NO-IP DDNS"
"Dyndns DDNS"
hu
"LUPUS DDNS"
"Oray DDNS"
aH
"Q-See DDNS"
P
"SYSDNS DDNS"
AP
"Videotrend DDNS"
"CEPSA DDNS"
IV
"G4IP DDNS"
"HOSS DDNS"
2.
DDNS[index].Protocol string
"Intelbras DDNS"
89
"HSY DDNS"
"Flir DDNS"
fo
"ByDemes DDNS"
00
"WATASHI DDNS"
EG
"MINT DDNS"
"SPECO DDNS"
Di
"SHANY DDNS"
st
bool
.Enable true : use the DefaultHostName.HostName
.o
General APIs 63
4.7.5 Email
Get email config
Table 4-70
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Email
Method GET
Da
table.Email.Address=www.ttt.com
aH
table.Email.Anonymous=true
table.Email.AttachEnable=true
table.Email.Enable=true
TT
table.Email.HealthReport.Enable=false
P
table.Email.HealthReport.Interval=61
AP
table.Email.Password=123456
table.Email.Port=26
IV
table.Email.Receivers[0]=x@tttt.com
Success
table.Email.Receivers[1]=y@ttt.com
2.
Return
table.Email.Receivers[2]=z@ttt.com
89
table.Email.SendAddress=x@ttt.com
table.Email.SslEnable=false
fo
table.Email.TlsEnable=false
table.Email.Authentication=false
r1
table.Email.OnlyAttachment=false
00
table.Email.SendInterv=10
table.Email.Title=DVRMessage
M
table.Email.UserName=anonymity
EG
Comment —
Set email config
A
Table 4-71
Di
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
st
alue>[&<paramName>=<paramValue>…]
rib
Method GET
Description Set Email config.
ut
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Email.Address=mail.
Example
ttt.com&Email.Anonymous=false
io
Success
n
OK
Return
s.r
Comment —
.o
Appendix:
.
General APIs 64
ParamName ParamValue type Description
Email.AttachmentEnable bool Enable/Disable email attachment
Email.Enable bool Enable/Disable email function
Email.HealthReport.Enable bool Enable/Disable report device status by email.
Range is [30-1440].
Email.HealthReport.Interval integer
Unit is minutes
Email.Password string User password of email account.
Da
Email.Receivers[2] string
Email.SendAddress string Sender email address.
TT
4.7.6 WLan
IV
89
Table 4-72
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=WLan
fo
Method GET
Description Get Wlan config.
r1
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=WLan
00
table.WLan.eth2.Enable=true
table.WLan.eth2.Encryption=off
M
table.WLan.eth2.KeyFlag=false
EG
table.WLan.eth2.KeyID=0
table.WLan.eth2.KeyType=Hex
Success
A
table.WLan.eth2.Keys[0]=password1
Return
Di
table.WLan.eth2.Keys[1]=password2
table.WLan.eth2.Keys[2]=password3
st
table.WLan.eth2.Keys[3]=password4
rib
table.WLan.eth2.LinkMode=Auto
table.WLan.eth2.SSID=ttt
ut
Comment —
io
Table 4-73
s.r
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
.o
Method GET
.
General APIs 65
Return
Comment In below ParamName, interface is name of wireless interface.
Appendix:
Range is [0—3]
WLan.interface.KeyID integer Indicates which key is used.
TT
0: WLan.interface.Keys[0] is used.
WLan.interface.KeyType string Range is {Hex, ASCII]
P
WLan.interface.Keys[0] string For ASCII key type: 64bits encryption key length is 5,
AP
a—z, A—Z]
89
Table 4-74
http://<server>/cgi-bin/wlan.cgi?action=scanWlanDevices&<paramName>=<paramVal
st
Syntax
ue>[&<paramName>=<paramValue>…]
rib
Method GET
ut
Example
13098 Internet
n
found=1
s.r
wlanDevice[0].ApConnected=0
wlanDevice[0].ApMaxBitRate=54000000
.o
Success wlanDevice[0].ApNetWorkType=255
.
Return wlanDevice[0].AuthMode=7
wlanDevice[0].BSSID=28:2c:b2:5c:de:36
wlanDevice[0].EncrAlgr=3
wlanDevice[0].LinkMode=0
General APIs 66
wlanDevice[0].LinkQuality=31
wlanDevice[0].RSSIQuality=0
wlanDevice[0].SSID=xia_yuguo 13098 Internet
Comment —
Appendix:
4.7.8 UPnP
aH
Table 4-75
P
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=UPnP
AP
Method GET
Description Get UPnP config.
IV
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=UPnP
2.
Success table.UPnP.Enable=true
89
Return table.UPnP.MapTable[index].Enable=true
table.UPnP.MapTable[index].InnerPort=80
fo
table.UPnP.MapTable[index].OuterPort=8080
table.UPnP.MapTable[index].Protocol=TCP
r1
table.UPnP.MapTable[index].ServiceName=HTTP
Comment index in response is the UPNP map table index, start from 0.
00
Table 4-76
EG
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
alue>[&<paramName>=<paramValue>…]
A
Method GET
Di
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&UPnP.Enable=true&
UPnP.MapTable[0].Protocol=TCP
rib
Success OK
ut
Return
Comment index in below ParamName is UPNP map table index, range is [0-255]
io
n
Appendix:
s.r
Range is [1—65535].
UPnP.MapTable[index].InnerPort integer
Inner port number
Range is [1—65535].
UPnP.MapTable[index].OuterPort integer
Outer port number.
General APIs 67
ParamName ParamValue type Description
UPnP.MapTable[index].Protocol string Range is {TCP, UDP]
UPnP.MapTable[index].ServiceName string User defined UPnP service name.
Syntax http://<server>/cgi-bin/netApp.cgi?action=getUPnPStatus
Method GET
hu
Example http://192.168.1.108/cgi-bin/netApp.cgi?action=getUPnPStatus
status.InnerAddress=0.0.0.0
TT
status.OuterAddress=0.0.0.0
status.PortMapStatus[0]=Failed
P
Success status.PortMapStatus[1]=Failed
AP
Return status.PortMapStatus[2]=Failed
status.PortMapStatus[3]=Failed
IV
status.Status=Unknown
status.Working=false
2.
Comment —
89
4.7.10 NTP
fo
r1
Table 4-78
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=NTP
M
Method GET
Description Get NTP config
EG
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=NTP
A
table.NTP.Address=clock.isc.org
table.NTP.Enable=false
Di
table.NTP.Port=38
st
table.NTP.TimeZone=9
rib
Success table.NTP.UpdatePeriod=31
Return table.NTP.ServerList[0].Enable=true,
ut
table.NTP.ServerList[0].Address=192.168.1.108,
io
table.NTP.ServerList[0].Port=123
table.NTP.Tolerance=5,
n
table.NTP.TimeZoneDesc=Beijing
s.r
Comment —
.o
Table 4-79
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<param
Syntax
Value>[&<paramName>=<paramValue>…]
Method GET
General APIs 68
Description Set NTP config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NTP.Address=time.tt
Example
t.com&NTP.Enable=true
Success
OK
Return
Comment —
Da
4.7.11 RTSP
hu
Table 4-80
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=RTSP
TT
Method GET
Description Get RTSP config.
P
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RTSP
AP
table.RTSP.Enable=true
Success table.RTSP.Port=554
IV
Return table.RTSP.RTP.EndPort=40000
2.
table.RTSP.RTP.StartPort=20000
89
Comment —
Set RTSP config
fo
Table 4-81
r1
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<param
Syntax
Value>[&<paramName>=<paramValue>…]
00
Method GET
Description Set RTSP config.
M
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RTSP.Enable=true&
EG
Example
RTSP.Port=554
Success
A
OK
Return
Di
Comment —
st
Appendix:
rib
Table 4-82
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AlarmServer
Method GET
General APIs 69
Description Get alarm server config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AlarmServer
table.AlarmServer.Address=10.7.8.9
table.AlarmServer.Enable=false
table.AlarmServer.Password=
Success table.AlarmServer.Port=8888
Return table.AlarmServer.Protocol=ttt
Da
table.AlarmServer.ReportTime=02:00:00
table.AlarmServer.ReportWeekDay=2
hu
table.AlarmServer.UserName=admin
aH
Comment —
Set alarm server config
TT
Table 4-83
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<param
P
Syntax
Value>[&<paramName>=<paramValue>…]
AP
Method GET
Description Set Alarm Server config.
IV
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AlarmServer.Addres
Example
2.
s=as.ttt.com&AlarmServer.Enable=false
89
Success
OK
Return
fo
Comment —
r1
Appendix:
00
Range is [1—65535].
AlarmServer.Port integer
Port of Alarm server.
A
Table 4-84
Syntax
n
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect
Method GET
s.r
Description Motion detect config of a video channel contains Enable, MotionDetectWindow and
.o
EventHandler.
Example
.
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect
Success table.MotionDetect[0].Enable=false
Return table.MotionDetect[0].EventHandler.AlarmOut=1
table.MotionDetect[0].EventHandler.AlarmOutChannels[0]=0
table.MotionDetect[0].EventHandler.AlarmOutEnable=true
General APIs 70
table.MotionDetect[0].EventHandler.AlarmOutLatch=10
table.MotionDetect[0].EventHandler.BeepEnable=false
table.MotionDetect[0].EventHandler.Dejitter=5
table.MotionDetect[0].EventHandler.Delay=0
table.MotionDetect[0].EventHandler.ExAlarmOut=1
table.MotionDetect[0].EventHandler.ExAlarmOutChannels[0]=0
table.MotionDetect[0].EventHandler.ExAlarmOutEnable=false
Da
table.MotionDetect[0].EventHandler.FlashEnable=false
table.MotionDetect[0].EventHandler.FlashLatch=10
hu
table.MotionDetect[0].EventHandler.LogEnable=true
aH
table.MotionDetect[0].EventHandler.MailEnable=false
table.MotionDetect[0].EventHandler.Matrix=1
table.MotionDetect[0].EventHandler.MatrixChannels[0]=0
TT
table.MotionDetect[0].EventHandler.MatrixEnable=false
P
table.MotionDetect[0].EventHandler.MessageEnable=false
AP
table.MotionDetect[0].EventHandler.PtzLink[0][0]=None
table.MotionDetect[0].EventHandler.PtzLink[0][1]=1
IV
table.MotionDetect[0].EventHandler.PtzLinkEnable=false
table.MotionDetect[0].EventHandler.Record=1
2.
table.MotionDetect[0].EventHandler.RecordChannels[0]=0
89
table.MotionDetect[0].EventHandler.RecordEnable=true
table.MotionDetect[0].EventHandler.RecordLatch=10
fo
table.MotionDetect[0].EventHandler.Snapshot=1
r1
table.MotionDetect[0].EventHandler.SnapshotChannels[0]=0
table.MotionDetect[0].EventHandler.SnapshotEnable=false
00
table.MotionDetect[0].EventHandler.TimeSection[0][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][1]=0 00:00:00-23:59:59
M
table.MotionDetect[0].EventHandler.TimeSection[0][2]=0 00:00:00-23:59:59
EG
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
A
table.MotionDetect[0].EventHandler.TimeSection[0][5]=0 00:00:00-23:59:59
Di
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
st
table.MotionDetect[0].EventHandler.TimeSection[1][2]=0 00:00:00-23:59:59
rib
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
ut
table.MotionDetect[0].EventHandler.TimeSection[1][5]=0 00:00:00-23:59:59
io
table.MotionDetect[0].EventHandler.TimeSection[2][0]=1 00:00:00-23:59:59
n
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
s.r
table.MotionDetect[0].EventHandler.TimeSection[2][3]=0 00:00:00-23:59:59
.o
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
table.MotionDetect[0].EventHandler.TimeSection[3][3]=0 00:00:00-23:59:59
General APIs 71
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
Da
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
hu
table.MotionDetect[0].EventHandler.TimeSection[5][1]=0 00:00:00-23:59:59
aH
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
TT
table.MotionDetect[0].EventHandler.TimeSection[5][5]=0 00:00:00-23:59:59
P
table.MotionDetect[0].EventHandler.TimeSection[6][0]=1 00:00:00-23:59:59
AP
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
IV
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
2.
table.MotionDetect[0].EventHandler.TimeSection[6][5]=0 00:00:00-23:59:59
89
table.MotionDetect[0].EventHandler.TipEnable=false
table.MotionDetect[0].EventHandler.Tour=1
fo
table.MotionDetect[0].EventHandler.TourChannels[0]=0
r1
table.MotionDetect[0].EventHandler.TourEnable=false
table.MotionDetect[0].EventHandler.Voice.AudioFileName=
00
table.MotionDetect[0].EventHandler.VoiceEnable=false
table.MotionDetect[0].MotionDetectWindow[0].Id=0
M
table.MotionDetect[0].MotionDetectWindow[0].Name=Region1
EG
table.MotionDetect[0].MotionDetectWindow[0].Region[0]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[1]=4194303
A
table.MotionDetect[0].MotionDetectWindow[0].Region[2]=4194303
Di
table.MotionDetect[0].MotionDetectWindow[0].Region[3]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[4]=4194303
st
table.MotionDetect[0].MotionDetectWindow[0].Region[5]=4194303
rib
table.MotionDetect[0].MotionDetectWindow[0].Region[6]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[7]=4194303
ut
table.MotionDetect[0].MotionDetectWindow[0].Region[8]=4194303
io
table.MotionDetect[0].MotionDetectWindow[0].Region[9]=4194303
n
table.MotionDetect[0].MotionDetectWindow[0].Region[10]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[11]=4194303
s.r
table.MotionDetect[0].MotionDetectWindow[0].Region[12]=4194303
.o
table.MotionDetect[0].MotionDetectWindow[0].Region[13]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[14]=4194303
.
table.MotionDetect[0].MotionDetectWindow[0].Region[15]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[16]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[17]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Sensitive=60
General APIs 72
table.MotionDetect[0].MotionDetectWindow[0].Threshold=5
table.MotionDetect[0].MotionDetectWindow[0].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[0].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[0].Window[2]=8191
table.MotionDetect[0].MotionDetectWindow[0].Window[3]=8191
table.MotionDetect[0].MotionDetectWindow[1].Id=1
table.MotionDetect[0].MotionDetectWindow[1].Name=Region2
Da
table.MotionDetect[0].MotionDetectWindow[1].Region[0]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[1]=0
hu
table.MotionDetect[0].MotionDetectWindow[1].Region[2]=0
aH
table.MotionDetect[0].MotionDetectWindow[1].Region[3]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[4]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[5]=0
TT
table.MotionDetect[0].MotionDetectWindow[1].Region[6]=0
P
table.MotionDetect[0].MotionDetectWindow[1].Region[7]=0
AP
table.MotionDetect[0].MotionDetectWindow[1].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[9]=0
IV
table.MotionDetect[0].MotionDetectWindow[1].Region[10]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[11]=0
2.
table.MotionDetect[0].MotionDetectWindow[1].Region[12]=0
89
table.MotionDetect[0].MotionDetectWindow[1].Region[13]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[14]=0
fo
table.MotionDetect[0].MotionDetectWindow[1].Region[15]=0
r1
table.MotionDetect[0].MotionDetectWindow[1].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[17]=0
00
table.MotionDetect[0].MotionDetectWindow[1].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[1].Threshold=5
M
table.MotionDetect[0].MotionDetectWindow[1].Window[0]=0
EG
table.MotionDetect[0].MotionDetectWindow[1].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[2]=0
A
table.MotionDetect[0].MotionDetectWindow[1].Window[3]=0
Di
table.MotionDetect[0].MotionDetectWindow[2].Id=2
table.MotionDetect[0].MotionDetectWindow[2].Name=Region3
st
table.MotionDetect[0].MotionDetectWindow[2].Region[0]=0
rib
table.MotionDetect[0].MotionDetectWindow[2].Region[1]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[2]=0
ut
table.MotionDetect[0].MotionDetectWindow[2].Region[3]=0
io
table.MotionDetect[0].MotionDetectWindow[2].Region[4]=0
n
table.MotionDetect[0].MotionDetectWindow[2].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[6]=0
s.r
table.MotionDetect[0].MotionDetectWindow[2].Region[7]=0
.o
table.MotionDetect[0].MotionDetectWindow[2].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[9]=0
.
table.MotionDetect[0].MotionDetectWindow[2].Region[10]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[11]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[12]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[13]=0
General APIs 73
table.MotionDetect[0].MotionDetectWindow[2].Region[14]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[15]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[17]=0
table.MotionDetect[0].MotionDetectWindow[2].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[2].Threshold=5
table.MotionDetect[0].MotionDetectWindow[2].Window[0]=0
Da
table.MotionDetect[0].MotionDetectWindow[2].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[2].Window[2]=0
hu
table.MotionDetect[0].MotionDetectWindow[2].Window[3]=0
aH
table.MotionDetect[0].MotionDetectWindow[3].Id=3
table.MotionDetect[0].MotionDetectWindow[3].Name=Region4
table.MotionDetect[0].MotionDetectWindow[3].Region[0]=0
TT
table.MotionDetect[0].MotionDetectWindow[3].Region[1]=0
P
table.MotionDetect[0].MotionDetectWindow[3].Region[2]=0
AP
table.MotionDetect[0].MotionDetectWindow[3].Region[3]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[4]=0
IV
table.MotionDetect[0].MotionDetectWindow[3].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[6]=0
2.
table.MotionDetect[0].MotionDetectWindow[3].Region[7]=0
89
table.MotionDetect[0].MotionDetectWindow[3].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[9]=0
fo
table.MotionDetect[0].MotionDetectWindow[3].Region[10]=0
r1
table.MotionDetect[0].MotionDetectWindow[3].Region[11]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[12]=0
00
table.MotionDetect[0].MotionDetectWindow[3].Region[13]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[14]=0
M
table.MotionDetect[0].MotionDetectWindow[3].Region[15]=0
EG
table.MotionDetect[0].MotionDetectWindow[3].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[17]=0
A
table.MotionDetect[0].MotionDetectWindow[3].Sensitive=60
Di
table.MotionDetect[0].MotionDetectWindow[3].Threshold=5
table.MotionDetect[0].MotionDetectWindow[3].Window[0]=0
st
table.MotionDetect[0].MotionDetectWindow[3].Window[1]=0
rib
table.MotionDetect[0].MotionDetectWindow[3].Window[2]=0
table.MotionDetect[0].MotionDetectWindow[3].Window[3]=0
ut
table.MotionDetect[0].OsdTwinkleEnable=false
io
table.MotionDetect[0].PirMotionLevel=3
Comment —
n
Table 4-85
.o
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
.
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set motion detection config.
Example Enable motion detection:
General APIs 74
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Ena
ble=true
tWindow[0].Region[3]=1&MotionDetect[0].MotionDetectWindow[0].Region[4]=1&Motion
Detect[0].DetectVersion=V3.0
hu
Success
OK
Return
aH
In table below,
head = MotionDetect[ChannelNo]
TT
ChannelNo: integer, array index starts from 0, which means video channel(equals to
P
LineNum
Index of region, region is divided into lines and each line has several blocks, a line is
IV
Comment 1=Line 2
89
…
WinNum
fo
Index of detect window, there are 4 detect windows at present. Each window is divided
into 18 lines and 22 blocks per line.
r1
00
Appendix:
A
head.PtzManualEnable bool
devices
rib
head.TimeDivide. array<array<strin
TimeSchedule
.o
TimeSchedule g>>
head.TimeDivide.Level integer sensitive in timesection, different with global sensitive.
.
General APIs 75
ParamName ParamValue type Description
head.VolumeRatio integer Area occupancy ratio
head.SubRatio integer SubRatio
head.Region array<integer> Region
Setting of EventHandler is described in
head.EventHandler —
SetEventHandler.
Da
head.MotionDetectWin
integer It is the Id of a detect window.
dow [WinNum].Id
hu
head.MotionDetectWin
string It is the name of a detect window.
dow [WinNum].Name
aH
d detect.
It is similar with head.Region [LineNum].
IV
per line.
89
Example:
dow[WinNum].Region[ integer
MotionDetect [0].Region [0] = 4194303 (0x3FFFFF): the
r1
LineNum]
22 blocks in channel 0 line 0 is monitored.
MotionDetect [0].Region [1] =0: the 22 blocks in channel
00
4.9 Event
A
Di
Table 4-86
Syntax
io
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=<handlerName>
Method GET
n
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Alarm[0].Eve
Example
.o
ntHandler
handlerName.EventHandler.AlarmOutChannels[0]=1
.
handlerName.EventHandler.AlarmOutChannels[1]=1
Success
…
Return
handlerName.EventHandler.AlarmOutEnable=false
handlerName.EventHandler.AlarmOutLatch=10
General APIs 76
handlerName.EventHandler.BeepEnable=true
handlerName.EventHandler.Dejitter=0
handlerName.EventHandler.Delay=30
handlerName.EventHandler.LogEnable=true
handlerName.EventHandler.MailEnable=true
handlerName.EventHandler.PtzLink[0][0]=None
handlerName.EventHandler.PtzLink[0][1]=0
Da
handlerName.EventHandler.PtzLink[1][0]=None
handlerName.EventHandler.PtzLink[1][1]=0
hu
…
aH
handlerName.EventHandler.PtzLinkEnable=false
handlerName.EventHandler.RecordChannels[0]=1
handlerName.EventHandler.RecordChannels[1]=2
TT
…
P
handlerName.EventHandler.RecordEnable=true
AP
handlerName.EventHandler.RecordLatch=10
handlerName.EventHandler.SnapshotChannels[0]=1
IV
handlerName.EventHandler.SnapshotChannels[1]=1
…
2.
handlerName.EventHandler.SnapshotEnable=false
89
handlerName.EventHandler.SnapshotPeriod=3
handlerName.EventHandler.SnapshotTimes=0
fo
handlerName.EventHandler.TimeSection[0][0]=1 01:00:00-24:00:00
r1
handlerName.EventHandler.TimeSection[0][1]=1 01:00:00-24:00:00…
…
00
handlerName.EventHandler.TimeSection[6][5]=1 01:00:00-24:00:00
handlerName.EventHandler.TipEnable=true
M
handlerName.EventHandler.ExAlarmOutEnable=true
EG
handlerName.EventHandler.Enable=true,
handlerName.EventHandler.FilckerLightType=WhiteLight,
A
handlerName.EventHandler.LightLinkType=Filcker,
Di
handlerName.EventHandler.FilckerIntevalTime=5,
handlerName.EventHandler.FilckerTimes=5,
st
handlerName.EventHandler.LightDuration=10,
rib
handlerName.EventHandler.WhiteLightTimeSection=,
handlerName.EventHandler.LightBright=50
ut
handlerName.ExAlarmOutChannels[0] =2
io
handlerName.ExAlarmOutChannels[1]=3
…
n
Parameters in URL:
s.r
Alarm[ChannelNo].EventHandler
Comment
MotionDetect[ChannelNo].EventHandler
.
BlindDetect[ChannelNo].EventHandler
LossDetect[ChannelNo].EventHandler
Set event handler config
Table 4-87
General APIs 77
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Modify event handler settings.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Alarm[0].EventHandl
Example
er.AlarmOutChannels[0]=1&Alarm[0].EventHandler.AlarmOutEnable=true
Success
Da
OK
Return
Comment In below paramName, Meaning of handlerName is the same with GetEventHandler.
hu
Appendix:
aH
1},
handlerName.EventHandler.AlarmOutChann
AP
handlerName.EventHandler.AlarmOutEnable bool
function.
Range is [10—300].
fo
Range is [0—300].
Di
alarm.
Range is {None, Preset, Tour,
io
Pattern}
n
events.
ch is PTZ channel index which
.o
starts from 0.
.
General APIs 78
paramName paramValue type Description
This is the parameter of
PtzLink[ch][0],
If PtzLink[ch]][0] is
handlerName.EventHandler.PtzLink[ch][1] integer
Preset: this is preset point.
Tour: this is tour path number.
Pattern: this is pattern number.
Da
Range is [10—300].
Unit is seconds, indicates the time
handlerName.EventHandler.RecordLatch integer
to record after input alarm is
TT
cleared.
P
handlerName.EventHandler.SnapshotChann
array<integer> snapshot channel list
AP
els
Enable/Disable snapshot
handlerName.EventHandler.SnapshotEnable bool
IV
function.
Range is [0—255].
2.
handlerName.EventHandler.SnapshotPeriod integer
0 means continuously snapshot
for every frame.
fo
Range is [0—65535]
r1
(Sunday—Saturday)
ts (time section) range is [0-23],
A
Format: mask
st
hh:mm:ss-hh:mm:ss
rib
[ts]
Mask 0: this time section is not
io
used.
n
Example:
.o
TimeSection[1][0]=1
.
12:00:00-18:00:00
Means EventHandler is effective
between 12:00:00 and 18:00:00
at Monday.
General APIs 79
paramName paramValue type Description
Enable/Disable local message
handlerName.EventHandler.TipEnable bool
box tip.
handlerName.EventHandler.ExAlarmOutEna Enable/Disable extend alarm out
bool
ble ability
handlerName.EventHandler.LightingLink.Ena
bool Enable/Disable LightingLink
ble
Da
handlerName.EventHandler.LightingLink.Ligh
string range : [“Filcker”, “KeepLighting”]
aH
tLinkType
handlerName.EventHandler.LightingLink.Filc Filcker Inteval Time
float
kerIntevalTime unit: 0.1s
TT
handlerName.EventHandler.LightingLink.Filc
integer Filcker Times
P
kerTimes
AP
handlerName.EventHandler.LightingLink.Whi array<array<string
teLightTimeSection >>
2.
handlerName.EventHandler.LightingLink.Ligh
89
integer brightness
tBright
handlerName.ExAlarmOutChannels[ch] integer extend alarm out channels
fo
r1
Table 4-88
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Alarm
EG
Method GET
A
table.Alarm[0].Enable=false
st
GetEventHandler)
Success
table.Alarm[0].Name=Door1
ut
Return
table.Alarm[0].SensorType=NC
io
table.Alarm[1]….
…
n
Comment —
s.r
Table 4-89
.
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramVal
Syntax
ue>[&<paramName>=<paramValue>…]
Method GET
Description Set alarm config.
General APIs 80
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Alarm[0].Enable=true
Success
OK
Return
In below ParamName, input is external alarm input channel which starts from 0.
Comment EventHandler defines parameter of relevant actions when alarm or event happens. It's
also used in following sections about events.
Da
Appendix:
Table 4-90
fo
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AlarmOut
Method GET
r1
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AlarmOut
Success table.AlarmOut[alarmOutChannel].Mode=0
M
Return table.AlarmOut[alarmOutChannel].Name=Beep
EG
Parameters in Response:
Comment
alarmOutChannel: the alarm out channel index which starts from 0.
A
Table 4-91
st
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
rib
Method GET
ut
Example
&AlarmOut[0].Name=port1
n
Success
OK
s.r
Return
Comment port in below ParamName is alarm out port index, start form 0.
.o
.
Appendix:
General APIs 81
ParamName ParamValue type Description
Range is {0, 1, 2}
0: automatically alarm
AlarmOut[port].Mode integer
1: force alarm
2: close alarm
AlarmOut[port].Name string Alarm out port name.
Da
Table 4-92
aH
Syntax http://<server>/cgi-bin/alarm.cgi?action=getInSlots
Method GET
Description Get alarm input channel number.
TT
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getInSlots
P
Success
result=2
AP
Return
Comment —
IV
Table 4-93
Syntax http://<server>/cgi-bin/alarm.cgi?action=getOutSlots
fo
Method GET
r1
Success
result=1
Return
M
Comment —
EG
Table 4-94
st
Syntax http://<server>/cgi-bin/alarm.cgi?action=getInState
Method GET
rib
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getInState
Success
io
result=3
Return
n
A bit in the response result indicates a channel alarm states, result 3 means alarm
Comment
s.r
Table 4-95
Syntax http://<server>/cgi-bin/alarm.cgi?action=getOutState
Method GET
General APIs 82
Description Get alarm output state for all channels.
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getOutState
Success
result=0
Return
Comment A bit in the response result indicates a channel, result 1 means alarm is present.
Table 4-96
aH
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=BlindDetect
Method GET
TT
head.Enable=false
AP
Success
head.EventHandler= (output of EventHandler is described in GetEventHandler)
Return
head.Level=3
IV
Parameters in Response:
2.
head=table.BlindDetect[ChannelNo]
Comment
89
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
fo
Table 4-97
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
00
alue>[&<paramName>=<paramValue>…]
Method GET
M
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&BlindDetect[0].Enabl
Example
e=true
A
Success
OK
Di
Return
st
Parameters in URL:
In table below,
rib
Comment head=BlindDetect[ChannelNo]
ut
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
io
n
Appendix:
s.r
head.EventHandler —
SetEventHandler.
General APIs 83
ParamName ParamValue type Description
Range is [1—6].
Sensitivity of blind detection.
head.Level integer
1: lowest sensitivity.
6: highest sensitivity.
Table 4-98
aH
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=LossDetect
Method GET
TT
head=table.LossDetect [ChannelNo]
Comment
2.
ChannelNo: integer, array index starts from 0, which means video channel (equals to
89
Table 4-99
r1
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
00
Method GET
Description Set video loss detection config.
M
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LossDetect[0].Enabl
Example
EG
e=true
Success
A
OK
Return
Di
Parameters in URL:
st
In table below,
Comment head=LossDetect [ChannelNo]
rib
ChannelNo: integer, array index starts from 0, which means video channel(equals to
ut
Appendix:
n
head.EventHandler —
SetEventHandler.
.
General APIs 84
Table 4-100
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=LoginFailureAlarm
Method GET
Description Get login failure alarm config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=LoginFailureA
Example
larm
Success head.Enable=false
Da
Comment
head=table.LoginFailureAlarm
aH
Table 4-101
TT
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
P
Method GET
AP
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LoginFailureAlarm.E
Example
nable=true
2.
Success
OK
89
Return
Parameters in URL:
fo
Appendix:
00
event can be linked with send email and alarm out. The
head.Enable bool
max try login times can be configured in chapter
A
SetGeneralConfig.
Setting of EventHandler is described in
Di
head.EventHandler —
SetEventHandler.
st
rib
Table 4-102
n
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageNotExist
s.r
Method GET
Description Get storage not exist event config.
.o
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=StorageNotE
Example
.
xist
table.StorageNotExist.Enable=false
Success
table.StorageNotExist.EventHandler= (output of EventHandler is described in
Return
GetEventHandler)
General APIs 85
Comment —
Set storage not exist event config
Table 4-103
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Da
ble=true
Success
aH
OK
Return
Comment —
TT
Appendix:
P
Table 4-104
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageFailure
00
Method GET
M
Example
e
table.StorageFailure.Enable=false
A
Success
table.StorageFailure.EventHandler= (output of EventHandler is described in
Di
Return
GetEventHandler)
st
Comment —
rib
Table 4-105
ut
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
io
alue>[&<paramName>=<paramValue>…]
n
Method GET
s.r
le=true
.
Success
OK
Return
Comment —
Appendix:
General APIs 86
ParamName ParamValue type Description
StorageFailure.Enable bool Enable/Disable loss detect feature.
Setting of EventHandler is described in
StorageFailure.EventHandler —
SetEventHandler.
Table 4-106
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageLowSpace
aH
Method GET
Description Get storage low space event config.
TT
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=StorageLowS
Example
P
pace
table.StorageLowSpace.Enable=false
AP
Success
table.StorageLowSpace.EventHandler= (output of EventHandler is described in
Return
IV
GetEventHandler)
Comment —
2.
Table 4-107
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
fo
Syntax
alue>[&<paramName>=<paramValue>…]
r1
Method GET
Description Set storage low space event config.
00
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageLowSpace.E
Example
M
nable=true
Success
EG
OK
Return
Comment —
A
Di
Appendix:
st
StorageLowSpace.EventHandler —
SetEventHandler.
io
Table 4-108
.
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=NetAbort
Method GET
Description Get net abort event config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=NetAbort
General APIs 87
table.NetAbort.Enable=false
Success
table.NetAbort.EventHandler= (output of EventHandler is described in
Return
GetEventHandler)
Comment —
Set net abort event config
Table 4-109
Da
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
hu
Method GET
Description Set net abort event config.
aH
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetAbort.Enable=tru
Example
e
TT
Success
OK
Return
P
Comment —
AP
Appendix:
IV
Table 4-110
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=IPConflict
EG
Method GET
Description Get IP conflict event config.
A
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=IPConflict
Di
Success table.IPConflict.Enable=false
st
GetEventHandler)
Comment —
ut
Table 4-111
n
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
s.r
alue>[&<paramName>=<paramValue>…]
Method GET
.o
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&IPConflict.Enable=tr
ue
Success OK
Return
Comment —
General APIs 88
Appendix:
Table 4-112
http://<server>/cgi-bin/eventManager.cgi?action=getEventIndexes&code=<eventCode
aH
Syntax
>
Method GET
TT
Description Not all events support this command. Do not recommend to use it, use Attach command
instead.
AP
http://192.168.1.108/cgi-bin/eventManager.cgi?action=getEventIndexes&code=AlarmL
Example
IV
ocal
channels[0]=0
2.
channels[1]=2
89
Success channels[2]=3
Return …
fo
(This response means event happened on channel 0, channel 2 and channel 3 while
video channel index starts from 0)
r1
Parameters in URL:
00
eventCode includes:
VideoMotion: motion detection event
M
Table 4-113
http://<server>/cgi-bin/eventManager.cgi?action=attach&codes=[<eventCode>,<event
n
Syntax
Code>,…][&keepalive = 20][&heartbeat=<Heartbeat>]
s.r
Method GET
.o
VideoMotion%2CVideoLoss%2CVideoBlind]
Example
http://192.168.1.108/cgi-bin/eventManager.cgi?action=attach&codes=[All]&heartbeat=5
Success HTTP Code: 200 OK\r\n
General APIs 89
Return Cache-Control: no-cache\r\n
Pragma: no-cache\r\n
Expires: Thu, 01 Dec 2099 16:00:00 GMT\r\n
Connection: close\r\n
Content-Type: multipart/x-mixed-replace; boundary=<boundary>\r\n
Body:
--<boundary>\r\n
Da
Content-Type: text/plain\r\n
Content-Length: <data length>\r\n
hu
<eventInfo>\r\n\r\n
aH
--<boundary>\r\n
Content-Type: text/plain\r\n
Content-Length: <data length>\r\n
TT
<eventInfo>\r\n\r\n
P
For example:
AP
Cache-Control: no-cache\r\n
Pragma: no-cache\r\n
2.
Connection: close\r\n
Content-Type: multipart/x-mixed-replace; boundary=myboundary\r\n\r\n
fo
Body:
r1
--myboundary\r\n
Content-Type: text/plain\r\n
00
Content-Length: 39\r\n
Code=VideoMotion;action=Start;index=0\r\n\r\n
M
--myboundary\r\n
EG
Content-Type: text/plain\r\n
Content-Length: 38\r\n
A
Code=VideoBlind;action=Start;index=0\r\n\r\n
Di
--myboundary\r\n
Content-Type: text/plain\r\n
st
Content-Length: 9\r\n
rib
Heartbeat\r\n\r\n
--myboundary\r\n
ut
…
io
eventCode can be any one of the standard codes defined in DHIIF, or "All".
All means all kinds of the eventcode.
n
eventcode include:
s.r
General APIs 90
CrossRegionDetection: intrusion event
LeftDetection: abandoned object detection
TakenAwayDetection: missing object detection
VideoAbnormalDetection: scene change event
FaceDetection: face detect event
AudioMutation: intensity change
AudioAnomaly: input abnormal
Da
MDResult: motion detection data reporting event. The motion detect window
IV
contains 18 rows and 22 columns. The event info contains motion detect data with
mask of every row.
2.
In the example, you can see most event info is like "Code=eventcode; action=Start;
index=0", but for some specific events, they will contain an another parameter named
M
the datainfo's fomat is JSON(JavaScript Object Notation). The detail information about
the specific events and datainfo are listed in the appendix below this table.
A
keepalive: If this param exist, the client must send any data to device by this
Di
of [1,60] second.
rib
For example:
The keeplive data can be the string "keep alive".
ut
and the value is 5, it means every 5 seconds the device should send the heartbeat
s.r
General APIs 91
(0,0) 8191,0
X
Y
Da
hu
(0,8191) (8191,8191)
aH
Table 4-114
P
Syntax http://<server>/cgi-bin/eventManager.cgi?action=getCaps
AP
Method GET
Description Get event manager capabilities.
IV
Example http://192.168.1.108/cgi-bin/eventManager.cgi?action=getCaps
caps.AlarmOutEnable=true
2.
caps.BeepEnable=true
89
caps.DejitterEnable=true
caps.MMSEnable=true
fo
caps.MailEnable=true
caps.MonitorTourEnable=true
r1
caps.PtzLinkEnable=true
00
caps.RecordEnable=true
caps.SnapshotEnable=true
M
caps.TimeSectionEnable=true
EG
caps.TipEnable=true
caps.RecordCloudEnable=true,
A
caps.SnapshotCloudEnable=false,
Di
caps.SnapshotTimes[0]=3,
Success
caps.SnapshotTimes[1]=10,
st
Return
caps.SupportAlarmBell=false,
rib
caps.SupportAccessControl=false,
caps.SipCallEnable=false,
ut
caps.SupportAlarmServer=false,
io
caps.SupportPtzLinkDelay=false,
n
caps.SupportPSTNAlarmServer=false,
caps.SupportICR=false,
s.r
caps.BeepTime=false,
.o
caps.DejitterRange.Min=0,
caps.DejitterRange.Max=60
.
caps.AlarmOutLatch[0]=1,
caps.AlarmOutLatch[1]=300,
caps.RecordLatch[0]=0,
caps.RecordLatch[1]=300,
General APIs 92
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,
Da
caps.SupportLightControl=false,
caps.LinkLightBrightRange[0]=0,
hu
caps.LinkLightBrightRange[1]=100,
caps.SupportVideoMatrix=false,
aH
caps.LinkDetailCameraEnable=false,
caps.SupportDisableLinkage[0]=0
TT
caps.SupportDisableLinkage[1]=0
P
caps.SupportDisableLinkage[2]=0
caps.SupportDisableLinkage[3]=0
AP
Comment —
IV
Table 4-115
fo
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=NetAlarm
r1
Method GET
Description Get net alarm event config.
00
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=NetAlarm
M
table.NetAlarm[0].Enable=false
table.NetAlarm[0].Name=channel1
EG
Success
NetAlarm[0].SensorType=NO
Return
table.NetAlarm[0].EventHandler= (output of EventHandler is described in
A
GetEventHandler)
Di
Comment —
st
Table 4-116
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
ut
Syntax
alue>[&<paramName>=<paramValue>…]
io
Method GET
n
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetAlarm[0].Enable=
Example
true
.o
Success
OK
.
Return
Comment —
Appendix:
General APIs 93
ParamName ParamValue Description
type
NetAlarm[channel].Enable bool Enable/Disable alarm input.
Defence Area Type, it can be { "Intime",
NetAlarm[channel].DefenceAreaType string
"Delay", "Fullday" }
NetAlarm[channel].DisableDelay integer delay time of removal, unit: s
NetAlarm[channel].EnableDelay
Da
Table 4-117
http://<server>/cgi-bin/netAlarm.cgi?action=setState&channel=<ChannelNo>&alarm=<A
2.
Syntax
larm>[&name=<Name>&trigger=<Trigger>&desc=<Desc>]
89
Method GET
Description Set the netalarm state.
fo
http://192.168.1.108/cgi-bin/netAlarm.cgi?action=setState&channel=1&alarm=true&nam
Example
r1
e=somke&trigger=SmokingSensor&desc=Zone8
Success
OK
00
Return
Parameters in URL:
M
Alarm: bool, the state of the alarm, the value can be true and false, true means the alarm
is start.
A
Name: string, the name of the alarm, optional parameter, the length of this value should
Di
Optional parameter, the length of this value should less than 32.
Desc: string, the description of the alarm, optional parameter, the length of this value
ut
4.9.21 GetSupportedEvents
s.r
Table 4-118
.o
Syntax http://<server>/cgi-bin/eventManager.cgi?action=getExposureEvents
.
Method GET
Description Get the event list which the device supports.
Example http://192.168.1.108/cgi-bin/eventManager.cgi?action=getExposureEvents
Success events[0]=VideoMotion
Return events[1]=AlarmLocal
General APIs 94
events[2]=FaceDetection
events[3]=VideoMotion
…
Comment —
4.10 PTZ
Da
Table 4-119
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Ptz
TT
Method GET
P
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Ptz
table.Ptz[port].Address=8
IV
table.Ptz[port].Attribute[0]=115200
table.Ptz[port].Attribute[1]=8
2.
table.Ptz[port].Attribute[2]=Even
Success
89
table.Ptz[port].Attribute[3]=1
Return
table.Ptz[port].Homing[0]=0
fo
table.Ptz[port].Homing[1]=30
r1
table.Ptz[port].NumberInMatrixs=0
table.Ptz[port].ProtocolName=NONE
00
Parameters in Response:
Comment
port is PTZ port index, start form 0.
M
Table 4-120
A
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
alue>[&<paramName>=<paramValue>…]
Di
Method GET
st
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Ptz[0].Address=192.
168.0.1&Ptz[0].Attribute[0]=9600
ut
Success OK
io
Return
Comment port in below ParamName is PTZ port index, start form 0.
n
s.r
Appendix:
.o
General APIs 95
ParamName ParamValue type Description
19200, 38400, 57600, 115200}.
Range is {4, 5, 6, 7, 8}.
Ptz[port].Attribute[1] integer
Data bit.
Range is {Even, Mark, None, Odd, Space}.
Ptz[port].Attribute[2] string
Parity verification mode.
Range is {1, 1.5, 2}.
Da
Ptz[port].Attribute[3] float
Stop bit.
Range is {-1,0—255}
hu
Ptz[port].Homing[1] integer
After no operation timeout, PTZ go to preset point
P
set in Ptz[port].Homing[0].
AP
Ptz[port].ControlPriority string
default : "Net"
89
Table 4-121
Syntax http://<server>/cgi-bin/ptz.cgi?action=getProtocolList[&channel=<ChannelNo>]
00
Method GET
Description Get the protocol list that PTZ can support. Unsupported now.
M
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getProtocolList&channel=1
EG
info.RS[0]=Pelco
Success info.RS[1]=DH-SD1
A
Return info.Coaxial[0]=HD-CVI
Di
info.Coaxial[1]=HD-CVI2.0
st
Table 4-122
n
Syntax http://<server>/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps[&channel=<ChannelNo>]
s.r
Method GET
Description Get PTZ channel protocol capabilities.
.o
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps&channel=1
.
caps.AlarmLen=0
Success caps.AuxMax=8
Return caps.AuxMin=1
caps.CamAddrMax=255
General APIs 96
caps.CamAddrMin=1
caps.Flip=false
caps.Focus=false
caps.Interval=200
caps.Iris=false
caps.Menu=false
caps.MonAddrMax=255
Da
caps.MonAddrMin=0
caps.Name=DH-SD1
hu
caps.Pan=false
caps.PanSpeedMax=255
aH
caps.PanSpeedMin=1
caps.PatternMax=5
TT
caps.PatternMin=1
P
caps.PresetMax=80
caps.PresetMin=1
AP
caps.Tile=false
IV
caps.TileSpeedMax=255
caps.TileSpeedMin=1
2.
caps.TourMax=7
89
caps.TourMin=0
caps.Type=1
fo
caps.Zoom=false
caps.PtzMotionRange.HorizontalAngle[0]=0
r1
caps.PtzMotionRange.HorizontalAngle[1]=360
00
caps.PtzMotionRange.VerticalAngle[0]=-20
caps.PtzMotionRange.VerticalAngle[1]=90
M
caps.ZoomMax=30
EG
caps.ZoomMin=1
Parameters in URL:
Comment
A
Appendix:
st
CamAddrMax
Maximum/Minimum channel address.
n
CamAddrMin
Flip True or false, support picture flip or not.
s.r
General APIs 97
Field in response Description
PanSpeedMax
Maximum/Minimum pan speed.
PanSpeedMin
PatternMax
Maximum/Minimum pattern path number.
PatternMin
PresetMax
Maximum/Minimum preset point number.
PresetMin
Da
TileSpeedMax
Maximum/Minimum tile speed.
aH
TileSpeedMin
TourMax
Maximum/Minimum tour path number.
TT
TourMin
Type Type of PTZ protocol.
P
PtzMotionRange.HorizontalAngle angle
it only when Pan was true
IV
Table 4-123
00
Syntax http://<server>/cgi-bin/ptz.cgi?action=getStatus[&channel=<ChannelNo>]
M
Method GET
Description Get PTZ status.
EG
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getStatus&channel=1
status.UTC=6538920
A
status.MoveStatus=Idle
Di
Success
status.ZoomStatus=Idle
Return
st
status.PresetID=10
rib
status.Position=120,12,2
Comment ChannelNo: integer, video channel index which starts from 1.
ut
Basic movement
s.r
Table 4-124
.o
http://<server>/cgi-bin/ptz.cgi?action=<action>&channel=<ch>&code=<code>&arg1=<a
Syntax
.
rg1>&arg2=<arg2>&arg3=<arg3>
Method GET
Description PTZ basic movement.
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Up&arg1=0&arg2=1
Example
&arg3=0
General APIs 98
http://192.168.1.108/cgi-bin/ptz.cgi?action=stop&channel=1&code=Up&arg1=0&arg2=1&
arg3=0
Success
OK
Return
Parameters in URL:
action is PTZ control command, it can be start or stop.
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
Da
code is PTZ operation, and arg1, arg2, arg3 are arguments of operation.
code and argN values are listed in table below.
hu
larger 、Aperture smaller) would take effects temporarily, PTZ will auto—adjust the
Comment aperture after the auto—exposure recovery time (15 mins)
The default focus mode of PTZ is semi—auto, PTZ control or other operations will trigger
TT
Appendix:
AP
8]
Horizontal speed, range is
Left Pan left 0 0
fo
[1—8]
r1
[1—8] [1—8]
Vertical speed, range is Horizontal speed, range is
A
ZoomTele Zoom in 0 0 0
ut
Table 4-125
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Continuously&arg1=<a
.
Syntax
rg1>&arg2=<arg2>&arg3=<arg3>&arg4=<arg4>
Method GET
Description Start the continuous movement.
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Continuously&arg1=
General APIs 99
5&arg2=5&arg3=5&arg4=60
Success
OK
Return
Parameters in URL:
ch is PTZ channel index which starts from 1. Range is [1 — n].
arg3 is zoom speed, range is [-100—100];
Comment
arg4 is timeout value,the measurement unit is second, it's an integer greater than 0,the
Da
PTZ will stop moving automatically if timeout value reached and no"stop"command
received. The maximum timeout value is 3600 seconds.
hu
Appendix:
aH
Continuously
Pan right and tile up
2.
Continuously
00
Table 4-126
EG
http://<server>/cgi-bin/ptz.cgi?action=stop&channel=<ch>&code=Continuously&arg1=0&
Syntax
arg2=0&arg3=0&arg4=0
A
Method GET
Description Immediately stop the continuous movement.
Di
http://192.168.1.108/cgi-bin/ptz.cgi?action=stop&channel=1&code=Continuously&arg1=
st
Example
0&arg2=0&arg3=0&arg4=0
rib
Success
OK
Return
ut
Parameters in URL:
Comment
io
3D positioning
s.r
Table 4-127
http://<server>/cgi-bin/ptzBase.cgi?action=moveDirectly&channel=<ChannelNo>&start
.o
Syntax
Point[0]=<startX>&startPoint[1]=<startY>&endPoint[0]=<endX>&endPoint[1]=<endY>
.
Method GET
Three-dimensional orientation. Move to the rectangle with screen coordinate [startX,
Description
startY], [endX, endY] .
Example http://192.168.1.108/cgi-bin/ptzBase.cgi?action=moveDirectly&channel=1&startPoint[0]
Table 4-128
hu
http://<server>/cgi-bin/ptz.cgi?action=moveRelatively&channel=<ch>&arg1=<arg1>&arg2
Syntax
=<arg2>&arg3=<arg3>
aH
Method GET
Description PTZ relative movement.
TT
http://192.168.1.108/cgi-bin/ptz.cgi?action=moveRelatively&channel=1&arg1=1&arg2=1&
Example
arg3=1
P
Success
AP
OK
Return
IV
Parameters in URL:
ch is PTZ channel index which starts from 1. Range is [1 — n].
2.
Table 4-129
00
http://<server>/cgi-bin/ptz.cgi?action=moveAbsolutely&channel=<ch>&arg1=<arg1>&arg
Syntax
2=<arg2>&arg3=<arg3>
M
Method GET
EG
Example
0.3&arg3=0.5
Di
Success
OK
st
Return
Parameters in URL:
rib
Comment arg2 is absolute vertical coordinate, the normalization value is [-1, 1].
s.r
Actual range subject to equipment, you can get the detail information by protocol
4.10.3(Get PTZ Capability of Current Protocol).
Table 4-130
Syntax http://<server>/cgi-bin/ptz.cgi?action=getPresets[&channel=<ChannelNo>]
Method GET
Da
presets[0].Index=1
aH
presets[0].Name=Preset 1
Success presets[0].Type=0
Return presets[0].PresetFunction="VideoBlack"
TT
presets[0].Position=[900, -900, 5]
P
…
AP
Parameters in URL:
Comment ChannelNo: integer, video channel index which starts from 1.
IV
Table 4-131
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=GotoPreset&arg1=0&a
Syntax
rg2=<index>&arg3=0
fo
Method GET
r1
Description Go to preset.
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=GotoPreset&arg1=0&
00
Example
arg2=1&arg3=0
M
Success
OK
Return
EG
Parameters in URL:
A
Set preset
st
Table 4-132
rib
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=SetPreset&arg1=0&ar
Syntax
ut
g2=<index>&arg3=0
Method GET
io
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=SetPreset&arg1=0&a
Example
s.r
rg2=2&arg3=0
Success
.o
OK
Return
.
Parameters in URL:
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
arg2 is preset number
Set the name for specified preset
OK
Return
Parameters in URL:
hu
P
Table 4-134
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=ClearPreset&arg1=0&
AP
Syntax
arg2=<index>&arg3=0
Method GET
IV
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=ClearPreset&arg1=0
Example
89
&arg2=1&arg3=0
Success
OK
fo
Return
Parameters in URL:
r1
4.10.7 Tour
EG
Table 4-135
Di
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=StartTour&arg1=<index
Syntax
>&arg2=0&arg3=0
st
Method GET
rib
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=StartTour&arg1=1&arg
Example
2=0&arg3=0
io
Success
n
OK
Return
s.r
Parameters in URL:
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
.o
Table 4-136
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=StopTour&arg1=<index
Syntax
>&arg2=0&arg3=0
Table 4-137
http://<server>/cgi-bin/ptz.cgi?action=setTour&channel=<ch>&arg1=<index>&arg2=<nam
Syntax
TT
e>
Method GET
P
Descriptio Add tour group, including set the tour route and name. Frequently used with add tour
AP
n preset.
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=setTour&channel=1&arg1=1&arg2=1
IV
Success
OK
2.
Return
89
Parameters in URL:
ch is PTZ channel index which starts from 1. Range is [1 — n].
Comment
fo
Table 4-138
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=ClearTour&arg1=<inde
M
Syntax
x>&arg2=0&arg3=0
EG
Method GET
Description Delete the tour group with specified number.
A
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=ClearTour&arg1=1&ar
Example
Di
g2=0&arg3=0
st
Success
OK
Return
rib
Parameters in URL:
ut
Table 4-139
s.r
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=AddTour&arg1=<index
Syntax
.o
1>&arg2=<index2>&arg3=0
Method GET
.
Table 4-140
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=DelTour&arg1=<index1
Syntax
hu
>&arg2=<index2>&arg3=0
Method GET
aH
=2&arg3=0
Success
P
OK
Return
AP
Parameters in URL:
ch is PTZ channel index which starts from 1. Range is [1 — n].
IV
Comment
arg1 is the number of tour route
2.
4.10.8 Scan
fo
Table 4-141
00
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=SetLeftLimit&arg1=<ind
Syntax
ex>&arg2=0&arg3=0
M
Method GET
EG
Example
arg2=0&arg3=0
Di
Success
OK
Return
st
Parameters in URL:
rib
Table 4-142
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=SetRightLimit&arg1=<in
s.r
Syntax
dex>&arg2=0&arg3=0
.o
Method GET
Description Set right boundary.
.
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=SetRightLimit&arg1=1
Example
&arg2=0&arg3=0
Success
OK
Return
Table 4-143
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=AutoScanOn&arg1=<in
Syntax
Da
dex>&arg2=0&arg3=0
Method GET
hu
Example
&arg2=0&arg3=0
Success
OK
TT
Return
Parameters in URL:
P
Table 4-144
2.
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=AutoScanOff&arg1=<in
89
Syntax
dex>&arg2=0&arg3=0
Method GET
fo
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=AutoScanOff&arg1=1
Example
&arg2=0&arg3=0
00
Success
OK
Return
M
Parameters in URL:
EG
4.10.9 Pattern
st
Table 4-145
ut
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=SetPatternBegin&arg1=
Syntax
io
<index>&arg2=0&arg3=0
Method GET
n
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=SetPatternBegin&arg1
Example
.o
=1&arg2=0&arg3=0
Success
.
OK
Return
Parameters in URL:
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
arg1 is pattern number
Table 4-146
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=SetPatternEnd&arg1=<i
Syntax
ndex>&arg2=0&arg3=0
Method GET
Description Stop pattern record.
Da
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=SetPatternEnd&arg1=
Example
1&arg2=0&arg3=0
hu
Success
OK
Return
aH
Parameters in URL:
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
TT
AP
Table 4-147
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=StartPattern&arg1=<ind
Syntax
IV
ex>&arg2=0&arg3=0
Method GET
2.
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=StartPattern&arg1=1&
Example
arg2=0&arg3=0
fo
Success
OK
r1
Return
Parameters in URL:
00
Stop pattern
EG
Table 4-148
A
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=StopPattern&arg1=<ind
Syntax
ex>&arg2=0&arg3=0
Di
Method GET
st
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=StopPattern&arg1=1&
Example
arg2=0&arg3=0
ut
Success
OK
io
Return
n
Parameters in URL:
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
s.r
4.10.10 Pan
.
Start pan
Table 4-149
OK
Return
Parameters in URL:
hu
Comment
ch is PTZ channel index which starts from 1. Range is [1 — n].
aH
Stop pan
Table 4-150
TT
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=AutoPanOff&arg1=0&ar
Syntax
g2=0&arg3=0
P
Method GET
AP
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=AutoPanOff&arg1=0&
Example
arg2=0&arg3=0
2.
Success
OK
89
Return
Parameters in URL:
fo
Comment
ch is PTZ channel index which starts from 1. Range is [1 — n].
r1
Table 4-151
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=PtzAutoMovement
A
Method GET
Di
Example
ment
rib
table.PtzAutoMovement[port][Task].Enable = true
table.PtzAutoMovement[port][Task].TimeSection[week][section] = 0 00:00:00-23:59:59
ut
…
io
table.PtzAutoMovement[port][Task].Function = None
n
table.PtzAutoMovement[port][Task].ScanId = 0
Success
s.r
table.PtzAutoMovement[port][Task].PresetId = 0
Return
table.PtzAutoMovement[port][Task].PatternId = 0
.o
table.PtzAutoMovement[port][Task].TourId = 0
.
table.PtzAutoMovement[port][Task].AutoHoming.Time = 30
table.PtzAutoMovement[port][Task].SnapshotEnable = false
table.PtzAutoMovement[port][Task].SnapshotDelayTime = 30
Parameters in Response:
Comment
port is PTZ port index, start from 0.
Table 4-152
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
Da
alue>[&<paramName>=<paramValue>…]
Method GET
hu
Example
[0].Function=Preset&PtzAutoMovement[0][0].PresetId=1
Success
OK
TT
Return
Parameters in URL:
P
In table below,
AP
head=PtzAutoMovement[port][task]
Comment port is PTZ port index, start from 0.
IV
week: from 1 to 7.
section: time section, from 0 to 5.
89
Appendix:
fo
timeSchedule[week][section]=1 10:00:00-11:00:00
head.TimeSection timeSchedule
…
M
Table 4-153
s.r
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Restart&arg1=0&arg
Syntax
2=0&arg3=0
.o
Method GET
.
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Reset&arg1=0&arg2
Syntax
=0&arg3=0
hu
Method GET
aH
Success
OK
P
Return
AP
Parameters in URL:
Comment
ch is PTZ channel index which starts from 1. Range is [1 — n].
IV
Table 4-155
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Menu&arg1=0&arg2
r1
Syntax
=0&arg3=0
Method GET
00
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Menu&arg1=0&arg
Example
2=0&arg3=0
EG
Success
OK
A
Return
Parameters in URL:
Di
Comment
ch is PTZ channel index which starts from 1. Range is [1 — n].
st
Table 4-156
ut
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Exit&arg1=0&arg2=0&
Syntax
arg3=0
io
Method GET
n
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Exit&arg1=0&arg2=0
Example
&arg3=0
.o
Success
OK
.
Return
Parameters in URL:
Comment
ch is PTZ channel index which starts from 1. Range is [1 — n].
Confirm
Success
OK
Return
hu
Parameters in URL:
Comment
aH
Table 4-158
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=<code>&arg1=<arg1
P
Syntax
>&arg2=<arg2>&arg3=<arg3>
AP
Method GET
Description Start the basic operation of menu.
IV
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=MenuUp&arg1=0&
Example
2.
arg2=0&arg3=0
89
Success
OK
Return
fo
Parameters in URL:
ch is PTZ channel index which starts from 1. Range is [1 — n].
r1
Comment
code is PTZ operation, and arg1, arg2, arg3 are arguments of operation.
code and argN values are listed in table below.
00
Appendix:
M
EG
MenuDown MenuDown 0 0 0
Di
MenuLeft MenuLeft 0 0 0
st
MenuRight MenuRight 0 0 0
rib
4.11 Record
ut
io
Table 4-159
s.r
Syntax http://<server>/cgi-bin/recordManager.cgi?action=getCaps
.o
Method GET
Description Get record manager capabilities.
.
Example http://192.168.1.108/cgi-bin/recordManager.cgi?action=getCaps
caps.MaxPreRecordTime=30
Success
caps.PacketLengthRange[0]=1
Return
caps.PacketLengthRange[1]=60
Comment —
hu
Table 4-160
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Record
P
Method GET
AP
table.Record[channel].PreRecord=6
2.
table.Record[channel].TimeSection[weekday][0]=65535 00:00:00-24:00:00
table.Record[channel].TimeSection[weekday][1]=0 02:00:00-24:00:00
89
Success
table.Record[channel].TimeSection[weekday][2]=0 03:00:00-24:00:00
Return
table.Record[channel].TimeSection[weekday][3]=0 04:00:00-24:00:00
fo
table.Record[channel].TimeSection[weekday][4]=0 05:00:00-24:00:00
r1
table.Record[channel].TimeSection[weekday][5]=0 06:00:00-24:00:00
Parameters in Response:
00
channel: integer, array index starts from 0, which means video channel(equals to video
M
Record config contains pre record time and record time sections of every day.
A
Table 4-161
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
st
Syntax
alue>[&<paramName>=<paramValue>…]
rib
Method GET
Description Set record config.
ut
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Record[0].TimeSecti
io
on[0][0]=6 00:00:00-23:59:59
n
Example Set record time to every Sunday all day. Record type is motion detection and alarm.
s.r
In this example, "6 00:00:00-23:59:59" means motion detection and alarm record all day
(6 = 4 & 2, alarm is 4, motion detection is 2.).
.o
Success
OK
.
Return
Parameters in URL:
In table below,
Comment
ch: integer, array index starts from 0, which means video channel (equals to video
channel index -1, and so 0 means channel 1).
Appendix:
Saturday),7:Holiday
aH
Table 4-162
M
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=RecordMode
Method GET
EG
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RecordMode
Success
Di
table.RecordMode[Channel].Mode=0
Return
st
Parameters in Response:
rib
Comment Channel: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
ut
Table 4-163
n
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
s.r
alue>
Method GET
.o
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RecordMode[0].Mod
Example
e=0
Success
OK
Return
Appendix:
Range is {0, 1, 2 }.
0: automatically record
hu
RecordMode[Channel].Mode integer
1: manually record
aH
2: stop record.
Table 4-164
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MediaGlobal
IV
Method GET
2.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MediaGlobal
table.MediaGlobal.OverWrite=true,
fo
table.MediaGlobal.PacketType=0,
table.MediaGlobal.PacketLength=60,
r1
Success
table.MediaGlobal.PacketSize=1024,
Return
table.MediaGlobal.LogRecord=false,
00
table.MediaGlobal.LogEncode=false,
M
table.MediaGlobal.SnapFormatAs=MainFormat
Comment —
EG
Table 4-165
Di
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>
st
Method GET
rib
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MediaGlobal.SnapF
Example
ormatAs=MainFormat
io
Success
OK
n
Return
s.r
Comment —
.o
Appendix:
.
Table 4-166
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=factory.create
Method GET
Da
Success
result=08137
aH
Return
Comment The result is the finder's objectId, needed by the following API.
Step 2 Start to find media files satisfied the conditions with the finder.
TT
P
Table 4-167
http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile&object=<objectId>&condition
AP
.Channel=<ChannelNo>&condition.StartTime=<start>&condition.EndTime=<end>[&c
Syntax
ondition.Dirs[0]=<dir>&condition.Types[0]=<type>&condition.Flags[0]=<flags>&conditi
IV
on.Events[0]=<event>&condition.VideoStream=<stream>]
2.
Method GET
89
Description Check if there are files that satisfy all the conditions.
Find a file in channel 1, in directory "/mnt/dvr/sda0",event type is "AlarmLocal" or
fo
"VideoMotion", file type is "dav", and time between 2014-1-1 12:00:00 and 2015-1-10
12:00:00 , URL is:
r1
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&conditio
n.Channel=1&condition.Dirs[0] =/mnt/dvr/sda0&condition.Types[0]=dav&condition.Eve
00
nts[0]=AlarmLocal&condition.Events[1]=VideoMotion&condition.StartTime=2014-1-1%2
M
012:00:00&condition.EndTime=2015-1-10%2012:00:00&condition.VideoStream=Main
Success
EG
OK
Return
A
Di
st
rib
ut
io
n
s.r
.o
.
Comment type : which types of the file you want to find. It is an array. The index starts from 0. The
range of type is {"dav", "jpg", "mp4"}. If omitted, find files with all the types.
aH
flags : which flags of the file you want to find. It is an array. The index starts from 0. The
range of flag is {"Timing", "Manual", "Marker", "Event", "Mosaic", "Cutout"}. If omitted,
TT
event : by which event the record file is triggered. It is an array. The index starts from 0.
The range of event is {"AlarmLocal", "VideoMotion", "VideoLoss", "VideoBlind",
AP
"Traffic*"}. This condition can be omitted. If omitted, find files of all the events.
IV
stream : which video stream type you want to find. The range of stream is {"Main",
"Extra1", "Extra2", "Extra3"}. If omitted, find files with all the stream types.
2.
Table 4-168
http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=<objectId>&cou
fo
Syntax
nt=<fileCount>
r1
Method GET
Description Find the next files no more than fileCount.
00
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&cou
Example
M
nt=100
found=1
EG
items[0].Channel=1
items[0].StartTime=2011-1-1 12:00:00
A
items[0].EndTime=2011-1-1 13:00:00
Di
Success items[0].Type=dav
st
Return items[0].Events[0]=AlarmLocal
rib
items[0].VideoStream=Main
items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
ut
items[0].Length=790
items[0].Duration=3600
io
Appendix:
Field in Description
.o
Response
.
Table 4-169
TT
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=close&object=<objectId>
P
Method GET
Description Stop finding.
AP
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=close&object=08137
IV
Success
OK
Return
2.
Comment —
89
Table 4-170
fo
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=destroy&object=<objectId>
r1
Method GET
Description Destroy the media file finder.
00
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=destroy&object=08137
M
Success
OK
Return
EG
Comment —
A
This API is the same as the API in "4.11.5 Find Media Files".
Step 2 Start to find media files satisfied the common conditions and FaceDetection condition
ut
Table 4-171
n
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
Method GET
s.r
Start to find media files satisfied the common conditions and FaceDetection conditions
Description
.o
Search directory list, if omit, search all. Each dir path max
+Dirs array<string> O
aH
++FaceDetecti
object R DB filter for FaceDetection
onRecordFilter
P
+++Mask int O Mask Status, 0: all, 1: not wearing mask, 2: wearing mask
+++Beard int O Beard Status, 0: all, 1: no beard, 2: has beard
fo
[ Response Params ] ( OK )
r1
[ Example ]
GET
00
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Ch
M
annel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-10%201
2:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.Events[0]=FaceDetect
EG
Request
ion&condition.DB.FaceDetectionRecordFilter.ImageType=GlobalSence&condition.DB.Face
DetectionRecordFilter.Sex=Man&condition.DB.FaceDetectionRecordFilter.Age[0]=25&cond
A
ition.DB.FaceDetectionRecordFilter.Age[1]=40&condition.DB.FaceDetectionRecordFilter.Gl
Di
asses=1
st
Respons
OK
e
rib
Table 4-172
io
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
n
Method GET
Description Get the media file information found by the finder.
s.r
+CutLength int R File length that cut between start time and end time
+Length int O File length of the whole file
hu
+++Mask int O
mask
+++Beard int O Beard Status, 0: unknown, 1: no beard, 2: has beard
fo
[ Example ]
r1
GET
Request http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=1
00
00
M
found=100
items[0].Channel=1
EG
items[0].StartTime=2011-1-1 12:00:00
items[0].EndTime=2011-1-1 13:00:00
A
items[0].Type=jpg
Di
items[0].Events[0]=FaceDetection
st
items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
rib
items[0].CutLength=79000
Respons items[0].SummaryNew[0].Key=FaceDetectionRecord
ut
e items[0].SummaryNew[0].Value.ImageType=GlobalSence
items[0].SummaryNew[0].Value.TimeStamp.UTC=134652732
io
items[0].SummaryNew[0].Value.TimeStamp.UTCMS=134
n
items[0].SummaryNew[0].Value.Sex=Man
s.r
items[0].SummaryNew[0].Value.Age=30
items[0].SummaryNew[0].Value.Glasses=1
.o
items[0].SummaryNew[0].Value.Mask=2
.
items[0].SummaryNew[0].Value.Beard=1
…
Step 4 Close the finder.
This API is the same as the API in "4.11.5 Find Media Files".
Step 2 Start to find media files satisfied the common conditions and FaceRecognition
conditions with the finder.
hu
Table 4-173
aH
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
Method GET
TT
Description Start to find media files satisfied the common conditions and FaceRecognition conditions
with the finder.
P
+Channel int R The video channel to search, video channel index start from
1, use -1 to search all video channel.
89
+Flags array<string> O Search flags. It can be: "Timing", "Manual", "Marker", "Event",
M
"Mosaic", "Cutout"
should include “Event”.
EG
Search directory list, if omit, search all. Each dir path max
+Dirs array<string> O
string length is 259.
Di
itionRecordFilt
er
ut
dress
+++StartTime string R Start time to search, ex: "2010-05-25 12:05:00"
n
+++Person object O Search condition of history person and the similar face group
.o
person candidates
++++Name string O Person's name, max string length is 15
.
nge
[ Response Params ] ( OK )
P
[ Example ]
AP
Request GET
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Ch
IV
annel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-10%201
2:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.Events[0]=FaceRecog
2.
nition&condition.DB.FaceRecognitionRecordFilter.RegType=RecSuccess&condition.DB.Fa
89
ceRecognitionRecordFilter.StartTime=2014-1-1%2012:00:00&condition.DB.FaceRecognitio
nRecordFilter.EndTime=2015-1-10%2012:00:00&condition.DB.FaceRecognitionRecordFilte
fo
r.Person.Sex=Male&condition.DB.FaceRecognitionRecordFilter.Person.Country=CN&condi
r1
tion.DB.FaceRecognitionRecordFilter.Person.Age[0]=25&condition.DB.FaceRecognitionRe
cordFilter.Person.Age[1]=40&condition.DB.FaceRecognitionRecordFilter.Person.Glasses=1
00
&condition.DB.FaceRecognitionRecordFilter.GroupID[0]=10001&condition.DB.FaceRecogn
itionRecordFilter.GroupID[1]=10003&condition.DB.FaceRecognitionRecordFilter.GroupID[2]
M
=10005&condition.DB.FaceRecognitionRecordFilter.SimilaryRange[0]=40&condition.DB.Fa
EG
ceRecognitionRecordFilter.SimilaryRange[1]=100
Respons OK
A
e
Di
Table 4-174
rib
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
Method GET
ut
dress
+++IsGlobalSc
P
++++FilePath string O The file path of the picture, max string length is 259
+++Object object O The target face info
2.
++++Eye int O Eye status, 0: not detected, 1: close eye, 2: open eye
r1
++++Mouth int O Mouth status, 0: not detected, 1: close mouth, 2: open mouth
Mask status, 0: not detected, 1: not wearing mask, 2: wearing
00
++++Mask int O
mask
M
string O
eType "Unknown"
s.r
+++++Feature
int O Feature State, 0:Unknown, 1:Failed, 2:OK
State
.
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=1
00
items[0].Length =790
items[0].SummaryNew[0].Key=FaceRecognitionRecord
hu
items[0].SummaryNew[0].Value.RecResult=1
items[0].SummaryNew[0].Value.MachineAddress=BinJiang
aH
items[0].SummaryNew[0].Value.IsGlobalScene=true
items[0].SummaryNew[0].Value.ImageInfo.Length=123
TT
items[0].SummaryNew[0].Value.ImageInfo.FilePath=/tmp/1.jpg
P
Respons items[0].SummaryNew[0].Value.Object.Sex=Man
e items[0].SummaryNew[0].Value.Object.Age=40
AP
items[0].SummaryNew[0].Value.Object.Glasses=1
IV
items[0].SummaryNew[0].Value.Object.Eye=2
items[0].SummaryNew[0].Value.Object.Mouth=1
2.
items[0].SummaryNew[0].Value.Candidates[0].Similarity=50
89
items[0].SummaryNew[0].Value.Candidates[0].Person.Name=ZhangSan
items[0].SummaryNew[0].Value.Candidates[0].Person.Birthday=1980-01-01
fo
items[0].SummaryNew[0].Value.Candidates[0].Person.Sex=Male
items[0].SummaryNew[0].Value.Candidates[0].Person.Country=CN
r1
items[0].SummaryNew[0].Value.Candidates[0].Person.Province=ZheJiang
00
items[0].SummaryNew[0].Value.Candidates[0].Person.City=HangZhou
items[0].SummaryNew[0].Value.Candidates[0].Person.CertificateType=IC
M
items[0].SummaryNew[0].Value.Candidates[0].Person.ID=1234567890
EG
items[0].SummaryNew[0].Value.Candidates[0].Person.FeatureState=0
…
A
This API is the same as the API in "4.11.5 Find Media Files".
rib
Step 2 Start to find media files satisfied the common conditions and HumanTrait conditions
s.r
Table 4-175
.
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
Method GET
Start to find media files satisfied the common conditions and HumanTrait conditions with
Description
the finder.
+Dirs array<string> O
string length is 259.
AP
array<string> O
Color HumanTrait for available values, max array size is 4
M
++++HasHat int O Has hat or not, 0: all, 1: not has hat, 2: has hat
++++HasBag int O Has bag or not, 0: all, 1: not has bag, 2: has bag
A
5: hiddened
[ Response Params ] ( OK )
ut
[ Example ]
GET
io
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Ch
n
annel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-10%201
s.r
2:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.Events[0]=HumanTrai
t&condition.DB.HumanTraitRecordFilter.HumanAttributes.CoatColor[0]=White&condition.D
.o
Request
B.HumanTraitRecordFilter.HumanAttributes.CoatColor[1]=Yellow&condition.DB.HumanTrait
.
RecordFilter.HumanAttributes.CoatType=1&condition.DB.HumanTraitRecordFilter.HumanAt
tributes.HasHat=2&condition.DB.HumanTraitRecordFilter.HumanAttributes.Sex=Man&cond
ition.DB.HumanTraitRecordFilter.HumanAttributes.Age[0]=30&condition.DB.HumanTraitRe
cordFilter.HumanAttributes.Age[1]=50&condition.DB.HumanTraitRecordFilter.HumanAttribu
Table 4-176
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
Da
Method GET
Descripti
Get the media file information found by the finder
hu
on
[ Request Params ] ( key=value format at URL )
aH
+CutLength int R File length that cut between start time and end time
00
++++CoatType int O
for available values,
++++Trousers Trousers color, refer to TrousersColor in 16.1.3.5 [Event]
ut
string O
Color HumanTrait for available values,
io
++++HasHat int O Has hat or not, 0: unknown, 1: not has hat, 2: has hat
++++HasBag int O Has bag or not, 0: unknown, 1: not has bag, 2: has bag
.o
mask
++++Beard int O Beard status, 0: not detected, 1: no beard, 2: has beard
TT
+++HumanPat
string O Human picture path, max string length is 259
h
fo
+++HumanSce
string O Human scene picture path, max string length is 259
r1
nePath
[ Example ]
00
GET
Request http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=1
M
00
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
items[0].Length=790
items[0].SummaryNew.Key=HumanTraitRecord
hu
items[0].SummaryNew.Value.HumanAttributes.CoatColor=White
items[0].SummaryNew.Value.HumanAttributes.CoatType=1
aH
items[0].SummaryNew.Value.HumanAttributes.TrousersColor=Black
items[0].SummaryNew.Value.HumanAttributes.TrousersType=1
TT
items[0].SummaryNew.Value.HumanAttributes.HasHat=2
P
Respons items[0].SummaryNew.Value.HumanAttributes.HasBag=1
e items[0].SummaryNew.Value.HumanAttributes.Sex=Man
AP
items[0].SummaryNew.Value.HumanAttributes.Age=30
IV
items[0].SummaryNew.Value.HumanAttributes.HairStyle=2
items[0].SummaryNew.Value.HumanAttributes.HasUmbrella=1
2.
items[0].SummaryNew.Value.HumanAttributes.Bag=0
89
items[0].SummaryNew.Value.HumanAttributes.Cap=2
items[0].SummaryNew.Value.FaceAttributes.Sex=Man
fo
items[0].SummaryNew.Value.FaceAttributes.Age=35
items[0].SummaryNew.Value.FaceAttributes.Mask=0
r1
items[0].SummaryNew.Value.FaceAttributes.Beard=1
00
items[0].SummaryNew.Value.FaceAttributes.Glass=2
items[0].SummaryNew.Value.FaceAttributes.Emotion=Smile
M
items[0].SummaryNew.Value.FacePath=/mnt/2010/8/11/dav/15:40:50.jpg
EG
items[0].SummaryNew.Value.FaceScenePath=/mnt/2010/8/11/dav/15:40:51.jpg
…
A
This API is the same as the API in "4.11.5 Find Media Files".
rib
Step 2 Start to find media files satisfied the common conditions and TrafficCar conditions with
s.r
the finder
.o
Table 4-177
.
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
Method GET
Start to find media files satisfied the common conditions and TrafficCar conditions with
Description
the finder.
+Channel int R
1, use -1 to search all video channel.
P
+Events array<string> O
Ignored, use Event under DB param.
Search directory list, if omit, search all. Each dir path max
fo
+Dirs array<string> O
string length is 259.
r1
<compare
EG
<compare Plate type condition, use compare condition format, ex: ["==",
+++PlateType O
st
condition> "Armed"],
<compare Plate color condition, use compare condition format, ex: ["==",
rib
+++PlateColor O
condition> "Blue"],
ut
+++VehicleCol <compare Vehicle color condition, use compare condition format, ex:
O
or condition> ["==", "White"],
io
[ Response Params ] ( OK )
n
[ Example ]
s.r
GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condit
ion.Channel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-1
.o
0%2012:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.DB.TrafficCar.
.
Request PlateNumber[0]=%3d%3d&condition.DB.TrafficCar.PlateNumber[1]=%2a888&condition.D
B.TrafficCar.Speed[0]=%3c%3e&condition.DB.TrafficCar.Speed[1]=40&condition.DB.Traffi
cCar.Speed[2]=80&condition.DB.TrafficCar.VehicleColor[0]=%3d%3d&condition.DB.Traffic
Car.VehicleColor[1]=White
Table 4-178
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
Method GET
Descripti
Get the media file information found by the finder
Da
on
[ Request Params ] ( key=value format at URL )
hu
+CutLength int R File length that cut between start time and end time
r1
+++VehicleCol
string O Vehicle color, ex: "Yellow", "Blue", … etc
Di
or
+++Country string O Country info. max string length is 19
st
[ Example ]
GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&co
io
Request
unt=100
n
s.r
.o
.
Respons items[0].Length=790
e items[0].Summary.TrafficCar.PlateNumber=A08888
hu
items[0].Summary.TrafficCar.PlateType=Unknown
items[0].Summary.TrafficCar.PlateColor=Blue
aH
items[0].Summary.TrafficCar.VehicleColor=White
items[0].Summary.TrafficCar.Country=China
TT
items[0].Summary.TrafficCar.Speed=70
P
items[0].Summary.TrafficCar.Event=TrafficJunction
…
AP
This API is the same as the API in "4.11.5 Find Media Files".
Step 5 Destroy the finder.
2.
This API is the same as the API in "4.11.5 Find Media Files".
89
This API is the same as the API in "4.11.5 Find Media Files".
00
Step 2 Start to find media files satisfied the common conditions and IVS conditions with the
finder
M
Table 4-179
EG
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
Method GET
A
Start to find media files satisfied the common conditions and IVS conditions with the
Di
Description
finder.
st
+Channel int R
1, use -1 to search all video channel.
n
+Flags array<string> O
"Mosaic", "Cutout"
+Events array<string> O Search event list,
Search directory list, if omit, search all. Each dir path max
+Dirs array<string> O
string length is 259.
+++Action string O
"Cross"
aH
[ Example ]
P
GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condit
AP
ion.Channel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-1
Request 0%2012:00:00&condition.Types[0]=jpg&condition.DB.IVS.Rule=CrossLineDetection&cond
IV
ition.DB.IVS.Action=Cross&condition.DB.IVS.ObjectType[0]=Human&condition.DB.IVS.Ob
jectType[1]=NonMotor
2.
Response OK
89
Table 4-180
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
r1
Method GET
Description Get the media file information found by the finder
00
items[0].EndTime=2011-1-1 13:00:00
items[0].Type=jpg
hu
items[0].Events[0]=CrossLineDetection
Response
aH
items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
items[0].Length=790
items[0].Summary.IVS.Rule=CrossLineDetection
TT
items[0].Summary.IVS.Action=Cross
P
items[0].Summary.IVS.ObjectType=Human
AP
…
Step 4 Close the finder.
IV
This API is the same as the API in "4.11.5 Find Media Files".
Step 5 Destroy the finder.
2.
This API is the same as the API in "4.11.5 Find Media Files".
89
This API is the same as the API in "4.11.5 Find Media Files".
00
Step 2 Start to find media files satisfied the common conditions and NonMotor conditions with
the finder
M
Table 4-181
EG
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
Method GET
A
Start to find media files satisfied the common conditions and NonMotor conditions with
Di
Description
the finder.
st
+Flags array<string> O
"Mosaic", "Cutout"
+Events array<string> O Search event list,
Search directory list, if omit, search all. Each dir path max
+Dirs array<string> O
string length is 259.
"CoachMotorcycle"
+++Helmet int O Helmet status, 0 : unknown, 1 : without helmet, 2 : with helmet
IV
[ Response Params ] ( OK )
[ Example ]
2.
GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condit
89
ion.Channel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-1
Request 0%2012:00:00&condition.Types[0]=jpg&condition.DB.NonMotorRecordFilter.NumOfCyclin
fo
g=2&condition.DB.NonMotorRecordFilter.Color=White&condition.DB.NonMotorRecordFilt
r1
er.Category=Bicycle&condition.DB.NonMotorRecordFilter.Helmet=1
Response OK
00
Table 4-182
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
EG
Method GET
A
"CoachMotorcycle"
+++Helmet int O Helmet status, 0 : unknown, 1 : without helmet, 2 : with helmet
IV
[ Example ]
GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&
2.
Request
count=100
89
found=100
items[0].Channel=1
fo
items[0].StartTime=2011-1-1 12:00:00
r1
items[0].EndTime=2011-1-1 13:00:00
items[0].Type=jpg
00
items[0].Events[0]=NonMotorDetect
items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
M
Response
items[0].Length=790
EG
items[0].SummaryNew.Key=NonMotorRecordFilter
items[0].SummaryNew.Value.NumOfCycling=2
A
items[0].SummaryNew.Value.Color=White
Di
items[0].SummaryNew.Value.Category=Bicycle
items[0].SummaryNew.Value.Helmet=1
st
…
rib
This API is the same as the API in "4.11.5 Find Media Files".
n
Table 4-183
.
Syntax http://<server>/cgi-bin/RPC_Loadfile/<Filename>
Method GET
Description Download a file by filename. To get filename by chapter file finding.
http://192.168.1.108/cgi-bin/RPC_Loadfile/mnt/sd/2015-01-08/001/dav/19/19.57.12-19.
Example
58.25[M][0@0][0].dav
Table 4-184
http://<server>/cgi-bin/loadfile.cgi?action=startLoad&channel=<ChannelNo>&startTim
TT
Syntax
e=<starttime>&endTime=<endtime>[&subtype=<typeNo>]
P
Method GET
AP
Description Download the media data between start time and end time.
http://192.168.1.108/cgi-bin/loadfile.cgi?action=startLoad&channel=1&startTime=2012-
Example
IV
10-8%2013:00:01&endTime=2012-10-8%2014:00:01&subtype=0
HTTP Code: 200 OK
2.
Content-Type: Application/octet-stream
89
Success Content-Length:<fileLength>
Return Body:
fo
<data>
r1
<data>
Parameters in URL:
00
0-Main Stream
Comment
EG
1-Extra Stream 1
2-Extra Stream 2
A
starttime & endtime: video start time and end time. Time format: yyyy-mm-dd
Di
hh:mm:ss
st
Table 4-185
ut
http://<server>/cgi-bin/RecordStreamInterleaved.cgi?action=attachStream&path=<File
Syntax
io
name>[&password=<password>]
n
Method GET
s.r
Description Encrypted Download a file by filename. To get filename by chapter file finding.
http://172.29.2.241/cgi-bin/RecordStreamInterleaved.cgi?action=attachStream&path=/
Example
.o
mnt/sd/2019-07-01/001/dav/12/12.36.16-12.36.26[F][0@0][0].dav
.
preset password
aH
Table 4-186
Syntax http://<server>/cgi-bin/userManager.cgi?action=getUserInfo&name=<userName>
IV
Method GET
2.
user.Name=admin
user.Memo=admin 's account
fo
Success user.Group=admin
r1
Return user.Reserved=true
user.Sharable=true
00
user. AuthList=<authList>
M
Comment —
EG
Table 4-187
Di
Syntax http://<server>/cgi-bin/userManager.cgi?action=getUserInfoAll
st
Method GET
rib
users[0].Group=admin
io
users[0].Id=1
users[0].Memo=admin 's account
n
users[0].Name=admin
s.r
Success
users[0].Reserved=true
Return
.o
users[0].Sharable=true
users[0]. AuthList=<authList>
.
users[1].Group=admin
…
Comment —
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=getActiveUserInfoAll
users[0].name=admin
hu
users[0].ip=10.43.2.16
Success
users[0].group=admin
aH
Return
users[0].clienttype=web3.0
users[0].logintime=2011-11-08 09:51:03
TT
Comment —
P
Table 4-189
Syntax http://<server>/cgi-bin/userManager.cgi?action=getGroupInfo&name=<groupName>
2.
Method GET
89
group.Name=admin
Success
group.Memo=administrator group
r1
Return
group.AuthorityList=<authList>
Parameters in URL:
00
The device has one or two default user groups: "admin"or "admin"and "user". The
M
"admin"group has all the authorities of operating the device. The "user"group only has
Comment
monitoring and replaying authorities.
EG
If the group named groupName does not exist, the device returns Error.
Di
Table 4-190
Syntax http://<server>/cgi-bin/userManager.cgi?action=getGroupInfoAll
ut
Method GET
io
group[0].Id=1
s.r
group[0].Name=admin
.o
group[0].Memo=administrator group
Success group[0].AuthorityList=<authList>
.
Return group[0].AuthorityDetail.Bypass[0]=1
group[0].AuthorityDetail.Bypass[1]=2
group[0].AuthorityDetail.Bypass[2]=3
…
group[1].AuthorityList=<authList>
group[1]….
hu
…
Comment
aH
Table 4-191
AP
http://<server>/cgi-bin/userManager.cgi?action=addUser&user.Name=<userName>&u
Syntax ser.Password=<userPassword>&user.Group=<userGroup>&user.Sharable=<userSh
IV
arable>[&user.Memo=<userMemo>&user.Reserved=<userReserved>]
Method GET
2.
http://192.168.1.108/cgi-bin/userManager.cgi?action=addUser&user.Name=George&us
Example
er.Password=123456&user.Group=user&user.Sharable=true&user.Reserved=false
fo
Success
OK
r1
Return
Parameters in URL:
00
userGroup: string, the range is "admin"and "user". In different group, the user has
Comment different authorities.
M
Table 4-192
st
Syntax http://<server>/cgi-bin/userManager.cgi?action=deleteUser&name=<userName>
rib
Method GET
Description Delete user with name username.
ut
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=deleteUser&name=George
io
Success
OK
n
Return
s.r
Comment —
.o
Table 4-193
http://<server>/cgi-bin/userManager.cgi?action=modifyUser&name=<UserName>&user
Syntax
.Memo=<userMemo>&user.Group=<userGroup>&user.Reserved=<userReserved>&us
Comment User is identified by <UserName>, other params are the same with AddUser.
hu
Table 4-194
TT
http://<server>/cgi-bin/userManager.cgi?action=modifyPassword&name=<username>
Syntax
&pwd=<newPwd>&pwdOld=<oldPwd>
P
Method GET
AP
Example
&pwd=abcdef&pwdOld=123456
Success
2.
OK
Return
89
Table 4-195
00
http://<server>/cgi-bin/userManager.cgi?action=modifyPasswordByManager&userNam
Syntax e=<username>&pwd=<newPwd>&managerName=<managerName>&managerPwd=
M
<managerPwd>&accountType=<accountType>
EG
Method GET
Description Manager Modify common user's password.
A
http://192.168.1.108/cgi-bin/userManager.cgi?action=modifyPasswordByManager&use
Di
Example rName=Geoge&pwd=123456&managerName=admin&managerPwd=abc123&account
st
Type=0
Success
rib
OK
Return
ut
Table 4-196
http://<server>/cgi-bin/log.cgi?action=startFind&condition.StartTime=<start>&condition
Syntax
hu
.EndTime=<end>[&condition.Type=<type>]
Method GET
aH
Example http://192.168.1.108/cgi-bin/log.cgi?action=startFind&condition.StartTime=2011-1-1%2
012:00:00&condition.EndTime=2011-1-10%2012:00:00
P
Success token=1
AP
Return count=100
Parameters in URL:
IV
In response, there is a token for further log finding process. If token is greater than 0,
Comment logs are found; otherwise no logs are found.
89
Type: log type. The range is { "System", "Config", "Event", "Storage", "Account", "Data",
"File", "CourseRecord" }.
fo
Table 4-197
Syntax http://<server>/cgi-bin/log.cgi?action=doFind&token=<TokenValue>&count=<logCount>
M
Method GET
EG
found=2
Di
items[0].RecNo=789
items[0].Time=2011-05-20 11:59:10
st
items[0].Type=ClearLog
rib
items[0].User=admin
Success items[1].Detail.Compression=H.264->MJPG
ut
Return items[1].Detail.Data=Encode
io
items[1].RecNo=790
n
items[1].Time=2011-05-20 11:59:21
s.r
items[1].Type=SaveConfig
items[1].User=System
.o
…
.
Parameters in URL:
The TokenValue is got by startFind in the above section, and logCount is the count of
Comment
logs for this query.
The maximum value of logCount is 100.
Field in Description
Response
found Count of found log, found is 0 if no log is found.
User User name.
Type Log type.
Da
Table 4-198
TT
Syntax http://<server>/cgi-bin/log.cgi?action=stopFind&token=<TokenValue>
Method GET
P
Example http://192.168.1.108/cgi-bin/log.cgi?action=stopFind&token=1
Success
IV
OK
Return
Parameters in URL:
2.
Comment
The TokenValue is got by startFind in above section
89
Table 4-199
00
Syntax http://<server>/cgi-bin/log.cgi?action=clear
M
Method GET
Description Clear all the logs.
EG
Example http://192.168.1.108/cgi-bin/log.cgi?action=clear
Success
A
OK
Return
Di
Comment —
st
Table 4-200
http://<server>/cgi-bin/Log.backup?action=All&condition.StartTime=<startTime>&cond
io
Syntax
ition.EndTime=<endTime>
n
Method GET
s.r
Download the log information between the start time and the end time as a file named
Description
Log.Backup default.
.o
http://192.168.1.108/cgi-bin/Log.backup?action=All&condition.StartTime=2014-8-25%2
.
Example
000:02:32&condition.EndTime=2020-8-25%2001:02:32
HTTP/1.1 200 OK
Success
CONTENT-LENGTH: 743087
Return
CONNECTION: close
&w_User: default
&Time: 2014-09-01 15:20:45
&Type: VideoLoss
&Content: EventType: VideoLoss
channel: <8>
Da
…
Parameters in URL:
aH
startTime/endTime: the start/end time when log info built. 24 hour Format, as:
yyyy-mm-dd hh:mm:ss.
TT
Comment
For example:
P
2014-8-25 00:02:32
AP
2020-8-25 01:02:32
IV
http://<server>/cgi-bin/log.cgi?action=doSeekFind&token=<TokenValue>&offset=<offsetVal
Syntax
ue>&count=<logCount>
fo
Method GET
r1
Descripti
Find log with token TokenValue, offset offsetValue and count logCount.
on
00
http://192.168.1.108/cgi-bin/log.cgi?action=doSeekFind&token=46878&offset=200&count=2
Example
00
M
found=2
EG
items[0].RecNo=789
items[0].Time=2011-05-20 11:59:10
A
items[0].Type=ClearLog
Di
items[0].User=admin
items[0].Detail.Compression=H.264->MJPG
st
items[0].Detail.Data=Encode
rib
Success
items[1].RecNo=790
Return
items[1].Time=2011-05-20 11:59:21
ut
items[1].Type=SaveConfig
io
items[1].User=System
n
items[1].Detail.Compression=H.264->MJPG
s.r
items[1].Detail.Data=Encode
.o
…
.
Parameters in URL:
Comme The TokenValue is got by startFind in the above section, and logCount is the count of logs
nt for this query.offsetValue is the number which count from the first matched.
The maximum value of logCount is 100.
Method POST
Use this message to upload the firmware, and when the device receiving all the data
hu
Description successfully, it will start to upgrade the device, and then use the getState method to get
aH
the state.
POST /cgi-bin/upgrader.cgi?action=uploadFirmware HTTP/1.1
Host: 192.168.1.108
TT
Connection: keep-alive
P
Content-Length: xxxxxxxxx
IV
Example -----------------------------8655433224198
Content-Disposition:form-data;name="upgrade"; filename= "xxxxxx.bin"
2.
Content-Type: application/octet-stream
89
Firmware data….
fo
r1
-----------------------------8655433224198--
Success
OK
00
Return
Comment —
M
EG
Table 4-202
Di
Syntax http://<server>/cgi-bin/upgrader.cgi?action=getState
Method GET
st
Use this message to upload the firmware, and when the device receiving all the data
rib
Description successfully, it will start to upgrade the device, and then use the getState method to get
the state.
ut
Example http://192.168.1.108/cgi-bin/upgrader.cgi?action=getState
io
Success state.State=Upgrading
n
Return state.Progress=45
s.r
Parameters in Response:
State: the state of the upgrade, it can be Preparing, Downloading, DownloadFailed,
Comment
.o
Example http://192.168.1.108//cgi-bin/upgrader.cgi?action=updateFirmwareByUrl&Url=https://aa
a/bbb/ccc/license.bin
hu
Success OK
Return
aH
4.15 Wiper
P
Table 4-204
http://<server>/cgi-bin/rainBrush.cgi?action=moveContinuously&interval=<Second>[&c
2.
Syntax
hannel=<ChannelNo>]
89
Method GET
Description Control the wiper to move continuously.
fo
Example http://192.168.1.108/cgi-bin/rainBrush.cgi?action=moveContinuously&interval=5
r1
Success
OK
Return
00
Second: integer, rain brush movement time interval which start from 1.
Comment
ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
M
EG
Table 4-205
Di
Syntax http://<server>/cgi-bin/rainBrush.cgi?action=stopMove[&channel=<ChannelNo>]
st
Method GET
Description Control the wiper to stop moving.
rib
Example http://192.168.1.108/cgi-bin/rainBrush.cgi?action=stopMove
ut
Success
OK
Return
io
Comment ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
n
s.r
Table 4-206
.
Syntax http://<server>/cgi-bin/rainBrush.cgi?action=moveOnce[&channel=<ChannelNo>]
Method GET
Description Control the wiper to move once.
Example http://192.168.1.108/cgi-bin/rainBrush.cgi?action=moveOnce
4.16 Security
Da
Table 4-207
aH
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
TT
Method GET
P
Example
Policy=2
IV
Success
OK
Return
2.
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor
TT
Method GET
P
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor
Success head.Name=Day,
IV
Return head.Brightness=50,
head.Contrast=50,
2.
head.Saturation=50,
89
head.Hue=50,
head.Gamma=50,
fo
head.ChromaSuppress=50,
head.Style=Standard,
r1
head.TimeSection=1 00:00:00-24:00:00
00
In table below,
EG
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
night, and 2 means config for normal scene.
st
rib
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
io
Method SET
n
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoColor[0][0].Brig
Example
htness=50
.o
Success
.
OK
Return
Parameters in URL:
Comment paramName and paramValue are as table below.
In table below,
Appendix:
Da
5.1.2 Sharpness
TT
P
Get sharpness
AP
Table 5-1
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInSharpness
IV
Method GET
2.
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInSharp
Example
ness
fo
Success head.Level=4
Return head.Sharpness=8
r1
Parameters in URL:
paramName and paramValue are as table below.
00
In table below,
M
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
night, and 2 means config for normal scene.
Di
Set sharpness
st
rib
Table 5-2
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
ut
Syntax
alue>[&<paramName>=<paramValue>…]
io
Method SET
Description Set sharpness
n
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInSharpness[0]
s.r
Example
[0].Level=10&VideoInSharpness[0][0].Mode=1&VideoInSharpness[0][0].Sharpness=0
.o
Success
OK
Return
.
Parameters in URL:
paramName and paramValue are as table below.
Comment
In table below,
head = VideoInSharpness [ChannelNo] [ConfigNo]
Appendix:
Table 5-3
P
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoImageControl
AP
Method GET
Description Get flip, mirror and Rotate90
IV
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoImageC
Example
2.
ontrol
89
head.Flip=true
Success
head.Mirror=false
Return
fo
head.Rotate90=0
Parameters in Response:
r1
Comment
video channel index -1, and so 0 means channel 1).
M
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
night, and 2 means config for normal scene.
EG
Table 5-4
Di
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
st
alue>[&<paramName>=<paramValue>…]
rib
Method SET
Description Set flip, mirror and Rotate90
ut
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoImageControl[
Example
io
0].Flip=true
Success
n
OK
Return
s.r
Parameters in URL:
.o
Comment
video channel index -1, and so 0 means channel 1).
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
night, and 2 means config for normal scene.
Appendix:
5.2 Exposure
TT
P
Get exposure
Table 5-5
2.
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInExposure
89
Method GET
Description Get exposure
fo
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInExpos
Example
r1
ure
head.AntiFlicker=0
00
head.Gain=50
head.GainMax=50
M
head.GainMin=0
EG
Success
head.Iris=50
Return
head.IrisAuto=false
A
head.Mode=0
Di
head.Value1=40
st
head.Value2=40
Parameters in Response:
rib
head = table.VideoInExposure[ChannelNo][ConfigNo]
ut
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Comment
video channel index -1, and so 0 means channel 1).
io
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
n
Set exposure
.o
Table 5-6
.
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method SET
Description Set exposure
Comment
video channel index -1, and so 0 means channel 1).
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
hu
Appendix:
Range is {0,1,2}
P
AntiFlicker mode:
AP
2: 60 Hz AntiFlicker
Range is [0—100]
2.
GainMin.
r1
true: IrisAuto
head.IrisAuto bool
EG
false: No IrisAuto
A
0: "Auto" by default
Di
1: Low noise
2: Anti-smear
st
4: Manual (range)
rib
7: Gain priority
io
8: Shutter priority
n
time of manualExposure
Range is [0-1000], unit is millisecond
head.Value2 float Upper limit of AutoExposure time, should be
bigger than ExposureValue1
Table 5-7
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInBacklight
hu
Method GET
Description Get backlight
aH
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInBackli
Example
ght
TT
head.GlareInhibition=50
Success
head.Mode=Off
P
Return
head.WideDynamicRange=50
AP
Parameters in Response:
head = table.VideoInBacklight[ChannelNo][ConfigNo]
IV
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Comment
2.
Set backlight
r1
Table 5-8
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
00
Syntax
alue>[&<paramName>=<paramValue>…]
M
Method SET
Description Set backlight
EG
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInBacklight[0][
Example
A
0].GlareInhibition=50
Success
Di
OK
Return
st
Parameters in URL:
rib
head = VideoInBacklight[ChannelNo][ConfigNo]
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Comment
ut
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
night, and 2 means config for normal scene.
n
s.r
Appendix:
.o
Table 5-9
TT
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInWhiteBalan
Syntax
ce
P
Method GET
AP
Example
Balance
head.GainBlue=50
2.
Success
head.GainRed=50
89
Return
head.Mode=Auto
Parameters in Response:
fo
head = table.VideoInWhiteBalance[ChannelNo][ColorConfigNo]
r1
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Comment
video channel index -1, and so 0 means channel 1).
00
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
night, and 2 means config for normal scene.
M
EG
Table 5-10
A
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
Di
alue>[&<paramName>=<paramValue>…]
st
Method SET
Description Set white balance
rib
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInWhiteBalanc
Example
ut
e[0][0].GainBlue=50
Success
io
OK
Return
n
Parameters in URL:
s.r
head = VideoInWhiteBalance[ChannelNo][ConfigNo]
ChannelNo: integer, array index starts from 0, which means video channel (equals to
.o
Comment
video channel index -1, and so 0 means channel 1).
.
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
night, and 2 means config for normal scene.
Appendix:
5.5 Day-Night
TT
Get day-night
IV
Table 5-11
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInDayNight
2.
Method GET
89
head.Delay=10
r1
Success head.Mode=Brightness
Return head.Sensitivity=2
00
head.Type=Mechanism
M
head = table.VideoInDayNight[ChannelNo][ConfigNo]:
ChannelNo: integer, array index starts from 0, which means video channel (equals to
EG
Set Day-Night
st
rib
Table 5-12
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
ut
alue>[&<paramName>=<paramValue>…]
io
Method SET
Description Set day-night
n
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInDayNight[0][
s.r
Example
0].Mode=BlackWhite
.o
Success
OK
Return
.
Parameters in URL:
Comment ParamName and paramValue are as table below. In table below,
head = VideoInDayNight[ChannelNo][ConfigNo]
Appendix:
To get the capability set of video input, refer to 4.5.12. For instance, you can use the following URL:
IV
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 .
2.
89
Table 5-13
r1
http://<server>/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=<zoomNo>[&cha
Syntax
nnel=<ChannelNo>]
00
Method GET
Description Ajust magnification and the focus.
M
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.5&zoom=
Example
EG
-0.5
Success
A
OK
Return
Di
Parameters in URL:
focusNo : float, the range is between 0 and 1; -1 means reset to position 0.
st
Comment
zoomNo : float, the range is between 0 and 1; -1 means reset to position 0.
rib
Table 5-14
s.r
http://<server>/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=<fo
Syntax
cusNo>&zoom=<zoomNo>[&channel=<ChannelNo>]
.o
Method GET
.
Return
Parameters in URL:
hu
The value means the moving speed of motor lens, positive value means move forwards,
Comment
P
This command is used to drive the lens move continuously, until it reaches end.
When the motor is moving, you can send this command again with "focus" or "zoom"
IV
-1, and the focus parameter should be -1 when adjust the zoom parameter.
89
Table 5-15
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=autoFocus[&channel=<ChannelNo>]
00
Method GET
Description Auto focus.
M
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=autoFocus
EG
Success
OK
Return
A
Parameters in URL:
Comment
Di
Table 5-16
http://<server>/cgi-bin/devVideoInput.cgi?action=getFocusStatus[&channel=<Channel
io
Syntax
No>]
n
Method GET
s.r
status.Focus=0.5
Success
.
status.Zoom=0.5
Return
status.Status=Normal
Parameters in URL:
Comment ChannelNo: integer, video channel index which starts from 1.
Parameters in Response:
Table 5-17
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInZoom
hu
Method GET
Description Get zoom
aH
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInZoo
Example
m
TT
head.DigitalZoom=true
Success Return
head.Speed=7
P
Parameters in URL:
AP
head = table.VideoInZoom[ChannelNo][ConfigNo]
Comment ChannelNo: integer, array index starts from 0, which means video channel (equals to
IV
Set zoom
fo
Table 5-18
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
r1
Syntax
alue>[&<paramName>=<paramValue>…]
Method SET
00
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInZoom[0][0].D
Example
igitalZoom=false&VideoInZoom[0][0].Speed=8
EG
Success
OK
A
Return
Parameters in URL:
Di
head = VideoInZoom[ChannelNo][ConfigNo]
st
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Comment
rib
Appendix:
n
head.Speed
head.Mode=0,
head.Sensitivity=1,
hu
Success head.FocusLimitSelectMode=Manual,
aH
Return head.FocusLimit=2000,
head.FocusFarLimit=5000,
head.AutoFocusTrace=0,
TT
head.IRCorrection=0
P
Comment —
AP
Set focus
IV
Table 5-20
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
2.
alue>[&<paramName>=<paramValue>…]
89
Method SET
Description Set focus
fo
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInFocus[0][0].F
Example
ocusLimit=1000
r1
Success
OK
Return
00
Parameters in URL:
M
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
Di
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for
st
Appendix:
ut
head.FocusLimit integer
will be displayed as 200000mm+.
Get the "FocusLimit" capacity to determine the
value range.
head.FocusFarLimit integer Customized requirement. Remote focus limit
2: auto correct
Range is 0,1,2
hu
head.Sensitivity integer
0—high, 1—default, 2—low
aH
5.7 Lighting
TT
P
Get lighting
IV
Table 5-21
2.
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Lighting
89
Method GET
Description Get lighting
fo
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Lighting
r1
head.Correction=50
head.FarLight[0].Angle=0
00
head.FarLight[0].Light=0
Success head.Mode=ZoomPrio
M
Return head.NearLight[0].Angle=0
EG
head.NearLight[0].Light=0
head.MiddleLight[0].Angle=50
A
head.MiddleLight[0].Light=50
Di
head = table.Lighting[ChannelNo][ConfigNo]:
st
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Comment video channel index -1, and so 0 means channel 1).
rib
ConfigNo: array index, can be 0, 1 or 2. 0 means config for day, 1 means config for night,
ut
Set lighting
n
Table 5-22
s.r
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
.o
Method GET
.
Appendix:
P
AP
head.Mode string
The following are special for composite lamps.
89
Light compensation.
r1
Range is [0—100].
head.FarLight[Index].Light integer
The luminance of far light.
M
Range is [0—100].
head.MiddleLight[Index].Light integer
EG
head.NearLight[Index].Light integer
The luminance of near light.
Di
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.
n
Table 5-23
.o
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions
.
Method GET
Get video in options config, such as Backlight, ExposureSpeed, DayNightColor,
Description
DayOptions, NightOptions, and NormalOptions.
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptio
Example
ns
head.FlashControl.Mode=0
head.FlashControl.Pole=0
hu
head.FlashControl.Value=0
aH
head.FlashControl.PreValue=0
head.Flip=false
head.Gain=50
TT
head.GainAuto=true
P
head.IrisAuto=false
AP
head.Mirror=false
head.NightOptions.AntiFlicker=0
IV
head.NightOptions.Backlight=0
head.NightOptions.BacklightRegion[0]=3096
2.
head.NightOptions.BacklightRegion[1]=3096
89
head.NightOptions.BacklightRegion[2]=5096
head.NightOptions.BacklightRegion[3]=5096
fo
head.NightOptions.BrightnessThreshold=50
Success
r1
head.NightOptions.DayNightColor=2
Return
head.NightOptions.ExposureMode=0
00
head.NightOptions.ExposureSpeed=0
head.NightOptions.ExposureValue1=0
M
head.NightOptions.ExposureValue2=40
EG
head.NightOptions.ExternalSyncPhase=125
head.NightOptions.Flip=false
A
head.NightOptions.Gain=50
Di
head.NightOptions.GainAuto=true
head.NightOptions.GainBlue=50
st
head.NightOptions.GainGreen=50
rib
head.NightOptions.GainMax=50
head.NightOptions.GainMin=0
ut
head.NightOptions.GainRed=50
io
head.NightOptions.GlareInhibition=0
n
head.NightOptions.IrisAuto=true
head.NightOptions.Mirror=false
s.r
head.NightOptions.Profile=3
.o
head.NightOptions.ReferenceLevel=50
head.NightOptions.Rotate90=0
.
head.NightOptions.SunriseHour=0
head.NightOptions.SunriseMinute=0
head.NightOptions.SunriseSecond=0
head.NightOptions.SunsetHour=23
head.NormalOptions.Backlight=0
head.NormalOptions.BacklightRegion[0]=3096
hu
head.NormalOptions.BacklightRegion[1]=3096
aH
head.NormalOptions.BacklightRegion[2]=5096
head.NormalOptions.BacklightRegion[3]=5096
head.NormalOptions.BrightnessThreshold=50
TT
head.NormalOptions.DayNightColor=1
P
head.NormalOptions.ExposureMode=0
AP
head.NormalOptions.ExposureSpeed=0
head.NormalOptions.ExposureValue1=0
IV
head.NormalOptions.ExposureValue2=40
head.NormalOptions.ExternalSyncPhase=125
2.
head.NormalOptions.Flip=false
89
head.NormalOptions.Gain=50
head.NormalOptions.GainAuto=true
fo
head.NormalOptions.GainBlue=50
r1
head.NormalOptions.GainGreen=50
head.NormalOptions.GainMax=50
00
head.NormalOptions.GainMin=0
head.NormalOptions.GainRed=50
M
head.NormalOptions.GlareInhibition=0
EG
head.NormalOptions.IrisAuto=true
head.NormalOptions.Mirror=false
A
head.NormalOptions.Profile=0
Di
head.NormalOptions.ReferenceLevel=50
head.NormalOptions.Rotate90=0
st
head.NormalOptions.SunriseHour=0
rib
head.NormalOptions.SunriseMinute=0
head.NormalOptions.SunriseSecond=0
ut
head.NormalOptions.SunsetHour=23
io
head.NormalOptions.SunsetMinute=59
n
head.NormalOptions.SunsetSecond=59
head.NormalOptions.SwitchMode=0
s.r
head.ReferenceLevel=50
.o
head.ReferenceLevelEnable=false
head.Rotate90=0
.
head.SignalFormat=BT656
head.WhiteBalance=Disable
Parameters in Response:
Comment
head = table.VideoInOptions[ChannelNo]
Table 5-24
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Da
Method GET
Set video in options config, such as Backlight, ExposureSpeed, DayNightColor,
Description
hu
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].E
xposureMode=0&VideoInOptions[0].ExposureSpeed=0
TT
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].E
AP
xposureMode=1&VideoInOptions[0].ExposureSpeed=0&VideoInOptions[0].GainMin=0
&VideoInOptions[0].GainMax=60
IV
2.
xposureMode=2&VideoInOptions[0].ExposureSpeed=0&VideoInOptions[0].GainMin=0
&VideoInOptions[0].GainMax=50&VideoInOptions[0].ExposureValue1=0&VideoInOptio
fo
ns[0].ExposureValue2=20
r1
Set Manual:
00
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].E
M
xposureMode=4&VideoInOptions[0].ExposureSpeed=32&VideoInOptions[0].GainMin=
Example 0&VideoInOptions[0].GainMax=50&VideoInOptions[0].ExposureValue1=40&VideoInOp
EG
tions[0].ExposureValue2=40
A
Set SmartIRExposure:
Di
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].S
st
martIRExposure=true
rib
Filp:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].Fli
io
p=true
n
Mirror:
s.r
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].Mi
rror=true
.o
Or turn 90°:
.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].R
otate90=1
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].W
hiteBalance=Custom )
hu
Success
OK
Return
aH
Parameters in URL:
In table below, head = VideoInOptions[ChannelNo]
TT
Comment
ChannelNo: integer, array index starts from 0, which means video channel (equals to
P
Appendix:
IV
0: backlight closed.
head.Backlight integer
1: backlight grade 1
fo
...
r1
n - backlight grade n
Range is {0,1,2}
00
0: always multicolor
head.DayNightColor integer
1: autoswitch along with brightness,
M
2: always monochrome
EG
Range is {0,1,2, 4}
0: AutoExposure
A
2: Exposure first
4: Manual.
st
Range is [0 — n+1]
rib
0: forbid flash
head.FlashControl.Mode integer
aH
1: always flash
2: auto flash
Range is {0,1, 2, 3}
TT
Trigger mode:
P
0: low level
head.FlashControl.Pole integer
AP
1: high level
2: rising-edge
IV
3: falling-edge
Range is [0—15]
2.
Flashlight time-unit:
89
0: 0us,
1: 64us,
integer
fo
head.FlashControl.Value
2: 128us,
r1
3: 192us
…
00
15 - 960us
Range is [0—100]
M
head.Flip
false: disable video flip function
Di
Range is [0—100]
head.Gain integer If GainAuto is true, it's upper limit of auto gain, else
st
Range is [0—100]
integer Gain for blue value, Value is effective when
ut
head.GainBlue
WhiteBalance is "Custom."
io
Range is [0—100]
n
WhiteBalance is "Custom."
Range is [0—100]
.o
WhiteBalance is "Custom."
true: GainAuto
head.GainAuto bool
false: No GainAuto
true: IrisAuto
head.IrisAuto bool
false: No IrisAuto
frames.
AP
Range is {0,1,2}
Video rotation:
IV
Range is {0,1,2}
AntiFlicker mode:
00
2: 60 Hz AntiFlicker
EG
Range is [0—100]
head.GlareInhibition integer GlareInhibition:
A
0: Close GlareInhibition.
Di
integer
sThreshold when brightness is less than the
BrightnessThreshold, parameters change to
ut
Nightoptions.
io
true: IrisAuto
head.NightOptions.IrisAuto bool
n
false: No IrisAuto
s.r
de
when time is after sunset time and before sunrise.
aH
head.NightOptions.Exposure
integer
Speed
2.
head.NightOptions.Exposure
float
89
Value1
head.NightOptions.Exposure
float
fo
Value2
r1
head.NightOptions.Gain integer
head.NightOptions.GainAuto bool
00
head.NightOptions.GainBlue integer
head.NightOptions.GainGree
M
integer
n
EG
head.NightOptions.GainRed integer
head.NightOptions.WhiteBal Range is the same as relevant items of day
A
String
ance options in this table.
Di
head.NightOptions.Referenc Example:
integer
eLevel Value range of head.NightOptions.ExposureSpeed
st
float
yncPhase
ut
head.NightOptions.AntiFlicke
integer
r
io
head.NightOptions.Backlight integer
n
head.NightOptions.DayNight
integer
s.r
Color
head.NightOptions.Exposure
.o
integer
Mode
.
head.NightOptions.GlareInhi
integer
bition
head.NightOptions.Mirror integer
head.NightOptions.Flip integer
head.NormalOptions.Sunrise
integer
Minute
hu
head.NormalOptions.Sunrise
integer
aH
Second
head.NormalOptions.Sunset
integer
TT
Hour
head.NormalOptions.Sunset
integer
P
Minute
AP
head.NormalOptions.Sunset
integer
Second
IV
head.NormalOptions.Exposu
integer
reSpeed
2.
head.NormalOptions.Exposu
89
float
reValue1
head.NormalOptions.Exposu
fo
float
reValue2 NomalOptions contain a set of parameters similar
r1
bool
to NightOptions in this table.
M
head.NormalOptions.GainBlu
integer
e
EG
head.NormalOptions.GainGr
integer
een
A
head.NormalOptions.GainRe
integer
Di
d
st
head.NormalOptions.WhiteB
String
alance
rib
head.NormalOptions.Referen
integer
ut
ceLevel
head.NormalOptions.Externa
io
float
lSyncPhase
n
head.NormalOptions.AntiFlic
integer
s.r
ker
head.NormalOptions.Backlig
.o
integer
ht
.
head.NormalOptions.DayNig
integer
htColor
head.NormalOptions.Exposu
integer
reMode
Table 6-1
aH
Syntax http://<server>/cgi-bin/storageDevice.cgi?action=factory.getPortInfo
Method GET
TT
info.Total=2
AP
info.Plug=1
Success info.Mask=1
IV
Return info.Bad=0
2.
info.IDE=1
info.Esata=4
89
Comment —
fo
Table 6-2
00
Syntax http://<server>/cgi-bin/storageDevice.cgi?action=factory.getCollect
M
Method GET
Description Get all the names of storage devices.
EG
Example http://192.168.1.108/cgi-bin/storageDevice.cgi?action=factory.getCollect
A
list[0]="/dev/sda0"
Success
list[1]="/dev/sda1"
Di
Return
list[2]="/dev/sg1"
st
Comment —
rib
Table 6-3
Syntax http://<server>/cgi-bin/storageDevice.cgi?action=getDeviceAllInfo
n
Method GET
s.r
Example http://192.168.1.108/cgi-bin/storageDevice.cgi?action=getDeviceAllInfo
list.info0].Detail[0].IsError=false
.
list.info[0].Detail[0].Pointer=27023434
Success
list.info[0].Detail[0].TotalBytes=0
Return
list.info[0].Detail[0].Type=ReadWrite
list.info[0].Detail[0].Path="/mnt/dvr/sda0"
Table 6-4
aH
Syntax http://<server>/cgi-bin/storage.cgi?action=getCaps
Method GET
Description
TT
Success caps.RedundantDisk.Support=false
AP
Return caps.SupportRemoteLimit=true
Comment —
IV
Table 6-5
http://<server>/cgi-bin/storageDevice.cgi?action=setDevice&type=FormatPatition&path=<p
fo
Syntax
ath> [&<paramName>=<paramValue>…]
r1
Method GET
Descriptio
Format camera SD card.
00
n
[ Request Params ] (key=value format at URL )
M
http://192.168.1.108/cgi-bin/storageDevice.cgi?action=setDevice&type=FormatPatition&pa
Example
th= /dev/sda&formattype[0].fs=fat32
rib
Success
OK
ut
Return
If set successfully, return true, else return false.
io
Comment path : The stringValue is got from cgi API "Get storage device information"
n
6.2 NAS
.
table.NAS[0].Protocol="FTP"
Success table.NAS[0].Address="www.ttt.com"
hu
Return table.NAS[0].Port=21
aH
table.NAS[0].UserName="anonymity"
table.NAS[0].Password="none"
table.NAS[0].Directory="share"
TT
Comment —
P
Table 6-7
IV
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
2.
Method GET
89
1&NAS[0].Enable=true
Success
r1
OK
Return
00
Parameters in URL:
In table below,
Comment
M
Head=NAS[index]
EG
Appendix:
A
Table 6-8
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=RecordStoragePoi
Syntax
hu
nt
Method GET
aH
gePoint
table.RecordStoragePoint [0].TimingRecord.Local=1
P
table.RecordStoragePoint [0].TimingRecord.Redundant=Redundant
AP
table.RecordStoragePoint [0].TimingRecord.Remote=FTP
Success
table.RecordStoragePoint [0].TimingRecord.AutoSync=false
IV
Return
table.RecordStoragePoint [0].TimingRecord.AutoSyncRange=0
2.
table.RecordStoragePoint [0].TimingRecord.LocalForEmergency=false
table.RecordStoragePoint [0].TimingRecord.CompressBefore=15
89
Comment —
Set record storage point config
fo
r1
Table 6-9
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
00
alue>[&<paramName>=<paramValue>…]
Method GET
M
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RecordStoragePoint[
Example
0].TimingRecord.Local=local
A
Success
OK
Di
Return
st
Parameters in URL:
In table below,
rib
ch: integer, array index starts from 0, which means video channel(equals to video
Comment
ut
"EventSnapShot"}
s.r
Appendix:
.o
Sync
directory or not.
From the remote directory recovering
hu
synchronized.
When the remote directory is
RecordStoragePoint[ch].[recType].Local
P
directory or not.
RecordStoragePoint[ch].[recType].Comp The days' data which will be
IV
integer
ressBefore compressed.
2.
Table 6-10
r1
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup
Method GET
00
http://192.168.1.168/cgi-bin/configManager.cgi?action=getConfig&name=StorageGrou
Example
p
EG
table.StorageGroup[0].Channels[0].MaxPictures=0
A
table.StorageGroup[0].FileHoldTime=0
table.StorageGroup[0].Memo=For Reading & Writing Files
Di
table.StorageGroup[0].Name=ReadWrite
st
table.StorageGroup[0].OverWrite=true
rib
table.StorageGroup[0].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S
][%R].jpg
ut
table.StorageGroup[0].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.
io
Success %s[%E][%O@%S][%R].dav
Return table.StorageGroup[1].Channels[0].MaxPictures=0
n
table.StorageGroup[1].FileHoldTime=0
s.r
table.StorageGroup[1].OverWrite=true
.
table.StorageGroup[1].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S
][%R].jpg
table.StorageGroup[1].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.
%s[%E][%O@%S][%R].dav
Table 6-11
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Da
me=main
Success
aH
OK
Return
Parameters in URL:
TT
In table below,
Comment
P
Appendix:
2.
StorageGroup[Index].OverWrite bool
storage.
00
StorageGroup[Index].Channels[ch].
string The channel path.
Path
A
6.4 SDEncrypt
Di
st
Table 6-12
http://<server>/cgi-bin/SDEncrypt.cgi?action=encrypt&deviceName=<deviceName>&p
io
Syntax
assword=<password>
n
Method GET
s.r
Example
password=123456
.
Success
OK
Return
If set successfully, return true, else return false.
Comment
deviceName: The stringValue is got from cgi API Get storage device information
Syntax
assword=<password>
Method GET
hu
http://192.168.1.108/cgi-bin/SDEncrypt.cgi?action=decrypt&deviceName=/dev/mmc0&
Example
password=123456
Success
TT
OK
Return
P
deviceName: The stringValue is got from cgi API Get storage device information
Comment
(cgi-bin/storageDevice.cgi?action=getDeviceAllInfo).
IV
Table 6-14
fo
http://<server>/cgi-bin/SDEncrypt.cgi?action=clearPassword&deviceName=<deviceNa
Syntax
r1
me>&password=<password>
Method GET
00
Example
mmc0&password=123456
EG
Success
OK
Return
A
deviceName: The stringValue is got from cgi API Get storage device information
Comment
(cgi-bin/storageDevice.cgi?action=getDeviceAllInfo).
st
Table 6-15
n
http://<server>/cgi-bin/SDEncrypt.cgi?action=modifyPassword&deviceName=<device
Syntax
s.r
Name>&password=<password>&oldPassword=<oldPassword>
Method GET
.o
http://192.168.1.108/cgi-bin/SDEncrypt.cgi?action=clearPassword&deviceName=/dev/
Example
mmc0&password=123456&oldPassword=admin123
Success
OK
Return
Table 6-16
hu
http://<server>/cgi-bin/SDEncrypt.cgi?action=getOperateErrorPolicy&deviceName=<de
Syntax
aH
viceName>&operate=<operate>
Method GET
TT
When decrypt, clearPassword, modifyPassword failed, get the error info, leftTimes and
Description
left time.
P
http://192.168.1.108/cgi-bin/SDEncrypt.cgi?action=getOperateErrorPolicy&deviceNam
Example
AP
e=/dev/mmc0&operate=decrypt
Success policy.leftTimes=5
IV
Return policy.lockSeconds=30
If set successfully, return true, else return false.
2.
deviceName: the stringValue is got from cgi API Get storage device information
89
(cgi-bin/storageDevice.cgi?action=getDeviceAllInfo).
Comment
Operate: operate type, can be: decrypt, modifyPassword and clearPassword
fo
Table 6-17
A
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageHealthAlar
Syntax
m
Di
Method GET
st
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageHealthAlar
Example
m
ut
table.StorageHealthAlarm.Enable=true
io
Success table.StorageHealthAlarm.LowerLimit=10
Return table.StorageHealthAlarm.EventHandler= (output of EventHandler is described in
n
GetEventHandler)
s.r
Comment —
.o
Table 6-18
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
7.1.1 GUISet
hu
Table 7-1
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=GUISet
TT
Method GET
P
Description Get the GUI settings. Every video out screen has a group setting.
AP
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=GUISet
table.GUISet[index].WindowAlpha=128
IV
table.GUISet[index].TimeTitleEnable=true
table.GUISet[index].TimeTitlePos[0]=0
2.
table.GUISet[index].TimeTitlePos[1]=0
89
table.GUISet[index].TimeTitlePos[2]=8191
table.GUISet[index].TimeTitlePos[3]=8191
fo
table.GUISet[index].MenuShowOption=0
Success
r1
table.GUISet[index].MenuAutoHideTime=10
Return table.GUISet[index].AutoLogout=10
00
table.GUISet[index].ChannelTitleShowEnable=true
table.GUISet[index].ChannelTitlePos[0]=0
M
table.GUISet[index].ChannelTitlePos[1]=0
EG
table.GUISet[index].ChannelTitlePos[2]=8191
table.GUISet[index].ChannelTitlePos[3]=8191
A
table.GUISet[index].AutoGuideEnable=true
Di
…
Parameters in Response :
st
Comment
index: the array index which starts from 0.
rib
Table 7-2
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
io
Syntax
alue>[&<paramName>=<paramValue>…]
n
Method GET
s.r
Description Set the GUI settings. Every video out screen has a group setting.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&GUISet[0].WindowAl
.o
Example
pha=192&GUISet[0].TimeTitleEnable=false&GUISet[0].MenuShowOption=1
.
Success
OK
Return
Appendix:
GUISet[index].TimeTitlePos[0] integer
GUISet[index].TimeTitlePos[1] integer
The position of the time title.
TT
GUISet[index].TimeTitlePos[2] integer
GUISet[index].TimeTitlePos[3] integer
P
GUISet[index].ChannelTitlePos[0] integer
GUISet[index].ChannelTitlePos[1] integer
00
integer
GUISet[index].AutoGuideEnable bool Auto guide or not when startup.
EG
Table 7-3
Syntax http://<server>/cgi-bin/split.cgi?action=getMode&channel=<ChannelNo>
io
Method GET
n
Example http://192.168.1.108/cgi-bin/split.cgi?action=getMode&channel=1
Success mode=split1
.o
Return group=4
.
Parameters in URL:
Comment
ChannelNo: the display screen No. Start from 1 and <= 2.
Set split screen mode
Success
OK
Return
hu
Parameters in URL:
aH
Comment
/ "FitDisplayUnit4"};
P
group: the No. of a group which contains certain number channels. For example, if 16
AP
video channels display in split4 Mode which contains 4 video channels on Screen, then
there are 4 groups and each group contains 4 video channels.
IV
Table 7-5
00
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MonitorTour
Method GET
M
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MonitorTour
table.MonitorTour[ch].Enable=128
A
table.MonitorTour[ch].Interval=true
Success
Di
table.MonitorTour[ch].Mask.Split1=0,1,5
Return
st
table.MonitorTour[ch].Mask.Split8=0,1,5
table.MonitorTour[ch].Collections=Favortite1, Favortite2…
rib
Comment —
Set moniter tour config
ut
io
Table 7-6
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
n
Syntax
alue>[&<paramName>=<paramValue>…]
s.r
Method GET
.o
Example
e=true
Success
OK.
Return
Comment Parameters in URL:
Appendix:
Split collections
aH
Table 7-7
http://<server>/cgi-bin/split.cgi?action=enableTour&channel=<ChannelNo>&enable=<fl
Syntax
P
ag>
AP
Method GET
Description Enable tour in every video channel on a screen or not.
IV
Example http://192.168.1.108/cgi-bin/split.cgi?action=enableTour&channel=1&enable=true
Success
2.
OK
Return
89
Table 7-8
EG
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MonitorCollection
Method GET
A
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MonitorCollec
Example
tion
st
table.MonitorCollection.collectionname. Mode=Split1
rib
table.MonitorCollection.collectionname.Windows[winno].Enable= true
table.MonitorCollection.collectionname.Windows[winno].Device=device1
ut
Success table.MonitorCollection.collectionname.Windows[winno].VideoChannel=5
io
Return table.MonitorCollection.collectionname.Windows[winno].VideoStream=Main
n
table.MonitorCollection.collectionname.Windows[winno].AudioChannel=5
table.MonitorCollection.collectionname.Windows[winno].AudioStream=Main
s.r
…
.o
Parameters in Response :
Comment winno : integer, the array index which equals to the window index in a screen and starts
.
from 0.
Set monitor collection config
Table 7-9
Success
OK
Return
hu
Parameters in URL:
aH
Collect=MonitorCollection.collectionname.
collectionname: can be any name.
P
winno: integer, the array index which equals to the window index in a screen and starts
AP
from 0.
Appendix:
IV
Collect.Mode string
SetSplitMode.
Collect.Windows[winno].Enable bool Enable the window or not.
fo
Collect.Windows[winno].AudioStream string
"Extra2", "Extra3", "Auto"}.
A
Di
st
rib
ut
io
n
s.r
.o
.
Table 8-1
Syntax http://<server>/cgi-bin/devVideoAnalyse.cgi?action=getcaps&channel=<ChannelNo>
Method GET
TT
Example http://192.168.1.108/cgi-bin/devVideoAnalyse.cgi?action=getcaps&channel=1
AP
caps.CalibrateBoxs[0]=2
caps.CalibrateBoxs[1]=3
IV
caps.ComplexSizeFilter=false
caps.MaxCelibateAreas=10
2.
caps.MaxExcludeRegions=0
89
caps.MaxInternalOptions=512
caps.MaxModules=1
fo
caps.SupportGlobalDeviceParam=1
caps.MaxPointOfLine=20
r1
caps.MaxPointOfRegion=20
00
caps.MaxRules=10
caps.MaxStaffs=4
M
caps.SpecifiedObjectFilter=true
EG
caps.SupportedRules[0]=CrossLineDetection
caps.SupportedRules[1]=CrossRegionDetection
A
Success caps.SupportedRules[2]=LeftDetection
Di
Return caps.SupportedRules[3]=TakenAwayDetection
caps.SupportedScene[0]=Normal
st
caps.SupportedScene[1]=FaceDetection
rib
caps.SupportedScene[2]=VideoDiagnosis
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalSt
ut
affs[0]=0
io
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalSt
n
affs[1]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs
s.r
[0]=0
.o
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs
[1]=0
.
caps.SupportedScenes.StereoNumber.SupportedRules.ManNumDetection.SupportLoc
alDataStore=false
caps.SupportedScenes.NumberStat.CameraType=1
caps.SupportedScenes.NumberStat.SupportedRules.NumberStat.MaxRules=8
Appendix
Table 8-2
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseGlob
IV
Syntax
al
2.
Method GET
89
Global
head.Scene.Type=Normal
r1
head.Scene.PtzPresetId=1
head.Scene.Depth=Far
00
head.Scene.Detail.CameraAngle=30
M
head.Scene.Detail.CameraDistance=10.000000
Success
head.Scene.Detail.CameraHeight=6.200000
EG
Return
head.TimePeriod.Day[0]=8:00:00
A
head.TimePeriod.Day[1]=20:00:00
head.TimePeriod.Night[0]=20:00:00
Di
head.TimePeriod.Night[1]=8:00:00
st
…
rib
Parameters in Response :
head =table.VideoAnalyseGlobal[ChannelNo]
Comment
ut
ChannelNo: integer, array index starts from 0, which means video channel(equals to
io
Table 8-3
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
.o
alue>[&<paramName>=<paramValue>...]
.
Method GET
Description Set video analyse global config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoAnalyseGlobal[
Example
0].Scene.Type=Normal&VideoAnalyseGlobal[0].Scene.PtzPresetId=1
Appendix
aH
rib
Table 8-4
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule
ut
Method GET
io
Example
Rule
s.r
head.Name= line1
.o
head.Type=CrossLineDetection
Success head.VideoAnalyseRule[0][0].Enable =true
.
Table 8-5
Da
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
hu
Method GET
Description Set video analyse rules config.
aH
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoAnalyseRule[0]
Example
[0].Name=myAnalyseRule1&VideoAnalyseRule[0][0].Type=CrossLineDetection
TT
Success
OK
Return
P
Parameters in URL:
AP
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Comment
2.
Appendix
"TakenAwayDetection",
A
"VideoAbnormalDetection", "FaceDetection",
head.Type string "AudioMutation", "AudioAnomaly",
Di
"VideoUnFocus", "WanderDetection",
st
"RioterDetection", "ParkingDetection",
rib
integer
ze[1] not be beyond maximum height.
head.Config.SizeFilter.MinSi Minimum width. The width of the object must not
hu
integer
ze[0] be less than minimum width.
aH
Adapt to {"CrossRegionDetection",
head.Config.DetectRegion[0]
P
"WanderDetection", "RioterDetection",
"ParkingDetection", "MoveDetection"}.
IV
head.Config.DetectRegion[0]
integer The end point of DetectRegion 0;
[1]
2.
head.Config.DetectRegion[1]
integer The start point of DetectRegion 1;
89
[0]
head.Config.DetectRegion[1]
integer The end point of DetectRegion 1;
fo
[1]
r1
head.Config.DetectRegion[2]
integer The start point of DetectRegion 2;
[0]
00
head.Config.DetectRegion[2]
integer The start point of DetectRegion 2;
[1]
M
"TakenAwayDetection", "WanderDetection"}.
head.Config.MinDuration integer
Range is 10-300, adapt to {"RioterDetection"}.
A
head.Config.EnterThreshold integer
{"NumberStat"}.
ut
head.Config.InsideThreshold
{"NumberStat"}.
s.r
.o
Table 8-6
Syntax http://<server>/cgi-bin/devVideoAnalyse.cgi?action=getLastEventInfo&channel=<Chan
Return
EventInfo.Action=Start
Parameters in Response :
hu
ChannelNo: integer, array index starts from 0, which means video channel (equals to
aH
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=GlobalDevicePara
Syntax
m
2.
Method GET
89
table object R
+LocateHeight Float R Device locate Height
M
[ Example ]
EG
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=
Request
GlobalDeviceParam
A
Response table.GlobalDeviceParam.LocateHeight=10.5
Di
st
Syntax
Value>[&<paramName>=<paramValue>…]
ut
Method GET
Description Set Global Device Param
io
GlobalDeviceP
object R Global Device Param
aram
.o
8.1.6 getTemplateRule
Da
Gets all intelligent rule configuration templates and default values under
the specified category
hu
aH
Type in config
VideoAnalyseGlobal
IV
"Normal"
"Traffic"
2.
"TrafficPatrol"
89
"FaceDetection"(shared
by face detect and face
fo
recognition)
in added, Web can use
r1
示例
EG
http://<server>/cgi-bin/VideoInAnalyse.cgi?action=getTemplateRule&Channel=1&Class=Normal
A
etection crossline
n
second dimension of
.o
VideoAnalyseRule
+++Config object R detail of rule config
.
++++SizeFilter object R
+++++MinSize int[2] R [0, 0]
+++++MaxSiz int[2] R [8191, 8191]
e
示例
Rule.Normal.CrossLineDetection.Id=0
TT
Rule.Normal.CrossLineDetection.Enable=false
P
Rule.Normal.CrossLineDetection.Class=Normal
AP
Rule.Normal.CrossLineDetection.Type=CrossLineDetection
Rule.Normal.CrossLineDetection.ObjectTypes[0]=Unknown
IV
Rule.Normal.CrossLineDetection.PtzPresetId=0
Rule.Normal.Config.Direction=Both
2.
Rule.Normal.Config.SizeFilter.MaxSize[0]=[8191, 8191]
89
Rule.Normal.Config.SizeFilter.MinSize[0]=[0, 0]
…
fo
r1
Table 8-7
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidgetNumb
st
Syntax
erStat
rib
Method GET
Description Get OSD config when display number status information of people.
ut
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget
Example
io
NumberStat
n
head.EncodeBlend=true
head.ShowEnterNum=true
s.r
Success
head.ShowExitNum=true
Return
.o
head.TextAlign=0
.
…
Parameters in Response :
head =table.VideoWidgetNumberStat[ChannelNo]
Comment
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
Table 8-8
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set OSD config when display number status information of people.
Da
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidgetNumber
Example
Stat[0].EncodeBlend=true&VideoWidgetNumberStat[0].ShowEnterNum=true
hu
Success
OK
Return
aH
Parameters in URL:
paramName and paramValue are as table below.
TT
In table below,
Comment
head =VideoWidgetNumberStat[ChannelNo]
P
ChannelNo: integer, array index starts from 0, which means video channel(equals to
AP
Appendix
2.
Table 8-9
http://<server>/cgi-bin/heatMap.cgi?action=getPicByTime&channel=<ChannelNo>&St
Syntax
A
artTime=<start>&EndTime=<end>[&PtzPresetId=<PtzPresetId>]
Di
Method GET
Description Get binary data of heat map.
st
http://192.168.1.108/cgi-bin/heatMap.cgi?action=getPicByTime&channel=1&StartTime
rib
Example
=2015-08-20%2000:00:00&EndTime=2015-08-21%2023:59:59
Content-Type: application/binarytet-stream
ut
Success
Content-Length:<heatMap size>
Return
io
<HeatMap data>
n
Parameters in URL:
s.r
hh:mm:ss.
.
Parameters in Response:
heatMap size: width*height + 16.
HeatMap data: format as table below.
Table 8-10
URL http://<server>/cgi-bin/videoStatServer.cgi?action=getHeatMap
hu
Method GET
aH
PlanID int O The plan id, only valid for dome camera.
AP
[ Example ]
r1
GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=getHeatMap&channel=1&
Request PlanID=2&StartTime=2010-05-12%2020:00:00&EndTime=2010-05-12%2022:00:00&He
00
atMapType=AverageStayTime
M
HTTP/1.1 200 OK
Server: Device/1.0
EG
Content-Type: application/octet-stream
Response
Content-Length: <length>
A
Di
Appendix A: The heat map binary data format when HeatMapType is AverageStayTime.
rib
ion nnel et ed
16~31
io
octet
n
reserved
value
s.r
44+4*(N-1)+1~
octet …… …… ……
44+4*(N-1)+4
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
Da
octet 16~31
hu
value reserved
aH
44+4*(N-1)+1~
P
octet …… …… ……
44+4*(N-1)+4
AP
value next line number data num in next line data 1 data N
IV
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.
2.
octet 16~31
r1
value reserved
00
this object
44+4*(N-1)+1~
A
octet …… …… ……
44+4*(N-1)+4
Di
next object
Note: If “tracks in this packet” is 0, then all data has been sent, and connection will be closed.
rib
Table 8-11
n
URL http://<server>/cgi-bin/videoStatServer.cgi?action=attachRealTraceProc
s.r
Method GET
Description Subscribe the people realtime trace information.
.o
GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=attachRealTraceProc&cha
Request
nnel=1&heartbeat=5
hu
HTTP/1.1 200 OK
aH
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed
TT
P
--<boundary>
AP
Content-Type: application/octet-stream
Content-Length: <length>
IV
--<boundary>
Response
89
Content-Type: text/plain
Content-Length: 11
fo
Heartbeat
r1
-<boundary>
00
Content-Type: application/octet-stream
Content-Length: <length>
M
EG
…
Di
octet 16~31
io
value reserved
n
s.r
[ Example ]
GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=getHistoryTrace&channel=
AP
Request
1&PlanID=2&StartTime=2010-05-12%2020:00:00&EndTime=2010-05-12%2022:00:00
IV
HTTP/1.1 200 OK
Server: Device/1.0
2.
Connection: closed
fo
--<boundary>
Content-Type: application/octet-stream
r1
Content-Length: <length>
Response
00
--<boundary>
Content-Type: application/octet-stream
EG
Content-Length: <length>
A
--<boundary>
st
…
rib
on el et ed num packet
n
octet 16~31
s.r
value reserved
.o
[ Example ]
GET http://192.168.1.108/cgi-bin/HeatMapManager.cgi?action=attachRaw&channel=1&
2.
Request
heartbeat=5
89
HTTP/1.1 200 OK
Server: Device/1.0
fo
Connection: closed
00
--<boundary>
Content-Type: application/octet-stream
M
Content-Length: <length>
EG
--<boundary>
Response
Di
Content-Type: text/plain
Content-Length: 11
st
rib
Heartbeat
ut
-<boundary>
Content-Type: application/octet-stream
io
Content-Length: <length>
n
s.r
…
.
octet 48 49 …
Table 8-14
http://<server>/cgi-bin/videoStatServer.cgi?action=clearSectionStat[&AreaID=<AreaID>][
URL
aH
&PtzPresetId=<PtzPresetId>]
Method GET
TT
AreaID int O
device, if omit means clear all area statistics.
PtzPresetId int O The ptz preset index which starts from 1.
2.
[ Response Params ] ( OK )
89
[ Example ]
Request GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=clearSectionStat&AreaID=2
fo
Response OK
r1
8.3 FishEye
00
M
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,
Di
Then you can use the method described below to get the detail capability.
st
Table 8-15
rib
http://<server>/cgi-bin/devVideoInput.cgi?action=getCapsEx&channel=<ChannelNo>&
Syntax
name=VideoInFishEye
ut
Method GET
Description Get fisheye capability.
io
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCapsEx&channel=1&name=
n
Example
VideoInFishEye
s.r
.o
.
……
caps.EPtzCmd[0]=Up
hu
caps.EPtzCmd[1]=Down
…….
aH
Parameters in Response:
Type: string, it can be Chip, Plugin, and ChipAndPlugin. Chip means only support
TT
calibrate by device.
P
both.
MountMode: string and array.and MountMode means the install mode, it can be
Comment
IV
WallMode,CeilMode, FloorMode,180CeilMode.
CalibrateMode: string and array. It can be Original, Config, Panorama,
2.
Table 8-16
EG
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=FishEye
Method GET
A
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=FishEye
st
head.PlaceHolder=1
Success
rib
head.CalibrateMode=Original
Return
……..
ut
Parameters in Response:
head = table.FishEye[ChannelNo]
io
ChannelNo: integer, array index starts from 0, which means video channel (equals to
n
Table 8-17
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&FishEye[0].Calibrate
Example
Mode=Panorama
hu
aH
Success
OK
AP
Return
Comment —
IV
8.4 CrowdDistriMap
2.
89
Table 8-18
r1
Syntax http://<server>/cgi-bin/crowdDistriMap.cgi?action=getCaps
Method GET
00
Example http://192.168.1.108/cgi-bin/crowdDistriMap.cgi?action=getCaps
CrowdCapsList[0].channel=<ChannelNo>
EG
CrowdCapsList[0].Support=<Support>
Success
A
CrowdCapsList[1].channel=<ChannelNo>
Return
CrowdCapsList[1].Support=<Support>
Di
…
st
Table 8-19
s.r
http://<server>/cgi-bin/crowdDistriMap.cgi?action=attach&channel=<ChannelNo>[&he
Syntax
artbeat=<Heartbeat>]
.o
Method GET
.
Description Subscribe the crowd distribuite map information, return info at regular time.
Example http://<server>/cgi-bin/crowdDistriMap.cgi?action=attach&channel=1&heartbeat=5
Success HTTP/1.1 200 OK
Return Content-Type: multipart/x-mixed-replace; boundary=<boundary>
--<boundary>
Content-Type: text/plain
Content-Length: <data length>
CrowdStatData[0].Channel=1
Da
CrowdStatData[0].GloabalPeopleNum =10
CrowdStatData[0].RegionNum =1
hu
CrowdStatData[0].RegionPeopleList[0].RegionID=0
CrowdStatData[0].RegionPeopleList[0].Region[0][0]=10
aH
CrowdStatData[0].RegionPeopleList[0].Region[0][1]=10
CrowdStatData[0].RegionPeopleList[0].Region[1][0]=10
TT
CrowdStatData[0].RegionPeopleList[0].Region[1][1]=100
P
…
CrowdStatData[0].RegionPeopleList[0].RegionPeopleNum=100
AP
CrowdStatData[0].CrowdEventNum =2
IV
CrowdStatData[0].CrowdList[0].Center=2
CrowdStatData[0].CrowdList[0].Radius=2
2.
CrowdStatData[0].RegionEventNum =2
89
CrowdStatData[0].RegionList[0].Region[0][0]=10
CrowdStatData[0].RegionList[0].Region[0][1]=10
fo
CrowdStatData[0].RegionList[0].Region[1][0]=10
CrowdStatData[0].RegionList[0].Region[1][0]=100
r1
…
00
CrowdStatData[0].RegionList[0].RegionID=0
CrowdStatData[0].RegionList[0].PeopleNum=100
M
--<boundary>
EG
Content-Type: text/plain
Content-Length: 11
A
Heartbeat
Di
--<boundary>
st
Content-Type: text/plain
rib
CrowdStatData[0].Channel=1
io
…
Parameters in URL and Response
n
Region is Polygon, has a list of points, every point has x and y , so Region[0][0] is first
Comment point's x, Region[0][1] is first point's y, Region[1][0] is second point's x, Region[1][1] is
.
Heartbeat: integer, range is [1,60],unit is second.If the URL contains this parameter,
and the value is 5, it means every 5 seconds the device should send the heartbeat
Method GET
Description Get crowd distribuite map information, return info only once.
hu
Example http://<server>/cgi-bin/crowdDistriMap.cgi?action=getSummary&channel=1
aH
CrowdStatData[0].Channel=1
CrowdStatData[0].GloabalPeopleNum =10
CrowdStatData[0].RegionNum =1
TT
CrowdStatData[0].RegionPeopleList[0].RegionID=0
P
CrowdStatData[0].RegionPeopleList[0].Region[0][0]=10
AP
CrowdStatData[0].RegionPeopleList[0].Region[0][1]=10
CrowdStatData[0].RegionPeopleList[0].Region[1][0]=10
IV
CrowdStatData[0].RegionPeopleList[0].Region[1][1]=100
…
2.
CrowdStatData[0].RegionPeopleList[0].RegionPeopleNum=100
Success
89
CrowdStatData[0].CrowdEventNum =2
Return
CrowdStatData[0].CrowdList[0].Center=2
fo
CrowdStatData[0].CrowdList[0].Radius=2
r1
CrowdStatData[0].RegionEventNum =2
CrowdStatData[0].RegionList[0].Region[0][0]=10
00
CrowdStatData[0].RegionList[0].Region[0][1]=10
CrowdStatData[0].RegionList[0].Region[1][0]=10
M
CrowdStatData[0].RegionList[0].Region[1][0]=100
EG
…
CrowdStatData[0].RegionList[0].RegionID=0
A
CrowdStatData[0].RegionList[0].PeopleNum=100
Di
Similar to above "Subscribe to Realtime Crowd Stat", but reply stat only once, not at
Comment regular time.
st
8.5 Intelligent
ut
io
URL http://<server>/cgi-bin/intelli.cgi?action=getCaps
Method GET
.o
PicFileStream
+MultiChannelM
object O Multi channel description
ode
TT
Array<Arra
++IndepMode O Multi channel open at one time separately
P
y<object>>
AP
Array<Arra
++CompMode O Multi channel combined mode
y<object>>
2.
++AlgorithmVers
EG
Array<obje
+TotalCapacity O Intelligent analyse total capacity
st
ct>
++Class string R Intelligent analyse class, ex : ObjectDetect
rib
Array<strin
++Type R Intelligent analyse rules, ex : FaceDetection
ut
g>
The maximum number of video channels that can be analysed
io
++Number int R
at same time
n
[ Example ]
s.r
caps.MultiChannelMode.IndepMode[0][0].Channel=0
.
caps.MultiChannelMode.IndepMode[0][0].Type=Normal
Response
caps.MultiChannelMode.IndepMode[0][1].Channel=1
caps.MultiChannelMode.IndepMode[0][1].Type=ObjectDetect
…
caps.Algorithm[0].AlgorithmVendor=Dahua
caps.Algorithm[1].Class=ObjectDetect
hu
caps.Algorithm[1].AlgorithmVersion=V2.8
caps.Algorithm[1].AlgorithmVendor=Dahua
aH
…
caps.TotalCapacity[0].Class=Normal
TT
caps.TotalCapacity[0].Type[0]=FaceDetection
P
caps.TotalCapacity[0].Number=3
caps.TotalCapacity[1].Class=ObjectDetect
AP
caps.TotalCapacity[1].Type[0]=FaceDetection
IV
caps.TotalCapacity[1].Number=3
…
2.
89
URL http://<server>/cgi-bin/intelli.cgi?action=attachResource
Method GET
r1
heartbeat int O 5 seconds the device should send the heartbeat message to
the client, the heartbeat meaage are "Heartbeat". If this
A
Array<obj
rib
[ Example ]
n
HTTP/1.1 200 OK
Server: Device/1.0
.o
Connection: closed
Response
--<boundary>
Content-Type: text/plain
Content-Length: <length>
--<boundary>
Da
Content-Type: text/plain
Content-Length: 11
hu
Heartbeat
aH
--<boundary>
Content-Type: text/plain
TT
Content-Length: <length>
P
RemainCapacity[0].Class=Normal
AP
RemainCapacity[0].Number=1
IV
RemainCapacity[1].Class=ObjectDetect
RemainCapacity[1].Number=1
2.
…
89
fo
r1
00
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
Table 9-1
http://<server>/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus&channel=<Chan
Syntax
nelNo>&<paramName>=<paramValue>[&<paramName>=<paramValue>…]
TT
Method GET
P
http://192.168.1.108/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus&condition.L
Example
ane[0]=0&condition.Lane[1]=255
IV
status[0].PictureId=5
89
status[0].TrafficCar.CountInGroup=1
Success
…
Return
fo
status[1].Lane=1
status[1].PictureId=4
r1
status[1].TrafficCar.CountInGroup=1
00
…
Parameters in URL:
M
Parameters in Response :
rib
Appendix
io
Table 9-2
http://<server>/cgi-bin/trafficSnap.cgi?action=openStrobe&channel=<ChannelNo>&inf
Syntax
o.openType=<OpenType>&info.plateNumber=<PlateNumber>
Method GET
Comment
OpenType: string, For now, the value is fixed to "Normal"
PlateNumber: string, the plateNumber of the TrafficCar.
hu
Table 9-3
http://<server>/cgi-bin/trafficSnap.cgi?action=<Action>&channel=<ChannelNo>&nam
Syntax
P
e=UnlicensedVehicle
AP
Method GET
Description Open or Close the unlicensed vehicle detection.
IV
http://192.168.1.108/cgi-bin/trafficSnap.cgi?action=open&channel=1&name=Unlicense
Example
dVehicle
2.
Success
89
OK
Return
Parameters in URL:
fo
9.1.4 Snap
M
Table 9-4
EG
Syntax http://<server>/cgi-bin/trafficSnap.cgi?action=manSnap&channel=<ChannelNo>
Method GET
A
Take a snapshot manually. For intelligent traffic device, it should use this method to take
Di
a snapshot.
But, the response is not image data.If you want to get the image data, please follow
st
these steps:
rib
Description
1. Use the method mentioned chapter (4.4.3 Subscribe to snapshot) to subscribe the
ut
3. In the connection which built in the Step 1, the device will send the image data.
n
Example http://192.168.1.108/cgi-bin/trafficSnap.cgi?action=manSnap&channel=1
s.r
Success
OK
Return
.o
Parameters in URL:
Comment
.
Method GET
Description Get all valid parking spaces status of one device.
hu
Example http://192.168.1.108/cgi-bin/trafficParking.cgi?action=getAllParkingSpaceStatus
aH
Return …
AP
status[1].Lane=1
status[1].Status = NoPark
IV
…
Parameters in Response :
2.
Comment
Status : Park or NoPark
89
Table 9-6
00
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ParkingSpaceLight
Syntax
M
State
Method GET
EG
Use this method. It can get the light state config. For example, it can know that when the
A
Description space is free, then the light should be green, and the space is full, the light should be
red.
Di
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ParkingSpac
Example
st
eLightState
rib
table.ParkingSpaceLightState.SpaceFree.Blue=0
table.ParkingSpaceLightState.SpaceFree.Green=1
ut
table.ParkingSpaceLightState.SpaceFree.Pink=0
io
table.ParkingSpaceLightState.SpaceFree.Purple=0
table.ParkingSpaceLightState.SpaceFree.Red=0
n
table.ParkingSpaceLightState.SpaceFree.White=0
s.r
Success
table.ParkingSpaceLightState.SpaceFree.Yellow=0
Return
table.ParkingSpaceLightState.SpaceFull.Blue=0
.o
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.SpaceOrder.Yellow=1
table.ParkingSpaceLightState.SpaceOverLine.Blue=0
hu
table.ParkingSpaceLightState.SpaceOverLine.Green=0
table.ParkingSpaceLightState.SpaceOverLine.Pink=0
aH
table.ParkingSpaceLightState.SpaceOverLine.Purple=0
table.ParkingSpaceLightState.SpaceOverLine.Red=0
TT
table.ParkingSpaceLightState.SpaceOverLine.White=0
P
table.ParkingSpaceLightState.SpaceOverLine.Yellow=1
table.ParkingSpaceLightState.SpaceSpecial.Blue=0
AP
table.ParkingSpaceLightState.SpaceSpecial.Green=0
IV
table.ParkingSpaceLightState.SpaceSpecial.Pink=0
table.ParkingSpaceLightState.SpaceSpecial.Purple=0
2.
table.ParkingSpaceLightState.SpaceSpecial.Red=0
89
table.ParkingSpaceLightState.SpaceSpecial.White=0
table.ParkingSpaceLightState.SpaceSpecial.Yellow=1
fo
Parameters in Response :
There are five conditions about the space light state: SpaceFree, SpaceFull,
r1
SpaceOrder, SpaceOverLine, and SpaceSpecial. For each condition, you can choose
00
0 means close;
EG
1 means open;
2 means twinkle.
A
Table 9-7
st
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
rib
Method GET
ut
ate.SpaceFree.Blue=1&ParkingSpaceLightState.SpaceFree.Green=0&ParkingSpaceLi
n
Example ghtState.SpaceFree.Pink=0&ParkingSpaceLightState.SpaceFree.Purple=0&ParkingSp
s.r
aceLightState.SpaceFree.Red=0&ParkingSpaceLightState.SpaceFree.White=0&Parki
ngSpaceLightState.SpaceFree.Yellow=0
.o
Success
.
OK
Return
Comment —
tate[0].State=Ordered
Success
aH
OK
Return
Parameters in URL:
TT
Table 9-9
2.
http://<server>/cgi-bin/trafficParking.cgi?action=setLightState&state[Index].LightNo=<L
Syntax aneNumber>&state[Index].Color=<Color>&state[Index].State=<State>&state[Index].
89
Enable=<Enable>
Method GET
fo
http://192.168.1.108/cgi-bin/trafficParking.cgi?action=setLightState&state[0].LightNo=0
Example
&state[0].Color=Red&state[0].State=0&state[0].Enable=true
00
Success
OK
M
Return
Parameters in URL:
EG
State: integer, it can be 0, 1, 2.0 means close;1 means open;2 means twinkle;
st
Table 9-10
s.r
http://<server>/cgi-bin/ConfigManager.cgi?action=getConfig&name=ParkingSpaceAcces
URL
sFilter
.o
Method GET
.
Get Parking Space Access Filter config. Using this method, we can get the accessible
Description
address of the device.
[ Request Params ] ( None )
[ Response Params ] ( key=value format )
GET
aH
Request http://10.0.0.8/cgi-bin/ConfigManager.cgi?action=getConfig&name=ParkingSpaceAccessFil
ter
TT
table.ParkingSpaceAccessFilter.Enable=false
Respons table.ParkingSpaceAccessFilter.Type=TrustList
P
e table.ParkingSpaceAccessFilter.TrustList[0]=172.24.2.14
AP
table.ParkingSpaceAccessFilter.BannedList[0]=172.24.2.15
Set parking space access filter setting
IV
Table 9-11
2.
URL http://<server>/cgi-bin/ConfigManager.cgi?action=setConfig
89
Method GET
Descripti
Set Parking Space Access Filter config.
fo
on
[ Request Params ] ( key=value format at URL )
r1
ParkingSpaceAc
object R ParkingSpaceAccessFilter config object
cessFilter
M
[ Response Params ] ( OK )
[ Example ]
st
GET
rib
http://10.0.0.8/cgi-bin/ConfigManager.cgi?action=setConfig&ParkingSpaceAccessFilter.Ena
Request
ble=true&ParkingSpaceAccessFilter.Type=TrustList&ParkingSpaceAccessFilter.TrustList[0]
ut
=172.24.2.14&ParkingSpaceAccessFilter.BannedList[0]=172.24.2.15
io
Respons
OK
n
e
s.r
Table 9-12
http://<server>/cgi-bin/trafficParking.cgi?action=setOverLineState&state[0].Lane=<Lan
Syntax
eNumber>&state[0].State=<State>
Method GET
Description Set the spaceState overLine state or StopOverLine state
Table 9-13
AP
http://<server>/cgi-bin/trafficRecord.cgi?action=uploadFile&Type=<Type>&format=<Fo
Syntax
rmat>&code=<Code>
IV
Method POST
Upload a blacklist or redlist(whitelist) file into the deivce, and the device will import the
2.
Description
data of the file.This operation may take a long time.
89
POST
/cgi-bin/trafficRecord.cgi?action=uploadFile&Type=TrafficBlackList&format=CSV&code
fo
=UTF-8 HTTP/1.1
r1
Host: 192.168.1.108
Connection: keep-alive
00
Content-Length:XXXX
Content-Type: multipart/form-data;
M
boundary=----WebKitFormBoundaryooT6JTCbuezAQeDy
Example
EG
------WebKitFormBoundaryooT6JTCbuezAQeDy
A
Content-Type: application/vnd.ms-excel
st
File data….
rib
------WebKitFormBoundaryooT6JTCbuezAQeDy--
ut
Success
OK
io
Return
n
Parameters in URL:
Type: string, the value can be “TrafficBlackList” or “TrafficRedList”.
s.r
Comment
Format: string, for the blacklist or redlist(whitelist), the value is fixed to "CSV".
.o
Code: string, for the blacklist, the value can be "utf-8"or "GB2312".
.
Table 9-14
http://<server>/cgi-bin/recordUpdater.cgi?action=exportAsyncFile&name=<Name>&file
Syntax
name=<FileName>&format=<Format>&code=<Code>
Parameters in URL:
Name: string, the value can be “TrafficBlackList” or “TrafficRedList”.
hu
Format: string, for the blacklist or redlist(whitelist), the value is fixed to “CSV”.
Code: string, for the blacklist or whitelist, the value can be “utf-8” or “GB2312”.
Get export blacklist or redlist record state
TT
Table 9-15
P
Syntax http://<server>/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=<Name>
AP
Method GET
Description Get the blacklist or redlist(whitelist) export state
IV
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=Traffi
Example
2.
cBlackList
89
Success
state=0
Return
fo
Parameters in URL:
Name: string, the value can be “TrafficBlackList” or “TrafficRedList”.
r1
Comment
state: integer, the value can be 0(success),1(fail), 2(running), 3(the file is invalid), 4(the
file is too large) or 5(have duplicate info in the file).
00
Table 9-16
EG
http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=<Type>&filename
Syntax
=<FileName>
A
Method GET
Di
http://192.168.1.108/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficBlackL
Example
ist&filename=RecordFile01
rib
Success
File data
ut
Return
Parameters in URL:
io
Comment
FileName: [optional], string, the name of the downloaded file. The FileName must be
s.r
Table 9-17
Syntax http://<server>/cgi-bin/recordUpdater.cgi?action=exportAsyncFile&name=TrafficFlow&fi
OK
Return
Parameters in URL:
hu
Table 9-18
Syntax http://<server>/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=TrafficFlow
P
Method GET
AP
Example http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=Traffi
cFlow
2.
Success state=0
89
Return
Comment Parameters in Response:
fo
state: integer,the value can be 0(success),1(fail), 2(running), 3(the file is invalid), 4(the
file is too large) or 5(have duplicate info in the file).
r1
Table 9-19
00
Syntax http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficFlow&filena
me=<FileName>
M
Method GET
EG
ilename=RecordFile01
Di
Return
Comment Parameters in URL:
rib
FileName: [optional], string, the name of the downloaded file. The FileName must be
ut
.
Table 9-20
http://<server>/cgi-bin/recordUpdater.cgi?action=exportAsyncFileByConditon&name=T
Syntax rafficSnapEventInfo&filename=<FileName>&format=<Format>&code=<Code>&condit
ion.startTime=<StartTime>&condition.endTime=<EndTime>
Method GET
Parameters in URL:
FileName: [optional], string, the name of the exported file.
hu
Code: string, for the TrafficSnapEventInfo, the value can be "utf-8"or "GB2312".
StartTime: string, the start of the record’s Time.
EndTime: string, The end of the record’s Time.
TT
Table 9-21
P
Syntax http://<server>/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=TrafficSna
AP
pEventInfo
Method GET
IV
Example http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=Traffi
89
cSnapEventInfo
Success state=0
fo
Return
Comment Parameters in Response:
r1
state: integer,the value can be 0(success),1(fail), 2(running), 3(the file is invalid), 4(the
file is too large) or 5(have duplicate info in the file).
00
Table 9-22
M
Syntax http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficSnapEventI
EG
nfo&filename=<FileName>
Method GET
A
Example http://192.168.1.108/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficSnapE
st
ventInfo&filename=RecordFile01
Success File data
rib
Return
ut
heartbeat int O 5 seconds the device should send the heartbeat message to
the client, the heartbeat meaage are "Heartbeat". If this
hu
ect>
AP
array<arr
+Region R the second array is point, must be two int, means x and y value,
ay<int>>
r1
GET http://192.168.1.108/cgi-bin/vehiclesDistribution.cgi?action=attach&Channel=1&he
Request
M
artbeat=5
HTTP/1.1 200 OK
EG
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
A
Connection: closed
Di
st
--<boundary>
Content-Type: text/plain
rib
Content-Length: <length>
ut
Response Channel=1
io
VehiclesData[0].PtzPresetId=1
n
VehiclesData[0].RuleId=1
s.r
VehiclesData[0].RuleType=197
VehiclesData[0].VehiclesNum=25
.o
VehiclesData[0].QueueLen=53
.
VehiclesData[0].Region[0][0]=1032
VehiclesData[0].Region[0][1]=1035
VehiclesData[0].Region[1][0]=1045
VehiclesData[0].Region[1][1]=5072
--<boundary>
Content-Type: text/plain
Da
Content-Length: 11
hu
Heartbeat
aH
-<boundary>
Content-Type: text/plain
Content-Length: <length>
TT
P
Channel=1
VehiclesData[0].PtzPresetId=2
AP
…
IV
2.
89
fo
r1
00
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
Table 10-1
http://<server>/cgi-bin/ThermographyManager.cgi?action=getCaps&channel=<Channe
Syntax
lNo>
TT
Method GET
P
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getCaps&channel=1
caps.PresetModes = Indoor
IV
caps.Brightness.Max = 100
caps.Brightness.Min = 0
2.
caps.Brightness.Step = 1
89
caps.Sharpness.Max= 100
caps.Sharpness.Min = 0
fo
caps.Sharpness.Step = 5
caps.EZoom.Max= 24
r1
caps.EZoom.Min = 0
00
caps.EZoom.Step = 1
caps.ThermographyGamma.Max= 8
M
caps.ThermographyGamma.Min = -8
EG
caps.ThermographyGamma.Step = 1
Success
caps.SmartOptimizer.Max= 100
Return
A
caps.SmartOptimizer.Min = 0
Di
caps.SmartOptimizer.Step = 5
caps.Agc.Max= 255
st
caps.Agc.Min = 0
rib
caps.Agc.Step = 5
caps.AgcMaxGain.Max= 255
ut
caps.AgcMaxGain.Min = 0
io
caps.AgcMaxGain.Step = 5
n
caps.AgcPlateau.Max= 100
caps.AgcPlateau.Min = 0
s.r
caps.AgcPlateau.Step = 5
.o
caps.PresetColorization[i]= Ironbow2
caps.PresetROIModes[j]= Full Screen
.
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
Comment
Parameters in Response:
Table 10-2
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ThermographyOpti
Syntax
TT
ons
Method GET
P
Description Thermography options contain EZoom, Colorization, and SmartOptimizer and so on.
AP
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Thermograph
Example
yOptions
IV
head.EZoom=0
2.
head.Colorization=White Hot
head.SmartOptimizer=10
89
head.OptimizedRegion.Type=Custom
head.OptimizedRegion.Enable= true
fo
head.OptimizedRegion.Regions[i][0u]=0
r1
head.OptimizedRegion.Regions[i][1u]=0
head.OptimizedRegion.Regions[i][2u]=0
00
Success
head.OptimizedRegion.Regions[i][3u]=0
Return
M
head.Agc=10
head.AgcMaxGain=10
EG
head.AgcPlateau=10
head.Mode="HighTemperature"
A
head.Auto.LowToHigh=13
Di
head.Auto.LHROI=15
st
head.Auto.HighToLow=12
rib
head.Auto.HLROI=95
Parameters in Response:
ut
Comment
video channel index -1, and so 0 means channel 1).
n
Table 10-3
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set thermography options.
In table below,
Comment
head = ThermographyOptions[ChannelNo][0]
hu
ChannelNo: integer, array index starts from 0, which means video channel(equals to
aH
Appendix
P
Range is [0—24].
head.EZoom integer Range and step are got from interface in "10.1.1
IV
"IceFire"…}.
head.Colorization String
89
Range is [0—100].
r1
head.SmartOptimizer integer Range and step are got from interface in "10.1.1
Get Capability of Thermography".
00
25%", "Custom"}.
EG
integer
ons[i][1u] i: the region index, starts from 0.
rib
integer
ons[i][3u] i: the region index, starts from 0.
n
Range is [0—255].
s.r
head.Agc integer Range and step are got from interface in "10.1.1
Get Capability of Thermography".
.o
Range is [0—255].
.
head.AgcMaxGain integer Range and step are got from interface in "10.1.1
Get Capability of Thermography".
Range and step are got from interface in "10.1.1
head.AgcPlateau integer
Get Capability of Thermography".
Table 10-4
http://<server>/cgi-bin/ThermographyManager.cgi?action=getExternSystemInfo&chann
Syntax
TT
el=<ChannelNo>
Method GET
P
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getExternSystemInfo&
Example
channel=1
IV
sysInfo.SerialNumber = 11111111123
Success sysInfo.SoftwareVersion = 2222222222222
2.
sysInfo.LibVersion = 4444444444
Parameters in URL:
fo
Comment
ChannelNo: integer, video channel index which starts from 1.
r1
Table 10-5
M
http://<server>/cgi-bin/ThermographyManager.cgi?action=getPresetParam&channel=<
EG
Syntax
ChannelNo>&mode=<modeType>
Method GET
A
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getPresetParam&chan
Example
st
nel=1&mode=Default
presetInfo.Brightness = 50
rib
presetInfo.Sharpness= 50
ut
presetInfo.EZoom= 12
presetInfo.ThermographyGamma= 0
io
presetInfo.SmartOptimizer= 10
Success
s.r
presetInfo.OptimizedRegion.Regions[i][0u]=0
.
presetInfo.OptimizedRegion.Regions[i][1u]=0
presetInfo.OptimizedRegion.Regions[i][2u]=0
presetInfo.OptimizedRegion.Regions[i][3u]=0
presetInfo.Agc= 10
Table 10-6
TT
http://<server>/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion&chann
Syntax
P
el=<ChannelNo>
AP
Method GET
Description Get optimized region info.
IV
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion&c
Example
hannel=1
2.
optimizedRegion.Enable= true
Success optimizedRegion.Regions[i][0u]=0
fo
Return optimizedRegion.Regions[i][1u]=0
r1
optimizedRegion.Regions[i][2u]=0
optimizedRegion.Regions[i][3u]=0
00
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
M
Comment
EG
Parameters in Response:
Regions : the region is a rectangle
A
Table 10-7
http://<server>/cgi-bin/ThermographyManager.cgi?action=enableShutter&channel=<C
ut
Syntax
hannelNo>&enable=<Enable>
io
Method GET
n
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=enableShutter&channel
Example
=1&enable=true
.o
Success
OK
.
Return
Parameters in URL:
Comment ChannelNo: integer, video channel index which starts from 1.
Enable: true or false, enable or not.
Description The visual channel change focus to the same as the thermography channel.
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=fixFocus&linkVideoCha
Example
hu
nnel[0]=1&linkVideoChannel[1]=2
Success
aH
OK
Return
Parameters in URL:
TT
Table 10-9
2.
http://<server>/cgi-bin/ThermographyManager.cgi?action=doFFC&channel=<Channel
Syntax
89
No>
Method GET
fo
Success
OK
Return
00
Parameters in URL:
Comment
M
10.2 Radiometry
A
Di
Table 10-10
rib
http://<server>/cgi-bin/RadiometryManager.cgi?action=getCaps[&channel=<ChannelN
Syntax
ut
o>]
Method GET
io
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getCaps&channel=1
s.r
caps.TotalNum.MaxNum=8
caps.TotalNum.Spot.MaxSpots=8
.o
caps.TotalNum.Line.MaxLines=1
Success
.
caps.TotalNum.Area.MaxAreas=8
Return
caps.TemperPresets.MaxPresets=256
caps.MeterInfo.Type[0u]=Spot
caps.MeterInfo.Type[1u]=Area
caps.MeterInfo.ObjectDistanceMeter.Step=1
caps.MeterInfo.ReflectedTemperature.Max=100
hu
caps.MeterInfo.ReflectedTemperature.Min=0
caps.MeterInfo.ReflectedTemperature.Default=0
aH
caps.MeterInfo.ReflectedTemperature.Step=1
caps.MeterInfo.RelativeHumidity.Max=100
TT
caps.MeterInfo.RelativeHumidity.Min=0
P
caps.MeterInfo.RelativeHumidity.Default=0
caps.MeterInfo.RelativeHumidity.Step=1
AP
caps.MeterInfo.AtmosphericTemperature.Max=100
IV
caps.MeterInfo.AtmosphericTemperature.Min=0
caps.MeterInfo.AtmosphericTemperature.Default=0
2.
caps.MeterInfo.AtmosphericTemperature.Step=1
89
caps.Statistics.MinPeriod=60
caps.Isotherm.MaxTemp=327.0
fo
caps.Isotherm.MinTemp=-20.0
Parameters in URL:
r1
Comment
ChannelNo: integer, video channel index which starts from 1.
00
Table 10-11
A
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingTherm
Di
Syntax
ometry
st
Method GET
rib
Thermometry
io
n
s.r
.o
.
table.Isotherm.MaxValue=50
table.Isotherm.MinValue=0
hu
table.Isotherm.ColorBarDisplay=true
table.HotSpotFollow=true
aH
table.TemperEnable=true
Comment —
TT
Table 10-12
AP
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
IV
Method GET
2.
Example
metry.RelativeHumidity=50&HeatImagingThermometry.ObjectDistance=20.3
Success
fo
OK
Return
r1
Parameters in URL:
Comment
The paramName and paramValue are in the table below.
00
Appendix
M
The Atmospheric
st
interface in getCaps.
Unit is meter.
.
than MinVaue
MinValue range is got form
hu
interface in getCaps.
HeatImagingThermometry.Isotherm.MinValue float
aH
Table 10-13
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ThermometryRule
fo
Method GET
Description Get thermometry rule.
r1
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Thermometry
Example
Rule
00
head.Enable = true
M
head.PresetId =0
head.RuleId=0
EG
head.Name=SpotName
A
head.Type=Spot
head.MeterRegion.Coordinates[PointNo][0]= 0
Di
head.MeterRegion.Coordinates[PointNo][1]= 0
st
…
rib
head.T=3
head.Alarm.Id=0
Success
ut
head.Alarm.Enable=true
Return
io
head.Alarm.Result =Max
head.Alarm.AlarmCondition=Below
n
head.Alarm.Threshold=20.0
s.r
head.Alarm.PreThreshold=10.0
head.Alarm.PreDuration=30
.o
head.Alarm.Hysteresis=0.1
.
head.Alarm.Duration=30
head.LocalParameters.Enable=true
head.LocalParameters.ObjectEmissivity=0.95
head.LocalParameters.ObjectDistance=0.95
Alarm= AlarmSetting[AlarmNo]
AlarmNo = alarm index
hu
Table 10-14
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
TT
alue>[&<paramName>=<paramValue>…]
Method GET
P
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ThermometryRule[0]
Example
[0].Name=name1
IV
Success
OK
2.
Return
89
Parameters in URL:
The paramName and paramValue are in the table below.
fo
In table below,
r1
head = ThermometryRule[ChannelNo][RuleNo]
Comment ChannelNo: integer, array index starts from 0, which means video channel (equals to
00
Alarm= AlarmSetting[AlarmNo]
AlarmNo = alarm index
A
Di
Appendix
st
interface in
GetCurrentProtocolCaps.
n
Range [0—MaxNum]
s.r
in getCaps.
Radiometry rule name.
.
head.Name string
char[64]
head.Type string Range is {Spot, Line, Area }.
Range [0 — 65535],unique
head.Alarm.Id integer
aH
alarm id
head.Alarm.Enable bool Enable/Disable
TT
head.Alarm.Duration integer
Unit is second
r1
head.Alarm.PreDuration integer
Unit is second
head.LocalParameters.Enable bool Enable/Disable
M
Range [0 — 1]
EG
head.LocalParameters.ObjectEmissivity float
Accuracy is 0.01
Object distance
A
in getCaps.
st
in getCaps.
ut
Table 10-15
.o
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingTemp
Syntax
er
.
Method GET
Description Get Heat Imaging Temper config
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingT
Example
emper
Table 10-16
hu
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
aH
Method GET
Description Set Heat Imaging Temper config
TT
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&HeatImagingTemper[
Example
0].Enable=false&HeatImagingTemper[0].EventHandler.BeepEnable=false
P
Success
AP
OK
Return
Parameters in URL:
IV
Appendix
00
Table 10-17
rib
http://<server>/cgi-bin/RadiometryManager.cgi?action=getRandomPointTemper&chann
Syntax
el=<ChannelNo>&coordinate[0]=x &coordinate[1]=y
ut
Method GET
io
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getRandomPointTemper&
Example
channel=1&coordinate[0]=1024&coordinate[1]=1024
s.r
Success TempInfo.Type=Spot
.o
Return TempInfo.TemperAver=27.5
.
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
Comment
x : The Xscale of the point
y : The Yscale of the point
Description Get temperature values from rules which have been set.
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getTemper&condition.Pres
hu
Example etId=0&condition.RuleId=0&condition.Type=Spot&condition.Name=Spot1&condition.ch
annel=1
aH
Success TempInfo.Type=Spot
Return TempInfo.TemperAver=27.5
TT
Parameters in URL:
Comment
The paramName and paramValue are in the table below.
P
AP
Appendix
Table 10-19
http://<server>/cgi-bin/RadiometryManager.cgi?action=startFind&condition.StartTime=
st
Syntax <StartTimeValue>&condition.EndTime=<EndTimeValue>&condition.Type=<TypeVal
rib
ue>&condition.channel=<ChannelValue>&condition.Period=<PeriodValue>
ut
Method GET
Description Start to query the history data of temperature values.
io
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=startFind&condition.StartTi
n
Example me=2010-04-01%200:00:00&condition.EndTime=2010-04-08%200:00:00&condition.Ty
s.r
pe=Spot&condition.channel=1&condition.Period=5
Success token=46878
.o
Return totalCount=333
.
Appendix
Table 10-20
hu
http://<server>/cgi-bin/RadiometryManager.cgi?action=doFind&token=<tokenvalue>&
Syntax
beginNumber=<BeginNumber>&count=<findNum>
aH
Method GET
Description Get the history data of temperature.
TT
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=doFind&token=46878&be
Example
P
ginNumber=16&count=16
found=12
AP
info[i].Time=2010-04-08 16:12:46
IV
info[i].PresetId=0
info[i].RuleId=0
2.
info[i].Type=Spot
89
info[i].Name=xxxx
Success
info[i].Coordinate[0]=1024
Return
fo
info[i].Coordinate[1]=2048
info[i].Channel=0
r1
info[i].TemperatureUnit=Centigrade
info[i].QueryTemperInfo.TemperAve=50.1
00
info[i].QueryTemperInfo.TemperMax=50.2
M
info[i].QueryTemperInfo.TemperMin=50.0
Parameters in URL:
EG
token: query token, get from interface of the first step above.
A
Params in Resp:
st
Table 10-21
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=stopFind&token=<tokenvalue>
io
Method GET
n
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=stopFind&token=46878
Success
.o
OK
Return
.
Comment token: query token, get from interface of the first step.
info[i].PresetId=0
aH
info[i].RuleId=0
info[i].Type=Spot
Success
info[i].Name=xxxx
TT
Return
info[i].Coordinate[0]=1024
P
info[i].Coordinate[1]=2048
AP
info[i].Channel=0
info[i].TemperatureUnit=Centigrade
IV
info[i].QueryTemperInfo.TemperAve=50.1
info[i].QueryTemperInfo.TemperMax=50.2
2.
info[i].QueryTemperInfo.TemperMin=50.0
89
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
Comment
fo
Params in Resp :
r1
Table 10-23
EG
http://<server>/cgi-bin/RadiometryManager.cgi?action=attachProc&channel=<Channel
Syntax
No>
A
Method GET
Di
Description Subscribe to radiometry data of a channel. It needs to cooperate with interface below.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=attachProc&channel=2
st
--<boundary>\r\n
rib
Content-Type: text/plain\r\n
Content-Length: <data length>\r\n\r\n
ut
dataInfo.Height=0
io
dataInfo.Width=0
n
dataInfo.Channel=0
s.r
dataInfo.sensorType="Tau"
.
dataInfo.Unzip.ParamR=1
dataInfo.Unzip.ParamB=1
dataInfo.Unzip.ParamF=1
dataInfo.Unzip.ParamO=1
Table 10-24
hu
http://<server>/cgi-bin/RadiometryManager.cgi?action=toFetch&channel=<ChannelNo
Syntax
aH
>
Method GET
Description
TT
Success
status=Ready
AP
Return
ChannelNo: integer, video channel index which starts from 1.
IV
Comment status: Range is {Ready, Busy}. "Ready"means service available and "Busy"means
service busy.
2.
89
Table 10-25
r1
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=FireWarning
Method GET
00
head.Enable=true
EG
head.PresetId=0
head.Row = 31
A
head.Col = 40
Di
head.Mode="Auto"
head.SmdFilterEnable=false
st
head.MovingTargetFilterEnable=false
rib
head.SunReflectEnable=false
ut
head.TimeDurationEnable=false
Success head.FireDuration= 15
io
Return head.DetectWindow[windowsNum].Regions[0]=123468789
n
head.DetectWindow[windowsNum].Regions[1]=123468789
s.r
head.DetectWindow[windowsNum].Regions[2]=123468789
head.DetectWindow[windowsNum].Regions[3]=123468789
.o
head.DetectWindow[windowsNum].Postion[0]=0
.
head.DetectWindow[windowsNum].Postion[1]=0
head.DetectWindow[windowsNum].Postion[2]=0
head.DetectWindow[windowsNum].Postion[3]=0
head.DetectWindow[windowsNum].Sensitivity = 95
head. DetectWindow[windowsNum].Id=1
Table 10-26
P
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
AP
alue>[&<paramName>=<paramValue>…]
Method GET
IV
Example
nble=false
89
Success
OK
Return
fo
Appendix:
00
effect
whether include fire detect
io
SpaceExClude mode
s.r
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=FireWarningMo
Example
de
hu
Success
head.Mode="PtzPreset"
Return
aH
Parameters in Response:
head= table.FireWarningMode[ChannelNo]
Comment
TT
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
P
AP
Table 10-28
2.
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
89
alue>[&<paramName>=<paramValue>…]
Method GET
fo
Example
. Mode ="SpaceExClude"
Success
00
OK
Return
M
Appendix:
A
Table 10-29
io
URL http://<server>/cgi-bin/TemperCorrection.cgi?action=getCurrentHotColdSpot
n
Method GET
s.r
[ Example ]
GET http://192.168.1.108/cgi-bin/TemperCorrection.cgi?action=getCurrentHotColdSpot
hu
Request
&channel=1
aH
info.HotPoint[0]=1150
info.HotPoint[1]=2320
TT
info.HotSpotValue=35.5
Response info.ColdPoint[0]=5452
P
info.ColdPoint[1]=6192
AP
info.ColdSpotValue=24.3
info.TemperatureUnit=0
IV
2.
Table 10-30
r1
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=PreAlarmEvent
00
Method GET
Description Get Heat Imaging Temper PreAlarm Event config
M
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=PreAlarmEve
Example
EG
nt
Success head.Enable=false
A
Parameters in Response:
head= table.PreAlarmEvent[ChannelNo]
st
Comment
ChannelNo: integer, array index starts from 0, which means video channel (equals to
rib
Table 10-31
io
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
n
Syntax
alue>[&<paramName>=<paramValue>…]
s.r
Method GET
Description Set Heat Imaging Temper PreAlarm Event config
.o
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&PreAlarmEvent[0].En
.
Example
able=false&PreAlarmEvent[0].EventHandler.BeepEnable=false
Success
OK
Return
Comment Parameters in URL:
In table below,
head=PreAlarmEvent[ChannelNo]
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
Da
Appendix
Table 11-1
http://<server>/cgi-bin/accessControl.cgi?action=openDoor&channel=<ChannelNo>[&
Syntax
UserID=<UserID>&Type=<Type>]
TT
Method GET
P
http://192.168.1.108/cgi-bin/accessControl.cgi?action=openDoor&channel=1&UserID=
Example
101&Type=Remote
IV
Success
OK
Return
2.
Parameters in URL:
89
Table 11-2
M
Syntax http://<server>/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=<ChannelNo>
EG
Method GET
Description Get status of the door.
A
Example http://192.168.1.108/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=1
Di
Success
Info.status=Open
Return
st
Parameters in URL :
rib
Table 11-3
.o
http://<server>/cgi-bin/accessControl.cgi?action=closeDoor&channel=<ChannelNo>[&
Syntax
.
UserID=<UserID>&Type=<Type>]
Method GET
Description Close the door.
http://192.168.1.108/cgi-bin/accessControl.cgi?action=closeDoor&channel=1&UserID=
Example
101&Type=Remote
Table 11-4
Syntax http://<server>/cgi-bin/accessControl.cgi?action=captureFingerprint
TT
Method GET
Description Capture fingerprint data, then report it via ‘Fingerprint’ event.
P
+FingerPrintNam
string O Fingerprint name (For smart building products)
e
89
[ Response Params ] ( OK )
[ Example ]
00
GET http://<server>/cgi-bin/accessControl.cgi?action=captureFingerprint&
M
Request info.ReaderID=101&info.FingerPrintName=aaaa&info.UserID=10221&heartbeat=5&timeou
t=10
EG
Response OK
A
Di
Table 11-5
URL http://<server>/cgi-bin/accessControl.cgi?action=captureCmd
ut
Method GET
io
Table 11-6
http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControlCustomPa
TT
URL
ssword
P
Method GET
Description Insert access control custom password.
AP
"AccessControlCustomPassword".
89
word
Ths user’s alarm password. ( This param is not supported by
r1
AlarmPassword string O
video talk device )
00
The index of the doors that custom password can open. ( This
Doors array<int> O
param is not supported by video talk device )
M
The index of the time sections of each door that this card can
TimeSections array<int> O
EG
control device )
Di
R/
Name Type Param Description
n
O
s.r
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControl
.
CustomPassword&UserID=102&OpenDoorPassword=123456&Doors[0]=1&Doors[1]=3&
Request
Doors[2]=5&VTOPosition=01018001&ValidDateStart=20151022%20093811&ValidDateEn
d=20151222%20093811&ValidCounts=30
Response RecNo=12345
OpenDoorPass
AP
[ Response Params ] ( OK )
[ Example ]
fo
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=update&name=AccessContr
olCustomPassword&recno=12345&UserID=102&OpenDoorPassword=123456&Doors[0]
r1
Request
=1&Doors[1]=3&Doors[2]=5&ValidDateStart=20151022%20093811&ValidDateEnd=2015
00
1222%20093811
Response OK
M
Table 11-8
st
http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=AccessControlCustomPa
URL
ssword
rib
Method GET
ut
Descriptio
Remove the access control custom password record by recno.
n
io
[ Response Params ] ( OK )
[ Example ]
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=remove&name=AccessCont
Request
rolCustomPassword&recno=12345
Table 11-9
http://<server>/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControlCustomPass
URL
word
Method GET
Da
Descriptio
Remove all the access control custom password records
n
hu
[ Response Params ] ( OK )
[ Example ]
P
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControl
AP
Request
CustomPassword
IV
Response OK
2.
Table 11-10
r1
http://<server>/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCustomPass
URL
word
00
Method GET
Description Find Access control custom password by condition.
M
VTOPosition string O
talk device )
+ValidDateStar
hu
[ Example ]
AP
GET http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCust
Request omPassword&condition.UserID=103&StartTime=123456700&EndTime=123456800&count
IV
=100
totalCount=1000
2.
found=100
89
records[0].RecNo=12345
records[0].CreateTime=123456789
fo
records[0].UserID=103
r1
records[0].OpenDoorPassword=123456
records[0].Doors[0]=1
00
records[0].Doors[1]=3
records[0].Doors[2]=5
M
records[0].VTOPosition=01018001
EG
records[0].ValidStart=20151022 093811
records[0].ValidEnd=20151222 093811
A
Response
…
Di
records[1].RecNo=13579
records[1].CreateTime=123456799
st
records[1].UserID=103
rib
records[0].OpenDoorPassword=123456
records[1].Doors[0]=2
ut
records[1].Doors[1]=4
io
records[1].Doors[2]=6
n
records[1].VTOPosition=01018002
s.r
records[1].ValidStart=20151022 093811
records[1].ValidEnd=20151222 093811
.o
…
.
Table 11-11
http://<server>/cgi-bin/recordUpdater.cgi?action=get&name=AccessControlCustomPas
URL
sword
…<other param> — — …<See above find command for other params of the record.>
[ Example ]
P
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=get&name=AccessControlCu
Request
AP
stomPassword&recno=3
record.RecNo=3
IV
record.CreateTime=123456789
record.UserID=103
2.
record.OpenDoorPassword=123456
89
record.Doors[0]=1
Response record.Doors[1]=3
fo
record.Doors[2]=5
r1
record.VTOPosition=01018001
record.ValidStart=20151022 093811
00
record.ValidEnd=20151222 093811
…
M
EG
Custom Password
Di
st
Table 11-12
http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCust
rib
URL
omPassword
ut
Method GET
Description Get the total number of records of the access control custom password.
io
Channels
+AccessControl Support log access control alarm record or not. ( This param is
bool O
P
+CustomPasswo
int O The custom password crypt type, 0 : plain text, 1 : MD5
rdEncryption
IV
int O
rAuth ( This param is not used by video talk device )
Support async auth type, 0 : not support, 1 : support, ( This
fo
+AsynAuth int O
param is not supported by video talk device )
r1
uint O
aysSchedules supported by video talk device )
++MaxTimePeri Max time periods per day. ( This param is not supported by
A
uint O
odsPerDay video talk device )
Di
++MaxSpecialD Max special day groups. ( This param is not supported by video
uint O
st
uint O
ecialDayGroup supported by video talk device )
ut
[ Example ]
Request GET http://192.168.1.108/cgi-bin/accessControlManager.cgi?action=getCaps
io
n
s.r
.o
.
caps.SpecialDaysSchedule.MaxSpecialDaysSchedules=5
caps.SpecialDaysSchedule.MaxTimePeriodsPerDay=5
hu
caps.SpecialDaysSchedule.MaxSpecialDayGroups=5
caps.SpecialDaysSchedule.MaxDaysInSpecialDayGroup=5
aH
TT
Syntax http://<server>/cgi-bin/accessControl.cgi?action=getLockStatus&channel=<ChannelNo>
Method GET
IV
ChannelNo: integer, the index of lock, starts from 1. Default is 1 if not present.
r1
Parameters in Response :
status: the range is {“Open”,”Close”,”Abnormal”, "FakeLocked", "Unknown" }
00
Table 11-14
rib
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AccessControlGener
URL
al
ut
Method GET
io
++UnlockRecord
Array<string> O "FingerPrint", "QRCode", "Card","Remote", "BlueTooth",
Type
"Face"}
fo
sensor type,
++SensorType integer O
r1
+++CurrentVoice
EG
0: Validate succeed
st
4: welcome
5: Welcome to come again
io
6: thank you
n
7: custom voice
s.r
}
++++VoiceID integer O voice id
.o
table.AccessControlGeneral.ABLock.Doors[1][2]=6
e
table.AccessControlGeneral.CustomPasswordEnable=true
hu
table.AccessControlGeneral.CommonPassword=123456
table.AccessControlGeneral.ButtonExitEnable=true
aH
table.AccessControlGeneral.CheckSensorBeforeLock=true
table.AccessControlGeneral.CheckSensorTime=30
TT
table.AccessControlGeneral.DuressPassword=654321
P
table.AccessControlGeneral.DuressEnable=true
AP
Table 11-15
IV
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
2.
Method GET
Descripti
89
AccessControlG
object R AccessControlGeneral config object
eneral
00
…<other param> — —
config object, They are all optional.>
A
[ Response Params ] ( OK )
[ Example ]
Di
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&AccessControlGeneral.Ac
st
cessProperty=bidirect&AccessControlGeneral.ABLock.Enable=false&AccessControlGener
rib
Request al.CustomPasswordEnable=true&AccessControlGeneral.CommonPassword=123456&Acc
essControlGeneral.ButtonExitEnable=true&AccessControlGeneral.CheckSensorBeforeLoc
ut
k=true
io
Respons
OK
e
n
s.r
Table 11-16
URL http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AccessControl
Method GET
++State string O
“OpenAlways”, “NoPersonNC”, “NoPersonNO”
aH
6 : only by fingerprint
7 : by password or access card or fingerprint
2.
22 : by face or password
23 : by fingerprint or password
ut
24 : by fingerprint or face
io
AccessTimeSechdule config.
The Unlock holding interval, unit is milliseconds, value
++UnlockHoldInt
fo
++AccessProtoc
string O "Remote", "Private" ( This param is also supported by
ol
EG
Enable
Di
++RepeatEnterA
bool O Whether to enable the repeat enter alarm.
larm
st
++DoorNotClose
rib
+++Time int O
index in AccessTimeSechdule config.
.
time range".
+++TimeSection string O time section, format as "hh:mm:ss-hh:mm:ss"
P
0 : only by password
1 : only by access card
IV
17 : only by face
EG
table.AccessControl[0].Enable=true
ut
table.AccessControl[0].State=Normal
table.AccessControl[0].Method=2
io
table.AccessControl[0].OpenAlwaysTime=1
n
table.AccessControl[0].CloseAlwaysTime=2
s.r
Respons table.AccessControl[0].UnlockHoldInterval=500
e table.AccessControl[0].AccessProtocol=Local
.o
table.AccessControl[0].BreakInAlarmEnable=true
.
table.AccessControl[0].DuressAlarmEnable=true
table.AccessControl[0].CardNoConvert=0
table.AccessControl[0].MaliciousAccessControlEnable=true
…
Set access control setting
[ Example ]
GET
P
http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&AccessControl[0].Enable=true&
AP
AccessControl[0].State=Normal&AccessControl[0].Method=2&AccessControl[0].OpenAlwa
Request ysTime=1&AccessControl[0].CloseAlwaysTime=2&AccessControl[0].UnlockHoldInterval=5
IV
00&AccessControl[0].AccessProtocol=Local&AccessControl[0].BreakInAlarmEnable=true&
AccessControl[0].DuressAlarmEnable=true&AccessControl[0].CardNoConvert=0&AccessC
2.
ontrol[0].MaliciousAccessControlEnable=true
89
Respons
OK
e
fo
r1
Table 11-18
URL http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Wiegand
EG
Method GET
A
table.Wiegand[0].PulseStep=1000
table.Wiegand[0].TransferMode=1
hu
Respons
table.Wiegand[0].OutType=1
e
aH
table.Wiegand[1].Mode=1
table.Wiegand[0].InputType=3
table.Wiegand[0].Doors=0
TT
…
P
Table 11-19
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
IV
Method GET
2.
Descripti
Set Wiegand setting.
89
on
[ Request Params ] ( key=value format at URL )
fo
[ Response Params ] ( OK )
EG
[ Example ]
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&Wiegand[0].Mode=1&Wie
A
Request gand[0].PulseWidth=200&Wiegand[0].PulseStep=1000&Wiegand[0].TransferMode=1&Wie
gand[0].OutType=1
Di
Respons
st
OK
e
rib
Table 11-20
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AccessTimeSchedul
.o
URL
e
.
Method GET
Description Get access time schedule setting.
[ Request Params ] ( None )
[ Response Params ] ( key=value format )
GET
Request
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=AccessTimeSchedule
P
table.AccessTimeSchedule[0].Name=TS1
AP
table.AccessTimeSchedule[0].Enable=true
table.AccessTimeSchedule[0].TimeSchedule[0][0]=1 00:00:00-12:00:00
Respons
IV
table.AccessTimeSchedule[0].TimeSchedule[0][1]=1 15:00:00-20:00:00
e
table.AccessTimeSchedule[0].TimeSchedule[1][0]=1 00:00:00-12:00:00
2.
table.AccessTimeSchedule[0].TimeSchedule[1][1]=1 15:00:00-20:00:00
89
…
Set access time schedule setting
fo
Table 11-21
r1
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
Method GET
00
Descripti
Set access time schedule setting.
M
on
[ Request Params ] ( key=value format at URL )
EG
AccessTimeSch
array<object> R The access time schedule config object array
edule
Di
[ Example ]
io
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&AccessTimeSchedule[0].
n
Name=TS1&AccessTimeSchedule[0].Enable=true&AccessTimeSchedule[0].TimeSchedule
Request [0][0]=1%2000:00:00-12:00:00&AccessTimeSchedule[0].TimeSchedule[0][1]=1%2015:00:0
s.r
0-20:00:00&AccessTimeSchedule[0].TimeSchedule[1][0]=1%2000:00:00-12:00:00&Access
.o
TimeSchedule[0].TimeSchedule[1][1]=1%2015:00:00-20:00:00
Respons
.
OK
e
Table 11-22
URL http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=SpecialDayGroup
Da
Method GET
Description Get special day group setting.
hu
+SpecialDayGro
array<object> R SpecialDayGroup config object array
P
up
AP
[ Example ]
r1
table.SpecialDayGroup[0].Enable=true
Respons table.SpecialDayGroup[0].Days[0].SpecialDayName=NationalDay
M
e table.SpecialDayGroup[0].Days[0].StartTime=2017-10-01 00:00:00
EG
table.SpecialDayGroup[0].Days[0].StartTime=2017-10-07 23:59:59
…
A
Table 11-23
st
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
rib
Method GET
Descripti
ut
Table 11-24
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=SpecialDaysSchedul
URL
TT
e
Method GET
P
+SpecialDaysSc
array<object> R SpecialDaysSchedule config object array
hedule
fo
00:00:00-12:00:00".
++Doors array<int> R The doors array.
A
[ Example ]
GET
Di
Request
http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=SpecialDaysSchedule
st
table.SpecialDaysSchedule[0].Name=SpecialDayGroup1
rib
table.SpecialDaysSchedule[0].Enable=true
table.SpecialDaysSchedule[0].GroupNo=1
ut
e table.SpecialDaysSchedule[0].TimeSection[1]=1 15:00:00-20:00:00
n
table.SpecialDaysSchedule[0].Doors[0]=2
table.SpecialDaysSchedule[0].Doors[1]=3
s.r
…
.o
Table 11-25
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
Method GET
Descripti Set special days schedule setting.
…<other param> — —
config object, They are all optional.>
[ Response Params ] ( OK )
hu
[ Example ]
aH
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&SpecialDaysSchedule[0].
Name=SpecialDayGroup1&SpecialDaysSchedule[0].Enable=true&SpecialDaysSchedule
TT
Request [0].GroupNo=1&SpecialDaysSchedule[0].TimeSection[0]=1%2000:00:00-12:00:00&Special
DaysSchedule[0].TimeSection[1]=1%2015:00:00-20:00:00&SpecialDaysSchedule[0].Doors
P
[0]=2&SpecialDaysSchedule[0].Doors[1]=3
AP
Respons
OK
e
IV
Table 11-26
r1
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MeasureTemperatur
URL
e
00
Method GET
M
+MeasureTempe
st
1: mask prompt
n
2: mask intercept
++OnlyTemperat whether to enable the single function, temperature
s.r
bool O
ureMode measurement
.o
++TemperatureD
bool R whether to show the temperature
.
isplay
temperature unit:{
++TemperatureU 0: centigrade
uint O
nit 1: Fahrenheit
}
++GuideModule
object O param of temperature measurement module of Guide
Param
hu
odel
2: Gate mode
P
gModel
r1
eplaceThreshold
function won’t work.
EG
+++ValidTemper
float O the lower limit of valid temperature value
atureLowerLimit
A
++InfraredTemp
object O param of infrared temperature measurement
Di
eratureParam
+++Correct float O temperature correct value, unit is ℃
st
bool O
Enable measurement, show temperature on the top of face
ut
+++RetentionTi
Uint32 O temperature retention Time, unit: ms
me
hu
++WristTempera
Object O param of wrist temperature measurement
tureParam
TT
eratureDistance
AP
+++Temperature
Uint32 O timeout of temperature measurement, unit: s
Timeout
IV
+++ValidTemper
flaot O the lower limit of valid temperature value
atureLowerLimit
fo
[ Example ]
r1
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=
Request
MeasureTemperature
00
table.MeasureTemperature.Enable=true
table.MeasureTemperature.GuideModuleParam.CalibrationModel=1
M
table.MeasureTemperature.GuideModuleParam.Correct=0
EG
table.MeasureTemperature.GuideModuleParam.DebugModelEnable=false
table.MeasureTemperature.GuideModuleParam.HeatDisplayEnbale=false
A
table.MeasureTemperature.GuideModuleParam.MaxDistance=0
Di
table.MeasureTemperature.GuideModuleParam.ProjectDebugModel=false
st
table.MeasureTemperature.GuideModuleParam.RectEnable=true
table.MeasureTemperature.GuideModuleParam.TempRandReplaceThreshold=0
rib
table.MeasureTemperature.GuideModuleParam.Threshold=37.300000
ut
Respons table.MeasureTemperature.GuideModuleParam.ValidTemperatureLowerLimit=30
e table.MeasureTemperature.InfraredTemperatureParam.Correct=0
io
table.MeasureTemperature.InfraredTemperatureParam.DebugModelEnable=false
n
table.MeasureTemperature.InfraredTemperatureParam.MaxDistance=100
s.r
table.MeasureTemperature.InfraredTemperatureParam.OverTemperatureMaxDistance=100
table.MeasureTemperature.InfraredTemperatureParam.RectEnable=true
.o
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.WristTemperatureParam.TemperatureTimeout=10
table.MeasureTemperature.WristTemperatureParam.Threshold=37.300000
hu
table.MeasureTemperature.WristTemperatureParam.ValidTemperatureDistance=5
table.MeasureTemperature.WristTemperatureParam.ValidTemperatureLowerLimit=35
aH
…
Set measure temperature setting
TT
Table 11-27
P
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
AP
Method GET
Descripti
IV
MeasureTemper
object R The measure temperature config object
ature
fo
[ Response Params ] ( OK )
M
[ Example ]
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&MeasureTemperature.En
EG
Request able=true&MeasureTemperature.GuideModuleParam.Threshold=38.5&MeasureTemperatur
A
e.MaskOpt=2
Respons
Di
OK
e
st
rib
Table 11-28
s.r
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=CitizenPictureCompa
URL
re
.o
Method GET
.
[ Example ]
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=
Request
P
CitizenPictureCompare
AP
table.CitizenPictureCompare.SysMode=CitizenCompare
table.CitizenPictureCompare.Threshold=50
IV
Respons table.CitizenPictureCompare.UnlockEnable=false
e table.CitizenPictureCompare.FuncEnable=false
2.
table.CitizenPictureCompare.CitizenIDCheck=false
89
…
Set citizen picture compare setting
fo
Table 11-29
r1
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
Method GET
00
Descripti
Set citizen picture compare setting
M
on
EG
CitizenPictureCo
object R CitizenPictureCompare config object
mpare
Di
…<other param> — —
config object, They are all optional.>
rib
[ Response Params ] ( OK )
[ Example ]
ut
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&CitizenPictureCompare.S
io
ysMode= CitizenIDCheck&CitizenPictureCompare.Threshold=80&CitizenPictureCompare.
Request
n
UnlockEnable=true&CitizenPictureCompare.FuncEnable=true&CitizenPictureCompare.Citi
zenIDCheck=true
s.r
Respons
OK
.o
e
.
Table 11-30
URL http://<server>/cgi-bin/AccessUser.cgi?action=insertMulti
Da
Method POST
Description Insert person information.
hu
user
89
true: Yes
+FirstEnterDoors int16[] O -1 indicates all channels.
00
+Doors int16[] O
TimeSections, and the value
n
AC configuration.
The door authority corresponds to
.o
"ValidDateEnd" is deprecated.
aH
[ Response Params ] ( OK )
[ Example ]
POST http://192.168.1.108/cgi-bin/AccessUser.cgi?action=insertMulti
TT
P
{
AP
UserList[{
"UserID": "100013",
IV
"UserName": "",
"UserType": 0,
2.
"UseTime": 1,
89
"IsFirstEnter": true,
"FirstEnterDoors": [0, 1],
fo
Request "UserStatus": 0,
r1
"Authority": 1,
"CitizenIDNo": "123456789012345678",
00
"Password": "xxxxxxxxxx",
"Doors": [1,3,5,7],
M
"TimeSections": [1,2,3,4],
EG
"SpecialDaysSchedule": [1,2],
"ValidFrom": "2018-01-02 00:00:00",
A
} ,…,{}]
}
st
Response OK
rib
Table 11-31
s.r
URL http://<server>/cgi-bin/AccessUser.cgi?action=updateMulti
Method POST
.o
+Password string O
when unlocking by User ID +
89
password
fo
Doors.
Holiday plan identification. The
st
the configuration).
io
"ValidDateStart" is deprecated.
"yyyy-MM-dd HH:mm:ss", end of
.o
"ValidDateEnd" is deprecated.
[ Response Params ] ( OK )
[ Example ]
{
UserList[{
"UserID": "100013",
"UserName": "",
"UserType": 0,
Da
"UseTime": 1,
"IsFirstEnter": true,
hu
"Authority": 1,
"CitizenIDNo": "123456789012345678",
TT
"Password": "xxxxxxxxxx",
P
"Doors": [1,3,5,7],
"TimeSections": [1,2,3,4],
AP
"SpecialDaysSchedule": [1,2],
IV
} ,…,{}]
89
Response OK
fo
Table 11-32
URL http://<server>/cgi-bin/AccessUser.cgi?action=removeAll
EG
Method GET
Description Clear information of all persons.
A
[ Response Params ] ( OK )
rib
[ Example ]
ut
io
Response OK
.
[ Response Params ] ( OK )
hu
[ Example ]
aH
TT
GET http://192.168.1.108/cgi-bin/AccessUser.cgi?action=removeMulti&UserIDList[0]=102&
Request
UserIDList [1]=102
P
AP
IV
Respons
OK
e
2.
89
Table 11-34
URL http://<server>/cgi-bin/AccessUser.cgi?action=list
00
Method GET
M
users
First user authority or not. false:
.
+IsFirstEnter bool O
No; true: Yes
+FirstEnterDoors int16[] O -1 indicates all channels
+UserStatus uint16 O 0: Normal; 1: Frozen
+Authority uint8 O
password
hu
AC configuration.
P
SpecialDaysSchedule (defined in
r1
the configuration).
"yyyy-MM-dd HH:mm:ss", start of
00
[ Example ]
Di
st
rib
GET http://192.168.1.108/cgi-bin/AccessUser.cgi?action=list&UserIDList[0]=102&UserIDList
Request
[1]=102
ut
io
n
Users[0].UserID=100013
Users[0].UserName=Name
s.r
Users[0].UserType=1
.o
Users[0].UseTime=1
Respons
.
Users[0].IsFirstEnter=ZhangSan
e
Users[0].FirstEnterDoors=0
Users[0].UserStatus=12345678
Users[0].Authority=1
Users[0].CitizenIDNo=1
Table 11-35
TT
URL http://<server>/cgi-bin/AccessCard.cgi?action=insertMulti
Method POST
P
Card type
r1
Enumint{
0: Ordinary card
00
1: VIP card
+CardType uint16 O
2: Guest card
M
3: Patrol card
EG
4: Blocklist card
5: Duress card
A
0: Normal
rib
1<<2: Frozen
io
1<<3: Arrearage
n
1<<4: Overdue
[ Response Params ] ( OK )
s.r
[ Example ]
.o
.
{
CardList[{
"UserID" : "100013"
Request "CardNo" : ""
"CardType" : 0
Da
} ,…,{}]
}
aH
Response OK
TT
Table 11-36
IV
URL http://<server>/cgi-bin/AccessCard.cgi?action=updateMulti
2.
Method POST
Description Update card number information.
89
Card type
M
Enumint{
0: Ordinary card
EG
1: VIP card
+CardType uint16 O
A
2: Guest card
3: Patrol card
Di
4: Blocklist card
st
5: Duress card
rib
0: Normal
1<<0: Reported for loss
n
+CardStatus uint32 O
1<<1: Canceled
s.r
1<<2: Frozen
1<<3: Arrearage
.o
1<<4: Overdue
.
[ Response Params ] ( OK )
[ Example ]
{
CardList[{
"UserID" : "100013"
Request "CardNo" : ""
"CardType" : 0
Da
} ,…,{}]
}
aH
Response OK
TT
Table 11-37
IV
URL http://<server>/cgi-bin/AccessCard.cgi?action=removeAll
2.
Method GET
Description Clear all card information.
89
[ Response Params ] ( OK )
r1
[ Example ]
00
M
Response OK
st
Table 11-38
n
URL http://<server>/cgi-bin/AccessCard.cgi?action=removeMulti
s.r
Method GET
Description Delete card number data.
.o
Respo
hu
OK
nse
aH
Table 11-39
AP
URL http://<server>/cgi-bin/AccessCard.cgi?action=list
Method GET
IV
Card type
M
Enumint{
0: Ordinary card
EG
1: VIP card
+CardType uint16 O
A
2: Guest card
3: Patrol card
Di
4: Blocklist card
st
5: Duress card
rib
0: Normal
1<<0: Reported for loss
n
+CardStatus uint32 O
1<<1: Canceled
s.r
1<<2: Frozen
.o
1<<3: Arrearage
1<<4: Overdue
.
[ Example ]
Cards[0].CardNo=12345678
Cards[0].UserID=1
hu
Cards[0].CardType=1
Cards[0].CardName=ZhangSan
aH
Cards[0].CardStatus=0
…
TT
Response
Cards[1].CardNo=12345679
P
Cards[1].UserID=2
Cards[1].CardType=1
AP
Cards[1].CardName=LiSi
IV
Cards[1].CardStatus=0
…
2.
89
Table 11-40
URL http://<server>/cgi-bin/AccessFace.cgi?action=insertMulti
00
Method POST
M
now.
[ Response Params ] ( OK )
.o
[ Example ]
.
{
“FaceList”:[
{
"UserID": "102",
Request "FaceData": [ "xxxx", "xxxx", … ],
Da
},
….
aH
]
}
TT
Response OK
P
Table 11-41
URL http://<server>/cgi-bin/AccessFace.cgi?action=updateMulti
89
Method POST
Description Update face information.
fo
200kx5.
Either cloud storage URL of white light
Di
[ Response Params ] ( OK )
io
[ Example ]
POST http://192.168.1.108/cgi-bin/AccessFace.cgi?action=updateMulti
n
s.r
{
.o
“FaceList”:[
Request {
.
"UserID": "102",
"FaceData": [ "xxxx", "xxxx", … ],
"PhotoData": [ "yyyy", "yyyy", … ],
" PhotoURL": [ "yyyy", "yyyy", … ],
Response OK
hu
Table 11-42
URL http://<server>/cgi-bin/AccessFace.cgi?action=removeAll
P
Method GET
AP
[ Response Params ] ( OK )
[ Example ]
89
fo
r1
Response OK
EG
Table 11-43
rib
URL http://<server>/cgi-bin/AccessFace.cgi?action=removeMulti
Method GET
ut
[ Response Params ] ( OK )
.
[ Example ]
Response OK
hu
Table 11-44
URL http://<server>/cgi-bin/AccessFace.cgi?action=list
P
Method GET
AP
[ Response Params ]
FaceDataList array<object> R The records that returned.
fo
maximum 20.
M
+PhotoURL array<string> O
invalid when it is subject to
st
available now.
[ Example ]
ut
io
n
GET http://192.168.1.108/cgi-bin/AccessFace.cgi?action=list&UserIDList
Request
s.r
[0]=1&UserIDList[1]=2
.o
.
FaceDataList[0].UserID=1
FaceDataList[0].PhotoData=[ "xxxx", "xxxx", … ],
Response
FaceDataList[0].FaceData=[ "xxxx", "xxxx", … ],
…
Table 11-45
URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=insertMulti
aH
Method POST
Description Insert fingerprint information.
TT
now.
Duress fingerprint number, with a value
M
[ Example ]
st
POST http://192.168.1.108/cgi-bin/AccessFingerprint.cgi?action=insertMulti
rib
{
ut
“AccessFingerprints”:[
{
n
"UserID": "102",
s.r
Request
"FingerprintPacket" :
.o
{
"Length" : 810,
.
"Count" : 3,
"DuressIndex" : 2
}
}
Response OK
hu
Table 11-46
URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=updateMulti
P
Method POST
AP
now.
A
[ Example ]
io
POST http://192.168.1.108/cgi-bin/AccessFingerprint.cgi?action=updateMulti
n
{
s.r
“AccessFingerprints”:[
Request
{
.
"UserID": "102",
"FingerprintPacket" :
{
"Length" : 810,
Response OK
hu
Table 11-47
URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=removeAll
P
Method GET
AP
[ Response Params ] ( OK )
[ Example ]
89
fo
r1
Response OK
EG
Table 11-48
rib
URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=removeMulti
Method GET
ut
[ Response Params ] ( OK )
.
[ Example ]
Response OK
hu
Table 11-49
URL http://<server>/cgi-bin/AccessFingerprint.cgi?action=get
P
Method GET
AP
[ Response Params ]
Binary fingerprint data (Binary
fo
FingerprintData BinaryData R
Data).
r1
+Length uint32 R
package
M
available now.
rib
[ Example ]
.o
.
FingerprintPacket.Length=810
FingerprintPacket.Count=3
hu
Response
FingerprintPacket.DuressIndex=1
FingerprintData=xxx
aH
Table 11-50
URL http://<server>/cgi-bin/AccessUser.cgi?action=startFind
IV
Method GET
2.
Condition object R
according to the user information
field.
00
Disabled user
st
users
First user authority or not. false:
+IsFirstEnter bool O
ut
2: General user
+CitizenIDNo string O ID card number
.
door in Doors.
aH
SpecialDaysSchedule (defined in
P
the configuration).
AP
"ValidDateStart" is deprecated.
"yyyy-MM-dd HH:mm:ss", end of
2.
"ValidDateEnd" is deprecated.
[ Response Params ]
fo
[ Example ]
A
Di
{
io
"Token": 1234,
n
}
.o
Table 11-51
[ Response Params ]
TT
GET http://192.168.1.108/cgi-bin/AccessUser.cgi?action=doFind&Token=1234&Offset=0&C
Request
ount=20
2.
89
fo
{ "Info": [ {
r1
00
"UserID": "102",
Respons
…
M
e
}, { … }, … ]
EG
A
}
Di
st
Table 11-52
io
URL http://<server>/cgi-bin/AccessUser.cgi?action=stopFind
n
Method GET
s.r
Response OK
hu
Information
TT
Table 11-53
AP
Condition object R
according to the user information
r1
field.
+UserID string O User ID
00
Card type
Enumint{
EG
0: Ordinary card
A
1: VIP card
+CardType uint16 O
2: Guest card
Di
3: Patrol card
st
4: Blocklist card
rib
5: Duress card
+CardName string O Card name
ut
0: Normal
n
+CardStatus uint32 O
1<<1: Canceled
1<<2: Frozen
.o
1<<3: Arrearage
.
1<<4: Overdue
[ Response Params ]
Token uint32 R Search token.
Total uint32 R Total number of entries found this
{
P
"Token": 1234,
AP
"Caps ": 20
2.
}
89
Table 11-54
00
URL http://<server>/cgi-bin/AccessCard.cgi?action=doFind
Method GET
M
[ Response Params ]
io
[ Example ]
s.r
.o
GET http://192.168.1.108/cgi-bin/AccessCard.cgi?action=doFind&Token=1234&Offset=0&C
.
Request
ount=20
"UserID": "102",
Respons
e …
Da
}, { … }, … ]
hu
}
aH
Information
P
AP
Table 11-55
URL http://<server>/cgi-bin/AccessCard.cgi?action=stopFind
2.
Method GET
89
Response OK
ut
Table 11-56
URL http://<server>/cgi-bin/AccessFace.cgi?action=startFind
.o
Method GET
.
{
fo
"Token": 1234,
r1
"Caps ": 20
M
}
EG
Table 11-57
st
URL http://<server>/cgi-bin/AccessFace.cgi?action=doFind
rib
Method GET
Description Get face related information.
ut
GET http://192.168.1.108/cgi-bin/AccessFace.cgi?action=doFind&Token=1234&Offset=0&C
Request
ount=20
Da
hu
{ "Info": [ {
aH
"UserID": "102",
TT
Respons
e …
P
}, { … }, … ]
AP
IV
}
2.
Table 11-58
00
URL http://<server>/cgi-bin/AccessFace.cgi?action=stopFind
Method GET
M
[ Example ]
rib
ut
io
Response OK
.
Table 12-1
TT
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=attachState
Method GET
P
Description Subscribe the video talk status. When client disconnect, it will unsubscribe.
AP
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=attachState
Notify the state:
IV
2.
SID=315
state.State=Answer
89
state.Talkback.Pack=RTP
state.Talkback.Protocol=UDP
fo
state.Talkback.Type=Talk
r1
state.Talkback.Audio.AudioPort=6000
state.Talkback.Audio.Format[0].Compression=PCM
00
Success state.Talkback.Audio.Format[0].Frequency=44000
M
Return state.Talkback.Audio.Format[0].Depth=16
state.Talkback.Audio.Format[1].Compression=G.711A
EG
state.Talkback.Audio.Format[1].Frequency=44000
state.Talkback.Audio.Format[1].Depth=16
A
state.Talkback.Video.VideoPort=7000
Di
state.Talkback.Video.Format[0].Compression=H.264
st
state.Talkback.Video.Format[0].Frequency=90000
state.Talkback.Video.Format[1].Compression=MJPG
rib
…
ut
state.Talkback. MediaAddr=224.10.10.10
Parameters in Response:
io
"Busying" }
s.r
Table 12-2
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=detachState&SID=<sid>
Method GET
Description Unsubscribe the video talk status.
Table 12-3
hu
http://<server>/cgi-bin/VideoTalkPeer.cgi?action=invite[&Talkback.Protocol=<protocol>
Syntax
aH
&Talkback.Type=<type>&Talkback.MediaAddr=<addr>…]
Method GET
Description Start the video talk conversation.
TT
http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=invite&Talkback.Protocol=UDP&
Example
P
Talkback.Type=Talk&Talkback.MediaAddr=224.10.10.10
AP
Success
OK
Return
IV
Parameters in URL:
protocol: the transmit protocol
2.
Comment
type: video talk type.
89
Table 12-4
00
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=cancel
Method GET
M
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=cancel
Success
A
OK
Return
Di
Comment —
st
Table 12-5
http://<server>/cgi-bin/VideoTalkPeer.cgi?action=answer&Talkback.Protocol=<protoco
io
Syntax
l>&Talkback.Type=<type>&Talkback.MediaAddr=<addr>…
n
Method GET
s.r
Example
&Talkback.Type=Talk&Talkback.MediaAddr=224.10.10.10
.
Success
OK
Return
Parameters in URL:
Comment
protocol: the transmit protocol
Method GET
Description Refuse answer the call.
hu
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=refuse
aH
Success
OK
Return
TT
Comment —
P
12.1.7 Hang Up
AP
Table 12-7
IV
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=hangup
Method GET
2.
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=hangup
Success
fo
OK
Return
r1
Comment —
00
Table 12-8
st
http://<server>/cgi-bin/recordFinder.cgi?action=find&name=VideoTalkLog[&condition.C
Syntax
allType=<Type>&condition.EndState=<State>&count=<countNo>]
rib
Method GET
ut
Example
on.CallType=Incoming&condion.EndState=Missed&count=500
n
totalCount=1000
s.r
found=500
records[0].RecNo=789
.o
Success records[0].CreateTime=123456789
.
Return records[0].CallType=Incoming
records[0].EndState=Received
records[0].PeerNumber=501
…
Comment
Parameters in Response :
totalCount : the record count which match condition
Da
Table 12-9
http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=Announcement&Conten
2.
Syntax t=<Content>&ExpirTime=<ExpirTime>&IssueTime=<IssueTime>&Title=<Title>&User
89
=<User>&State=<State>&ReadFlag=<ReadFlag>
Method GET
fo
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insert&name=Announcement&C
Example ontent=stringData&ExpirTime=2012-01-01%2012:00:00&IssueTime=2012-01-01%201
00
2:00:00&Title=Anounce1&User=101&State=0&ReadFlag=0
Success
M
RecNo=<RecNo>
Return
EG
Parameters in URL:
Content: Announcement Content
A
Comment
User: the number the Announcement issued to
rib
Parameters in Response :
io
Table 12-10
http://<server>/cgi-bin/recordFinder.cgi?action=find&name=AlarmRecord[&StartTime=<
Syntax
startTime>&EndTime=<endTime>&count=<countNo>]
records[0].CreateTime=123456789
Success records[0].Channel=0
hu
Return records[0].SenseMethod=DoorMagnetism
aH
records[0].RoomNumber=501
records[0].ReadFlag=0
records[0].Comment=Friend
TT
…
P
Parameters in URL:
AP
countNo: the number of records to get, The record count, default 1024
2.
Table 12-11
http://<server>/cgi-bin/recordFinder.cgi?action=find&name=AccessControlAlarmRecor
Syntax
A
d[&StartTime=<startTime>&EndTime=<endTime>&count=<countNo>]
Di
Method GET
Find the AccessControlAlarmRecord record. ( This api is supported by access control
st
Description
device. )
rib
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AccessControlAlarmR
Example ecord&StartTime=2014-8-25%2000:02:32&EndTime=2014-8-25%2001:02:32&count=5
ut
00
io
totalCount=1000
n
found=500
s.r
records[0].RecNo=789
records[0].CreateTime=123456789
.o
Success records[0].UserID=10113
.
Return records[0].EventCode=DoorMagnetism
records[0].DevAddrs=1
records[0].IndexNum=0
records[0].Time=2017-05-10 16:00:01
…
Comment
Parameters in Response :
totalCount : the record count which match condition
Da
12.5 SIP
TT
P
The user needs to connect video intercom through CGI protocol, but do not know how to use this
AP
protocol to configure the device. This document provides the corresponding CGI protocol according
to the configuration data format involved in the specific service.
IV
Table 12-12
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name
fo
=SIP
Method GET
r1
SIP server
++SIPServer string R
IP address or domain name
st
++OutboundProxyID string O
++OutboundProxyPort Int O Proxy server port number
io
User account ID
++UserID String R
n
Video stream
enumchar[32]{
"Main": Main stream
TT
Audio stream
enumchar[32]{
2.
}
++RouteEnable bool O Enable SIP cross-router or not.
00
++SIPServerLoginPWD string O
For intelligent building only
Di
string O
me For intelligent building only
n
table.SIP.AuthPassword=123456
table.SIP.IsMainVTO=0
hu
table.SIP.LocalRTPPort=15000
aH
table.SIP.LocalSIPPort=5060
table.SIP.OutboundProxy=192.168.1.111
table.SIP.OutboundProxyID=8000
TT
table.SIP.OutboundProxyPort=5060
P
table.SIP.RegisterRealm=VDP
AP
table.SIP.Route[0]=sip:10.30.1.2:5060;lr
Response table.SIP.RouteEnable=true
IV
table.SIP.SIPServer=192.168.1.111
table.SIP.SIPServerID=8000
2.
table.SIP.SIPServerLoginPWD=admin
89
table.SIP.SIPServerLoginUserName=admin
table.SIP.SIPServerPort=5060
fo
table.SIP.SIPServerRedundancyPassWord=admin
table.SIP.SIPServerRedundancyUserName=admin
r1
table.SIP.UserEnable=true
00
table.SIP.UserID=8001
table.SIP.UserType=2
M
EG
Table 12-13
Di
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
Method GET
st
SIP server
++SIPServer string R
s.r
t
.
++OutboundPro
string O Proxy server IP address or domain name
xy
++OutboundPro
string O Proxy server ID
xyID
++STUNServer String O
IP address or domain name
aH
++RegisterReal
String R Registration domain
m
TT
0-65535
AP
Reboot
false: Not delete
89
++DefaultCallNu
string O Default call number
mber
fo
Video stream
enumchar[32]{
00
Audio stream
Di
enumchar[32]{
"Main": Main stream
st
}
io
name.
++SIPServerLog Username to log in to VTNC
.o
string O
inUserName For intelligent building only
.
++AnalogNumbe
string O in the analog system
rStart
aH
rEnd
For intelligent building only
P
Enable registration
AP
[ Example ]
89
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&SIP.SIPServer
Request =192.168.1.108&SIP.SIPServerPort=5060&SIP.RegisterRealm=VDP&SIP.RouteEnable=
fo
true
r1
Response OK
00
12.6 Registar
M
EG
Table 12-14
Di
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=
st
Registar
rib
Method GET
Description Get Registar configuration.
ut
+Registar object[] R
.o
"ZYCOO"
"ThirdParty"
hu
"3CXSystem"
"Asterisk"
aH
}
++GeneralServerInfo object O
TT
authentication is required.
[ Example ]
2.
GET http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=
Request
89
Registar
Response
fo
table.Registar[0].ServerType=VTO
r1
Table 12-15
M
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
EG
Method GET
Description Modify Registar configuration.
A
"ThirdParty"
"3CXSystem"
hu
"Asterisk"
}
aH
++GeneralServe object O
rInfo
TT
[ Response Params ] ( OK )
[ Example ]
2.
GET
Request
89
http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&Registar.ServerType=VTO
Response OK
fo
r1
Table 12-16
A
URL http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=VideoTalkContact
Method GET
Di
r
VTLongNumber string O Long number for video intercom or serial number of analog
.
indoor monitor
VTNetAddress string O Network address for video intercom
MacAdress string O MAC address
VTOPosition string O Door number linked with indoor monitor
VTSlavePort uint32 O Allocator port when accessing to the analog indoor monitor for
aH
video talk
(Change string to uint32 for consistency)
VTSlaveAddress string O Address of the analog indoor monitor for video talk
TT
}
89
"public"
r1
"local"
}
00
LiftControlByVT bool O Lift control is triggered by the indoor monitor opening the door.
rib
H
ut
[ Example ]
s.r
GET
Request http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=VideoTalkContact&VTShort
.o
Number=101&RegisterType=public&VTHPassword=123456
.
Response RecNo=12345
er
+VTLongNumbe string O Long number for video intercom or serial number of VTH
fo
ode talk
EG
Enumint{
0: SubAddress
A
1: SubID+SubPort
}
Di
+VTSlaveId uint32 O Allocator address when accessing to the analog indoor monitor
st
video talk
io
+VTSlaveAddres string O Address of the analog indoor monitor for video talk
s
s.r
[ Example ]
aH
GET
Request http://<server>/cgi-bin/recordUpdater.cgi?action=get&name=VideoTalkContact&recno=123
45
TT
record.RecNo=12345
P
record.CreateTime=123456789
AP
record.FirstName=Dafei
record.FamilyName=Wang
IV
record.VTShortNumber=0101
record.VTMiddleNumber=11010101
2.
record.VTLongNumber=330103001101010151
89
record.VTNetAddress=127.0.0.1
record.MacAdress=0A:3E:FF:2A:50:41
fo
record.VTOPosition=01018001
r1
record.VTSlaveBindMode=0
record.VTSlaveId=1258421
00
Response record.VTSlavePort=1258421
record.VTSlaveAddress=04:b3:01:f7
M
record.NickName=Nick
EG
record.Notes=Friend
record.Type=VTH
A
record.RegisterType=public
Di
record.VTHPassword=123456
record.VTOBuilding=01
st
record.VTOUnit=01
rib
record.GroupNumber=301
record.Channel=1
ut
record.Floors[0]=1
io
record.LiftControlByVTH=true
n
Table 12-18
.
URL http://<server>/cgi-bin/recordUpdater.cgi?action=update&name=VideoTalkContact
Method GET
Description Update Room number database records.
[ Request Params ] (key=value format in URL)
Name Type R/O Param Description
r
VTLongNumber string O Long number for video intercom or serial number of VTH
hu
de talk
AP
Enumint{
0: SubAddress
IV
1: SubID+SubPort
}
2.
VTSlaveId uint32 O Allocator address when accessing to the analog indoor monitor
89
VTSlavePort uint32 O Allocator port when accessing to the analog indoor monitor for
r1
video talk
(Change string to uint32 for consistency)
00
VTSlaveAddress string O Address of the analog indoor monitor for video talk
NickName string O Nickname
M
}
RegisterType enumchar[ O Registration method
rib
32] Enumchar[32]{
ut
"public"
"local"
io
}
n
Channel uint32 O Channel number, based on which the mobile phone subscribes
to the call notification message.
Floors char[256][4 O Floor number (lift control requirements), with up to 256
] characters
Response OK
hu
Table 12-19
URL http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=VideoTalkContact
TT
Method GET
P
[ Example ]
89
GET
Request http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=VideoTalkContact&recno
fo
=12345
r1
Response OK
00
Table 12-20
EG
URL http://<server>/cgi-bin/recordUpdater.cgi?action=clear&name=VideoTalkContact
Method GET
A
[ Example ]
Request GET http://<server>/cgi-bin/recordUpdater.cgi?action=clear&name=VideoTalkContact
io
Response OK
n
s.r
Table 12-21
URL http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize&name=VideoTalkContact
Method GET
Description Get the total number of records of the database VideoTalkContact.
GET
Request
http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize&name=VideoTalkContact
hu
Response Count=200
aH
TT
P
AP
IV
2.
89
fo
r1
00
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
Table 13-1
http://<server>/cgi-bin/FileFindHelper.cgi?action=startFind&condition.channel=<Channe
lNo>&condition.startTime=<start>&condition.endTime=<end>&condition.streamType=<
TT
Syntax
stream>[&condition.flags[0]=<flag>&condition.events[0]=<event>&combineMode.granu
P
larity=<granularityValue>&combineMode.types[0]=<combineType>]
Method GET
AP
Find a file in channel 1. Event type is "AlarmLocal" or "VideoMotion". Time lines between
2014-1-1 12:00:00 and 2015-1-10 12:00:00. Combine "AlarmLocal" or "VideoMotion"
2.
URL is:
Example http://172.23.1.66/cgi-bin/fileFindHelper.cgi?action=startFind&condition.channel=1&con
fo
dition.startTime=2014-1-1%2012:00:00&condition.endTime=2015-1-10%2012:00:00&co
ndition.streamType=Main&condition.flags[0]=Event&condition.events[0]=AlarmLocal&co
r1
ndition.events[1]=VideoMotion&combineMode.granularity=16&combineMode.types[0]=A
00
larmLocal&combineMode.types[0]=VideoMotion
Success
M
result=08137
Return
EG
Start to find a file with the above condition and combine files with certain type. If it
succeeds, return to find id. Otherwise return to Error.
A
Parameters in URL:
Di
flag: which flags of the file you want to find. It is an array. The index starts from 0. The
rib
range of flag is {"Timing", "Marked", "Event", "Restrict"}. If omitted, find files with all the
flags.
ut
event: by which event the record file is triggered. It is an array. The index starts from 0.
io
Comment The range of event is {"AlarmLocal", "VideoMotion", "VideoLoss"}. This condition can be
n
combineType: which types of the file you want to combined. It is an array. The index
starts from 0. The range of combine type is {"AlarmLocal", "VideoMotion", "Timing",
.
"VideoLoss"}. This condition can be omitted. If omitted, file will not be combined.
granularityValue: by which granularity to combine files
Example:
File 1:
File 2:
hu
items[0].Channel =1
items[0].StartTime =2011-1-1 13:00:00
aH
items[0].VideoStream=Main
P
items[0].Length =790
items[0].Duration = 3600
AP
IV
items[0].Channel =1
89
items[0].Events[0]=AlarmLocal
items[0].VideoStream=Main
r1
items[0].Length =1580
00
items[0].Duration = 7200
M
Table 13-2
A
http://<server>/cgi-bin/FileFindHelper.cgi?action=startMotionFind&condition.channel=<C
hannelNo>&condition.startTime=<start>&condition.endTime=<end>&condition.streamT
Di
Syntax ype=<stream>&motionRegion.senseLevel=<level>[&motionRegion.rects[rectNo][0]=<r
st
ect0>&motionRegion.rects[rectNo][1]=<rect1>&motionRegion.rects[rectNo][2]=<rect2>
rib
&motionRegion.rects[rectNo][3]=<rect3>]
Method GET
ut
Find a file in channel 1, event type is "AlarmLocal" or "VideoMotion", and time between
n
http://172.23.1.66/cgi-bin/fileFindHelper.cgi?action=startMotionFind&condition.channel=
.o
Example 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]=AlarmLoc
.
al&condition.events[1]=VideoMotio&motionRegion.senseLevel=1&motionRegion.rects[1]
[0]=0&motionRegion.rects[1][1]=0&motionRegion.rects[1][2]=21&motionRegion.rects[1][
3]=17
Success result=08137
range of flag is {"Timing", "Marked", "Event", "Restrict"}. If omitted, find files with all the
flags.
hu
event: by which event the record file is triggered. It is an array. The index starts from 0.
Comment
The range of event is {"AlarmLocal", "VideoMotion"}. This condition can be omitted. If
aH
level: the motion sensitive level, range is 0–6, 0 represent all level
AP
and rect3 range is 0—17. {0,0,0,0} top—left, {21,0,0,0} top—right, {0,17,0,0} bottom
—left, {21,17,0,0} bottom—right
2.
89
Table 13-3
http://<server>/cgi-bin/FileFindHelper.cgi?action=findNext&findId=<findId>&count=<fileCo
r1
Syntax
unt>
00
Method GET
Descriptio
M
Example http://192.168.1.108/cgi-bin/FileFindHelper.cgi?action=findNext&findId=08137&count=100
found=1
A
items[0].channel =1
Di
Success
items[0].fileType =dav
rib
Return
items[0].events[0]=AlarmLocal
items[0].streamType=Main
ut
items[0].length =790
io
items[0].duration = 3600
n
findId: The find Id is created by API Create a file finder or API Create a motion file finder.
Comment
Must create a finder before finding files.
s.r
.o
Table 13-4
Syntax http://<server>/cgi-bin/FileFindHelper.cgi?action=stopFind&findId=<findId>
Method GET
Description Stop the searching operation.
Table 13-5
hu
http://<server>/cgi-bin/FileFindHelper.cgi?action=getBoundFile&condition.channel=<Cha
aH
Syntax nnelNo>&condition.startTime=<start>&condition.endTime=<end>&condition.streamTyp
e=<stream>[&condition.flags[0]=<flag>&condition.events[0]=<event>]
Method GET
TT
http://<server>/cgi-bin/FileFindHelper.cgi?action=getBoundFile&condition.channel=1&co
AP
Example ndition.startTime=2014-1-1%2012:00:00&condition.endTime=2015-1-10%2012:00:00&c
ondition.streamType=Main&condition.flags[0]=Timing
IV
found=2
items[0].channel =1
2.
items[0].streamType=Main
r1
items[0].length =790
Success
items[0].duration = 3600
Return
00
items[1].channel =1
items[1].startTime =2011-1-1 13:00:00
M
items[1].events[0]= Timing
items[1].streamType=Main
A
items[1].length =790
Di
items[1].duration = 3600
Comment Params is same as FileFindHelper.startFind
st
rib
13.2 BandLimit
ut
Table 13-6
s.r
Syntax http://<server>/cgi-bin/BandLimit.cgi?action=getLimitState
Method GET
.o
Example http://192.168.1.108/cgi-bin/bandLimit.cgi?action=getLimitState
Success
limit=true
Return
Comment —
Syntax paramValue>&condition.StartTime=<paramValue>&condition.EndTime=<paramValu
e>&condition.Channel[0]=<paramValue>
hu
Method GET
aH
[0]=RecordRestrict&condition.Types[1]=RecordProtect&condition.StartTime=2014-7-3
Example
%2021:02:32&condition.EndTime=2014-7-3%2023:02:32&condition.Channel[0]=1&con
P
dition.Channel[1]=3
AP
Success
OK
Return
IV
In table below:
Comment TypeIndex: The index of type array
2.
Appendix:
fo
Table 13-8
http://<server>cgi-bin/FileManager.cgi?action=cancelConditionList&condition.Types[0]
rib
Syntax =<paramValue>&condition.StartTime=<paramValue>&condition.EndTime=<paramVa
lue>&condition.Channel[0]=<paramValue>
ut
Method GET
io
http://192.168.1.108/cgi-bin/FileManager.cgi?action=cancelConditionList&condition.Ty
s.r
pes[0]=RecordRestrict&condition.Types[1]=RecordProtect&condition.StartTime=2014-
Example
7-3%2021:02:32&condition.EndTime=2014-7-3%2023:02:32&condition.Channel[0]=1&
.o
condition.Channel[1]=3
.
Success
OK
Return
Comment paramValue as Appendix above.
http://192.168.1.108/cgi-bin/FileManager.cgi?action=removeConditionList&condition.Ty
pes[0]=RecordRestrict&condition.Types[1]=RecordProtect&condition.StartTime=2014-
aH
Example
7-3%2021:02:32&condition.EndTime=2014-7-3%2023:02:32&condition.Channel[0]=0&
condition.Channel[1]=3
TT
Success
OK
Return
P
13.3.4 DownloadFile
2.
download file
89
g
M
Request Example
http://192.168.1.108/cgi-bin/FileManager.cgi?action=downloadFile&fileName=download.jpg
EG
A
Response Example
st
HTTP/1.1 200 OK
rib
Content-type: text/plain;charset=utf-8
CONNECTION: close
ut
Set-Cookie:secure; HttpOnly
io
CONTENT-LENGTH: <length>
n
<Binary Data>
s.r
.o
13.3.5 UploadFile
.
Request Example
POST
aH
http://192.168.1.108/cgi-bin/FileManager.cgi?action=uploadFile&fileName=xxxxxx.bmp&fileLength=124
879
TT
HTTP/1.1
P
Host: 192.168.1.108
Connection: keep-alive
AP
Content-Type: multipart/form-data;boundary=---------------------------8655433224198
IV
Content-Length: xxxxxxxxx
2.
-----------------------------8655433224198
89
Content-Disposition:form-data;name="upload"; filename="xxxxxx.bmp"
Content-Type: image/jpeg or application/x-MS-bmp
fo
photo data….
r1
00
-----------------------------8655433224198--
M
OK
Di
st
Table 13-10
ut
Syntax http://<server>/cgi-bin/global.cgi?action=getDST
io
Method GET
n
Success
result = 1
.o
Return
.
Table 14-1
http://<server>/cgi-bin/coaxialControlIO.cgi?action=control&[channel=<channelno>]&inf
TT
Syntax
o[0].Type=<type>&info[0].IO=<io>&info[0].TriggerMode=<triggermode>
P
Method GET
AP
pe=1&info[0].IO=0&info[0].TriggerMode=1
Success
2.
OK
Return
89
channelno: video channel index for white light,for siren it's audio output channel, The
Comment
channel number is default 0 if the request is not carried the param
fo
Appendix:
r1
Required.
type integer
1:wight light, 2:speaker
M
Required.
io integer
EG
1:open, 2:close
Required.
A
triggermode integer
1:trigger by linkage, 2:trigger by manual
Di
Table 14-2
rib
Return status.speaker=on
s.r
Comm 312
Table 14-3
Syntax http://<server>/cgi-bin/pirAlarm.cgi?action=getPirParam&[channel=<channelNo>]
Method GET
Description Get pir parameter.
Example http://192.168.1.108/cgi-bin/pirAlarm.cgi?action=getPirParam&channel=1
head.Enable=true
head.PirLink.LightingLink.Enable=true
Da
head.PirLink.LightingLink.LightLinkType=Filcker
head.PirLink.LightingLink.FilckerIntevalTime=5
hu
head.PirLink.LightingLink.LightDuration=10
aH
head.PirLink.LightingLink.WhiteLightTimeSection=TimeSection
head.PirLink.TimeSection[weekday][0]=1 00:00:00-24:00:00
head.PirLink.TimeSection[weekday][1]=0 02:00:00-24:00:00
TT
head.PirLink.TimeSection[weekday][2]=0 03:00:00-24:00:00
P
head.PirLink.TimeSection[weekday][3]=0 04:00:00-24:00:00
AP
head.PirLink.TimeSection[weekday][4]=0 05:00:00-24:00:00
head.PirLink.TimeSection[weekday][5]=0 06:00:00-24:00:00
IV
head.RecordEnable=true
head.RecordChannels=[0, 1, 2]
2.
head.RecordLatch=10
89
head.AlarmOutEnable=true
head.AlarmOutChannels=[1, 4]
Success
fo
head.AlarmOutLatch=10
Return
head.SnapshotEnable=true
r1
head.SnapshotChannels=[2, 4]
00
head.MailEnable=true
head.AlarmBellEnable=true
M
head.AlarmBellLatch=10
EG
head.Dejitter=0
head.LogEnable=true
A
head.DetectWindow[0].Level=3
Di
head.DetectWindow[0].Id=0
head.DetectWindow[0].Name=Region0
st
head.DetectWindow[0].Sensitive=58
rib
head.DetectWindow[0].Threshold=4
head.DetectWindow[0].Region[0]=3932160
ut
head.DetectWindow[0].Region[1]=3932160
io
…
n
…
head. DetectWindow [1]…
s.r
head=configEx[channelNo]
set pir parameter
Table 14-4
Comm 313
http://<server>/cgi-bin/pirAlarm.cgi?action=setPirParam&[channel=<channelNo>]&<pa
Syntax
ramName>=<paramValue>...&<paramName>=<paramValue>
Method GET
Description Set pir parameter.
http://192.168.1.108/cgi-bin/pirAlarm.cgi?action=setPirParam&channel=1&configEx[1].
Example
Enable=true&configEx[1].PirLink.LightingLink.Enable=true&...
Success
Da
OK
Return
channel : video channel index
hu
Comment
head=configEx[channelNo]
aH
Appendix:
TT
channel.
AP
WinNum
Index of detect window, there are 4 detect
IV
head.DetectWindow[WinNum].Level integer
89
Range is [1—6].
Sensitivity of pir
fo
1: lowest sensitivity.
r1
6: highest sensitivity.
head.DetectWindow[WinNum].Id integer It is the Id of a detect window.
00
head.DetectWindow[WinNum].Nam
string It is the name of a detect window.
e
M
Range is [0—100].
head.DetectWindow[WinNum].Sens
EG
Range is [0—100].
head.DetectWindow[WinNum].Thre
Di
Comm 314
ParamName ParamValue type Description
LineNum
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
Da
1=Line 2
…
hu
…
aH
on[LineNum]
A bit describes a block in the line.
P
Example:
MotionDetect[0].Region[0] = 4194303
IV
Staurday)
ts (time section) range is [0 — 23],
M
Range is {0, 1}
n
Range is [10—300].
head.PirLink.RecordLatch integer Unit is seconds, indicates the time to
.
Comm 315
ParamName ParamValue type Description
Range is {0, 1}, ch is alarm out channel
index.
head.PirLink.AlarmOutChannels[ch] integer 0 — do not output alarm at alarm out
channel ch
1 — output alarm at alarm out channel ch
head.PirLink.AlarmOutEnable bool Enable/Disable alarm out function.
Da
Range is [10—300].
head.PirLink.AlarmOutLatch Integer Unit is seconds, indicates the time to
hu
Range is {0, 1}
head.PirLink.SnapshotChannels[ch] integer 0 — do not snapshot on video channel ch
1 — snapshot on video channel ch
TT
Range is [0—255].
AP
head.PirLink.AlarmBellLatch integer
Unit is seconds
head.PirLink.LogEnable bool Enable/Disable log for alarm.
fo
r1
00
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
Comm 316
15 Other APIs
15.1 Discover Devices
Da
Table 15-1
aH
Syntax http://<server>/cgi-bin/deviceDiscovery.cgi?action=attach[&DeviceClass=<deviceClass>]
Method GET
TT
deviceInfo[index].AlarmInputChannels=8
AP
deviceInfo[index].AlarmOutputChannels=0
deviceInfo[index].DeviceClass=VTO
IV
deviceInfo[index].DeviceType=VTO2000A
2.
deviceInfo[index].HttpPort=80
deviceInfo[index].IPv4Address.DefaultGateway=172.12.0.1
89
deviceInfo[index].IPv4Address.DhcpEnable=false
deviceInfo[index].IPv4Address.IPAddress=172.12.7.102
fo
deviceInfo[index].IPv4Address.SubnetMask=255.255.0.0
r1
deviceInfo[index].IPv6Address.DefaultGateway=2008::1
Success
deviceInfo[index].IPv6Address.DhcpEnable=false
00
Return
deviceInfo[index].IPv6Address.IPAddress=2008::6/112
M
deviceInfo[index].Mac=00:01:5b:01:44:77
deviceInfo[index].MachineName=YZZ4DZ008D00031
EG
deviceInfo[index].Port=37777
deviceInfo[index].RemoteVideoInputChannels=0
A
deviceInfo[index].SerialNo=YZZ4DZ008D00031
Di
deviceInfo[index].Vendor=Multi
st
deviceInfo[index].Version=1.200.0.0
deviceInfo[index].VideoInputChannels=1
rib
deviceInfo[index].VideoOutputChannels=16
ut
Parameters in URL:
deviceClass: in range of {VTO, VTH, VTT, VTS, VTNC, SHG}
io
15.2 Flashlight
.
…
aH
head.TimeSection[6][5]=0 00:00:00-23:59:59
Parameters in Response:
Comment
head = table.FlashLight
TT
Table 15-3
AP
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
IV
alue>[&<paramName>=<paramValue>…]
Method GET
2.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&FlashLight.Enable=tr
Example
ue&FlashLight.TimeSection[1][0]=1%2012:00:00-18:00:00
fo
Success
OK
Return
r1
Comment —
00
Appendix:
M
type
FlashLight.Enable bool Enable
A
Saturday)
ts (time section) range is [0—23], it's index of time
ut
section table.
io
n
59]
.o
Example:
TimeSection[1][0]=1 12:00:00—18:00:00
Means flash light is effective between 12:00:00
Start Application
aH
Table 15-4
http://<server>/cgi-bin/installManager.cgi?action=start&appname=<appname>&appid=
Syntax
TT
<appid>
Method GET
P
http://192.168.1.108/cgi-bin/installManager.cgi?action=start&appname=FaceDemo&ap
Example
pid=1
IV
Success
OK
Return
2.
Parameters in URL:
89
Stop Application
r1
Table 15-5
00
http://<server>/cgi-bin/installManager.cgi?action=stop&appname=<appname>&appid=
Syntax
<appid>
M
Method GET
Description Stop application.
EG
http://192.168.1.108/cgi-bin/installManager.cgi?action=stop&appname=FaceDemo&ap
Example
A
pid=1
Success
Di
OK
Return
st
Parameters in URL:
rib
Table 15-6
.o
URL http://<server>/cgi-bin/dhop.cgi?action=uploadApp
.
Method POST
Description Install application.
[ Request Params ] (None)
[ Response Params ] ( OK )
Request --<boundary>
Da
<app data>
aH
--<boundary>--
Response OK
TT
Table 15-7
AP
URL http://<server>/cgi-bin/dhop.cgi?action=installAppByUrl
Method GET
IV
[ Example ]
GET http://192.168.1.108/cgi-bin/dhop.cgi?action=installAppByUrl&Url=https://aaa/bbb/c
r1
Request
cc/app.bin
Response OK
00
M
Table 15-8
Di
URL http://<server>/cgi-bin/dhop.cgi?action=updateAppByUrl
st
Method GET
Description Update Application
rib
[ Response Params ] ( OK )
n
[ Example ]
s.r
GET http://192.168.1.108/cgi-bin/dhop.cgi?action=updateAppByUrl&appName=xxx&Url
Request
=https://aaa/bbb/ccc/app.bin
.o
Response OK
.
Table 15-9
URL http://<server>/cgi-bin/dhop.cgi?action=updateFirmwareByUrl
Method GET
Response OK
Update application license with license download url
hu
Table 15-10
aH
URL http://<server>/cgi-bin/dhop.cgi?action=updateLicenseByUrl
Method GET
TT
[ Response Params ] ( OK )
[ Example ]
2.
GET http://192.168.1.108/cgi-bin/dhop.cgi?action=updateLicenseByUrl&appName=xxx&
Request
89
Url=https://aaa/bbb/ccc/license.bin
Response OK
fo
Table 15-11
URL http://<server>/cgi-bin/dhop.cgi?action=uploadLicense
00
Method POST
M
[ Response Params ] ( OK )
[ Example ]
Di
Host: 172.29.2.176
rib
Content-Type: application/octet-stream
Request
Content-Length: <length>
ut
Response OK
n
s.r
URL http://<server>/cgi-bin/dhop.cgi?action=uninstall
Method GET
Description Uninstall application.
[ Request Params ] (key=value format in URL)
URL http://<server>/cgi-bin/dhop.cgi?action=downloadLog
hu
Method GET
aH
[ Example ]
AP
Server: Device/1.0
Content-Type: Application/octet-stream
2.
Response
Content-Length: <length>
89
15.4.1 getCaps
URL http://<server>/cgi-bin/LensFunc.cgi?action=getCaps
Method GET
Da
+DepthField uint8 R Whether support depth field adjust, 0 : not support, 1 : support
AP
Response Caps.AngelAdjust.Support=3
00
Caps.AngelAdjust.MaxVelocity=8
M
EG
15.4.2 adjustAngleContinuously
A
URL http://<server>/cgi-bin/LensFunc.cgi?action=adjustAngleContinuously
Di
Method GET
Description Adjust the angel continuously.
st
direction
s.r
[ Example ]
.
GET http://192.168.1.108/cgi-bin/LensFunc.cgi?action=adjustAngleContinuously&Chan
Request
nel=1&Direction=2&Velocity=2
Response OK
[ Response Params ] ( OK )
[ Example ]
aH
15.4.4 adjustDepthField
AP
IV
URL http://<server>/cgi-bin/LensFunc.cgi?action=adjustDepthField
Method GET
2.
DepthField float R The sensor depth position, range from 0 to 1, -1 means reset.
[ Response Params ] ( OK )
00
[ Example ]
GET http://192.168.1.108/cgi-bin/LensFunc.cgi?action=adjustDepthField&Channel=1&D
M
Request
epthField=0.3
EG
Response OK
A
Di
15.4.5 adjustDepthFieldContinuously
st
URL http://<server>/cgi-bin/LensFunc.cgi?action=adjustDepthFieldContinuously
rib
Method GET
ut
d
means stop adjust.
.
[ Response Params ] ( OK )
[ Example ]
GET http://192.168.1.108/cgi-bin/LensFunc.cgi?action=adjustDepthFieldContinuously&
Request
Channel=1&DepthFieldSpeed=0.03
15.4.6 getDepthFieldStatus
URL http://<server>/cgi-bin/LensFunc.cgi?action=getDepthFieldStatus
Method GET
Da
+Status string R
“AutoDepthField” : adjusting depth position.
+DepthField float R The sensor board relative position, range from 0 to 1
IV
+DepthFieldStep
uint R The depth position total step.
2.
s
The depth position reset result, only valid when reset.
89
+ResetResult string O
“Success” : reset success, ”Failed” : reset failed
[ Example ]
fo
Status.Status=Normal
Status.DepthField=0.3
00
Response
Status.DepthFieldSteps=1000
M
Status.ResetResult=Success
EG
A
15.4.7 autoAdjustDepthField
Di
URL http://<server>/cgi-bin/LensFunc.cgi?action=autoAdjustDepthField
st
Method GET
rib
[ Response Params ] ( OK )
[ Example ]
s.r
GET http://192.168.1.108/cgi-bin/LensFunc.cgi?action=autoAdjustDepthField&Channel=
Request
.o
1
.
Response OK
15.5.1 getGPSStatus
Syntax http://<server>/cgi-bin/positionManager.cgi?action=getGPSStatus
Method GET
Da
Return status.Longitude=120.175556
status.Latitude=30.186389
status.Speed=30.00
TT
status.Altitude=45.0
P
status.Bearing=45.3
AP
status.SatelliteCount=11
status.WorkStatus=1
IV
SatelliteCount:Satellite number
WorkStatus:GPS working status,0= unlocated,1= un-differenced positioning,2=
00
15.6.1 getCaps
Di
st
Method GET
io
http://192.168.1.108/cgi-bin/radarAdaptor.cgi?action=getCaps&channel=1
Success caps.DetectionRange = 5000 //Zoom in 100 times, while the true value is 50.00
s.r
Example http://192.168.1.108/cgi-bin/radarAdaptor.cgi?action=getCapsEx&channel=1
Success caps.DetectionRange = 5000 // Radar detection range
hu
...
caps.Capacity.List[23] = 300
P
…
2.
caps.RadarChannel.List[23] = 2
caps.MovedDetect.Support = true // Device motion detection setting enabled
89
15.6.3 getStatus
00
M
http://<server>/cgi-bin/radarAdaptor.cgi?action=getStatus&channel=<ChannelNo>
Method GET
A
http://192.168.1.108/cgi-bin/radarAdaptor.cgi?action=getCaps&channel=1
Success status.State = Normal
st
Return
rib
Appendix:
io
n
15.6.4 calculateRealSize
Radar real map size calculation
Syntax http://<server>/cgi-bin/radarAdaptor.cgi?action=calculateRealSize&channel=<Channel
Return realSize.realMap[1]=400
Comment Parameters in URL:
hu
Appendix:
P
AP
15.6.5 attachAlarmPointInfo
89
fo
elNo>&[&heartbeat=<Heartbeat>]
Method GET
00
60.
Example http://192.168.0.108/cgi-bin/radarAdaptor.cgi?action=attachAlarmPointInfo&channel=1&
n
heartbeat=5
s.r
Connection: closed
--<boundary>
Content-Type: application/octet-stream
Channel=1
info[0].PointType=0x80
info[0].RegionNumber=1
info[0].ObjectType=1
info[0].TrackID=1
Da
info[3].PointType=0x80
……
TT
P
--<boundary>
Content-Type: text/plain
AP
Content-Length: 11
IV
Heartbeat
2.
-<boundary>
89
Content-Type: application/octet-stream
Content-Length: <length>
fo
Channel=1
r1
info[0].PointType=0x80
00
……
M
--<boundary>
EG
…
Comment Parameters in URL:
A
Notice:
st
15.6.6 getLinkSDState
io
n
Syntax http://<server>/cgi-bin/radarAdaptor.cgi?action=getLinkSDState&channel=<ChannelNo>
&ip[0]=<ip>&ip[1]=<ip>......&ip[23]=<ip>
.o
Method GET
.
Appendix:
aH
15.6.7 manualLocate
AP
Syntax http://<server>/cgi-bin/radarAdaptor.cgi?action=manualLocate&channel=<ChannelNo>&
2.
point[0]=<x>&point[1]=<y>
Method GET
89
Example http://192.168.1.108/cgi-bin/radarAdaptor.cgi?action=manualLocate&channel=1&point[0]
=10&point[1]=10
r1
Success OK
Return
00
15.6.8 startRadarCalibration
st
Syntax http://<server>/cgi-bin/radarAdaptor.cgi?action=startRadarCalibration&channel=<Chan
nelNo>&mode=<mode>&direction=<direction>&step=<step>
ut
Method GET
io
Example http://192.168.1.108/cgi-bin/radarAdaptor.cgi?action=startRadarCalibration&channel=1
s.r
&mode=1&direction=1&step=5
Success OK
.o
Return
.
15.6.9 addRadarLinkSD
Radar link SD added
Da
Request URL http://<server>/cgi-bin/radarAdaptor.cgi?action=addRadarLinkSD
hu
Method GET
Request Params ( key=value format in URL )
aH
bject> information
+PassWord char[32] 是 password, plaintext "admin123"
P
8]
+Port integer 是 port 5000
IV
http://192.168.1.108/cgi-bin/radarAdaptor.cgi?action=addRadarLinkSD&Devices[0].SDLinkIP=10.11.17.
98&Devices[0].Port=5000&Devices[0].Usename=admin&Devices[0].PassWord=admin123&Channel=1
fo
r1
0:normal
A
1:overtime
2:Wrong user name or password
Di
Response Example
rib
SD.Info.ErrorCode=0
ut
io
15.6.10 delRadarLinkSD
n
s.r
Method GET
.
8&Channel=1
hu
Response Example
OK
TT
P
15.6.11 [Config]MapPara
AP
map para
IV
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MapPara
Di
configname and configobject in the following table correspond to specific configuration names and
rib
configuration contents.
special explanation:
ut
In the return of getConfig, there is a "table" level above the specific configuration.
io
In the request of setConfig, there is no "table" level above the specific configuration.
n
getConfig
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=configName
s.r
Method GET
.o
table.MapPara[0].RadarCoordinate.RadarPixelPoint[0]=10
table.MapPara[0].RadarCoordinate.RadarPixelPoint[1]=20
hu
table.MapPara[0].MapSize.PixelLine[0][0]=10
table.MapPara[0].MapSize.PixelLine[0][1]=10
aH
table.MapPara[0].MapSize.PixelLine[1][0]=20
table.MapPara[0].MapSize.PixelLine[1][1]=20
TT
table.MapPara[0].MapSize.Distance=10.1
P
table.MapPara[1].RadarCoordinate.RadarDirectionAngle=70.5
…
AP
IV
setConfig
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig
2.
Method GET
89
Request Example
00
http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&MapPara[0].RadarCoordinate.RadarDirectio
nAngle=70.5&MapPara[0].RadarCoordinate.RadarPixelPoint[0]=10&MapPara[0].RadarCoordinate.Rad
M
arPixelPoint[1]=20&MapPara[0].MapSize.PixelLine[0][0]=10&MapPara[0].MapSize.PixelLine[0][1]=10&
EG
MapPara[0].MapSize.Distance=10.1
A
OK
rib
ut
15.6.12 [Config]RadarAnalyseRule
io
n
RadarAnalyseRule
Requi
s.r
00:00:00-23:59:59",
"0
hu
Format.
00:00:00-23:59:59",
++TimeSectio TimeSect TimeSection is used for the filtering of notify
Yes "0
TT
"0
All fields except this one are used for
00:00:00-23:59:59",
AP
listener response.
"0
IV
00:00:00-23:59:59",]
]
2.
++SnapshotE
bool Yes Enable snapshotg false
00
nable
++RecordLat Record delay time (second)
integer Yes 10
M
starts from 0.
st
ble
stop recording when it is stop. Record is
io
disabled if it is false.
++VoiceEnabl
n
++BeepEnabl
bool Yes Buzzer false
.o
e
++MessageE
.
integer Yes 1
mber unique.
Controlled device IP (which is optional and
TT
adjustment).
AP
Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarAnalyseRule
IV
Note:
Please refer to appendix in chapter 15.6.11 for configuration operation method
2.
89
15.6.13 [Config]RadarCalibration
fo
RadarCalibration
r1
direction.
s.r
camera (m).
++CalibrationPos object[] Yes Array of calibration points. null
.
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarCalibration
Note:
TT
15.6.14 [Config]RadarGuardLine
IV
RadarGuardLine
2.
according to
RadarAnalyseRule.
A
Target filtering
bit0: Reserved
Di
bit1: Human.
st
bit3: Animal
(Enable by setting it to 1)
ut
24]
s.r
High Alarm
+Type char[32] Yes "Alarm"
Alarm
.
Shield
+Enable bool Yes Whether to enable the rules true
Rule line number
+RegionNumber integer Yes 1
Range [1, 10]
15.6.15 [Config]RadarLink
hu
RadarLink
aH
Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name= RadarLink
IV
Note:
Please refer to appendix in chapter 15.6.11 for configuration operation method
2.
89
15.6.16 [Config]RadarLinkDevice
fo
RadarLinkDevice
r1
object[][24]
EG
Example
n
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarLinkDevice
Note:
s.r
15.6.17 [Config]RadarPara
RadarPara
Parameter Type Required Description Example
+TargetRatio object Yes Tracking screen ratio for radar-PTZ linkage. null
Reciprocal of screen ratio.
aH
2: Channel 2
+Capacity object Yes Configuration of radar transmitting power. null
2.
1: Default.
EG
4: Custom.
Example
Di
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarPara
st
Note:
rib
15.6.18 [Config]RadarTrackGlobal
n
RadarTrackGlobal
s.r
channel
Tracking switching mode
+TrackSwitchMode char[32] Yes Tour/time priority/distance priority "Rotation"
Rotation/TimePriority/DistancePri
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RadarTrackGlobal
Note:
hu
15.6.19 [Config]RemoteSDLink
TT
P
RemoteSDLink
AP
configuration.
Two-dimensional array. The first
2.
Example
00
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RemoteSDLink
Note:
M
15.7 TemperCustom
Di
Syntax http://<server>/cgi-bin/TemperCustom.cgi?action=setEnvTemp
ut
Method GET
Description Set environment temperature
io
15.8 GpsControl
Da
15.8.1 getCaps
hu
Syntax http://<ip>/cgi-bin/GpsControl.cgi?action=getCaps
Method GET
TT
Syntax http://<ip>/cgi-bin/configManager.cgi?action=getConfig&name=GPS
Method GET
r1
Return Table.GPS[1].Enable[1]=false
EG
Table.GPS[0].CurMode[0]="GPS"
Table.GPS[1].CurMode[1]="BEIDOU"
A
Table.GPS[0].SyncTime[0]=true
Di
Table.GPS[1].SyncTime[1]=false
st
Syntax http://<ip>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[
&<paramName>=<paramValue>...]
ut
Success OK or ERROR
n
Return
s.r
Appendix:
.o
ue type
head.Enable bool true/false
head.CurMode string "GPS"/"BEIDOU"
head.SyncTime bool true/false
15.9.1 resetAngle
Reset camera lens angle
Method GET
hu
[ Response Params ] ( OK )
IV
[ Example ]
2.
Request http://172.27.1.153/cgi-bin/LensManager.cgi?action=resetAngle&Channel=1
89
Response OK
fo
r1
00
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
Method GET
Request Params ( key=value format in URL )
IV
Request Example
89
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=getSummary&channel=1
fo
+EnteredSubto
object O People enter stat.
tal
ut
++TotalInTime 0
int O Today enter num after call clearSectionStat.
s.r
Section
+ExitedSubtota
.o
AI APIs 342
Section
+InsideSubtota
object O People inside region stat.
l
++Total int R Today inside num. 65
array<obj
++ManStayStat O The entering and leaving stat of people that leaved.
ect>
2012-01-04
+++EnterTime string O People enter time.
Da
00:00:00
2012-01-04
hu
summary.Channel=0
summary.RuleName=NumberStat
TT
summary.EnteredSubtotal.Today=0
P
summary.EnteredSubtotal.Total=14
AP
summary.EnteredSubtotal.TotalInTimeSection=0
summary.ExitedSubtotal.Today=0
IV
summary.ExitedSubtotal.Total=32
summary.ExitedSubtotal.TotalInTimeSection=0
2.
summary.InsideSubtotal.Total=65
89
summary.InsideSubtotal.ManStayStat[0].EnterTime=2012-01-04 00:00:00
summary.InsideSubtotal.ManStayStat[0].ExitTime=2012-01-04 00:00:45
fo
summary.InsideSubtotal.ManStayStat[1].EnterTime=2012-01-04 00:00:00
summary.InsideSubtotal.ManStayStat[1].ExitTime=2012-01-04 00:00:45
r1
00
Start to find
EG
Start to find video stat info, in response, there is a token for further info finding process, and there is
A
Method GET
Request Params ( key=value format in URL )
rib
2012-01-04
+StartTime string R Find time range start
s.r
00:00:00
2012-01-04
.o
AI APIs 343
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
Da
Array<i The area id which starts from 1, max array size [1,2]
+AreaID O
nt> is 20.
aH
Request Example
P
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=startFind&channel=1&condition.StartTime=201
AP
1-01-01%2012:00:00&condition.EndTime=2011-01-10%2012:00:00&condition.Granularity=Hour&condit
ion.RuleType=NumberStat&condition.MinStayTime=20&condition.AreaID[0]=2&condition.AreaID[1]=3
IV
Token for this search, use this token to get result 12345
token int R
and stop search.
fo
Response Example
token=12345
00
totalCount=56
M
Get the find result of Video Stat info with channel, token, begin Number and count.
A
token int R
result and stop searching.
n
beginNumber int R
totalCount -1.
count int R The count of info for this query. 20
.o
Request Example
.
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=doFind&channel=1&token=12345&beginNumb
er=0&count=20
AI APIs 344
Name Type R/O Description Example
found int R Number of result that return. 20
array<obj
info R Result information of video Stat.
ect>
+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, only valid 1
+PtzPresetId int O
Da
ime
“AverageStayTime”.
Rule name, it can be: NumberStat
TT
"ExitedSubtotal"param.
2012-01-04
2.
2012-01-04
+EndTime string O Find time range end
00:02:00
fo
+EnteredSubto 14
int O Total enter num.
tal
r1
+ExitedSubtota 5
int O Total leave num.
00
l
+InsideSubtota 65
M
Response Example
found=20
A
info[0].Channel=0
info[0].AreaID=2
Di
info[0].RuleName=NumberStat
st
info[0].StartTime=2012-03-14 00:00:00
rib
info[0].EndTime=2012-04-14 00:00:00
info[0].EnteredSubtotal=14
ut
info[0].ExitedSubtotal=5
io
info[0].InsideSubtotal=65
info[1].Channel=0
n
info[1].AreaID=3
s.r
info[1].RuleName=NumberStat
.o
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
…
AI APIs 345
Stop the searching session
Stop query video stat by channel and token.
token int R
result and stop searching.
Request Example
TT
GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=stopFind&channel=1&token=12345
P
AP
OK
2.
default is 1.
Request Example
A
GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=clearSectionStat&channel=1
Di
st
OK
ut
io
Method GET
.
AI APIs 346
second. If the URL 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
Da
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=attach&channel=1&heartbeat=5
hu
+EnteredSubto
object O People enter stat.
89
tal
++Total int R Total enter num. 14
fo
Section
+ExitedSubtota
M
++TotalInTime 0
int O Today leave num after call clearSectionStat.
Section
st
+InsideSubtota
rib
array<obj
++ManStayStat O The entering and leaving stat of people that leaved.
io
ect>
n
2012-01-04
+++EnterTime string O People enter time
s.r
00:00:00
2012-01-04
+++ExitTime string O People leave time
.o
00:00:45
.
Response Example
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed
AI APIs 347
--<boundary>
Content-Type: text/plain
Content-Length: <length>
summary.Channel=0
summary.RuleName=NumberStat
Da
summary.EnteredSubtotal.Today=2
summary.EnteredSubtotal.Total=14
hu
summary.EnteredSubtotal.TotalInTimeSection=1
summary.ExitedSubtotal.Today=3
aH
summary.ExitedSubtotal.Total=32
summary.ExitedSubtotal.TotalInTimeSection=2
TT
summary.InsideSubtotal.Total=65
P
summary.InsideSubtotal.ManStayStat[0].EnterTime=2012-01-04 00:00:00
summary.InsideSubtotal.ManStayStat[0].ExitTime=2012-01-04 00:00:45
AP
summary.InsideSubtotal.ManStayStat[1].EnterTime=2012-01-04 00:00:00
IV
summary.InsideSubtotal.ManStayStat[1].ExitTime=2012-01-04 00:00:45
--<boundary>
2.
Content-Type: text/plain
89
Content-Length: 11
fo
Heartbeat
--<boundary>
r1
Content-Type: text/plain
00
Content-Length: <length>
M
summary.Channel=0
EG
summary.RuleName=NumberStat
summary.EnteredSubtotal.Today=2
A
summary.EnteredSubtotal.Total=14
…
Di
st
Table 16-1
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
io
Description When people number triggers the rule, send this event.
n
AI APIs 348
PresetID int O The preset id, if omit, means preset is unknown.
[ Example ]
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Code=NumberStat;action=Start;index=0;data={
Da
"Number": 120,
Event
"EnteredNumber": 180,
hu
"ExitedNumber": 60,
aH
"Type": "EnterOver",
"Area": 2
}
TT
--<boundary>
P
AP
Table 16-2
2.
Array<obje
r1
AreaID int O The area id, begin from 1, if omit, means single area.
PresetID int O The preset id, if omit, means preset is unknown.
Di
[ Example ]
st
--<boundary>
rib
Content-Type: text/plain
Content-Length: <length>
ut
io
Code=ManNumDetection;action=pulse;index=0;data={
Event "ManList": [ { "BoundingBox": [2992,1136,4960,5192], "Stature": 170 },
n
{…}, … ],
.o
"AreaID" : 2
}
.
--<boundary>
AI APIs 349
16.1.1.7 [Event] CrowdDetection
Table 16-3
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
Description When crowd density overrun, send this event.
[ Event Params ] ( JSON format )
Da
ct>
The center point, must be two int, means x and y value,
aH
+Center Array<int> R
coordinate remap to 0 — 8192.
+Radius int R The radius length.
TT
Array<obje
RegionList O The people num overrun region list.
ct>
P
[ Example ]
--<boundary>
2.
Content-Type: text/plain
89
Content-Length: <length>
fo
Event Code=CrowdDetection;action=start;index=0;data={
"CrowdList": [ { "Center" : [5734,2377],"Radius" : 10}, …{} ],
r1
--<boundary>
M
16.1.2 FaceRecognitionServer
EG
A
Table 16-4
rib
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=createGroup
Method GET
ut
groupName string R The face group name, max string length is 127.
s.r
255.
[ Response Params ] ( key=value format )
.
AI APIs 350
http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=createGroup&groupName
=Test1&groupDetail=ForTest1
Response groupID=10000
Table 16-5
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=modifyGroup
hu
Method GET
Description Modify a face group.
aH
groupID string R The identity of the face group, max string length is 63.
groupName string R The name of the the face group, max string length is 127.
P
groupDetail string O Description detail of the face group, max string length is 255.
AP
[ Response Params ] ( OK )
IV
[ Example ]
GET
2.
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=modifyGroup&groupID=10
89
000&groupName=Test1&groupDetail=ForTest1
Response OK
fo
r1
Table 16-6
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=deleteGroup
M
Method GET
EG
groupID string R The identity of the face group, max string length is 63.
st
[ Response Params ] ( OK )
rib
[ Example ]
GET
ut
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=deleteGroup&groupID=100
00
io
Response OK
n
s.r
There are two ways to deploy the group. One is based on the group (putDisposition), and the
.
Table 16-7
AI APIs 351
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=putDisposition
Method GET
Deploy the face group to some video channels. If the video channel has been deployed
Description
already, it will change the similary.
[ Request Params ] ( key=value format at URL )
Name Type R/O Param Description
groupID string R The identity of the face group, max string length is 63.
Da
GET
AP
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=putDisposition&groupID=1
0000&list[0].channel=1&list[0].similary=80&list[1].channel=2&list[1].similary=70
IV
report[0]=true
Response
report[1]=false
2.
Table 16-8
fo
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=deleteDisposition
Method GET
r1
Descripti
Remove the deployment of face group from some video channels.
00
on
[ Request Params ] ( key=value format at URL )
M
groupID string R The identity of the face group, max string length is 63.
channel Array<int> R Video channel index which starts from 1.
A
[ Example ]
rib
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=deleteDisposition&groupID
ut
=10000&channel[0]=1&channel[1]=2
io
report[0]=true
Response
n
report[1]=false
s.r
Table 16-9
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=setGroup
.
Method GET
Deploy some face groups to one video channel. If the video channel has been deployed
Descripti
already, it will change the similary.
on
Note: This method will do an overwrite operation.
AI APIs 352
[ Request Params ] ( key=value format at URL )
Name Type R/O Param Description
channel int R Video channel index which starts from 1.
List of disposition info, if not exist, remove all disposition from
list Array<object> O
channel.
+groupID int R The identity of the face group, max string length is 63.
+similary int R The threshold of the face similary, 0 — 100.
Da
[ Response Params ] ( OK )
[ Example ]
hu
GET
aH
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=setGroup&channel=1&list
[0].groupID=10000&list[0].similary=80&list[1].groupID=10002&list[1].similary=75
TT
Response OK
get disposition group from channel
P
Table 16-10
AP
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=getGroup
IV
Method GET
Get the Deployment about the video channel.
Descripti
2.
Note: If the video channel does not deploy any group, then the response will be success
on
89
[ Example ]
Request GET http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=getGroup&channel=1
A
groupID[0]=10001
Di
groupID[1]=10003
groupID[2]=10006
st
….
rib
Response
similary[0]=80
similary[1]=75
ut
similary[2]=85
io
….
n
s.r
Table 16-11
.
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=findGroup
Method GET
Description Find the face group. If the groupID is not present in the URL, it will return all the groups.
[ Request Params ] ( key=value format at URL )
AI APIs 353
Name Type R/O Param Description
groupID string O The identity of the face group, max string length is 63.
[ Response Params ] ( key=value format )
Name Type R/O Param Description
GroupList Array<object> R The face group information list.
+groupID string R The identity of the face group, max string length is 63.
+groupName string R Name of the face group, max string length is 127.
Da
+groupDetail string O Description detail of the face group, max string length is 255.
+groupSize int R The number of face in this face group.
hu
Array<Array<s
+TimeSection O The time section of face group
tring>>
P
[ Example ]
AP
GroupList[0].groupName=Test1
GroupList[0].groupDetail=ForTest1
2.
GroupList[0].groupSize=30
89
GroupList[0].channels[0]=1
GroupList[0].channels[1]=2
fo
…
r1
GroupList[0].similarity[0]=80
GroupList[0].similarity[1]=75
00
…
GroupList[0].groupType=BlackListDB
M
GroupList[0].TimeSection[0][0]=1 00:00:00-23:59:59
EG
GroupList[0].TimeSection[0][1]=0 00:00:00-23:59:59
GroupList[0].TimeSection[0][2]=0 00:00:00-23:59:59
A
GroupList[0].TimeSection[0][3]=0 00:00:00-23:59:59
Di
GroupList[0].TimeSection[0][5]=0 00:00:00-23:59:59
GroupList[0].TimeSection[1][0]=1 00:00:00-23:59:59
rib
GroupList[0].TimeSection[1][1]=0 00:00:00-23:59:59
ut
GroupList[0].TimeSection[1][2]=0 00:00:00-23:59:59
GroupList[0].TimeSection[1][3]=0 00:00:00-23:59:59
io
GroupList[0].TimeSection[1][4]=0 00:00:00-23:59:59
n
GroupList[0].TimeSection[1][5]=0 00:00:00-23:59:59
s.r
GroupList[0].TimeSection[2][0]=1 00:00:00-23:59:59
GroupList[0].TimeSection[2][1]=0 00:00:00-23:59:59
.o
GroupList[0].TimeSection[2][2]=0 00:00:00-23:59:59
.
GroupList[0].TimeSection[2][3]=0 00:00:00-23:59:59
GroupList[0].TimeSection[2][4]=0 00:00:00-23:59:59
GroupList[0].TimeSection[2][5]=0 00:00:00-23:59:59
GroupList[0].TimeSection[3][0]=1 00:00:00-23:59:59
GroupList[0].TimeSection[3][1]=0 00:00:00-23:59:59
AI APIs 354
GroupList[0].TimeSection[3][2]=0 00:00:00-23:59:59
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
Da
GroupList[0].TimeSection[4][3]=0 00:00:00-23:59:59
GroupList[0].TimeSection[4][4]=0 00:00:00-23:59:59
hu
GroupList[0].TimeSection[4][5]=0 00:00:00-23:59:59
GroupList[0].TimeSection[5][0]=1 00:00:00-23:59:59
aH
GroupList[0].TimeSection[5][1]=0 00:00:00-23:59:59
GroupList[0].TimeSection[5][2]=0 00:00:00-23:59:59
TT
GroupList[0].TimeSection[5][3]=0 00:00:00-23:59:59
P
GroupList[0].TimeSection[5][4]=0 00:00:00-23:59:59
GroupList[0].TimeSection[5][5]=0 00:00:00-23:59:59
AP
GroupList[0].TimeSection[6][0]=1 00:00:00-23:59:59
IV
GroupList[0].TimeSection[6][1]=0 00:00:00-23:59:59
GroupList[0].TimeSection[6][2]=0 00:00:00-23:59:59
2.
GroupList[0].TimeSection[6][3]=0 00:00:00-23:59:59
89
GroupList[0].TimeSection[6][4]=0 00:00:00-23:59:59
GroupList[0].TimeSection[6][5]=0 00:00:00-23:59:59
fo
GroupList[1].groupID=00003
r1
GroupList[1].groupName=Test3
00
GroupList[1].groupDetail=ForTest3
GroupList[1].groupSize=50
M
GroupList[1].channels[0]=1
EG
GroupList[1].channels[1]=2
…
A
GroupList[1].similarity[0]=70
GroupList[1].similarity[1]=85
Di
…
st
rib
Start ReAbstract
io
Table 16-12
n
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=groupReAbstract
s.r
Method GET
Abstract features for the groups.
.o
Description About the process of the re-extract, the device will use an event named
.
AI APIs 355
[ Response Params ] (key=value format)
Name Type R/O Param Description
token int R The identity of this operation.
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=groupReAbstract&groupID[
0]=10000&groupID[1]=10001
Da
Response token=12345
Stop ReAbstract
hu
Table 16-13
aH
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopGroupReAbstract
Method GET
TT
Descripti
Stop the abstract features process.
on
P
[ Example ]
89
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=stopGroupReAbstract&tok
fo
en=12345
Response OK
r1
00
Table 16-14
EG
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=addPerson
Method POST
A
The identity of the face group that this person to add. Max string
groupID string R
length is 63.
ut
country string O
according to ISO3166.
province string O The province name, max string length is 63.
.o
AI APIs 356
Name Type R/O Param Description
uid string R The id for this Person, max string length is 31.
[ Example ]
POST
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=addPerson&groupID=10000&na
me=ZhangSan&birthday=1980-01-05&sex=Male&country=CN&province=ZheZhang&city=
Hangzhou HTTP/1.1
Da
Request
Content-Type: image/jpeg
Content-Length: <image size>
hu
aH
Table 16-15
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=modifyPerson
IV
Method POST
2.
Note: If you do not want to change the image about the person, the request should not
Description
contain the image data.
Note: You should provide at lease one optional param to update.
fo
The identity of the Face Group that this Person in. max string
groupID string R
M
length is 63.
name string O The person's name, max string length is 63.
EG
country string O
according to ISO3166.
st
certificateType string O
"Unknown".
io
[ Response Params ] ( OK )
[ Example ]
s.r
POST
.o
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=modifyPerson&uid=0005&grou
.
pID=10000&name=ZhangSan&birthday=1980-01-05&sex=Male&country=CN&province=
Request ZheZhang&city=Hangzhou HTTP/1.1
Content-Type: image/jpeg
Content-Length: <image size>
AI APIs 357
<JPEG image data>
Response OK
Table 16-16
Da
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=deletePerson
Method GET
hu
The identity of the face group that this Person in. max string
groupID string R
length is 63.
P
[ Response Params ] ( OK )
AP
[ Example ]
IV
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=deletePerson&uid=001&gr
2.
oupID=10000
89
Response OK
fo
Start to find
00
Table 16-17
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFind
M
Method GET
EG
+GroupID Array<string> R The list of identity of the face group, max string length is 63.
person object O Person condition.
ut
+Country
according to ISO3166.
s.r
+CertificateType
"Unknown".
+ID string O Person ID of CertificateType, max string length is 31.
+FeatureState int O Feature State, 0:Unknown, 1:Failed, 2:OK.
[ Response Params ] ( key=value format )
AI APIs 358
Name Type R/O Param Description
Token for this search, use this token to get result and stop
token uint R
search.
totalCount int R Result num, return -1 means still searching.
[ Example ]
GET
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFind&condition.GroupID[0]
Da
Request
=10000&condition.GroupID[1]=10003&person.Sex=Male&person.Country=CN&person.F
eatureState=1
hu
token=123456789
Response
aH
totalCount=24
Get find result
TT
Table 16-18
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFind
P
Method GET
AP
Descripti Get one result of person's information from the search result set.
on Note: the returned token will be expired after 60 seconds without any doFind call.
IV
Token for this search, use this token to get result and stop
token uint R
search.
fo
+UID string R The identity of the person, max string length is 31.
EG
string R The identity of the face group that this Person in. max string
+GroupID
length is 63.
A
+Country
according to ISO3166.
+Province string O Province name, max string length is 63.
ut
"Unknown".
s.r
[ Example ]
.
GET
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFind&token=123456789&in
dex=0
HTTP/1.1 200 OK
Response
Server: Device/1.0
AI APIs 359
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Content-Length: <length>
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Da
person.UID=0005
person.GroupID=10000
hu
person.Name=ZhangSan
person.Birthday=1980-01-01
aH
person.Sex=Male
person.Country=CN
TT
person.Province=ZheJiang
P
person.City=HangZhou
person.CertificateType=IC
AP
person.ID=1234567890
IV
person.FeatureState=0
--<boundary>
2.
Content-Type: image/jpeg
89
--<boundary>--
Stop finding
00
Table 16-19
M
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFind
Method GET
EG
Descripti
Stop the search session.
on
A
The token for this search, use this token to get result and stop
token uint R
rib
search.
[ Response Params ] ( OK )
ut
[ Example ]
GET
io
Request
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFind&token=123456789
n
Response OK
s.r
.o
Start ReAbstract
Table 16-20
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=reAbstract
Method GET
AI APIs 360
Abstract features for the persons.
Description About the process of the re-extract, the device will use an event named
"FaceFeatureAbstract"to report the process.
[ Request Params ] ( key=value format at URL )
Name Type R/O Param Description
UID Array<int> O The list of identity of person, max string length is 31.
[ Response Params ] ( OK )
Da
[ Example ]
GET
hu
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=reAbstract&uid[0]=001&ui
aH
d[1]=002
Response OK
TT
Stop ReAbstract
P
Table 16-21
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopReAbstract
AP
Method GET
IV
Descripti
Stop the abstract features process.
on
2.
[ Response Params ] ( OK )
[ Example ]
fo
OK
e
00
Table 16-22
A
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=FaceRecognitionAlar
URL
Di
m
st
Method GET
Description Get the Face Recognition Alarm Out Setting.
rib
+FaceRecognitio
array<object> R Each face group has one config object in this array.
s.r
nAlarm
++GroupID String R The face group ID, max string length is 63.
.o
++GroupName String R The face group name, max string length is 127.
.
++AlarmOutEna
Bool R Enable AlarmOut or not.
ble
++AlarmChannel Array<object> R Each AlarmOut channel has one config object in this array.
AI APIs 361
Alarm rule mask.
+++AlarmRuleM
Int R Bit 0 : recognition success
ask
Bit 1 : recognition failed
+++AlarmOutLat
Int R Alarm out delay, unit is second, value between 1 anf 300.
ch
[ Example ]
GET
Da
Request http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=FaceRecognitionAlar
m
hu
table.FaceRecognitionAlarm[0].GroupID=0017
aH
table.FaceRecognitionAlarm[0].GroupName=wsd
table.FaceRecognitionAlarm[0].AlarmOutEnable=true
table.FaceRecognitionAlarm[0].AlarmChannel[0].AlarmRuleMask=0
TT
table.FaceRecognitionAlarm[0].AlarmChannel[0].AlarmOutLatch=5
P
table.FaceRecognitionAlarm[0].AlarmChannel[1].AlarmRuleMask=0
AP
table.FaceRecognitionAlarm[0].AlarmChannel[1].AlarmOutLatch=8
…
Response
IV
table.FaceRecognitionAlarm[1].GroupID=0018
table.FaceRecognitionAlarm[1].GroupName=cst
2.
table.FaceRecognitionAlarm[1].AlarmOutEnable=true
89
table.FaceRecognitionAlarm[1].AlarmChannel[0].AlarmRuleMask=0
table.FaceRecognitionAlarm[1].AlarmChannel[0].AlarmOutLatch=10
fo
table.FaceRecognitionAlarm[1].AlarmChannel[1].AlarmRuleMask=0
table.FaceRecognitionAlarm[1].AlarmChannel[1].AlarmOutLatch=15
r1
…
00
Method GET
EG
Descripti
Set the Face Recognition Alarm Out Setting.
on
A
array<object> R Each face group has one config object in this array.
Alarm
rib
+GroupID String R The face group ID, max string length is 63.
+GroupName String R The face group name, max string length is 127.
ut
+AlarmOutEnabl
io
+AlarmChannel Array<object> R Each AlarmOut channel has one config object in this array.
s.r
sk
Bit 1 : recognition failed
.
++AlarmOutLatc
Int R Alarm out delay, seconds, value between 1 and 300.
h
[ Response Params ] ( OK )
[ Example ]
AI APIs 362
GET
http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&FaceRecognitionAlarm[0].Gr
Request oupID=0017&FaceRecognitionAlarm[0].GroupName=wsd&FaceRecognitionAlarm[0].Ala
rmOutEnable=true&FaceRecognitionAlarm[0].AlarmChannel[0].AlarmRuleMask=0&Face
RecognitionAlarm[0].AlarmChannel[0].AlarmOutLatch=5
Response OK
Da
Start to find
aH
Table 16-23
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindByPic
TT
Method POST
Start to find person in face groups by picture. The search may last for some time, so the
P
Description Note: If you want to find person in face groups by person info, see above "Find
Person"API.
IV
Note: The returned token will be expired after 60 seconds without any doFind call.
2.
The token of this search, use this token to get result and stop
token uint R
M
search.
EG
[ Example ]
POST
Di
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindByPic&GroupID[0]=0000
st
1&GroupID[1]=00003&Similarity=80&MaxCandidate=500
rib
<JPEG data>
n
HTTP/1.1 200 OK
Server: Device/1.0
s.r
Connection: closed
Respons
.
e
--<boundary>
Content-Type: application/json
Content-Length: <length>
AI APIs 363
{ "token": 123456789,
"progress": 20
"totalCount": -1
}
--<boundary>
Content-Type: application/json
Content-Length: <length>
Da
{ "token": 123456789,
hu
"progress": 60
"totalCount": -1
aH
}
--<boundary>
TT
Content-Type: application/json
P
Content-Length: <length>
AP
{ "token": 123456789,
IV
"progress": 100
"totalCount": 350
2.
}
89
--<boundary>--
Get the find result
fo
Table 16-24
r1
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindByPic
Method GET
00
Get the find result, reply using multipart format, first part is json string to describe all
M
Descripti candidate person, then the following parts are the person's pictures, refer by UID and
on GroupID in part header Content-Info.
EG
Note: the returned token will be expired after 60 seconds without any doFind call.
[ Request Params ] ( key=value format in URL )
A
Token for this search, use this token to get result and stop
token uint R
st
search.
rib
The identity of the Face Group that this Person in. max string
++GroupID string R
length is 63.
++Name string R Person Name, max string length is 63.
++Birthday string O Birthday ex: "1980-01-01".
AI APIs 364
++Sex string O Sex, it can be "Male", "Female", "Unknown".
Country name, length must be 2, value should be according
++Country string O
to ISO3166.
++Province string O Province name, max string length is 63.
++City string O City name, max string length is 63.
++CertificateTy Certificate Type. It can be "IC', "Passport", "Military" or
string O
pe "Unknown".
Da
GET
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindByPic&token=12345678
P
9&index=0&count=10
AP
HTTP/1.1 200 OK
Server: Device/1.0
IV
--<boundary>
Content-Type: application/json
fo
Content-Length: <length>
r1
{ "Found" : 10,
00
"Candidates" : [
{
M
"person" : {
EG
"UID" : "0001",
"GroupID" : "001",
A
"Name" : "ZhangSan",
Response
Di
"Birthday" : "1980-01-05",
"Sex" : "Male",
st
...
rib
},
"Similarity" : 85
ut
},
io
{
n
"person" : {
s.r
"UID" : "0002",
"GroupID" : "002",
.o
"Name" : "LiSi",
.
"Birthday" : "1980-01-06",
"Sex" : "Male",
...
},
"Similarity" : 80
AI APIs 365
},
{ ... }, ...
]
}
--<boundary>
Content-Info: UID=0001&GroupID=001
Content-Type: image/jpeg
Da
Content-Length: <length>
hu
--<boundary>
Content-Info: UID=0002&GroupID=002
Content-Type: image/jpeg
TT
Content-Length: <length>
P
--<boundary>
IV
...
Stop finding
2.
Table 16-25
89
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindByPic
Method GET
fo
Descripti
Stop the search session.
r1
on
[ Request Params ] ( key=value format in URL )
00
Token for this search, use this token to get result and stop
token uint R
search.
EG
[ Response Params ] ( OK )
A
[ Example ]
GET
Di
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindByPic&token=12345678
st
9
rib
Response OK
ut
Start to find
n
s.r
Table 16-26
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindHistoryByPic
.o
Method POST
.
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.
Description 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.
AI APIs 366
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Channel int R Video channel index which starts from 0.
StartTime string R Start time to search, ex: 2018-01-13T00:00:00Z.
EndTime string R End time to search, ex: 2018-01-14T00:00:00Z.
Similarity int R Similarity percent, 1 — 100.
MaxCandidate int O Max Candidate result number.
Da
Token for this search, use this token to get result and stop
token uint R
aH
search.
progress uint R Search Progress, 100 means finished.
TT
POST
AP
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindHistoryByPic&Channe
l=0&StartTime=2018-01-13T00:00:00Z&EndTime=2018-01-14T00:00:00Z&Type=All&Si
IV
milarity=80&MaxCandidate=500
Request
Content-Type: image/jpeg
2.
<JPEG data>
fo
r1
00
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
AI APIs 367
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed
--<boundary>
Content-Type: application/json
Da
Content-Length: <length>
hu
{ "token": 123456789,
"progress": 20
aH
"totalCount": -1
}
TT
--<boundary>
P
Content-Type: application/json
Response
Content-Length: <length>
AP
IV
{ "token": 123456789,
"progress": 60
2.
"totalCount": -1
89
}
--<boundary>
fo
Content-Type: application/json
Content-Length: <length>
r1
00
{ "token": 123456789,
"progress": 100
M
"totalCount": 350
EG
}
--<boundary>--
A
Table 16-27
st
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindHistoryByPic
Method GET
rib
Get the find result, reply by multipart, first part is json string to describe all candidate person,
Descripti
ut
then the following part is the person's picture, refer by UID in part header Content-Info.
on
Note: the returned token will be expired after 60 seconds without any doFind call.
io
Token for this search, use this token to get result and stop
token uint R
search.
.o
index uint R
–1.
count uint R Number of result person to get, start from Index.
[ Response Params ] ( JSON format )
Name Type R/O Param Description
AI APIs 368
Found int R Number of result person that return.
Candidates Array<object> R Candidates Person.
+Person object R Person Info.
++UID string R System id for this Person, max string length is 63.
++Sex string O Sex. It can be "Male", "Female" or "Unknown".
++Age int O Age.
++Glasses int O Glasses Status, 0: all, 1: not wear, 2: wear.
Da
GET
aH
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindHistoryByPic&token=12
3456789&index=0&count=12
TT
HTTP/1.1 200 OK
Server: Device/1.0
P
Connection: closed
IV
--<boundary>
Content-Type: application/json
2.
Content-Length: <length>
89
{ "Found" : 12,
fo
"Candidates" : [
r1
{
"person" : {
00
"UID" : "0001",
"Sex" : "Male",
M
"Age" : 30,
EG
"Glasses": 1
Response },
A
"Similarity" : 85
Di
},
{
st
"person" : {
rib
"UID" : "0002",
"Sex" : "Male",
ut
"Age" : 50,
io
"Glasses": 2
n
},
s.r
"Similarity" : 80
},
.o
{ ... }, ...
.
]
}
--<boundary>
Content-Info: UID=0001
Content-Type: image/jpeg
AI APIs 369
Content-Length: <length>
--<boundary>
...
aH
Stop finding
TT
Table 16-28
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindHistoryByPic
P
Method GET
AP
Descripti
Stop finding.
on
IV
token uint R
searching.
[ Response Params ] ( OK )
fo
[ Example ]
r1
GET
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindHistoryByPic&token=1
00
23456789
M
Response OK
EG
Table 16-29
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
st
When the video channel disposition with some face group, and the video channel detect
rib
Description
a face, send this event.
ut
remap to 0 — 8192.
.
AI APIs 370
+Feature array<string> O Face feature, can be some of the following: "WearGlasses",
"SunGlasses", "NoGlasses", "Smile", "Anger", "Sadness",
"Disgust", "Fear", "Surprise", "Neutral", "Laugh", "Happy",
"Confused", "Scream".
+Eye int O Eye status, 0: not detected, 1: close eye, 2: open eye.
+Mouth int O Mouth status, 0: not detected, 1: close mouth, 2: open mouth.
+Mask int O Mask status, 0: not detected, 1: not wearing mask, 2: wearing
Da
mask.
+Beard int O Beard status, 0: not detected, 1: no beard, 2: has beard.
hu
[ Example ]
aH
--<boundary>
Content-Type: text/plain
Content-Length: <length>
TT
P
Code=FaceDetection;action=Start;index=0;data={
AP
"Age": 40,
Event
"Feature": [ "WearGlasses", "Smile"],
2.
"Eye": 2,
89
"Mouth": 1,
"Mask": 1,
fo
"Beard": 2
r1
}, {…}, … ]
}
00
--<boundary>
M
Table 16-30
Usage Refer to "4.4.3 Subscribe to Snapshot"for how to subscribe event
Di
When the video channel disposition with some face group, and the video channel detect
Description
st
+EventBaseInf
object R Base info of event.
o
n
++Index int O The channel index relate to this event, start from 0.
+UID String R The identity of the Person, max string length is 31.
.
AI APIs 371
length is 63.
+++Name string O Person Name, max string length is 63.
+++Birthday string O Birthday ex: "1980-01-01".
+++Sex string O Sex, it can be "Male", "Female", "Unknown".
Country name. The length must be 2, and value should be
+++Country string O
according to ISO3166.
+++Province string O Province name, max string length is 63.
Da
string O
ype "Unknown".
aH
"Confused", "Scream".
89
++Eye int O Eye status, 0: not detected, 1: close eye, 2: open eye.
++Mouth int O Mouth status, 0: not detected, 1: close mouth, 2: open mouth.
fo
mask.
++Beard int O Beard status, 0: not detected, 1: no beard, 2: has beard.
00
[ Example ]
M
--<boundary>
Content-Type: text/plain
EG
Content-Length: <length>
A
Events[0].EventBaseInfo .Code=FaceRecognition
Di
Events[0].EventBaseInfo .Action=Pulse
st
Events[0].EventBaseInfo .Index=0
Events[0].UID=00105
rib
Events[0].Candidates[0].Person.UID=0012
ut
Events[0].Candidates[0].Person.GroupID=10000
Event
Events[0].Candidates[0].Person.Name=ZhangSan
io
Events[0].Candidates[0].Person.Birthday=1980-01-02
n
Events[0].Candidates[0].Person.Sex=Male
s.r
…
Events[0].Candidates[0].Similarity=80
.o
Events[0].Candidates[1].Person.UID=0014
.
Events[0].Candidates[1].Person.GroupID=10000
Events[0].Candidates[1].Person.Name=Lisi
Events[0].Candidates[1].Person.Birthday=1980-01-05
Events[0].Candidates[1].Person.Sex=Male
AI APIs 372
…
Events[0].Candidates[1].Similarity=75
…
Events[0].Face.Sex=Man
Events[0].Face.Age=20
Events[0].Face.Feature[0]=SunGlasses
Events[0].Face.Feature[1]=Smile
Da
Events[0].Face.Eye=2
Events[0].Face.Mouth=1
hu
Events[0].Face.Mask=1
Events[0].Face.Beard=2
aH
--<boundary>
Content-Type: image/jpeg
TT
--<boundary>
IV
Table 16-31
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
fo
When Re-Abstract Feature By Group or By Person, the abstract progress detail will send
Description
r1
in this event.
[ Event Params ] ( JSON format )
00
"Process" : In Process;
Di
+UID string O The identity of the person, max string length is 31.
rib
+GroupID string O The identity of the face group, max string length is 63.
[ Example ]
ut
io
n
s.r
.o
.
AI APIs 373
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Code=FaceFeatureAbstract;action=Start;index=0;data={
"Infos": [ { "State": "Progress",
Event
"Progress": 30,
Da
"UID": "20005",
"GroupID": "10000"
hu
}, {…}, … ]
}
aH
--<boundary>
TT
Table 16-32
IV
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=FaceRecognitionEve
URL
2.
ntHandler
Method GET
89
+FaceRecognitio
array<object> R Each face group has one config object in this array.
M
nEventHandler
++GroupID String R The face group ID, max string length is 63.
EG
++GroupName String R The face group name, max string length is 127.
A
Mask
Bit 1 : recognition failed
st
ask
Bit 1 : recognition failed
s.r
[ Example ]
GET
Request http://10.0.0.8/cgi-bin/configManager.cgi?action=getConfig&name=FaceRecognitionEve
ntHandler
AI APIs 374
table.FaceRecognitionEventHandler[0].GroupID=0017
table.FaceRecognitionEventHandler[0].GroupName=wsd
table.FaceRecognitionEventHandler[0].EventEnableMask=3
table.FaceRecognitionEventHandler[0].RecordEnableMask=0
table.FaceRecognitionEventHandler[0].RecordLatch=10
table.FaceRecognitionEventHandler[0].SnapEnableMask=3
table.FaceRecognitionEventHandler[0].MailEnableMask=0
Da
…
Response
table.FaceRecognitionEventHandler[1].GroupID=0018
hu
table.FaceRecognitionEventHandler[1].GroupName=cst
table.FaceRecognitionEventHandler[1].EventEnableMask=3
aH
table.FaceRecognitionEventHandler[1].RecordEnableMask=0
table.FaceRecognitionEventHandler[1].RecordLatch=10
TT
table.FaceRecognitionEventHandler[1].SnapEnableMask=3
P
table.FaceRecognitionEventHandler[1].MailEnableMask=0
…
AP
URL http://<server>/cgi-bin/configManager.cgi?action=setConfig
Method GET
2.
Descripti
Set the Face Recognition Event Handler Setting.
89
on
[ Request Params ] ( key=value format at URL )
fo
FaceRecognition
array<object> R Each face group has one config object in this array.
Alarm
00
+GroupID String R The face group ID, max string length is 63.
+GroupName String R The face group name, max string length is 127.
M
+RecordLatch Int R Record latch time, unit is second.
rib
sk
Bit 1 : recognition failed
io
[ Example ]
.
AI APIs 375
GET
http://10.0.0.8/cgi-bin/configManager.cgi?action=setConfig&FaceRecognitionEventHandl
er[0].GroupID=0017&FaceRecognitionEventHandler[0].GroupName=wsd&FaceRecognit
Request
ionEventHandler[0].EventEnableMask=3&FaceRecognitionEventHandler[0].RecordEnab
leMask=0&FaceRecognitionEventHandler[0].RecordLatch=10&FaceRecognitionEventHa
ndler[0].SnapEnableMask=3&FaceRecognitionEventHandler[0].MailEnableMask=0
Response OK
Da
Table 16-33
P
remap to 0 — 8192.
r1
[ Example ]
--<boundary>
00
Content-Type: text/plain
Content-Length: <length>
M
Event
EG
Code=LeftDetection;action=pulse;index=0;data={
"Object": { "BoundingBox": [2992,1136,4960,5192] }
A
}
Di
--<boundary>
st
rib
Table 16-34
io
AI APIs 376
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Event
Code=TakenAwayDetection;action=pulse;index=0;data={
"Object": { "BoundingBox": [2992,1136,4960,5192] }
}
Da
--<boundary>
hu
Table 16-35
TT
remap to 0 — 8192.
The object wandering tracks, array of polyline, one polyline
fo
Array<Array<
Tracks O for one object, polyline is array of points, point is array of two
r1
Array<int>>>
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
00
Array<Array<i
DetectRegion R 20, the second array is point, must be two int, means x and y
nt>>
M
--<boundary>
A
Content-Type: text/plain
Content-Length: <length>
Di
st
Code=WanderDetection;action=start;index=0;data={
rib
{…}, … ],
io
"Tracks": [ [ [1202, 576], [1456, 863], [1921, 1204], [2341, 1823], [3512, 2314] ],
[ [2214, 3412], [3153, 3674], [4512, 4213] ],
n
[…], … ],
s.r
--<boundary>
.
Table 16-36
AI APIs 377
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
Description When detect some object was stay, send this event
[ Event Params ] ( JSON format )
Name Type R/O Param Description
Object object O The object that was stay.
The detected object 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
Da
+BoundingBox Array<int> O
—bottom point, y's value of right—bottom point. Coordinate
remap to 0 — 8192.
hu
The detection region, the first array is point list, max item is
Array<Array<i
AP
DetectRegion O 20, the second array is point, must be two int, means x and y
nt>>
value, coordinate remap to 0 — 8192.
IV
AreaID int O The area id, begin from 1, if omit, means single area.
PresetID int O The preset id, if omit, means preset is unknown.
2.
[ Example ]
89
--<boundary>
Content-Type: text/plain
fo
Content-Length: <length>
r1
Code=StayDetection;action=start;index=0;data={
00
{ "BoundingBox": [4392,4136,6960,6512] },
EG
{…}, … ],
"DetectRegion": [ [1292,3469], [6535,3373], … ],
A
"AreaID" : 2
Di
}
st
--<boundary>
rib
Table 16-37
Usage Refer to "4.4.3 Subscribe to Snapshot "for how to subscribe event
n
AI APIs 378
+HumanAttribute
object O The human attributes.
s
The detected human bounding box, 4 interge, refer to x's
value of left-top point, y's value of left-top point, x's value of
++BoundingBox Array<int> O
right-bottom point, y's value of right-bottom point.
Coordinate remap to 0 — 8192.
++Sex string O Sex, can be "Man", "Woman", "Unknown".
Da
"Cyan", "Other".
++CoatType int O Coat type, 0: unknown, 1: long sleeve, 2: short sleeve.
IV
++TrousersType int O
skirt.
89
++HasHat int O Has hat or not, 0: unknown, 1: not has hat, 2: has hat.
++HasBag int O Has bag or not, 0: unknown, 1: not has bag, 2: has bag.
fo
umbrella.
Bag type, 0: unknown, 1: handbag, 2: shoulder bag, 3:
++Bag int O
00
++UpperPattern int O
3: pattern, 4: gap, 5: grid.
EG
+FaceAttributes object O If the human's face can be detected, find it's attributes.
st
++BoundingBox Array<int> O
right-bottom point, y's value of right-bottom point.
ut
"Confused", "Scream".
.
++Eye int O Eye status, 0: not detected, 1: close eye, 2: open eye.
Mouth status, 0: not detected, 1: close mouth, 2: open
++Mouth int O
mouth.
AI APIs 379
Mask status, 0: not detected, 1: not wearing mask, 2:
++Mask int O
wearing mask.
++Beard int O Beard status, 0: not detected, 1: no beard, 2: has beard.
Glasses status, 0: unknown, 1: not wearing, 2: normal
++Glass Int O
Glasses, 3: sun glasses, 4: black frame glasses.
[ Example ]
--<boundary>
Da
Content-Type: text/plain
Content-Length: <length>
hu
aH
Events[0].EventBaseInfo .Code=HumanTrait
Events[0].EventBaseInfo .Action=Pulse
Events[0].EventBaseInfo .Index=0
TT
Events[0].HumanAttributes.BoundingBox[0]=1341
P
Events[0].HumanAttributes.BoundingBox[1]=2451
AP
Events[0].HumanAttributes.BoundingBox[2]=4513
Events[0].HumanAttributes.BoundingBox[3]=4135
IV
Events[0].HumanAttributes.Sex=Man
Events[0].HumanAttributes.Age=30
2.
Events[0].HumanAttributes.CoatColor=White
89
Events[0].HumanAttributes.CoatType=1
Events[0].HumanAttributes.TrousersColor=Black
fo
Events[0].HumanAttributes.TrousersType=1
Event Events[0].HumanAttributes.HasHat=1
r1
Events[0].HumanAttributes.HasBag=2
00
Events[0].FaceAttributes.BoundingBox[0]=1341
Events[0].FaceAttributes.BoundingBox[1]=2451
M
Events[0].FaceAttributes.BoundingBox[2]=4513
EG
Events[0].FaceAttributes.BoundingBox[3]=4135
Events[0].FaceAttributes.Sex=Man
A
Events[0].FaceAttributes.Age=30
Di
Events[0].FaceAttributes.Feature[0]=Smile
Events[0].FaceAttributes.Eye=2
st
Events[0].FaceAttributes.Mouth=1
rib
Events[0].FaceAttributes.Glass=1
--<boundary>
ut
Content-Type: image/jpeg
io
--<boundary>
.o
.
Table 16-38
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
AI APIs 380
Description When detect some object cross the line, send this event.
[ Event Params ] ( JSON format )
Name Type R/O Param Description
Object object R The object that cross the line.
The detected object 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
+BoundingBox Array<int> R
—bottom point, y's value of right-bottom point. Coordinate
Da
remap to 0 — 8192.
Objects array<object> O If detect several object, store in this array.
hu
The detection line, the first array is point list, max item is 20,
Array<Array<i
P
DetectLine R the second array is point, must be two int, means x and y
nt>>
AP
“Any”.
[ Example ]
2.
--<boundary>
89
Content-Type: text/plain
Content-Length: <length>
fo
r1
Code=CrossLineDetection;action=pulse;index=0;data={
Event
"Object": { "BoundingBox": [2992,1136,4960,5192] },
00
}
EG
--<boundary>
A
Table 16-39
rib
R/
Name Type Param Description
O
n
remap to 0 — 8192.
Objects array<object> O If detect several object, store in this array.
AI APIs 381
The detected object 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
+BoundingBox Array<int> R
—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
Array<Array<i
DetectRegion R 20, the second array is point, must be two int, means x and y
nt>>
value, coordinate remap to 0 — 8192.
Da
--<boundary>
Content-Type: text/plain
P
Content-Length: <length>
AP
Code=CrossRegionDetection;action=pulse;index=0;data={
IV
“Action” : “Cross”,
89
"Direction" : "Enter"
}
fo
--<boundary>
r1
Table 16-40
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
EG
Description When detect the queue stay time too long, send this event
A
remap to 0 — 8192.
io
+BoundingBox Array<int> O
—bottom point, y's value of right—bottom point. Coordinate
.o
remap to 0 — 8192.
The detection region, the first array is point list, max item is
.
Array<Array<i
DetectRegion O 20, the second array is point, must be two int, means x and y
nt>>
value, coordinate remap to 0 — 8192.
AreaID int O The area id, begin from 1, if omit, means single area.
PresetID int O The preset id, if omit, means preset is unknown.
AI APIs 382
[ Example ]
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Code=QueueStayDetection;action=start;index=0;data={
"Object": { "BoundingBox": [2992,1136,4960,5192] },
Da
{…}, … ],
"DetectRegion": [ [1292,3469], [6535,3373], … ],
aH
"AreaID" : 2
}
TT
--<boundary>
P
AP
Table 16-41
2.
+BoundingBox Array<int> R
right-bottom point, y's value of right-bottom point. Coordinate
M
remap to 0 — 8192.
+Stature int R The people's stature, unit is cm.
EG
AreaID int O The area id, begin from 1, if omit, means single area.
A
--<boundary>
st
Content-Type: text/plain
rib
Content-Length: <length>
ut
Code=QueueNumDetection;action=pulse;index=0;data={
io
{…}, … ],
s.r
"AreaID" : 2
}
.o
--<boundary>
.
AI APIs 383
16.2 Intelligent Traffic APIs
Table 16-42
hu
URL http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=<RecordName>
Method GET
aH
unique.
MasterOfCar string O The car owner, max string length is 15
2.
PlateColor string O Plate color, max string length is 31, ex: "Yellow", "Blue", … etc.
89
etc.
BeginTime string O Begin time, ex: "2010-05-25 00:00:00".
00
asynchronously.
st
[ Example ]
GET
rib
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insert&name=TrafficBlackList&Pla
Request
ut
teNumber=AC00001&MasterOfCar=ZhangSan&PlateColor=Yellow&VehicleColor=Blue&
BeginTime=2011-01-01%2012:00:00&CancelTime=2011-01-10%2012:00:00
io
Response RecNo=12345
n
s.r
Table 16-43
URL http://<server>/cgi-bin/recordUpdater.cgi?action=update&name=<RecordName>
Method GET
AI APIs 384
Update Traffic BlackList/Red record.
Descripti
Note: Besides action, name, recno, there should be at least one more parameter to be
on
updated.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
The record table name, "TrafficBlackList" for BlackList and
name string R
"TrafficRedList"for RedList.
Da
PlateNumber string R
unique.
aH
[ Example ]
AP
GET
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=update&name=TrafficBlackList&re
IV
Request cno=12345&PlateNumber=AC00001&MasterOfCar=ZhangSan&PlateColor=Yellow&Vehi
cleColor=Blue&BeginTime=2011-01-01%2012:00:00&CancelTime=2011-01-10%2012:00
2.
:00
89
Response OK
fo
Table 16-44
URL http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=<RecordName>
M
Method GET
EG
Descripti
Remove Traffic BlackList/Red record.
on
A
name string R
"TrafficRedList"for RedList.
rib
[ Example ]
io
GET
n
Request http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=remove&name=TrafficBlackList&r
ecno=12345
s.r
Response OK
.o
.
Table 16-45
URL http://<server>/cgi-bin/recordFinder.cgi?action=find&name=<RecordName>
AI APIs 385
Method GET
Description Find Traffic BlackList/RedList record.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
The record table name, "TrafficBlackList"for BlackList and
name string R
"TrafficRedList"for RedList.
count int O Max result to return, default is 1024.
Da
array<object
records R The records that returned.
r1
>
+RecNo int R Record id.
00
[ Example ]
Di
GET
st
Request http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=TrafficBlackList&condition.
rib
PlateNumber=AC00001&StartTime=123456700&EndTime=123456800&count=100
totalCount=1000
ut
found=100
records[0].RecNo=12345
io
records[0].CreateTime=123456789
n
records[0].PlateNumber=AC00001
s.r
Respons records[0].MasterOfCar=ZhangSan
e …
.o
records[1].RecNo=13579
.
records[1].CreateTime=123456799
records[1].PlateNumber=AC00001
records[1].MasterOfCar=LiSi
…
AI APIs 386
16.2.1.5 RemoveEx Traffic BlackList/RedList Record
Table 16-46
URL http://<server>/cgi-bin/recordUpdater.cgi?action=removeEx&name=<RecordName>
Method GET
Descripti
RemoveEx Traffic BlackList/Red record.
Da
on
[ Request Params ] ( key=value format in URL )
hu
name string R
"TrafficRedList"for RedList.
RecNo int O The record id.
TT
PlateNumber string O The number of car plate, max string length is 31. It must be
unique.
P
[ Response Params ] ( OK )
AP
[ Example ]
IV
GET
Request http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=removeEx&name=TrafficBlackList
2.
&PlateNumber=AC00001
89
Response OK
fo
Table 16-47
Usage Refer to "4.4.3 Subscribe to Snapshot"for how to subscribe event
A
+IndexInGroup int O The index of this event in the event group, start from 1.
.o
AI APIs 387
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.
++Text string O Vehicle logo.
++SubText string O Vehicle sub logo.
++SubBrand int O Vehicle sub brand index.
++BrandYear int O Vehicle brand year index.
Da
"WithoutSunShade".
The detected sun shade bounding box, 4 interge, refer to
EG
"WithoutSafeBelt".
rib
[ Example ]
--<boundary>
ut
Content-Type: text/plain
Content-Length: <length>
io
n
Events[0].EventBaseInfo.Code=TrafficJunction
s.r
Events[0].EventBaseInfo.Action=Pulse
Event
Events[0].EventBaseInfo.Index=0
.o
Events[0].GroupID=123
.
Events[0].CountInGroup=3
Events[0].IndexInGroup=1
Events[0].Lane=0
Events[0].Vehicle.BoundingBox[0]=1341
AI APIs 388
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
Events[0].Vehicle.SubBrand=5
Events[0].Vehicle.BrandYear=2
Da
Events[0].TrafficCar.RecNo=123
Events[0].TrafficCar.PlateNumber=AC00003
hu
Events[0].TrafficCar.PlateColor=Yellow
Events[0].TrafficCar.VehicleColor=Blue
aH
Events[0].TrafficCar.BoundingBox[0]=1341
Events[0].TrafficCar.BoundingBox[1]=2451
TT
Events[0].TrafficCar.BoundingBox[2]=4513
P
Events[0].TrafficCar.BoundingBox[3]=4135
Events[0].TrafficCar.Country=China
AP
Events[0].CommInfo.Seat[0].Type=Main
IV
Events[0].CommInfo.Seat[0].Status[0]=Smoking
Events[0].CommInfo.Seat[0].SunShade=WithSunShade
2.
Events[0].CommInfo.Seat[0].ShadePos[0]=2021
89
Events[0].CommInfo.Seat[0].ShadePos[1]=3041
Events[0].CommInfo.Seat[0].ShadePos[2]=2151
fo
Events[0].CommInfo.Seat[0].ShadePos[3]=3661
Events[0].CommInfo.Seat[0].SafeBelt=WithoutSafeBelt
r1
…
00
--<boundary>
Content-Type: image/jpeg
M
--<boundary>
Di
Table 16-48
.o
AI APIs 389
++Code String R Event Code. It should be TrafficJam.
++Action String R Event Action. It can be "Start", "Stop" or "Pulse".
++Index int O The channel index relate to this event.
+GroupID int O The id of event group.
+CountInGroup int O Event count in the event group.
+IndexInGroup int O The index of this event in the event group, start from 1.
+Lane int O Lane number, start from 0.
Da
+JamRealLengt
int O Jam real length, unit is metre.
h
TT
[ Example ]
--<boundary>
P
Content-Type: text/plain
AP
Content-Length: <length>
IV
Events[0].EventBaseInfo.Code=TrafficJam
Events[0].EventBaseInfo.Action=Pulse
2.
Events[0].EventBaseInfo.Index=0
89
Events[0].GroupID=123
Events[0].CountInGroup=3
fo
Events[0].IndexInGroup=1
r1
Events[0].Lane=0
Event
Events[0].StartJaming=123456789
00
Events[0].AlarmInterval=180
Events[0].JamLenght=70
M
Events[0].JamRealLength=120
EG
…
--<boundary>
A
Content-Type: image/jpeg
Di
--<boundary>
ut
Event params is the same as TrafficJunction, except for event Code is TrafficUnderSpeed, and
add following params:
.o
.
Table 16-49
[ Extra Event Params ] ( key=value format )
Name Type R/O Param Description
+SpeedLimit array<int> O Speed limit, 2 integer, min speed and max speed.
+UnderSpeeding int O Percentage of under speed.
AI APIs 390
Percentage
Table 16-50
hu
+SpeedLimit array<int> O Speed limit, 2 integer, min speed and max speed.
+SpeedingPerce
int O Percentage of over speed.
TT
ntage
P
AP
Table 16-51
Usage Refer to "4.4.3 Subscribe to Snapshot"for how to subscribe event
2.
+Vehicle object O Actually this is the human that detected, not vehicle.
st
++BoundingBox Array<int> 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
ut
[ Example ]
n
Event --<boundary>
s.r
Content-Type: text/plain
Content-Length: <length>
.o
.
Events[0].EventBaseInfo.Code=TrafficPedestrain
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].GroupID=123
AI APIs 391
Events[0].CountInGroup=3
Events[0].IndexInGroup=1
Events[0].Lane=0
Events[0].Vehicle.Category=Passerby
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
--<boundary>
Content-Type: image/jpeg
aH
--<boundary>
AP
Event params is the same as TrafficJunction, except for event Code is TrafficParking, and
89
Table 16-52
[ Extra Event Params ] ( key=value format )
r1
+ParkingAllowed
int O The allowed time of parking.
EG
Time
A
Table 16-53
ut
Description When traffic flow trigger the rule, send this event
n
FlowStates array<object> R Traffic flow info, each object in list is traffic flow info about
.o
one lane.
.
AI APIs 392
+DrivingDirectio array<string> O Driving direction, should be an array of three strings:
n 1st string: direction, can be: "Approach", "Leave"
2nd string: Approach position name
3rd string: Leave position name
[ Example ]
Event --<boundary>
Content-Type: text/plain
Da
Content-Length: xxxx
hu
Code=TrafficFlowStat;action=Pulse;index=0;data={
aH
"FlowStates": [ { "Lane": 0,
"Flow": 50,
"Period": 5,
TT
}, {…}, … ]
AP
}
--<boundary>
IV
Table 16-54
URL http://<server>/cgi-bin/recordFinder.cgi?action=find&name=TrafficFlow
fo
Method GET
r1
AI APIs 393
means congestion.
[ Example ]
Request GET
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=TrafficFlow&condition.Cha
nnel=0&condition.Lane=0&StartTime=123456700&EndTime=123456800&count=100
Respons totalCount=1000
e found=100
Da
records[0].RecNo=12345
records[0].CreateTime=123456789
hu
records[0].StaticsticsTime=123456789
aH
records[0].Period=300
records[0].Channel=0
records[0].Lane=0
TT
records[0].Vehicles=250
P
records[0].AverageSpeed=25.4
AP
…
records[1].RecNo=13579
IV
records[1].CreateTime=123456799
records[1].StaticsticsTime=123456799
2.
records[1].Period=300
89
records[1].Channel=0
records[1].Lane=0
fo
records[1].Vehicles=220
records[1].AverageSpeed=21.8
r1
…
00
Table 16-55
URL http://<server>/cgi-bin/Attendance.cgi?action=addUser
ut
Method GET
Description Add an access user. ( This api is supported by attendance machine. )
io
AI APIs 394
GET
Request http://<server>/cgi-bin/Attendance.cgi?action=addUser&UserID=102&UserName=Zhang
San&Password=123456
Response OK
Table 16-56
hu
URL http://<server>/cgi-bin/Attendance.cgi?action=modifyUser
Method GET
aH
[ Response Params ] ( OK )
89
[ Example ]
GET
fo
Request http://<server>/cgi-bin/Attendance.cgi?action=modifyUser&UserID=102&UserName=Zhan
gSan&Password=123456
r1
Response OK
00
Table 16-57
URL http://<server>/cgi-bin/Attendance.cgi?action=deleteUser
A
Method GET
Di
[ Response Params ] ( OK )
[ Example ]
io
Response OK
s.r
.o
Table 16-58
URL http://<server>/cgi-bin/Attendance.cgi?action=getUser
Method GET
AI APIs 395
Description Get an access user's information. ( This api is supported by attendance machine. )
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
UserID string R The user's id
[ Response Params ] ( JSON format )
Name Type R/O Param Description
UserInfo object R The user's info
Da
"UserID": 102,
AP
}
Find all access user
2.
89
Table 16-59
URL http://<server>/cgi-bin/Attendance.cgi?action=findUser
fo
Method GET
Description Get all information of access user.
r1
[ Example ]
io
{ "Total": 1000,
s.r
"UserInfo": [ {
"UserID": 102,
.o
"Password": "123456"
}, { … } … ]
}
AI APIs 396
16.3.1.5 Add Access User Face
Table 16-60
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=add
Method POST
Description Add an access user face.
Da
+RoomNo array<string> O
size is 12. ( This param is not supported by access control. )
The user's face feature, encode with base64, max array size
P
+FaceData array<string> O
Note: There must be at least one between FaceData and
PhotoData.
IV
The user's face photo, encode with base64, max array size is
2.
[ Response Params ] ( OK )
[ Example ]
r1
POST http://<server>/cgi-bin/FaceInfoManager.cgi?action=add
00
Content-Type: application/json
Content-Length: <length>
M
{ "UserID": "102",
EG
"Info": {
Request
A
"UserName": "ZhangSan",
"RoomNo": [ "301", "303", … ],
Di
}
}
ut
Response OK
io
n
Table 16-61
.o
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=update
.
Method POST
Description Update an access user face.
[ Request Params ] ( JSON format in body )
Name Type R/O Param Description
AI APIs 397
UserID string R The user's id.
Info object R The user's info.
+UserName string O The user's name.
The user's room num list, max array size is 32, max string
+RoomNo array<string> O
size is 12. ( This param is not supported by access control. )
The user's face feature, encode with base64, max array size
is 20, and max string size is 2k.
Da
+FaceData array<string> O
Note: There must be at least one between FaceData and
PhotoData.
hu
The user's face photo, encode with base64, max array size is
aH
[ Response Params ] ( OK )
P
[ Example ]
AP
POST http://<server>/cgi-bin/FaceInfoManager.cgi?action=update
Content-Type: application/json
IV
Content-Length: <length>
2.
{ "UserID": "102",
89
"Info": {
Request
"UserName": "ZhangSan",
fo
}
}
M
Response OK
EG
Table 16-62
st
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=remove
rib
Method GET
Description Delete an access user face.
ut
[ Response Params ] ( OK )
s.r
[ Example ]
.o
AI APIs 398
Table 16-63
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=startFind
Method GET
Descripti
Start to find access user face.
on
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Da
search.
Total int O Result num, return 0 if not found.
P
[ Example ]
AP
Response "Total": 20
}
2.
Table 16-64
fo
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=doFind
Method GET
r1
Descripti
Get the find result.
00
on
[ Request Params ] ( key=value format in URL )
M
The token of this search, use this token to get result and stop
Token int R
search.
A
Offset int R Offset in the result record set, range is [0, Total – 1].
Di
The user's face photo's MD5 hash string, max array size is 5,
io
+MD5 array<string> O
max string size is 33.
n
[ Example ]
s.r
GET
Request http://<server>/cgi-bin/FaceInfoManager.cgi?action=doFind&Token=1234&Offset=0&Coun
.o
t=20
.
{ "Info": [ {
"UserID": "102",
Response "MD5": [ "xxxx", "xxxx", … ]
}, { … }, … ]
}
AI APIs 399
Stop the find session
Table 16-65
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=stopFind
Method GET
Description Stop the find session.
[ Request Params ] ( key=value format in URL )
Da
search.
[ Response Params ] ( OK )
aH
[ Example ]
Request GET http://<server>/cgi-bin/FaceInfoManager.cgi?action=stopFind&Token=1234
TT
Response OK
P
AP
Table 16-66
2.
URL http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControlCard
89
Method GET
Description Insert access user card info.
fo
name string R
"AccessControlCard".
M
CardName string R Access user card name, max string length is 32.
CardNo string R Access user card number.
EG
of following:
Di
1 << 3: the card is arrearage
ut
CardType int O 0 : Normal Card, 1: VIP Card, 2: Visitor Card, 3: Patrol Card, 4:
Blacklist Card, 5: Stress Card, 0xff: Mother Card
.o
Password string O
video talk device )
The index of the doors that this card can open. ( This param is
Doors array<int> O
not supported by video talk device )
AI APIs 400
The index of the time sections of each door that this card can
TimeSections array<int> O
open. ( This param is not supported by video talk device )
VTO position number. ( This param is not supported by access
VTOPosition string O
control device )
ValidDateStart string O The start of valid date, format is "yyyyMMdd hhmmss".
ValidDateEnd string O The end of valid date, format is "yyyyMMdd hhmmss".
Is the card still valid. ( This param is not supported by video talk
Da
IsValid bool O
device )
[ Response Params ] (key=value format)
hu
R/
Name Type Param Description
aH
O
RecNo int R The record id.
TT
[ Example ]
GET
P
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControlCard&
AP
Request CardName=ZhangSan&CardNo=12345&UserID=102&CardStatus=0&CardType=0&Pass
word=123456&Doors[0]=1&Doors[1]=3&Doors[2]=5&VTOPosition=01018001&ValidDateS
IV
tart=20151022%20093811&ValidDateEnd=20151222%20093811
Response RecNo=12345
2.
Table 16-67
fo
URL http://<server>/cgi-bin/recordUpdater.cgi?action=insertEx&name=AccessControlCard
Method POST
r1
Description Insert access user card and fingerprint. ( This api is not supported by video talk device )
00
"AccessControlCard".
CardName string R Access user card name, max string length is 32.
A
of following:
rib
and there will be voice prompts.
.o
CardType int O 0: Normal Card, 1: VIP Card, 2: Visitor Card, 3: Patrol Card, 4:
Blacklist Card, 5: Stress Card, 0xff: Mother Card
Password string O The Access card's password.
Doors array<int> O The index of the doors that this card can open.
AI APIs 401
The index of the time sections of each door that this card can
TimeSections array<int> O
open.
VTO position number. ( This param is not supported by access
VTOPosition string O
control device )
ValidDateStart string O The start of valid date, format is "yyyyMMdd hhmmss".
ValidDateEnd string O The end of valid date, format is "yyyyMMdd hhmmss".
IsValid bool O Is the card still valid.
Da
FingerprintPack
object O The fingerprint packet info.
et
hu
R/
Name Type Param Description
O
P
[ Example ]
POST
IV
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insertEx&name=AccessControlCar
d&CardName=ZhangSan&CardNo=12345&UserID=102&CardStatus=0&Password=1234
2.
56&Doors[0]=1&Doors[1]=3&Doors[2]=5&VTOPosition=01018001&ValidDateStart=20151
89
022%20093811&ValidDateEnd=20151222%20093811&FingerprintPacket.Length=500&Fi
Request
ngerprintPacket.Count=3
fo
Content-Type: application/octet-stream
r1
Content-Length: <length>
00
Table 16-68
st
URL http://<server>/cgi-bin/recordUpdater.cgi?action=update&name=AccessControlCard
rib
Method GET
Update access user card info.
ut
Description
Note: You should provide at lease one optional param to update.
io
name string R
"AccessControlCard".
.o
CardName string O Access user card name, max string length is 31.
Access user card number.
CardNo string O
Primary key, modification is not allowed in principle
The user's id.
UserID string O
Primary key, modification is not allowed in principle
AI APIs 402
…<See above insert command for other params of the record,
…<other param> — —
They are all optional.>
[ Response Params ] ( OK )
[ Example ]
GET
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=update&name=AccessControlCar
Request d&recno=12345&CardName=ZhangSan&CardNo=12345&UserID=102&CardStatus=0&
Da
CardType=0&Password=123456&Doors[0]=1&Doors[1]=3&Doors[2]=5&ValidDateStart=
20151022%20093811&ValidDateEnd=20151222%20093811
hu
Response OK
aH
Table 16-69
TT
URL http://<server>/cgi-bin/recordUpdater.cgi?action=updateEx&name=AccessControlCard
Method POST
P
Update access user card info and fingerprint. ( This api is not supported by video talk
AP
Description device )
Note: You should provide at lease one optional param to update.
IV
FingerprintPack
object O The fingerprint packet info.
et
Di
[ Response Params ] ( OK )
[ Example ]
ut
POST
io
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=updateEx&name=AccessControlC
n
ard&recno=12345&CardName=ZhangSan&CardNo=12345&UserID=102&CardStatus=0
&CardType=0&Password=123456&Doors[0]=1&Doors[1]=3&Doors[2]=5&ValidDateStart
s.r
=20151022%20093811&ValidDateEnd=20151222%20093811&FingerprintPacket.Length
Request
.o
=500&FingerprintPacket.Count=3
.
Content-Type: application/octet-stream
Content-Length: <length>
AI APIs 403
16.3.1.11 Delete Access User Card and Fingerprint
Delete Access user card and fingerprint record by recno
Table 16-70
URL http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=AccessControlCard
Method GET
Da
Descriptio Remove the access user card and fingerprint record. ( The video talk device can not delete
n fingerprint data.)
hu
[ Example ]
AP
GET
Request http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=remove&name=AccessControlCar
IV
d&recno=12345
2.
Response OK
89
Table 16-71
fo
URL http://<server>/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControlCard
r1
Method GET
Descriptio Remove all the access user card and fingerprint records. ( The video talk device can not
00
[ Response Params ] ( OK )
Di
[ Example ]
st
GET
Request
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControlCard
rib
Response OK
ut
io
Table 16-72
.o
URL http://<server>/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCard
.
Method GET
Description Find Access user card record by condition.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
name string R Record Name, should be "AccessControlCard".
AI APIs 404
count int O Max result to return, default is 1024.
StartTime string O The start of the record's CreateTime.
EndTime string O The End of the record's CreateTime.
condition object O Search condition.
+CardNo string O Access user card number.
+UserID string O The user's id.
+IsValid bool O The access card valid or not.
Da
+CardName string R The access user card name, max string length is 32.
AP
sum of following:
1 << 0: report the loss of the card
89
+Password string O
by video talk device )
Di
The index of the doors that this card can open. ( This param is
+Doors array<int> O
st
The index of the time sections of each door that this card can
+TimeSections array<int> O
open. ( This param is not supported by video talk device )
ut
+ValidDateStar
n
+IsValid bool O
talk device )
.
AI APIs 405
user type, it can be {
1: normal user
+UserType integer O
2: user in blacklist
}
+FirstEnter bool O is with first enter authority
+DynamicChec
string O dynamic check code
kCode
Da
GET http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCard
Request
aH
&condition.UserID=103&StartTime=123456700&EndTime=123456800&count=100
totalCount=1000
found=100
TT
records[0].RecNo=12345
P
records[0].CreateTime=123456789
AP
records[0].CardName=ZhangSan
records[0].CardNo=300
IV
records[0].UserID=103
records[0].CardStatus=0
2.
records[0].CardType=0
89
records[0].Doors[0]=1
records[0].Doors[1]=3
fo
records[0].Doors[2]=5
r1
records[0].VTOPosition=01018001
records[0].ValidStart=20151022 093811
00
records[0].ValidEnd=20151222 093811
records[0].IsValid=true
M
Response …
EG
records[1].RecNo=13579
records[1].CreateTime=123456799
A
records[1].StaticsticsTime=123456799
Di
records[1].CardName=ZhangSan
records[1].CardNo=302
st
records[1].UserID=103
rib
records[1].CardStatus=0
records[1].CardType=0
ut
records[1].Doors[0]=2
io
records[1].Doors[1]=4
n
records[1].Doors[2]=6
records[1].VTOPosition=01018002
s.r
records[1].ValidStart=20151022 093811
.o
records[1].ValidEnd=20151222 093811
records[1].IsValid=true
.
…
Find Access user card by recno
Table 16-73
AI APIs 406
URL http://<server>/cgi-bin/recordUpdater.cgi?action=get&name=AccessControlCard
Method GET
Description Find Access user card record by recno.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
name string R Record Name, should be "AccessControlCard".
recno int R The record id.
Da
+CardName string R The access user card name, max string length is 32.
+CardNo string R The access user card number.
P
…<other param> — — …<See above find command for other params of the record.>
[ Example ]
IV
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=get&name=AccessControlCar
Request
2.
d&recno=4
record.RecNo=4
89
record.CreateTime=123456789
record.CardName=ZhangSan
fo
record.CardNo=300
r1
record.UserID=103
record.CardStatus=0
00
record.CardType=0
M
Response record.Doors[0]=1
record.Doors[1]=3
EG
record.Doors[2]=5
record.VTOPosition=01018001
A
record.ValidStart=20151022 093811
Di
record.ValidEnd=20151222 093811
st
record.IsValid=true
…
rib
Table 16-74
io
URL http://<server>/cgi-bin/recordUpdater.cgi?action=getEx&name=AccessControlCard
n
Method GET
Find Access user card and fingerprint record by recno. ( This api is not supported by
s.r
Description
video talk device )
.o
AI APIs 407
record object R The record that returned.
+RecNo int R The record id.
+CreateTime int O The create time of record.
+CardName string R The access user card name, max string length is 32.
+CardNo string R The access user card number.
+UserID string R The user's id.
…<other param> — — …<See above find command for other params of the record.>
Da
+FingerprintPac
object O The fingerprint packet info.
ket
hu
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=getEx&name=AccessControl
Request
Card&recno=4
P
HTTP/1.1 200 OK
AP
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
IV
Content-Length: <length>
2.
--<boundary>
89
Content-Type: text/plain
Content-Length: <length>
fo
r1
record.RecNo=4
record.CreateTime=123456789
00
record.CardName=ZhangSan
record.CardNo=300
M
record.UserID=103
EG
record.CardStatus=0
record.CardType=0
A
Response
record.Doors[0]=1
Di
record.Doors[1]=3
record.Doors[2]=5
st
record.VTOPosition=01018001
rib
record.ValidStart=20151022 093811
record.ValidEnd=20151222 093811
ut
record.IsValid=true
io
…
n
record.FingerprintPacket.Length=500
s.r
record.FingerprintPacket.Count=3
--<boundary>
.o
Content-Type: application/octet-stream
.
Content-Length: <length>
AI APIs 408
16.3.1.13 Get the Total Number of Records of Access User Card and
Fingerprint
Table 16-75
http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCar
URL
d
Da
Method GET
hu
Description Get the total number of records of the access user card record.
[ Request Params ] ( key=value format in URL )
aH
"AccessControlCard".
[ Response Params ] ( key=value )
P
[ Example ]
GET
IV
Request http://192.168.1.108/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessContr
2.
olCard
89
Response count=150
Table 16-76
Usage Refer to "4.4.3 Subscribe to Snapshot"for how to subscribe event
EG
Description When user trying to open the door, send this event.
A
AI APIs 409
Open door method, can be:
0: by password
1: by access card
2: by access card and then password
3: by password and then access card
6: by fingerprint
7: by password and access card and fingerprint together
Da
10: reserved
11: by multiple access user
aH
12: by key
13: by duress password
TT
17: by ID card
IV
42: by DTMF(SIPINFO,RFC2833,INBAND)
43: by QR code, remote
.
AI APIs 410
+CardNo string O Card number if the door is opened by card
+UserID string R The user id
+ErrorCode integer O error code
+ObjectPropertie O
object Dynamic structure info
s
O is with mask, it can be {
0: unknow
Da
}
aH
+ManTemperatu O
object people’s temperature info
reInfo
++CurrentTempe O
TT
O temperature unit:{
AP
0: centigrade
++TemperatureU
integer 1: Fahrenheit
nit
IV
2: Kelvin
}
2.
++IsOverTemper O
89
--<boundary>
r1
Content-Type: text/plain
Content-Length: <length>
00
Events[0].EventBaseInfo.Code=TrafficJam
M
Events[0].EventBaseInfo.Action=Pulse
EG
Events[0].EventBaseInfo.Index=0
Events[0].RecNo=123
A
Events[0].Name=Door1
Di
Events[0].Type=Entry
Event Events[0].Status=1
st
Events[0].Method=1
rib
Events[0].CardNo=09DDAABB
Events[0].UserID=101
ut
…
io
--<boundary>
n
Content-Type: image/jpeg
s.r
--<boundary>
AI APIs 411
16.3.2.2 [Event] CitizenPictureCompare
Table 16-77
Usage Refer to "4.4.3 Subscribe to Snapshot"for how to subscribe event
Description When user trying to open the door, send this event.
[ Event Params ] ( key=value format )
Da
range[1, 100]
+Threshold integer O check threshold
2.
range[1, 100]
89
0 unknow
1 male
r1
2 female
00
9 not stated
}
M
effectiveness
+ImageInfo array<object> O Picture information, the first for the face cutout, the second
ut
AI APIs 412
++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)
Da
mber
+BuildingRoomN String O room number (for building products)
TT
umber
+PersonnelRelat String O relationship (for building products)
P
ionship
AP
1: Face acquisition
r1
2: visitor registration
3: Face permission distribution
00
1: without mask
Di
2: with mask
st
}
default 0.
rib
[ Example ]
ut
--<boundary>
Content-Type: text/plain
io
Content-Length: <length>
n
s.r
Events[0].EventBaseInfo.Code= CitizenPictureCompare
Event Events[0].EventBaseInfo.Action=Pulse
.o
Events[0].EventBaseInfo.Index=0
.
Events[0].UTC=1999999999
Events[0].CompareResult=true
Events[0].Similarity=80
Events[0].Threshold=75
AI APIs 413
…
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>
Table 16-78
URL http://<server>/cgi-bin/recordFinder.cgi?action=find&name=<RecordName>
TT
Method GET
Description Find AccessControl record.
P
name string R
"AccessControlCardRec".
2.
array<object
records R The records that returned.
>
A
+CardName string O Access user card name, max string length is 31.
rib
AI APIs 414
Open door method. It can be:
0: by password
1: by access card
+Method int R 2: by access card and then password
3: by password and then access card
6: by fingerprint
15: by face recognition
Da
+URL string O
not supported by access control device )
P
ture
O temperature unit:{
2.
0: centigrade
+TemperatureUn
89
integer 1: Fahrenheit
it
2: Kelvin
fo
}
r1
+CurrentTemper O
float current temperature
ature
00
O sex:{
0: unknow
A
1: male
+CitizenIDSex integer
Di
2: female
9: not stated
st
}
rib
+CitizenIDEthnic O
integer citizen ID ethnicity
ity
ut
+CitizenIDAddre O
string address
n
ss
s.r
+CitizenIDAutho O
string signing and issuing organization
rity
.o
AI APIs 415
Rec&StartTime=123456700&EndTime=123456800&condition.CardNo=12001&count=100
totalCount=1000
found=100
records[0].RecNo=12345
records[0].CreateTime=123456789
records[0].CardNo=12001
records[0].CardName=ZhangSan
Da
records[0].UserID=ZhangSan
records[0].Type=Entry
hu
records[0].Method=1
Response
…
aH
records[1].RecNo=13579
records[1].CreateTime=123456799
TT
records[1].CardNo=12001
P
records[1].CardName=ZhangSan
AP
records[1].UserID=ZhangSan
records[1].Type=Exit
IV
records[1].Method=1
…
2.
89
fo
r1
00
M
EG
A
Di
st
rib
ut
io
n
s.r
.o
.
AI APIs 416