Dahua HTTP API v2.63
Dahua HTTP API v2.63
hu
V2.63
2018-12-04
Cybersecurity Recommendations
Mandatory actions to be taken towards cybersecurity
1. Change Passwords and Use Strong Passwords:
The number one reason systems get "hacked" is due to having weak or default passwords. It is
recommended to change default passwords immediately and choose a strong password whenever
possible. A strong password should be made up of at least 8 characters and a combination of special
characters, numbers, and upper and lower case letters.
2. Update Firmware
Da
As is standard procedure in the tech-industry, we recommend keeping NVR, DVR, and IP camera
hu
firmware up-to-date to ensure the system is current with the latest security patches and fixes.
a
Regularly change the credentials to your devices to help ensure that only authorized users are able to
access the system.
AP
● Change default HTTP and TCP ports for systems. These are the two ports used to communicate and
fo
● These ports can be changed to any set of numbers between 1025-65535. Avoiding the default ports
We
reduces the risk of outsiders being able to guess which ports you are using.
st
3. Enable HTTPS/SSL:
Set up an SSL Certificate to enable HTTPS. This will encrypt all communication between your devices
Eu
and recorder.
ro
4. Enable IP Filter:
pe
Enabling your IP filter will prevent everyone, except those with specified IP addresses, from accessing
the system.
Te
On older IP Camera firmware, the ONVIF password does not change when you change the system's
hn
credentials. You will need to either update the camera's firmware to the latest revision or manually
ic
● Only forward the HTTP and TCP ports that you need to use. Do not forward a huge range of numbers
to the device. Do not DMZ the device's IP address.
● You do not need to forward any ports for individual cameras if they are all connected to a recorder on
site; just the NVR is needed.
7. Limit Features of Guest Accounts:
If your system is set up for multiple users, ensure that each user only has rights to features and functions
they need to use to perform their job.
8. UPnP:
Cybersecurity Recommendations I
● UPnP will automatically try to forward ports in your router or modem. Normally this would be a good
thing. However, if your system automatically forwards the ports and you leave the credentials defaulted,
you may end up with unwanted visitors.
● If you manually forwarded the HTTP and TCP ports in your router/modem, this feature should be
turned off regardless. Disabling UPnP is recommended when the function is not used in real
applications.
9. SNMP:
Disable SNMP if you are not using it. If you are using SNMP, you should do so only temporarily, for
tracing and testing purposes only.
10. Multicast:
Multicast is used to share video streams between two recorders. Currently there are no known issues
involving Multicast, but if you are not using this feature, deactivation can enhance your network security.
Da
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
a
accessed.
HT
Ideally, you want to prevent any unauthorized physical access to your system. The best way to achieve
this is to install the recorder in a lockbox, locking server rack, or in a room that is behind a lock and key.
AP
Cameras connected to the PoE ports on the back of an NVR are isolated from the outside world and
fo
The network your NVR and IP camera resides on should not be the same network as your public
st
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.
Eu
ro
pe
Te
c hn
ic
a l
Cybersecurity Recommendations II
Foreword
Purpose
Reader
Project managers
hu
Product managers
a
Safety Instructions
HT
TP
The following categorized signal words with defined meaning might appear in the Manual.
AP
result.
pe
TIPS Provides methods to help you solve a problem or save you time.
Te
to the text.
hn
ic
Revision History
a l
2 V2.60 Add find media file with TrafficCar info. September 12, 2018
Foreword III
As the device user or data controller, you might collect personal data of other such as face,
fingerprints, car plate number, Email address, phone number, GPS and so on. You need to be
in compliance with the local privacy protection laws and regulations to protect the legitimate
rights and interests of other people by implementing measures include but not limited to:
providing clear and visible identification to inform data subject the existence of surveillance
area and providing related contact.
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
Da
regions. For detailed information, see the paper manual, CD-ROM, QR code or our official
hu
website. If there is inconsistency between paper manual and the electronic version, the
electronic version shall prevail.
a
All the designs and software are subject to change without prior written notice. The product
HT
updates might cause some differences between the actual product and the Manual. Please
TP
contact the customer service for the latest program and supplementary documentation.
There still might be deviation in technical data, functions and operations description, or
AP
errors in print. If there is any doubt or dispute, please refer to our final explanation.
I
Upgrade the reader software or try other mainstream reader software if the Manual (in PDF
fo
All trademarks, registered trademarks and the company names in the Manual are the
We
Foreword IV
Table of Contents
Cybersecurity Recommendations ........................................................................................................... I
Foreword .................................................................................................................................................. III
1 Overview................................................................................................................................................. 1
2 References........................................................................................................................................... 2
3 Definitions ........................................................................................................................................... 3
3.1 Abbreviations................................................................................................................................. 3
3.2 Syntax Convention ........................................................................................................................ 3
Da
4 General APIs........................................................................................................................................ 7
HT
Table of Contents V
4.5.16 Auto Focus ...................................................................................................................... 34
4.5.17 Get Focus Status ............................................................................................................ 34
4.5.18 Get Coordinates of Current Window .............................................................................. 34
4.5.19 Set Coordinates of Current Window ............................................................................... 35
4.5.20 Video in Options ............................................................................................................. 35
4.5.21 Video Out ........................................................................................................................ 44
4.5.22 Smart Code ..................................................................................................................... 45
4.6 System ........................................................................................................................................ 46
4.6.1 General ............................................................................................................................. 46
4.6.2 Get Current Time .............................................................................................................. 47
4.6.3 Set Current Time............................................................................................................... 47
4.6.4 Locales.............................................................................................................................. 47
4.6.5 Get Language Capability .................................................................................................. 49
Da
Table of Contents VI
4.7.12 Alarm Server ................................................................................................................... 68
4.8 Motion Detection ......................................................................................................................... 69
4.8.1 Motion Detection Settings................................................................................................. 69
4.9 Event ........................................................................................................................................... 74
4.9.1 Event Handler ................................................................................................................... 74
4.9.2 Alarm Event ...................................................................................................................... 78
4.9.3 Alarm Out .......................................................................................................................... 79
4.9.4 Get Alarm Input Channels ................................................................................................ 80
4.9.5 Get Alarm Output Channels.............................................................................................. 80
4.9.6 Get States of Alarm Input Channels ................................................................................. 80
4.9.7 Get States of Alarm Output Channels .............................................................................. 81
4.9.8 Video Blind Event ............................................................................................................. 81
4.9.9 Video Loss Event .............................................................................................................. 82
Da
4.10 PTZ............................................................................................................................................ 95
4.10.1 PTZ Config ...................................................................................................................... 95
st
Table of Contents IX
10 Thermography and Radiometry APIs ............................................................................................ 182
10.1 Thermography Manager ......................................................................................................... 182
10.1.1 Get Capability of Thermography................................................................................... 182
10.1.2 Thermography Options ................................................................................................. 183
10.1.3 Get ExternSystem Information ..................................................................................... 185
10.1.4 Get Information of Preset Mode ................................................................................... 185
10.1.5 Get Optimized Region Information ............................................................................... 186
10.1.6 Enable Shutter .............................................................................................................. 186
10.1.7 Fix Focus ...................................................................................................................... 187
10.1.8 Do Flat Field Correction................................................................................................ 187
10.2 Radiometry .............................................................................................................................. 187
10.2.1 Get Capability of Radiometry........................................................................................ 187
10.2.2 Heat Image Thermometry............................................................................................. 188
Da
Table of Contents X
13.1.2 Create a Motion File Finder .......................................................................................... 213
13.1.3 Get the File Information Found by the Finder .............................................................. 214
13.1.4 Stop the Finder ............................................................................................................. 214
13.1.5 Get Bound Files ............................................................................................................ 215
13.2 BandLimit ................................................................................................................................ 215
13.2.1 Get Bandwidth Limit State ............................................................................................ 215
13.3 Record Files Protection........................................................................................................... 216
13.3.1 Add Protection .............................................................................................................. 216
13.3.2 Cancel Protection ......................................................................................................... 216
13.3.3 Remove Protection ....................................................................................................... 217
13.4 Get Daylight ............................................................................................................................ 217
14 Comm .............................................................................................................................................. 218
14.1 Coaxial Control IO................................................................................................................... 218
Da
Table of Contents XI
1 Overview
This document specifies the HTTP-based application programming interface of video products.
The HTTP-based interface provides the functionality for requesting snapshot and media stream,
controlling camera functions (for example, PTZ and focus), and getting and setting internal
parameter values.
The video products serve as a server. The client sends requests to server, and then server
handles requests and returns resources accordingly.
Da
hu
a
HT
TP
AP
I
fo
r
We
st
Eu
ro
pe
Te
c hn
ic
a l
Overview 1
[1].RFC 2616 Hypertext Transfer Protocol-HTTP/1.1
2 References
[2].RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax and Semantics
[3].RFC 2617 HTTP Authentication: Basic and Digest Access Authentication
[4].RFC 3986: Uniform Resource Identifiers (URI) Generic Syntax
Da
hu
a
HT
TP
AP
I
fo
r
We
st
Eu
ro
pe
Te
c hn
ic
a l
References 2
3 Definitions
3.1 Abbreviations
The following abbreviations are used throughout this document.
Application Programming Interface. In the document, it especially presents
API
application programming interface of video products.
In URL syntax and in descriptions of API parameters, text in italic within angle brackets
hu
denotes content that should be replaced with either a value or a string. When replacing the
a
text string, the angle brackets must also be replaced. For example, <server> in URL syntax
HT
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,
AP
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, ":", "/", "?", "@",
r
";", "=", "+", ",", "$", "&") within a name-value pair should be replaced with %< ASCII hex>.
We
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}"
Eu
"[]" following a string denotes an array. The index is an integer and starts from 0. For
pe
"O"means optional.
ic
a
protocol: URL scheme for the particular request. The http and https protocols are both
supported in this specification. So "http", as most of the APIs' default protocol except several
RTSP APIs, can be replaced by "https".
server: Server could be "hostname[: port] ". The hostname can be IP address or the fully
qualified domain name of an IP device. The port is the port number of server listening for TCP
connections. If the port is not given, the default port is assumed. For HTTP, the default port is
80. For HTTPS, the default port is 443.
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
Table 3-1
a
impossible to be satisfied.
I
403 Forbidden
service.
We
request.
The server encountered an unexpected condition
Eu
501 Not Implemented The server has not implemented the service.
pe
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
Te
"OK".
c hn
HTTP/1.1 200 OK
Server: xxx
a l
Content-Length: <length>
status.Focus=0.5
status.Zoom=0.5
…
Example: success respose with a word "OK"
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.
HTTP/1.1 400 Bad Request
Server: xxx
Content-Length: <length>
Error
Bad Request!
Da
Example: If the request fits with syntax but an error occurs while the server handles it, the
hu
Server: xxx
TP
Content-Length: <length>
AP
Error
I
3.5 Authentication
r
We
Video products support either basic authentication or digest authentication, see RFC 2617 for
st
detail. If the http request sent by client does not provide valid "Authorization" header information,
video products would return HTTP status code 401 and some information for authentication,
Eu
then client should calculate authentication information according RFC 2617, and sent request
ro
again with authentication information using “Authorization” header. Video products return the
pe
The client encodes the username and password with base64, and then sends it to server. A
l
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
hu
a
HT
TP
AP
I
fo
r
We
st
Eu
ro
pe
Te
c hn
ic
a l
Definitions 6
4 General APIs
The requests specified in this section are supported by all video products.
>&subtype=<typeNo>
hu
Example
rtsp://admin:admin@10.7.6.67:554/cam/realmonitor?channel=1&subtype=1
HT
Success
TP
Comment <typeNo>: the stream type. The <typeNo> of main stream is 0, extra stream 1 is 1, extra
st
stream 2 is 2. The extra stream counts can be obtained in "4.5.1 Get Max Extra Stream
Numbers". If the stream does not exist or not enabled, response will be error.
Eu
It also supplies basic authentication and digest authentication ways. The authentication
process is similar with "3.5 Authentication".
pe
Te
Table 4-2
ic
rtsp://<username>:<password>@<ip>:<port>/cam/playback?channel=<ChannelNo>
Syntax
a
&starttime=<starttime>&endtime=<endtime>
l
General APIs 7
Syntax rtsp://<username>:<password>@<ip>:<port>/<filename>
Description Get specific file stream.
rtsp://admin:admin@10.44.200.8:554//mnt/sd/2015-09-16/001/dav/20/20.32.08-20.32.
Example
28[M][0@0][0].dav
Success
media stream data
Return
It's similar with "4.1.1 Get Real-Time Stream".
Comment
filename: absolute path.
Method GET
hu
Example http://192.168.1.108/cgi-bin/mjpg/video.cgi or
http://192.168.1.108/cgi-bin/mjpg/video.cgi?channel=1&subtype=0
TP
For example:
HTTP Code: 200 OK
I
Body:
r
Success
--<boundary>
Return
We
Content-Type: image/jpeg
st
Content-Length:<image size>
Eu
--<boundary>
pe
ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
typeNo: the stream type, default 0 if not specified. It can be the following value:
Te
1-Extra Stream 1
hn
2-Extra Stream 2
ic
a
4.3 Audio
l
General APIs 8
Comment Above response means there are 2 audio input channels.
Table 4-7
HT
http://<server>/cgi-bin/audio.cgi?action=postAudio&<paramName>=<paramValue>[&
Syntax
<paramName>=<paramValue>…]
TP
Method POST
AP
is:
r
http://192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=
We
1
st
example:
POST /cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1 HTTP/1.1
Eu
Content-Type: Audio/G.711A
ro
Content-Length: 9999999
pe
<Audio data>
Te
<Audio data>
c hn
The URL of transmit a multipart, channel 1 audio stream(encoded with G.711 A-law) is:
a
http://192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=multipart&channel=
l
example:
POST /cgi-bin/audio.cgi?action=postAudio&httptype=multipart&channel=1 HTTP/1.1
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800
<Audio data>
--<boundary>
General APIs 9
Success
OK
Return
Parameters in URL:
Comment
The paramName and paramValue are in the table below.
MIME Description
hu
Audio/PCM PCM
a
Audio/ADPCM ADPCM
HT
Audio/G.726 G.726
AP
Audio/G.729 G.729
I
Audio/MPEG2 MPEG2
Audio/AMR AMR
fo
Audio/AAC AAC
r
We
Table 4-8
Eu
http://<server>/cgi-bin/audio.cgi?action=getAudio&<paramName>=<paramValue>[&<
ro
Syntax
paramName>=<paramValue>…]
pe
Method GET
Description Get audio.
Te
The URL of Request a single part, channel 1 audio stream(encoded with G.711 A-law)
hn
is:
ic
http://192.168.1.108/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=
a l
If the request was successful, the server returns a continuous flow of audio packets.
Example The content type is only set at the beginning of the connection.
Return:
HTTP Code: 200 OK
Content-Type: Audio/G.711A
Body:
<Audio data>
<Audio data>
General APIs 10
Example for multipart
The URL of Request a multipart, channel 1 audio stream(encoded with G.711 A-law) is:
http://192.168.1.108/cgi-bin/audio.cgi?action=getAudio&httptype=multipart&channel=1
If the request was successful, the server returns a continuous flow of audio packets.
The content type is "multipart/x-mixed-replace" and each audio packet ends with a
boundary string.
Return:
HTTP Code: 200 OK
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800
Da
hu
<Audio data>
--<boundary>
a
Success
HT
OK
Return
TP
Parameters in URL:
Comment
The paramName and paramValue are in the table below.
AP
I
Appendix:
fo
4.4 Snapshot
pe
4.4.1 Snap
Te
c hn
Table 4-9
a
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Snap
l
Method GET
Description Get snap config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Snap
table.Snap[0].HolidayEnable=false
table.Snap[0].TimeSection[0][0]=6 00:00:00-23:59:59
table.Snap[0].TimeSection[0][1]=0 00:00:00-23:59:59
Success table.Snap[0].TimeSection[0][2]=0 00:00:00-23:59:59
Return table.Snap[0].TimeSection[0][3]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[0][4]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[0][5]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[1][0]=6 00:00:00-23:59:59
General APIs 11
table.Snap[0].TimeSection[1][1]=0 00:00:00-23:59:59
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
table.Snap[0].TimeSection[1][4]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[1][5]=0 00:00:00-23:59:59
…
Response format:
table. Snap[channelNo].TimeSection[weekday][configNo]=1 00:00:00-23:59:59
channelNo: integer, array index starts from 0, which means video channel (equals to
Comment
video channel index -1, and so 0 means channel 1).
weekday: range is [0—6] (Sunday — Saturday).
configNo: the index of time section config. There are many time sections each day.
Set snap config
Da
Table 4-10
hu
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
a
Syntax
alue>[&<paramName>=<paramValue>…]
HT
Method GET
TP
Example
[0][0]=1%2012:00:00-18:00:00
I
Success
OK
fo
Return
r
In table below,
ch: integer, array index starts from 0, which means video channel (equals to video
We
Appendix:
pe
Saturday)
chn
General APIs 12
4.4.2 Get a Snapshot
Table 4-11
Syntax http://<server>/cgi-bin/ snapshot.cgi[?channel=<ChannelNo>]
Method GET
Description Get a snapshot of a video channel.
To get a snapshot of video channel 1, the URL can be
Example http://192.168.1.108/cgi-bin/snapshot.cgi or
http://192.168.1.108/cgi-bin/snapshot.cgi?channel=1
Success
Image of jpg format.
Return
Comment ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
Da
Table 4-12
HT
http://<server>/cgi-bin/snapManager.cgi?action=attachFileProc&Flags[0]=Event&Event
TP
Syntax s=[<eventCode>,<eventCode>...][&channel=<ChannelNo>][&heartbeat=<Heartbeat
>]
AP
Method GET
I
http://192.168.1.108/cgi-bin/snapManager.cgi?action=attachFileProc&Flags[0]=Event&
Example
r
Events=[VideoMotion%2CVideoLoss]&heartbeat=5
--<boundary>\r\n
We
Content-Type: text/plain\r\n
st
Events[0].Code=TrafficJunction
Events[0].CountInGroup=1
ro
Events[0].IndexInGroup=1
pe
Events[0].Lane=1
Events[0].Data.PTS= 42949485818.0
Te
Events[0].TrafficCar.PlateNumber=Z A12345
c hn
Events[0].TrafficCar. DeviceAddress=Hangzhou
Success ……
ic
Return Events[1].Code=TrafficJunction
a l
……
--<boundary>
Content-Type: image/jpeg
Content-Length:<image size>
<JPEG image data>
--<boundary>
Content-Type: text/plain
Content-Length:<data length>
Heartbeat
--<boundary>
General APIs 13
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
VideoLoss: video loss detection event
VideoBlind: video blind detection event.
AlarmLocal: alarm detection event.
TrafficJunction: vehicle passing event
TrafficRetrograde: retrograde event
TrafficParking: illegal parking event
Da
TrafficSuspiciousCar: when the vehicle is in the blacklist, it wiil produce this event.
I
Parameters in Response:
st
3, the IndexInGroup is 1,it means there are 3 pictures in this snapshot event, and this is
pe
Table 4-13
http://<server>/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStre
Syntax
am
Method GET
Description Get max extra stream count.
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 14
4.5.2 Video Color Config
Get video color config
Table 4-14
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor
Method GET
Description Get video color config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor
Success head. Brightness=50
Return head. Contrast=50
head. Hue=50
head. Saturation=50
Da
head= table.VideoColor[ChannelNo][ColorConfigNo]
ChannelNo: integer, array index starts from 0, which means video channel (equals to
HT
1 = Color Config 2
I
…
fo
Table 4-15
We
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
st
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Eu
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoColor[1][0].Brig
pe
Example
htness=50
Success
Te
OK
Return
c
hn
Appendix:
General APIs 15
ParamName ParamValue type Description
head.
integer Saturation
Saturation
Effective time for this video color config.
Format is: mask starttime endtime
Mask range is {0, 1}.
Mask 0 —this video config is not effective
Mask 1 —this config is effective
head.
string Starttime/Endtime format like 11:00:00.
TimeSection
Example:
0 01:00:00-02:00:00, means this config is not effective.
1 01:00:00-02:00:00, means this config is effective between
Da
Table 4-16
TP
Syntax http://<server>/cgi-bin/encode.cgi?action=getCaps
Method GET
AP
Example http://192.168.1.108/cgi-bin/encode.cgi?action=getCaps
fo
Success caps.PlaybackCompressSplitNumList[0]=1
r
Return caps.PlaybackCompressSplitNumList[1]=2
We
caps.PlaybackCompressSplitNumList[2]=4
st
caps.PreviewMode=SplitSnap
caps.VideoEncodeDevices[0].CoverAreaPercent=100
Eu
caps.VideoEncodeDevices[0].CoverCount=4
ro
caps.VideoEncodeDevices[0].LadenBitrate=162201600
pe
caps.VideoEncodeDevices[0].MaxCIFPFrameSize=40
caps.VideoEncodeDevices[0].MaxExtraStream=1
Te
caps.VideoEncodeDevices[0].MinCIFPFrameSize=7
c
caps.VideoEncodeDevices[0].RecordIndividualResolution=true
hn
caps.VideoEncodeDevices[0].SupportIndividualResolution=true
ic
caps.VideoEncodeDevices[0].TitleCount=4
a
Comment —
l
General APIs 16
headMain.Video.BitRateOptions=448,2560
headMain.Video.CompressionTypes=H.264,MJPG
headMain.Video.FPSMax=25
headMain.Video.ResolutionTypes=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
Success headExtra.Video.BitRateOptions=80,448
Return headExtra.Video.CompressionTypes=H.264,MJPG
headExtra.Video.FPSMax=25
headExtra.Video.ResolutionTypes=D1,CIF
headSnap.Video.CompressionTypes=H.264,MJPG
headSnap.Video.ResolutionTypes=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
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.
Da
config).
Parameters in Response:
a
headMain= caps[Channel].MainFormat[RecordType]
HT
headExtra = caps[Channel].ExtraFormat[ExtraStream]
TP
headSnap = caps[Channel].SnapFormat[SnapType]
AP
Channel: integer, array index starts from 0, which means video channel (equals to video
I
Comment
RecordType:
r
0 = regular record
We
ExtraStream:
Eu
0 = extra stream 1
ro
1 = extra stream 2
2 = extra stream 3
pe
SnapType:
Te
0 = regular snapshot
1 = motion detection snapshot
c hn
2 = alarm snapshot
ic
General APIs 17
Field in response Value range Description
To video, it contains all supported video compression types,
separated by comma. Range is {MPEG4, MPEG2, MPEG1,
MJPG, H.263, H.264, H.265}.
CompressionTypes string To audio, it contains all supported audio compression types,
separated by comma.
Range is {PCM, ADPCM, G.711A, G.711Mu, G.726, G.729,
MPEG2, AMR}
FPSMax integer Maximum FPS.
It contains all supported video resolutions.
ResolutionTypes string
Range is in below Resolution list.
—
hn
General APIs 18
Fixed Resolution Name Size in PAL Size in NTSC
"3M", "2048x1536" 2048 x 1536 (3 Mega Pixels) —
"5_0M", "2432x2048" 2432 x 2048 (5 Mega Pixels) —
"1_2M", "1216x1024" 1216 x 1024 (1.2 Mega Pixels) —
"1408x1024" 1408 x 1024 (1.5 Mega Pixels) —
"3296x2472" 3296 x 2472 (8 Mega Pixels) —
"5_1M", "2560x1920" 2560 x 1920 (5 Mega Pixels) —
"960H", 960 x 576 960 x 480
"DV720P" 960 x 720 —
"2560x1600" 2560 x 1600 (4 Mega Pixels) —
"2336x1752" 2336 x 1752 (4 Mega Pixels) —
"2592x2048" 2592 x 2048 —
"2448x2048" 2448 x 2048 —
Da
"1920x1440" 1920x1440 —
hu
"2752x2208" 2752x2208 —
a
"3840x2160" 3840x2160 —
HT
"4096x2160" 4096x2160 —
TP
"3072x2048" 3072x2048 —
Table 4-18
pe
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Encode
Te
Method GET
c
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Encode
ic
table.Encode[0].MainFormat[0].Audio.Bitrate=64
a
table.Encode[0].MainFormat[0].Audio.Channels[0]=0
l
table.Encode[0].MainFormat[0].Audio.Compression=G.711A
table.Encode[0].MainFormat[0].Audio.Depth=16
table.Encode[0].MainFormat[0].Audio.Frequency=8000
table.Encode[0].MainFormat[0].Audio.Mode=0
Success
table.Encode[0].MainFormat[0].Audio.Pack=DHAV
Return
table.Encode[0].MainFormat[0].AudioEnable=true
table.Encode[0].MainFormat[0].Video.resolution=1920x1080
table.Encode[0].MainFormat[0].Video.BitRate=4096
table.Encode[0].MainFormat[0].Video.BitRateControl=CBR
table.Encode[0].MainFormat[0].Video.Compression=H.264
table.Encode[0].MainFormat[0].Video.CustomResolutionName=1080P
General APIs 19
table.Encode[0].MainFormat[0].Video.FPS=18
table.Encode[0].MainFormat[0].Video.GOP=36
table.Encode[0].MainFormat[0].Video.Height=1080
table.Encode[0].MainFormat[0].Video.Pack=DHAV
table.Encode[0].MainFormat[0].Video.Profile=High
table.Encode[0].MainFormat[0].Video.Quality=4
table.Encode[0].MainFormat[0].Video.QualityRange=6
table.Encode[0].MainFormat[0].Video.SVCTLayer=1
table.Encode[0].MainFormat[0].Video.Width=1920
table.Encode[0].MainFormat[0].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
Da
table.Encode[0].MainFormat[1].Audio.Depth=16
hu
table.Encode[0].MainFormat[1].Audio.Frequency=8000
table.Encode[0].MainFormat[1].Audio.Mode=0
a
table.Encode[0].MainFormat[1].Audio.Pack=DHAV
HT
table.Encode[0].MainFormat[1].AudioEnable=true
TP
table.Encode[0].MainFormat[1].Video.resolution=1920x1080
table.Encode[0].MainFormat[1].Video.BitRate=4096
AP
table.Encode[0].MainFormat[1].Video.BitRateControl=CBR
I
table.Encode[0].MainFormat[1].Video.Compression=H.264
fo
table.Encode[0].MainFormat[1].Video.CustomResolutionName=1080P
r
table.Encode[0].MainFormat[1].Video.FPS=18
We
table.Encode[0].MainFormat[1].Video.GOP=36
table.Encode[0].MainFormat[1].Video.Height=1080
st
table.Encode[0].MainFormat[1].Video.Pack=DHAV
Eu
table.Encode[0].MainFormat[1].Video.Profile=High
table.Encode[0].MainFormat[1].Video.Quality=4
ro
table.Encode[0].MainFormat[1].Video.QualityRange=6
pe
table.Encode[0].MainFormat[1].Video.SVCTLayer=1
Te
table.Encode[0].MainFormat[1].Video.Width=1920
table.Encode[0].MainFormat[1].VideoEnable=true
c hn
table.Encode[0].MainFormat[2].Audio.Bitrate=64
ic
table.Encode[0].MainFormat[2].Audio.Channels[0]=0
table.Encode[0].MainFormat[2].Audio.Compression=G.711A
a l
table.Encode[0].MainFormat[2].Audio.Depth=16
table.Encode[0].MainFormat[2].Audio.Frequency=8000
table.Encode[0].MainFormat[2].Audio.Mode=0
table.Encode[0].MainFormat[2].Audio.Pack=DHAV
table.Encode[0].MainFormat[2].AudioEnable=true
table.Encode[0].MainFormat[2].Video.resolution=1920x1080
table.Encode[0].MainFormat[2].Video.BitRate=4096
table.Encode[0].MainFormat[2].Video.BitRateControl=CBR
table.Encode[0].MainFormat[2].Video.Compression=H.264
table.Encode[0].MainFormat[2].Video.CustomResolutionName=1080P
table.Encode[0].MainFormat[2].Video.FPS=18
General APIs 20
table.Encode[0].MainFormat[2].Video.GOP=36
table.Encode[0].MainFormat[2].Video.Height=1080
table.Encode[0].MainFormat[2].Video.Pack=DHAV
table.Encode[0].MainFormat[2].Video.Profile=High
table.Encode[0].MainFormat[2].Video.Quality=4
table.Encode[0].MainFormat[2].Video.QualityRange=6
table.Encode[0].MainFormat[2].Video.SVCTLayer=1
table.Encode[0].MainFormat[2].Video.Width=1920
table.Encode[0].MainFormat[2].VideoEnable=true
table.Encode[0].MainFormat[3].Audio.Bitrate=64
table.Encode[0].MainFormat[3].Audio.Channels[0]=0
table.Encode[0].MainFormat[3].Audio.Compression=G.711A
table.Encode[0].MainFormat[3].Audio.Depth=16
Da
table.Encode[0].MainFormat[3].Audio.Frequency=8000
hu
table.Encode[0].MainFormat[3].Audio.Mode=0
table.Encode[0].MainFormat[3].Audio.Pack=DHAV
a
table.Encode[0].MainFormat[3].AudioEnable=true
HT
table.Encode[0].MainFormat[3].Video.resolution=704x576
TP
table.Encode[0].MainFormat[3].Video.BitRate=2048
table.Encode[0].MainFormat[3].Video.BitRateControl=VBR
AP
table.Encode[0].MainFormat[3].Video.Compression=H.264
I
table.Encode[0].MainFormat[3].Video.FPS=25
fo
table.Encode[0].MainFormat[3].Video.GOP=50
r
table.Encode[0].MainFormat[3].Video.Height=576
We
table.Encode[0].MainFormat[3].Video.Pack=DHAV
table.Encode[0].MainFormat[3].Video.Profile=Main
st
table.Encode[0].MainFormat[3].Video.Quality=4
Eu
table.Encode[0].MainFormat[3].Video.QualityRange=6
table.Encode[0].MainFormat[3].Video.SVCTLayer=1
ro
table.Encode[0].MainFormat[3].Video.Width=704
pe
table.Encode[0].MainFormat[3].VideoEnable=true
Te
table.Encode[0].ExtraFormat[0].Audio.Bitrate=64
…
c hn
table.Encode[0].SnapFormat[0].Audio.Bitrate=64
ic
…
a
l
General APIs 21
Parameters in Response:
The format of the config is head.configItems. The head can be:
headMain= table. Encode[Channel].MainFormat[Type]
headSnap = table. Encode[Channel].SnapFormat[Type]
headExtra =table. Encode[Channel].ExtraFormat[ExtraStream]
Channel: integer, array index starts from 0, which means video channel (equals to video
channel index -1, and so 0 means channel 1).
Type:
Comment
0 = regular encode
1 = motion detection encode
2 = alarm encode
3= emergency encode
Da
ExtraStream:
hu
0 = extra stream 1
1 = extra stream 2
a
2 = extra stream 3
HT
Table 4-19
I
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
fo
alue>[&<paramName>=<paramValue>...]
Method GET
r
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Encode[1].MainForm
st
Example
at[0].Video.Compression=MPEG4&
Success
Eu
OK
Return
ro
Parameters in URL:
pe
In table below,
head=Encode[Channel].MainFormat[RecordType] (or)
Te
Encode[Channel].ExtraFormat[ExtraStream]
c hn
Channel: integer, array index starts from 0, which means video channel(equals to video
ic
Comment RecordType:
0 = regular record
1 = motion detection record
2 = alarm record
ExtraStream:
0 = extra stream 1
1 = extra stream 2
2 = extra stream 3
General APIs 22
ParamName ParamValue type Description
Unit is Kbps
head.Video.BitRate integer
Range depends on capability in GetVideoConfigCaps
Range is {CBR, VBR}
head.Video.BitRateControl string CBR: constant bitrates
VBR: variable bitrates
Range is {MPEG4, MPEG2, MPEG1, MJPG, H.263,
head.Video.Compression String H.264, H.265}
Depends on capacity in GetVideoConfigCaps
Range is [0.2—30].
Frames per second.
<1.0: several seconds/frame, FPS=0.3333: 3 seconds
head.Video.FPS float
per frame.
Da
second.
a
Range is [1—100].
Group of picture, it's the interval of I Frame,
HT
head.Video.GOP integer
Example: GOP=50, means there is one I frame every
TP
49 P or B frames
AP
head.Video.Profile String
Only when video compression is H.264, it's effective.
r
Range is [1—6].
We
6: best quality
ro
Unit is kbps
hn
GetAudioConfigCaps
a
head.Audio.Compression string
GetAudioConfigCaps
head.Audio.Depth integer Audio sampling depth
head.Audio.Frequency integer Audio sampling frequency
General APIs 23
ParamName ParamValue type Description
Range is {0,1,2,3,4,5,6,7}
Audio encode mode.
0: 4.75kbps,
1: 5.15 kbps,
2: 5.9 kbps,
head.Audio.Mode integer
3: 6.7 kbps,
4: 7.4 kbps,
5: 7.95 kbps,
6: 10.2 kbps,
7: 12.2 kbps,
head.AudioEnable bool Enable/Disable audio
Da
Table 4-20
TP
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoEncodeROI
Method GET
AP
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoEncode
Example
fo
ROI
r
Success
head.DynamicTrack=false
Return
We
Parameters in Response:
st
head=table.VideoEncodeROI[ChannelNo]
Comment
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Eu
Table 4-21
Te
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
c
alue>[&<paramName>=<paramValue>…]
hn
Method GET
ic
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoEncodeROI[0].
l
Example
DynamicTrack=true
Success
OK
Return
Parameters in URL:
paramName and paramValue are as table below.
In table below,
Comment
head = VideoEncodeROI[ChannelNo]
ChannelNo: integer, array index starts from 0, which means video channel(equals to
video channel index -1, and so 0 means channel 1).
Appendix:
General APIs 24
ParamName ParamValue type Description
head. DynamicTrack bool Enable/Disable
Table 4-22
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ChannelTitle
Method GET
Description Get the title of the video channel.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ChannelTitle
Success
table.ChannelTitle[Channel].Name=CAM1|123
Da
Return
hu
Parameters in Response:
Channel: integer, array index starts from 0, which means video channel (equals to
a
Comment
video channel index -1, and so 0 means channel 1).
HT
Name: string, which means title content. character '|' means newlines.
TP
Table 4-23
I
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>
fo
Method GET
r
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ChannelTitle[1].Nam
st
Example
e= test1|test2
Success
Eu
OK
Return
ro
video frames.
Please refer to SetVideoWidgetConfig.
Te
c
Parameters in URL:
hn
Comment
ChannelTitle[Channel].Name
a
Channel: integer, array index starts from 0, which means video channel(equals to video
l
General APIs 25
Description Get the video input channel numbers.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCollect
Success
result=1
Return
Comment —
Success result=2
hu
Return
a
Comment —
HT
Table 4-26
I
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxRemoteI
nputChannels
fo
Method GET
r
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxRe
st
moteInputChannels
Success table.MaxRemoteInputChannels=16
Eu
Return
ro
Table 4-27
a
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoStandard
l
Method GET
Description Get video standard config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoStandar
d
Success table.VideoStandard=PAL
Return
Comment —
Set video standard
Table 4-28
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&VideoStandard=<paramV
General APIs 26
alue>
Method GET
Description Set video standard config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoStandard=PAL
Success OK
Return
Comment VideoStandard: string, range is {PAL, NTSC} Video Standard.
Table 4-29
Da
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget
Method GET
hu
Description Video widget config contains Channel Title, User-defined Title, Covers and Time Title
a
parameters, defines the background color, front color and positions of channel title and
HT
time title, User-defined title and defines the regions which are not visible (cover).
TP
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget
Success head.BackColor[0]=0
AP
Return head.BackColor[1]=0
I
head.BackColor[2]=0
fo
head.BackColor[3]=128
r
head.EncodeBlend=true
head.FrontColor[0]=255
We
head.FrontColor[1]=255
st
head.FrontColor[2]=255
Eu
head.FrontColor[3]=0
head.Rect[0]=0
ro
head.Rect[1]=8191
pe
head.Rect[2]=0
head.Rect[3]=8191
Te
…
c hn
table.VideoWidget[Channel].Covers[CoReg] (or)
a l
table.VideoWidget[Channel].TimeTitle
table.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, Covers is an array which sustains multi- Cover regions
0 = region 1
1 = region 2
2 = region 3
3 = region 4
Index: integer, User-defined title index, now only index 0 is valid, others are reserved.
General APIs 27
Set video widget config
Table 4-30
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video widget config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[1].Cov
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
Success
OK
Return
Parameters in URL:
In table below,
Da
headChannelTitle = VideoWidget[Channel].ChannelTitle
hu
headCover = VideoWidget[Channel].Covers[CoReg]
a
headTimeTitle = VideoWidget[Channel].TimeTitle
HT
headUserDefinedTitle = VideoWidget[Channel].UserDefinedTitle[Index]
TP
Comment Channel: integer, array index starts from 0, which means video channel(equals to video
AP
CoReg: Cover region index. Covers is an array which contains multiple cover regions
fo
0 = region 1
1 = region 2
r
2 = region 3
We
3 = region 4
st
Index: integer, User-defined title index, now only index 0 is valid, others are reserved.
Eu
Appendix:
ro
Range is [0—255].
headCover.BackColor[0]
BackColor[0]:red value
Te
headCover.BackColor[1]
integer BackColor[1]:green value
c
headCover.BackColor[2]
hn
BackColor[2]:blue value
headCover.BackColor[3]
BackColor[3]: alpha value
ic
Range is [0—255].
headCover.FrontColor[0]
FrontColor[0]:red value
headCover.FrontColor[1]
integer FrontColor[1]:green value
headCover.FrontColor[2]
FrontColor[2]:blue value
headCover.FrontColor[3]
FrontColor[3]: alpha value
Range is [0—8191].
headCover.Rect[0] Rect[0]: top left corner x coordinate (left)
headCover.Rect[1] Rect[1]: top left corner y coordinate (top)
integer
headCover.Rect[2] Rect[2]: bottom right x coordinate (right)
headCover.Rect[3] Rect[3]: bottom right y coordinate
(bottom)
General APIs 28
ParamName ParamValue type Description
headChannelTitle.BackColor[0]
headChannelTitle.BackColor[1]
integer
headChannelTitle.BackColor[2]
headChannelTitle.BackColor[3]
headChannelTitle.EncodeBlend bool Range is the same with headCover.
headChannelTitle.FrontColor[0]
headChannelTitle.FrontColor[1]
integer
headChannelTitle.FrontColor[2]
headChannelTitle.FrontColor[3]
Only use the value of (left, top),the value
headChannelTitle.Rect[0]
of (right, bottom) is the same as (left, top)
headChannelTitle.Rect[1]
integer Rect[0], Rect[1] are used, and Rect[2]
headChannelTitle.Rect[2]
Da
headUserDefinedTitle.BackColor[0] headChannelTitle
headUserDefinedTitle.BackColor[1] These are configs about User-defined
I
integer
headUserDefinedTitle.BackColor[2] title.
fo
headUserDefinedTitle.BackColor[3]
r
headUserDefinedTitle.EncodeBlend bool
We
headUserDefinedTitle.FrontColor[0]
st
headUserDefinedTitle.FrontColor[1]
integer
headUserDefinedTitle.FrontColor[2]
Eu
headUserDefinedTitle.FrontColor[3]
ro
headUserDefinedTitle.Rect[0]
pe
headUserDefinedTitle.Rect[1]
integer
headUserDefinedTitle.Rect[2]
Te
headUserDefinedTitle.Rect[3]
c
headTimeTitle.BackColor[0]
hn
headTimeTitle.BackColor[1]
integer
ic
headTimeTitle.BackColor[2]
a
headTimeTitle.BackColor[3]
l
headTimeTitle.EncodeBlend bool
headTimeTitle.FrontColor[0] Range is the same with
headTimeTitle.FrontColor[1] headChannelTitle.
integer
headTimeTitle.FrontColor[2] These are configs about time title.
headTimeTitle.FrontColor[3]
headTimeTitle.Rect[0]
headTimeTitle.Rect[1]
integer
headTimeTitle.Rect[2]
headTimeTitle.Rect[3]
headTimeTitle.ShowWeek bool True: Display week within the time title.
General APIs 29
4.5.13 Get Video Input Capability
Table 4-31
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=getCaps&channel=<ChannelNo>
Method GET
Description Get video input capabilities.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCaps&channel=1
caps. AutoSyncPhase=false
caps. Backlight=2
caps. BrightnessCompensation=true
caps. ChipID=0
caps. CoverCount=4
caps. CoverType=1
Da
caps. CustomManualExposure=true
hu
caps. DayNightColor=true
a
caps. DayNightColorIO=0
HT
caps. DoubleExposure=0
TP
caps. DownScaling=false
caps. EEModeRange=100
AP
caps. ElectricFocus=false
I
caps. Exposure=16
fo
caps. ExposureMode=31
caps. ExternalSyncInput=0
r
caps. FishEye=false
We
caps. FlashAdjust=false
st
caps. Flip=true
Success
caps. FormatCount=5
Eu
Return
caps. Gain=true
ro
caps. GainAuto=true
pe
caps. Gamma=true
caps. GammaModeRange=100
Te
caps. GlareInhibition=1
c
caps. HorizontalBinning=0
hn
caps. IRCUT=true
ic
caps. ImageEnhancement.LevelRange[0]=0
a
caps. ImageEnhancement.LevelRange[1]=100
l
caps. ImageEnhancement.Support=true
caps. InfraRed=true
caps. Iris=true
caps. IrisAuto=true
caps. LadenBitrate=972000
caps. LimitedAutoExposure=true
caps. MaxExposureTime=300
caps. MaxExposureTime1=0
caps. MaxHeight=1080
caps. MaxMultiProfile=3
General APIs 30
caps. MaxWidth=1920
caps. MeteringRegionCount=0
caps. MinExposureTime=1
caps. MinExposureTime1=0
caps. Mirror=true
caps. MultiOptions=false
caps. NightOptions=true
caps. ReferenceLevel=false
caps. Rotate90=true
caps. SetColor=true
caps. SignalFormats=Inside
caps. SignalType[0]=VGA
caps. SnapshotExposure=false
Da
caps. SupportProfile=false
hu
caps. SupportWhiteLevel=true
caps. SupportWriteLevel=false
a
caps. SyncChipChannels=false
HT
caps. SyncFocus=0
TP
caps. TitleCount=4
caps. TridimDenoise=2
AP
caps. TridimDenoiseDetails=0
I
caps. UTC=0
fo
caps. UpScaling=false
r
caps. Version=0
We
caps. VerticalBinning=0
caps. VideoInDenoise.2D.LevelRange[0]=0
st
caps. VideoInDenoise.2D.LevelRange[1]=100
Eu
caps. VideoInDenoise.2D.Support=true
caps. VideoInDenoise.3D.3DAutoType.ModRange[0]=0
ro
caps. VideoInDenoise.3D.3DAutoType.ModRange[1]=100
pe
caps. VideoInDenoise.3D.Support=true
Te
caps. VideoInDenoise.Support=true
caps. WhiteBalance=3
chn
caps. WideDynamicRange=1
ic
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
a
Comment
l
Parameters in Response:
see table below
Appendix:
General APIs 31
Field in response Value type Description
CustomManualExposur
bool, true: support use defined manual exposure time
e
DayNightColor bool true: support color alternate between day and night.
DownScaling bool true: support down scaling, binning mode not included.
Exposure integer Exposure grade. 0 — don't support exposure control.
ExternalSyncInput bool true: support HD signal external synchronization.
FlashAdjust bool true: support flash adjust
Flip bool true: support picture flip.
Gain bool true: support gain control.
GainAuto bool true: support auto gain.
HorizontalBinning integer Horizontal/Vertical pixel binning mask,
1 — support 2 pixel binning,
Da
…
HT
Unit is Kbps.
LadenBitrate integer Maximum value of video stream bitrates, 16bpp, not in
fo
binning mode.
r
General APIs 32
Field in response Value type Description
Range is {0, 1, 2, 3}
0: don't support white balance.
1: support auto white balance
WhiteBalance integer
2: support auto and pre defined white balance.
3: support auto, pre defined and user defined white
balance
Method GET
hu
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.5&zoom=
Example
-0.5
HT
Success
TP
OK
Return
AP
Parameters in URL:
focusNo : float, the range is between 0 and 1; -1 means reset to position 0.
I
Comment
zoomNo : float, the range is between 0 and 1; -1 means reset to position 0.
fo
Table 4-33
Eu
http://<server>/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=<fo
Syntax
ro
cusNo>&zoom=<zoomNo>[&channel=<ChannelNo>]
pe
Method GET
Description Adjust magnification and the focus continuously.
Te
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus
hn
=0.02&zoom=-1
ic
Example
and when the motor is moving, we send below command to let it stop:
a
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus
l
=0&zoom=-1
Success
OK
Return
General APIs 33
Parameters in URL:
focusNo: float, the range is -1 < focus < 1; 0 means stop.
zoomNo: float, the range is -1 < zoom < 1; 0 means stop.
ChannelNo: integer, video channel index which starts from 1.
The value means the moving speed of motor lens, positive value means move forwards,
Comment
negative value means move backwards.
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"
parameter as 0 to stop it immediately.
In this command, when you adjust the focus parameter, the zoom parameter should be
-1, and the focus parameter should be -1 when adjust the zoom parameter.
Da
Table 4-34
a
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=autoFocus[&channel=<ChannelNo>]
HT
Method GET
TP
Success
I
OK
Return
fo
Parameters in URL:
r
Comment
ChannelNo: integer, video channel index which starts from 1.
We
st
Table 4-35
ro
http://<server>/cgi-bin/devVideoInput.cgi?action=getFocusStatus[&channel=<Channel
Syntax
pe
No>]
Method GET
Te
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getFocusStatus
hn
status.Focus=0.5
ic
Success
status.Zoom=0.5
Return
a
status.Status=Normal
l
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
Comment Parameters in Response:
The range of status.Status is "Normal" and "Autofocus". This command must be
continual executed until status.Status is "Normal".
General APIs 34
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
Return rect[2]=5000
rect[3]=5000
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
Comment Parameters in Response:
rect[n] : 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
Da
Table 4-37
http://<server>/cgi-bin/devVideoInput.cgi?action=setCurrentWindow&channel=<Chann
HT
Syntax
elNo>&rect[0]=<rect0>&rect[1]=<rect1>&rect[2]=<rect2>&rect[3]=<rect3>
TP
Method GET
AP
Example
rect[0]=0&rect[1]=0&rect[2]=5000&rect[3]=5000
fo
Success
r
OK
Return
We
Parameters in URL:
st
Table 4-38
ic
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions
Method GET
a l
General APIs 35
head. FlashControl.Mode=0
head. FlashControl.Pole=0
head. FlashControl.Value=0
head. FlashControl.PreValue=0
head. Flip=false
head. Gain=50
head. GainAuto=true
head. IrisAuto=false
head. Mirror=false
head. NightOptions.AntiFlicker=0
head. NightOptions.Backlight=0
head. NightOptions.BacklightRegion[0]=3096
head. NightOptions.BacklightRegion[1]=3096
Da
head. NightOptions.BacklightRegion[2]=5096
hu
head. NightOptions.BacklightRegion[3]=5096
head. NightOptions.BrightnessThreshold=50
a
head. NightOptions.DayNightColor=2
HT
head. NightOptions.ExposureMode=0
TP
head. NightOptions.ExposureSpeed=0
head. NightOptions.ExposureValue1=0
AP
head. NightOptions.ExposureValue2=40
I
head. NightOptions.ExternalSyncPhase=125
fo
head. NightOptions.Flip=false
r
head. NightOptions.Gain=50
We
head. NightOptions.GainAuto=true
head. NightOptions.GainBlue=50
st
head. NightOptions.GainGreen=50
Eu
head. NightOptions.GainMax=50
head. NightOptions.GainMin=0
ro
head. NightOptions.GainRed=50
pe
head. NightOptions.GlareInhibition=0
Te
head. NightOptions.IrisAuto=true
head. NightOptions.Mirror=false
c
hn
head. NightOptions.Profile=3
ic
head. NightOptions.ReferenceLevel=50
head. NightOptions.Rotate90=0
a l
head. NightOptions.SunriseHour=0
head. NightOptions.SunriseMinute=0
head. NightOptions.SunriseSecond=0
head. NightOptions.SunsetHour=23
head. NightOptions.SunsetMinute=59
head. NightOptions.SunsetSecond=59
head. NightOptions.SwitchMode=4
head. NightOptions.WhiteBalance=Auto
head. NightOptions.WideDynamicRange=0
head. NightOptions.WideDynamicRangeMode=0
head. NormalOptions.AntiFlicker=0
General APIs 36
head. NormalOptions.Backlight=0
head. NormalOptions.BacklightRegion[0]=3096
head. NormalOptions.BacklightRegion[1]=3096
head. NormalOptions.BacklightRegion[2]=5096
head. NormalOptions.BacklightRegion[3]=5096
head. NormalOptions.BrightnessThreshold=50
head. NormalOptions.DayNightColor=1
head. NormalOptions.ExposureMode=0
head. NormalOptions.ExposureSpeed=0
head. NormalOptions.ExposureValue1=0
head. NormalOptions.ExposureValue2=40
head. NormalOptions.ExternalSyncPhase=125
head. NormalOptions.Flip=false
Da
head. NormalOptions.Gain=50
hu
head. NormalOptions.GainAuto=true
head. NormalOptions.GainBlue=50
a
head. NormalOptions.GainGreen=50
HT
head. NormalOptions.GainMax=50
TP
head. NormalOptions.GainMin=0
head. NormalOptions.GainRed=50
AP
head. NormalOptions.GlareInhibition=0
I
head. NormalOptions.IrisAuto=true
fo
head. NormalOptions.Mirror=false
r
head. NormalOptions.Profile=0
We
head. NormalOptions.ReferenceLevel=50
head. NormalOptions.Rotate90=0
st
head. NormalOptions.SunriseHour=0
Eu
head. NormalOptions.SunriseMinute=0
head. NormalOptions.SunriseSecond=0
ro
head. NormalOptions.SunsetHour=23
pe
head. NormalOptions.SunsetMinute=59
Te
head. NormalOptions.SunsetSecond=59
head. NormalOptions.SwitchMode=0
c hn
head. ReferenceLevel=50
ic
head. ReferenceLevelEnable=false
head. Rotate90=0
a l
head. SignalFormat=BT656
head. WhiteBalance=Disable
Parameters in Response:
head = table.VideoInOptions[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).
Set video in options
Table 4-39
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
General APIs 37
Method GET
Set video in options config, such as Backlight, ExposureSpeed, DayNightColor,
Description
DayOptions, NightOptions, and NormalOptions.
Set Auto Exposure:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].E
xposureMode=0&VideoInOptions[0].ExposureSpeed=0
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].E
hu
xposureMode=2&VideoInOptions[0].ExposureSpeed=0&VideoInOptions[0].GainMin=0
a
&VideoInOptions[0].GainMax=50&VideoInOptions[0].ExposureValue1=0&VideoInOptio
ns[0].ExposureValue2=20
HT
TP
Set Manual:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].E
AP
xposureMode=4&VideoInOptions[0].ExposureSpeed=32&VideoInOptions[0].GainMin=
I
0&VideoInOptions[0].GainMax=50&VideoInOptions[0].ExposureValue1=40&VideoInOp
fo
tions[0].ExposureValue2=40
r
We
Set SmartIRExposure:
Example
st
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].S
martIRExposure=true
Eu
ro
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].Fli
Te
p=true
Mirror:
c hn
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].Mi
ic
rror=true
Or turn 90°:
a l
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].R
otate90=1
General APIs 38
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].W
hiteBalance=Custom )
Success
OK
Return
Parameters in URL:
In table below, head =VideoInOptions[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).
Appendix:
GetVideoInputCaps
hu
1: backlight grade 1
...
HT
n - backlight grade n
TP
Range is {0,1,2}
AP
0: always multicolor
head. DayNightColor integer
1: autoswitch along with brightness,
I
2: always monochrome
fo
Range is {0,1,2, 4}
r
0: AutoExposure
We
2: Exposure first
4: Manual.
Eu
Range is [0 — n+1]
ro
n depends on capability in
pe
GetVideoInputCaps
0: AutoExposure
head. ExposureSpeed integer
Te
General APIs 39
ParamName ParamValue type Description
Range is [0°—360°]
head. ExternalSyncPhase integer
External Synchronous Signal Phase
head. SmartIRExposure bool true: enable, false: disable
Range is {0,1,2}
0: forbid flash
head. FlashControl.Mode integer
1: always flash
2: auto flash
Range is {0,1, 2, 3}
Trigger mode:
0: low level
head. FlashControl.Pole integer
1: high level
2: rising-edge
Da
3: falling-edge
hu
Range is [0—15]
a
Flashlight time-unit:
0: 0us,
HT
1: 64us,
TP
…
I
15 - 960us
fo
Range is [0—100]
r
work.
true: enable video flip function
head. Flip bool
Eu
Range is [0—100]
pe
head. Gain integer If GainAuto is true, it's upper limit of auto gain,
else it's the fixed gain adjust value.
Te
Range is [0—100]
c
head. GainBlue integer Gain for blue value, Value is effective when
hn
WhiteBalance is "Custom."
ic
Range is [0—100]
a
head. GainRed integer Gain for red value, Value is effective when
l
WhiteBalance is "Custom."
Range is [0—100]
head. GainGreen integer Gain for green value, Value is effective when
WhiteBalance is "Custom."
true: GainAuto
head. GainAuto bool
false: No GainAuto
true: IrisAuto
head. IrisAuto bool
false: No IrisAuto
true: enable video mirror function
head. Mirror bool
false: disable video mirror function
General APIs 40
ParamName ParamValue type Description
White balance Mode.
Range is {Disable, Auto, Custom, Sunny,
Cloudy, Home, Office, Night}
Some IPC supports common modes:
"Disable", "Auto", "Sunny", "Night", "Outdoor",
head. WhiteBalance String "Custom"
Sometimes the device support other
advanced modes:
"CustomColorTemperature", "Indoor", "ATW",
"Manual", "AutoOutdoor", "ManualDatum" and
so on.
Range is [0—100]
Da
video frames.
a
Range is {0,1,2}
Video rotation:
HT
Range is {0,1,2}
We
AntiFlicker mode:
st
2: 60 Hz AntiFlicker
ro
Range is [0—100]
pe
head.
Range is [0—100]
NightOptions.BrightnessThre integer
ic
Nightoptions.
true: IrisAuto
head. NightOptions.IrisAuto bool
false: No IrisAuto
head. Range is [00—23]
integer
NightOptions.SunriseHour Sunrise hour.
head. Range is [00—59]
integer
NightOptions.SunriseMinute Sunrise minute
head. Range is [00—59]
integer
NightOptions.SunriseSecond Sunrise second
head. Sunset time. Its range is same with sunrise
integer
NightOptions.SunsetHour time, and it should be after sunrise time.
General APIs 41
ParamName ParamValue type Description
head. NightOptions are used if time is after sunset
integer
NightOptions.SunsetMinute time and before sunrise time.
head.
integer
NightOptions.SunsetSecond
Range is {0,1,2}
0: NoSwitch, always use day options.
1: Switch depends on brightness.
head. 2: Switch depends on time, switch to
integer
NightOptions.SwitchMode NightOptions when time is after sunset time
and before sunrise.
3: NoSwitch, always use NightOptions.
4: No switch, always use NormalOptions.
Da
Range is {0,1,2,3}
hu
3: depends on
TP
head.NightOptions.SwitchMode
head.
AP
integer
NightOptions.ExposureSpeed
I
head.
fo
NightOptions.ExposureValue float
r
1
We
head.
st
NightOptions.ExposureValue float
2
Eu
NightOptions.GainGreen Example:
c
String
NightOptions.WhiteBalance same with head. ExposureSpeed.
a
head.
l
integer
NightOptions.ReferenceLevel
head.
NightOptions.ExternalSyncP integer
hase
head.
integer
NightOptions.AntiFlicker
head. NightOptions.Backlight integer
head.
integer
NightOptions.DayNightColor
General APIs 42
ParamName ParamValue type Description
head.
integer
NightOptions.ExposureMode
head.
integer
NightOptions.GlareInhibition
head. NightOptions.Mirror integer
head. NightOptions.Flip integer
head. NightOptions.Rotate90 integer
head.
NomalOptions.BrightnessThr integer
eshold
head.
bool
NormalOptions.IrisAuto
Da
head.
integer
hu
NormalOptions.SunriseHour
a
head.
HT
NormalOptions.SunriseMinut integer
e
TP
head.
AP
NormalOptions.SunriseSeco integer
nd
I
head.
fo
integer
NormalOptions.SunsetHour
r
head.
We
integer
NormalOptions.SunsetMinute
st
NormalOptions.ExposureSpe integer
ed
Te
head.
c
NormalOptions.ExposureValu float
hn
e1
ic
head.
a
NormalOptions.ExposureValu float
l
e2
head. NormalOptions.Gain integer
head.
bool
NormalOptions.GainAuto
head.
integer
NormalOptions.GainBlue
head.
integer
NormalOptions.GainGreen
head.
integer
NormalOptions.GainRed
General APIs 43
ParamName ParamValue type Description
head.
String
NormalOptions.WhiteBalance
head.
NormalOptions.ReferenceLe integer
vel
head.
NormalOptions.ExternalSync integer
Phase
head.
integer
NormalOptions.AntiFlicker
head.
integer
NormalOptions.Backlight
Da
head.
hu
NormalOptions.DayNightColo integer
a
r
HT
head.
NormalOptions.ExposureMod integer
TP
e
AP
head.
NormalOptions.GlareInhibitio integer
I
n
fo
head.
integer
st
NormalOptions.Rotate90
Eu
Table 4-40
Te
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoOut
c
hn
Method GET
ic
head.Margin[0]=0
head.Margin[1]=0
head.Margin[2]=0
head.Margin[3]=0
head.Color.Brightness=50
Success
head.Color. Contrast =50
Return
head.Color. Satuation =50
head.Color. Hue =50
head.Mode. Width =800
head.Mode. Height=600
head.Mode. BPP =16
General APIs 44
head.Mode. Format ="Auto"
head.Mode. RefreshRate =60
…
Parameters in Response:
head = table.VideoOut[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).
Set video out config
Table 4-41
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video out config.
Da
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&table.VideoOut[1].Co
hu
Example
lor.Brightness=50
a
Success
HT
OK
Return
TP
Parameters in URL:
In table below,
AP
ChannelNo: integer, array index starts from 0, which means video channel (equals to
fo
Appendix:
We
head. Margin[0]
Eu
head. Margin[1]
integer Margin.
head. Margin[2]
ro
head. Margin[3]
pe
Table 4-42
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=SmartEncode
Method GET
General APIs 45
Description Get smart code config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=SmartEncode
Success head.Enbale=false
Return head.Extra[0]=false
Parameters in Response:
head = table.SmartEncode[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).
Set Smart Code config
Table 4-43
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Da
Method GET
Description Set smart code config.
hu
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&SmartEncode[0].Enb
a
Example
ale=true
HT
Success
OK
TP
Return
Parameters in URL:
AP
In table below,
I
ChannelNo: integer, array index starts from 0, which means video channel(equals to
r
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.
ro
pe
4.6 System
Te
c
4.6.1 General
hn
ic
Table 4-44
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=General
Method GET
Description Get general config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=General
table.General.MachineName=Test001
Success table.General.LocalNo=8
Return table.General.MachineAddress="binjiangqv jiangnandadao weiyelu"
table.General.MachineGroup="jiaojing yidui
Comment —
Set general config
General APIs 46
Table 4-45
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set general config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&General.MachineNa
Example
me=MyIPC
Success
OK
Return
Comment —
Appendix:
Table 4-46
Syntax http://<server>/cgi-bin/global.cgi?action=getCurrentTime
fo
Method GET
r
Example http://192.168.1.108/cgi-bin/global.cgi?action=getCurrentTime
st
Success
result = 2011-7-3 21:02:32
Return
Eu
The time format is "Y-M-D H-m-S". It's not be effected by Locales. TimeFormat in
ro
Comment
SetLocalesConfig.
pe
Table 4-47
hn
Syntax http://<server>/cgi-bin/global.cgi?action=setCurrentTime&time=2011-7-3%2021:02:32
ic
Method GET
a l
4.6.4 Locales
Get locales config
General APIs 47
Table 4-48
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Locales
Method GET
Description Get locales config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Locales
table.Locales.DSTEnable=false
table.Locales.DSTEnd.Day=1
table.Locales.DSTEnd.Hour=0
table.Locales.DSTEnd.Minute=0
table.Locales.DSTEnd.Month=1
table.Locales.DSTEnd.Week=2
Success table.Locales.DSTEnd.Year=2011
Return table.Locales.DSTStart.Day=0
Da
table.Locales.DSTStart.Hour=0
hu
table.Locales.DSTStart.Minute=0
a
table.Locales.DSTStart.Month=1
table.Locales.DSTStart.Week=1
HT
table.Locales.DSTStart.Year=2011
TP
table.Locales.TimeFormat=yyyy-MM-dd HH:mm:ss
Comment —
AP
Table 4-49
r
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
We
Method GET
st
Example
=false
ro
Success
pe
OK
Return
Comment —
Te
c
Appendix:
hn
ic
General APIs 48
ParamName ParamValue type Description
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.
Locales.DSTEnd.Year Integer Range is [2000-2038]
Locales.DSTStart.Day
Locales.DSTStart.Hour
Range is the same with items in Locales.DSTEnd.
Locales.DSTStart.Minute
Integer Locales.DSTStart table and Locales.DSTEnd table
Locales.DSTStart.Month
define the time range of DST.
Locales.DSTStart.Week
Locales.DSTStart.Year
Da
Example:
pe
yyyy-MM-dd HH:mm:ss or
MM-dd-yyyy HH:mm:ss or
Te
dd-M-yy hh:mm:ss
c hn
Table 4-50
l
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getLanguageCaps
Method GET
Description Get the list of supported languages.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getLanguageCaps
Success
Languages=SimpChinese,English,French
Return
response is a string contains languages with comma separated.
Languages include
Comment
{English, SimpChinese, TradChinese, Italian, Spanish, Japanese, Russian, French,
German}
General APIs 49
4.6.6 Language
Get language config
Table 4-51
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Language
Method GET
Description Get system language config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Language
Success
table.Language=SimpChinese
Return
Comment —
Set language config
Da
Table 4-52
hu
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
a
Syntax
alue>[&<paramName>=<paramValue>…]
HT
Method GET
TP
Example
nese
I
Success
OK
fo
Return
r
Comment NOTE: After changing language setting, system will automatically reboot!
We
Appendix:
st
Table 4-53
c hn
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AccessFilter
ic
Method GET
a
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AccessFilter
Success table.AccessFilter.Enable=false
Return table.AccessFilter.TrustList[0]=10.6.10.23
table.AccessFilter.TrustList[1]=10.6.10.62
table.AccessFilter.Type=TrustList
Comment Parameters in Response:
Type: Range is {TrustList, BannedList}. If Trustlist is supported, Bannedlist is not
supported.
More information in Appendix.
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.
BannedList: Banned list is used, trust
list is not used.
Table 4-54
hu
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AutoMaintain
a
Method GET
HT
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AutoMaintain
table.AutoMaintain. AutoRebootDay=3
AP
table.AutoMaintain. AutoRebootHour=0
I
table.AutoMaintain. AutoRebootMinute=0
fo
table.AutoMaintain. AutoShutdownDay=1
Success
r
table.AutoMaintain. AutoShutdownHour=0
Return
table.AutoMaintain. AutoShutdownMinute=0
We
table.AutoMaintain. AutoStartUpDay=1
st
table.AutoMaintain. AutoStartUpHour=2
table.AutoMaintain. AutoStartUpMinute=0
Eu
Comment —
ro
Table 4-55
Te
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
c
alue>[&<paramName>=<paramValue>…]
hn
Method GET
ic
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AutoMaintain.AutoR
l
Example
ebootDay=7
Success
OK
Return
Comment —
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
AutoMaintain. Range is [0—23].
integer
AutoRebootHour Auto restart hour
AutoMaintain. Range is [0—59].
integer
AutoRebootMinute Auto restart minute
AutoMaintain.
AutoShutdownDay
auto reboot time
AutoMaintain.
integer Range is same with AutoOpenDay,
Da
AutoShutdownHour
AutoOpenHour and AutoOpenMinute.
hu
AutoMaintain.
a
AutoShutdownMinute
HT
AutoMaintain. AutoStartUpDay
AutoMaintain. Auto shutdown time.
TP
Table 4-56
Eu
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Holiday
Method GET
ro
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Holiday
Te
table.Holiday.MonthMask[0]=3
table.Holiday.MonthMask[1]=0
c hn
table.Holiday.MonthMask[2]=0
ic
table.Holiday.MonthMask[3]=0
table.Holiday.MonthMask[4]=0
al
Success table.Holiday.MonthMask[5]=0
Return table.Holiday.MonthMask[6]=0
table.Holiday.MonthMask[7]=0
table.Holiday.MonthMask[8]=0
table.Holiday.MonthMask[9]=1610612739
table.Holiday.MonthMask[10]=0
table.Holiday.MonthMask[11]=0
Comment —
Set holiday config
Table 4-57
General APIs 52
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set holiday config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Holiday.MonthMask[
Example
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
presents the second day of a month is
AP
Table 4-58
st
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getDeviceType
Method GET
Eu
Description Get the device type displaying which is not the real type.
ro
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getDeviceType
pe
Success
type=DVR
Return
Te
Comment —
c hn
Table 4-59
l
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getHardwareVersion
Method GET
Description Get the device hardware version.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getHardwareVersion
Success
version=1.00
Return
Comment —
General APIs 53
4.6.12 Get Serial Number of Device
Table 4-60
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
Success
sn=YZC0GZ05100020
Return
Comment —
Table 4-61
hu
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getMachineName
a
Method GET
HT
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getMachineName
Success
AP
name=YZC0GZ05100020
Return
I
Comment —
fo
r
Table 4-62
st
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getSystemInfo
Eu
Method GET
ro
serialNumber= PA1FQ15900207
Success
Te
deviceType=27
Return
processor= ST7108
c hn
Comment —
ic
Table 4-63
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getVendor
Method GET
Description Get the vendor information.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getVendor
Success
vendor=TTT
Return
Comment —
General APIs 54
4.6.16 Get Software Information
Table 4-64
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
Return
Comment —
Table 4-65
hu
Syntax http://<server>/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=Onvif
a
Method GET
HT
Example http://192.168.1.108/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=Onvif
Success
AP
version=2.4.2
Return
I
Comment —
fo
r
Table 4-66
st
Syntax http://<server>/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=CGI
Eu
Method GET
ro
Success
version=2.0.0
Te
Return
Comment —
c hn
ic
Table 4-67
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getDeviceClass
Method GET
Description Get the device class.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getDeviceClass
Success
class=HDVR
Return
Comment —
General APIs 55
4.6.20 Onvif Service Authorization
Get config of Onvif service authorization
Table 4-68
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
If "OnvifLoginCheck" is false, you can get Onvif service directly; if true, you should enter
Comment
your ID/username and password.
Da
Table 4-69
a
http://<server>/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCh
HT
Syntax
eck=<flag>
TP
Method GET
Description Enable onvif login check or not.
AP
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLog
Example
I
inCheck=true
fo
Success
OK
r
Return
We
Parameters in URL:
Comment
flag : range is {true, false}.
st
Table 4-70
pe
Syntax http://<server>/cgi-bin/Config.backup?action=All
Te
Method GET
Description Download all the settings of a device as a file named Config.Backup by default.
c hn
Example http://192.168.1.108/cgi-bin/Config.backup?action=All
ic
CONNECTION: close
Content-type: application/binarytet-stream; charset=utf-8
{
"ATM" : {
"DataSource" : "RS232",
"DisplayPostion" : "lefttop",
"EncodeBlend" : true,
"PreviewBlend" : true,
"ProtocolAbility" : [ "POS" ],
"ProtocolName" : "ATM\/POS",
General APIs 56
"RecordChannels" : [ 0, 1, 2, 3 ]
}
……
}
Comment —
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=restore&names[0]=UPnP
hu
Success
OK
a
Return
HT
Parameters in URL:
Comment
xxx and yyy is config name which need to be restore
TP
AP
Table 4-72
fo
Syntax http://<server>/cgi-bin/configManager.cgi?action=restoreExcept&names[0]=<xxx>&na
r
mes[1]=<yyy>[&…]
We
Method GET
st
Success OK
ro
Return
pe
4.6.24 Reboot
hn
ic
Table 4-73
a
Syntax http://<server>/cgi-bin/magicBox.cgi?action=reboot[&delay=<paramValue>]
l
Method GET
Description Reboot the device.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=reboot
Success
OK
Return
Comment If successful, response OK. If fail, response Error.
4.6.25 Shutdown
Table 4-74
General APIs 57
Syntax http://<server>/cgi-bin/magicBox.cgi?action=shutdown
Method GET
Description Shutdown the device.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=shutdown
Success
OK
Return
Comment If successful, response OK. If fail, response Error.
4.6.26 FactoryReset
Table 4-75
Syntax http://<server>/cgi-bin/magicBox.cgi?action=resetSystemEx[&type=<type>]
Method GET
Da
Description Reset the configuration for the device to the factory default.
hu
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=resetSystemEx&type=0
a
Success
OK
HT
Return
Parameters in URL:
TP
1 means all parameters are set to their factory default value expect the specific
Comment parameters;
fo
The specific parameters of different device types are different. But it always contains the
r
network settings and user settings. After resetting, the device is reachable on the same
We
When the Type parameter is not present in the URL, the default value of the Type is 0.
Eu
Table 4-76
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getTracingCode
Te
Method GET
c
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getTracingCode
ic
Success
a
tc=0001...1101
Return
l
4.7 Network
General APIs 58
Description Get all of the system network interfaces.
Example http://192.168.1.108/cgi-bin/netApp.cgi?action=getInterfaces
netInterface[0].Name=eth0
Success netInterface[0].Type=Normal
Return netInterface[0].Valid=true
…
result item value:
Name: network interface name.
"eth0" - wired network interface
"eth2" - wireless network interface
"3G" - 3G network interface
Comment
Type: "Normal" — wired network
Da
types.
HT
Table 4-78
r
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Network
We
Method GET
st
Get network basic config. The basic config contains basic network parameters (default
Description
interface, domain name, host name), and configuration of each network interface.
Eu
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Network
ro
table.Network.DefaultInterface=eth0
pe
table.Network.Domain=ttt
table.Network.Hostname=badak
Te
table.Network.interface.DefaultGateway=10.7.0.1
c hn
table.Network.interface.DhcpEnable=false
Success
table.Network.interface.DnsServers[0]=221.123.33.228
ic
Return
table.Network.interface.DnsServers[1]=221.12.1.228
al
table.Network.interface.IPAddress=10.7.2.3
table.Network.interface.MTU=1500
table.Network.interface.PhysicalAddress=00:10:5c:f2:1c:b4
table.Network.interface.SubnetMask=255.255.0.0
Comment interface in response is network interface name, such as eth0, eth2…
Set network config
Table 4-79
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set network basic config.
General APIs 59
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetWork.Domain=ttt
Example
&NetWork.eth0.DhcpEnable=true
Success
OK
Return
Comment interface in below ParamName is network interface name, such as eth0 and eth2
Appendix:
address.
a
Network.
string IP address.
HT
interface.DefaultGateway
Network.
TP
Network.
string IP address of first DNS server.
interface.DnsServers[0]
I
Network.
fo
Network.
We
xx:xx:xx:xx:xx:xx.
Network.
pe
00:10:5c:f2:1c:b4
c
00:10:5C:F2:1C:B5
hn
interface.SubnetMask Example:
l
255.255.255.0
4.7.3 PPPoE
Get PPPoE config
Table 4-80
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=PPPoE
Method GET
Description Get PPPoE config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=PPPoE
General APIs 60
table.PPPoE.Enable=false
Success
table.PPPoE.Password=123456
Return
table.PPPoE.UserName=123456
Comment —
Table 4-81
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set PPPoE config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&PPPoE.UserName=
Example
user1&PPPoE.Password=123456
Da
Success
OK
hu
Return
a
Comment —
HT
Appendix:
TP
4.7.4 DDNS
We
st
Table 4-82
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=DDNS
ro
Method GET
pe
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=DDNS
Success table.DDNS[index].Address=www.ttt.com
c hn
Return table.DDNS[index].Enable=true
ic
table.DDNS[index].HostName=www.ttt.com
a
table.DDNS[index].KeepAlive=10
l
table.DDNS[index].Password=none
table.DDNS[index].Port=5050
table.DDNS[index].Protocol= Quick DDNS
table.DDNS[index].UserName=user1
table.DDNS[index].DefaultHostName.Enable=false
table.DDNS[index].DefaultHostName.HostName=9002A9D77133.quickddns.com
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-83
General APIs 61
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set DDNS config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&DDNS[0].Address=w
ww.ttt.com&DDNS[0].Enable=true
Success OK
Return
Comment index in below ParamName is the DDNS protocol table index, start from 0.
Appendix:
DDNS[index].KeepAlive integer
Unit is minutes.
AP
Range is [1—65535].
DDNS[index].Port integer
Port of DDNS server
fo
DDNS[index].Protocol string
"Private DDNS", "DHDDNS", "QUICK
st
DDNS"}.
DDNS[index].UserName string DDNS user name
Eu
DDNS[index].DefaultHostName
string The default hostname. It cannot be modified.
c
.HostName
hn
ic
4.7.5 Email
a l
Table 4-84
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Email
Method GET
Description Get Email config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Email
table.Email.Address=www.ttt.com
Success table.Email.Anonymous=true
Return table.Email.AttachEnable=true
table.Email.AttachmentEnable=true
General APIs 62
table.Email.Enable=true
table.Email.HealthReport.Enable=false
table.Email.HealthReport.Interval=61
table.Email.Password=123456
table.Email.Port=26
table.Email.Receivers[0]=x@tttt.com
table.Email.Receivers[1]=y@ttt.com
table.Email.Receivers[2]=z@ttt.com
table.Email.SendAddress=x@ttt.com
table.Email.SslEnable=false
table.Email.Title=DVRMessage
table.Email.UserName=anonymity
Comment —
Da
Table 4-85
a
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
HT
alue>[&<paramName>=<paramValue>…]
TP
Method GET
Description Set Email config.
AP
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Email.Address=mail.
Example
I
ttt.com&Email.Anonymous=false
fo
Success
OK
r
Return
Comment —
We
st
Appendix:
General APIs 63
4.7.6 WLan
Get WLan config
Table 4-86
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=WLan
Method GET
Description Get Wlan config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=WLan
table.WLan.eth2.Enable=true
table.WLan.eth2.Encryption=off
table.WLan.eth2.KeyFlag=false
table.WLan.eth2.KeyID=0
Da
table.WLan.eth2.KeyType=Hex
Success
hu
table.WLan.eth2.Keys[0]=password1
Return
a
table.WLan.eth2.Keys[1]=password2
table.WLan.eth2.Keys[2]=password3
HT
table.WLan.eth2.Keys[3]=password4
TP
table.WLan.eth2.LinkMode=Auto
table.WLan.eth2.SSID=ttt
AP
Comment —
I
Table 4-87
r
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
We
Syntax
alue>[&<paramName>=<paramValue>…]
st
Method GET
Description Set WLan config.
Eu
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&WLan.eth2.Enable=t
ro
Example
rue&WLan.eth2.KeyType=Hex
pe
Success
OK
Return
Te
Appendix:
ic
General APIs 64
ParamName ParamValue type Description
WLan.interface.Keys[2] string a—z, A—Z]
For HEX key type: 64bits encryption key length is 10,
WLan.interface.Keys[3] string 128bits encryption key length is 26, consists of [0—9,
a—z, A—Z]
Range is {Auto, Ad-hoc, and Infrastructure}.
Auto – select suitable mode automatically.
Ad-hoc – Device with wireless network adapter can
WLan.interface.LinkMode string connect to each other without Access Point.
Infrastructure – Integrate wire and wireless LAN
together to share network resource, access point is
need in this mode.
WLan.interface.SSID string SSID.
Da
hu
Table 4-88
HT
http://<server>/cgi-bin/wlan.cgi?action=scanWlanDevices&<paramName>=<paramVal
TP
Syntax
ue>[&<paramName>=<paramValue>…]
AP
Method GET
Description Search Wi-Fi device information.
I
http://192.168.1.108/cgi-bin/wlan.cgi?action=scanWlanDevices&SSID=xia_yuguo
fo
Example
13098 Internet
r
found=1
We
wlanDevice[0].ApConnected=0
st
wlanDevice[0].ApMaxBitRate=54000000
wlanDevice[0].ApNetWorkType=255
Eu
wlanDevice[0].AuthMode=7
Success
ro
wlanDevice[0].BSSID=28:2c:b2:5c:de:36
Return
pe
wlanDevice[0].EncrAlgr=3
wlanDevice[0].LinkMode=0
Te
wlanDevice[0].LinkQuality=31
c
wlanDevice[0].RSSIQuality=0
hn
Comment —
a l
Appendix:
4.7.8 UPnP
Get UPnP config
Table 4-89
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=UPnP
General APIs 65
Method GET
Description Get UPnP config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=UPnP
Success table.UPnP.Enable=true
Return table.UPnP.MapTable[index].Enable=true
table.UPnP.MapTable[index].InnerPort=80
table.UPnP.MapTable[index].OuterPort=8080
table.UPnP.MapTable[index].Protocol=TCP
table.UPnP.MapTable[index].ServiceName=HTTP
Comment index in response is the UPNP map table index, start from 0.
Set UPnP config
Table 4-90
Da
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
alue>[&<paramName>=<paramValue>…]
hu
Method GET
a
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&UPnP.Enable=true&
TP
UPnP.MapTable[0].Protocol=TCP
Success OK
AP
Return
I
Comment index in below ParamName is UPNP map table index, range is [0-255]
fo
Appendix:
r
We
Range is [1—65535].
UPnP.MapTable[index].InnerPort integer
ro
UPnP.MapTable[index].OuterPort integer
Outer port number.
Te
Table 4-91
Syntax http://<server>/cgi-bin/netApp.cgi?action=getUPnPStatus
Method GET
Description Get UPnP Status.
Example http://192.168.1.108/cgi-bin/netApp.cgi?action=getUPnPStatus
status.InnerAddress=0.0.0.0
status.OuterAddress=0.0.0.0
Success status.PortMapStatus[0]=Failed
Return status.PortMapStatus[1]=Failed
status.PortMapStatus[2]=Failed
status.PortMapStatus[3]=Failed
General APIs 66
status.Status=Unknown
status.Working=false
Comment —
4.7.10 NTP
Get NTP config
Table 4-92
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=NTP
Method GET
Description Get NTP config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=NTP
Da
table.NTP.Address=clock.isc.org
table.NTP.Enable=false
hu
Success
table.NTP.Port=38
a
Return
table.NTP.TimeZone=9
HT
table.NTP.UpdatePeriod=31
TP
Comment —
Set NTP config
AP
Table 4-93
I
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<param
fo
Syntax
Value>[&<paramName>=<paramValue>…]
r
Method GET
We
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NTP.Address=time.tt
Example
t.com&NTP.Enable=true
Eu
Success
OK
ro
Return
pe
Comment —
Te
4.7.11 RTSP
c hn
Table 4-94
a l
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=RTSP
Method GET
Description Get RTSP config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RTSP
table.RTSP.Enable=true
Success table.RTSP.Port=554
Return table.RTSP.RTP.EndPort=40000
table.RTSP.RTP.StartPort=20000
Comment —
Set RTSP config
General APIs 67
Table 4-95
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<param
Syntax
Value>[&<paramName>=<paramValue>…]
Method GET
Description Set RTSP config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RTSP.Enable=true&
Example
RTSP.Port=554
Success
OK
Return
Comment —
Appendix:
Table 4-96
r
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AlarmServer
We
Method GET
Description Get alarm server config.
st
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AlarmServer
Eu
table.AlarmServer.Address=10.7.8.9
ro
table.AlarmServer.Enable=false
table.AlarmServer.Password=
pe
Success table.AlarmServer.Port=8888
Te
Return table.AlarmServer.Protocol=ttt
table.AlarmServer.ReportTime=02:00:00
c hn
table.AlarmServer.ReportWeekDay=2
ic
table.AlarmServer.UserName=admin
—
a
Comment
l
Table 4-97
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<param
Syntax
Value>[&<paramName>=<paramValue>…]
Method GET
Description Set Alarm Server config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AlarmServer.Addres
Example
s=as.ttt.com&AlarmServer.Enable=false
Success
OK
Return
General APIs 68
Comment —
Appendix:
Table 4-98
HT
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect
Method GET
TP
Description Motion detect config of a video channel contains Enable, MotionDetectWindow and
AP
EventHandler.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect
I
Success table.MotionDetect[0].Enable=false
fo
Return table.MotionDetect[0].EventHandler.AlarmOut=1
r
table.MotionDetect[0].EventHandler.AlarmOutChannels[0]=0
We
table.MotionDetect[0].EventHandler.AlarmOutEnable=true
st
table.MotionDetect[0].EventHandler.AlarmOutLatch=10
table.MotionDetect[0].EventHandler.BeepEnable=false
Eu
table.MotionDetect[0].EventHandler.Dejitter=5
ro
table.MotionDetect[0].EventHandler.Delay=0
pe
table.MotionDetect[0].EventHandler.ExAlarmOut=1
table.MotionDetect[0].EventHandler.ExAlarmOutChannels[0]=0
Te
table.MotionDetect[0].EventHandler.ExAlarmOutEnable=false
c
table.MotionDetect[0].EventHandler.FlashEnable=false
hn
table.MotionDetect[0].EventHandler.FlashLatch=10
ic
table.MotionDetect[0].EventHandler.LogEnable=true
a
table.MotionDetect[0].EventHandler.MailEnable=false
l
table.MotionDetect[0].EventHandler.Matrix=1
table.MotionDetect[0].EventHandler.MatrixChannels[0]=0
table.MotionDetect[0].EventHandler.MatrixEnable=false
table.MotionDetect[0].EventHandler.MessageEnable=false
table.MotionDetect[0].EventHandler.PtzLink[0][0]=None
table.MotionDetect[0].EventHandler.PtzLink[0][1]=1
table.MotionDetect[0].EventHandler.PtzLinkEnable=false
table.MotionDetect[0].EventHandler.Record=1
table.MotionDetect[0].EventHandler.RecordChannels[0]=0
table.MotionDetect[0].EventHandler.RecordEnable=true
table.MotionDetect[0].EventHandler.RecordLatch=10
General APIs 69
table.MotionDetect[0].EventHandler.Snapshot=1
table.MotionDetect[0].EventHandler.SnapshotChannels[0]=0
table.MotionDetect[0].EventHandler.SnapshotEnable=false
table.MotionDetect[0].EventHandler.TimeSection[0][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][3]=0 00:00:00-23:59:59
Da
table.MotionDetect[0].EventHandler.TimeSection[1][4]=0 00:00:00-23:59:59
hu
table.MotionDetect[0].EventHandler.TimeSection[1][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][0]=1 00:00:00-23:59:59
a
table.MotionDetect[0].EventHandler.TimeSection[2][1]=0 00:00:00-23:59:59
HT
table.MotionDetect[0].EventHandler.TimeSection[2][2]=0 00:00:00-23:59:59
TP
table.MotionDetect[0].EventHandler.TimeSection[2][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][4]=0 00:00:00-23:59:59
AP
table.MotionDetect[0].EventHandler.TimeSection[2][5]=0 00:00:00-23:59:59
I
table.MotionDetect[0].EventHandler.TimeSection[3][0]=1 00:00:00-23:59:59
fo
table.MotionDetect[0].EventHandler.TimeSection[3][1]=0 00:00:00-23:59:59
r
table.MotionDetect[0].EventHandler.TimeSection[3][2]=0 00:00:00-23:59:59
We
table.MotionDetect[0].EventHandler.TimeSection[3][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][4]=0 00:00:00-23:59:59
st
table.MotionDetect[0].EventHandler.TimeSection[3][5]=0 00:00:00-23:59:59
Eu
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
ro
table.MotionDetect[0].EventHandler.TimeSection[4][2]=0 00:00:00-23:59:59
pe
table.MotionDetect[0].EventHandler.TimeSection[4][3]=0 00:00:00-23:59:59
Te
table.MotionDetect[0].EventHandler.TimeSection[4][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][5]=0 00:00:00-23:59:59
c hn
table.MotionDetect[0].EventHandler.TimeSection[5][0]=1 00:00:00-23:59:59
ic
table.MotionDetect[0].EventHandler.TimeSection[5][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][2]=0 00:00:00-23:59:59
a l
table.MotionDetect[0].EventHandler.TimeSection[5][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TipEnable=false
table.MotionDetect[0].EventHandler.Tour=1
General APIs 70
table.MotionDetect[0].EventHandler.TourChannels[0]=0
table.MotionDetect[0].EventHandler.TourEnable=false
table.MotionDetect[0].EventHandler.Voice.AudioFileName=
table.MotionDetect[0].EventHandler.VoiceEnable=false
table.MotionDetect[0].MotionDetectWindow[0].Id=0
table.MotionDetect[0].MotionDetectWindow[0].Name=Region1
table.MotionDetect[0].MotionDetectWindow[0].Region[0]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[1]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[2]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[3]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[4]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[5]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[6]=4194303
Da
table.MotionDetect[0].MotionDetectWindow[0].Region[7]=4194303
hu
table.MotionDetect[0].MotionDetectWindow[0].Region[8]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[9]=4194303
a
table.MotionDetect[0].MotionDetectWindow[0].Region[10]=4194303
HT
table.MotionDetect[0].MotionDetectWindow[0].Region[11]=4194303
TP
table.MotionDetect[0].MotionDetectWindow[0].Region[12]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[13]=4194303
AP
table.MotionDetect[0].MotionDetectWindow[0].Region[14]=4194303
I
table.MotionDetect[0].MotionDetectWindow[0].Region[15]=4194303
fo
table.MotionDetect[0].MotionDetectWindow[0].Region[16]=4194303
r
table.MotionDetect[0].MotionDetectWindow[0].Region[17]=4194303
We
table.MotionDetect[0].MotionDetectWindow[0].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[0].Threshold=5
st
table.MotionDetect[0].MotionDetectWindow[0].Window[0]=0
Eu
table.MotionDetect[0].MotionDetectWindow[0].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[0].Window[2]=8191
ro
table.MotionDetect[0].MotionDetectWindow[0].Window[3]=8191
pe
table.MotionDetect[0].MotionDetectWindow[1].Id=1
Te
table.MotionDetect[0].MotionDetectWindow[1].Name=Region2
table.MotionDetect[0].MotionDetectWindow[1].Region[0]=0
c hn
table.MotionDetect[0].MotionDetectWindow[1].Region[1]=0
ic
table.MotionDetect[0].MotionDetectWindow[1].Region[2]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[3]=0
a l
table.MotionDetect[0].MotionDetectWindow[1].Region[4]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[6]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[7]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[9]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[10]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[11]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[12]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[13]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[14]=0
General APIs 71
table.MotionDetect[0].MotionDetectWindow[1].Region[15]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[17]=0
table.MotionDetect[0].MotionDetectWindow[1].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[1].Threshold=5
table.MotionDetect[0].MotionDetectWindow[1].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[2]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[3]=0
table.MotionDetect[0].MotionDetectWindow[2].Id=2
table.MotionDetect[0].MotionDetectWindow[2].Name=Region3
table.MotionDetect[0].MotionDetectWindow[2].Region[0]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[1]=0
Da
table.MotionDetect[0].MotionDetectWindow[2].Region[2]=0
hu
table.MotionDetect[0].MotionDetectWindow[2].Region[3]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[4]=0
a
table.MotionDetect[0].MotionDetectWindow[2].Region[5]=0
HT
table.MotionDetect[0].MotionDetectWindow[2].Region[6]=0
TP
table.MotionDetect[0].MotionDetectWindow[2].Region[7]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[8]=0
AP
table.MotionDetect[0].MotionDetectWindow[2].Region[9]=0
I
table.MotionDetect[0].MotionDetectWindow[2].Region[10]=0
fo
table.MotionDetect[0].MotionDetectWindow[2].Region[11]=0
r
table.MotionDetect[0].MotionDetectWindow[2].Region[12]=0
We
table.MotionDetect[0].MotionDetectWindow[2].Region[13]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[14]=0
st
table.MotionDetect[0].MotionDetectWindow[2].Region[15]=0
Eu
table.MotionDetect[0].MotionDetectWindow[2].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[17]=0
ro
table.MotionDetect[0].MotionDetectWindow[2].Sensitive=60
pe
table.MotionDetect[0].MotionDetectWindow[2].Threshold=5
Te
table.MotionDetect[0].MotionDetectWindow[2].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[2].Window[1]=0
c hn
table.MotionDetect[0].MotionDetectWindow[2].Window[2]=0
ic
table.MotionDetect[0].MotionDetectWindow[2].Window[3]=0
table.MotionDetect[0].MotionDetectWindow[3].Id=3
a l
table.MotionDetect[0].MotionDetectWindow[3].Name=Region4
table.MotionDetect[0].MotionDetectWindow[3].Region[0]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[1]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[2]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[3]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[4]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[6]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[7]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[9]=0
General APIs 72
table.MotionDetect[0].MotionDetectWindow[3].Region[10]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[11]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[12]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[13]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[14]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[15]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[17]=0
table.MotionDetect[0].MotionDetectWindow[3].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[3].Threshold=5
table.MotionDetect[0].MotionDetectWindow[3].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[3].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[3].Window[2]=0
Da
table.MotionDetect[0].MotionDetectWindow[3].Window[3]=0
hu
table.MotionDetect[0].OsdTwinkleEnable=false
table.MotionDetect[0].PirMotionLevel=3
a
Comment —
HT
Table 4-99
AP
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
I
alue>[&<paramName>=<paramValue>…]
fo
Method GET
Description Set motion detection config.
r
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Ena
st
ble=true
Eu
Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Moti
pe
onDetectWindow[0].Region[0]=1&MotionDetect[0].MotionDetectWindow[0].Region[1]=
1&MotionDetect[0].MotionDetectWindow[0].Region[2]=1&MotionDetect[0].MotionDetec
Te
tWindow[0].Region[3]=1&MotionDetect[0].MotionDetectWindow[0].Region[4]=1&Motion
c
Detect[0].DetectVersion=V3.0
hn
Success
ic
OK
Return
a l
In table below,
head = MotionDetect[ChannelNo]
ChannelNo: integer, array index starts from 0, which means video channel(equals to
video channel index -1, and so 0 means channel 1).
LineNum
Comment Index of region, region is divided into lines and each line has several blocks, a line is
described by a 32 bit integer, a bit for a block.
0=Line 1
1=Line 2
…
WinNum
General APIs 73
Index of detect window, there are 4 detect windows at present. Each window is divided
into 18 lines and 22 blocks per line.
Appendix:
head.MotionDetectWin
string It is the name of a detect window.
a
dow [WinNum].Name
HT
per line.
st
dow Example:
integer
ro
4.9 Event
l
Table 4-100
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=<handlerName>
Method GET
Description Get event handler settings.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Alarm[0].Eve
General APIs 74
ntHandler
handlerName.EventHandler.AlarmOutChannels[0]=1
handlerName.EventHandler.AlarmOutChannels[1]=1
…
handlerName.EventHandler.AlarmOutEnable=false
handlerName.EventHandler.AlarmOutLatch=10
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
hu
handlerName.EventHandler.PtzLink[1][1]=0
…
a
handlerName.EventHandler.PtzLinkEnable=false
HT
handlerName.EventHandler.RecordChannels[0]=1
TP
Success handlerName.EventHandler.RecordChannels[1]=1
Return …
AP
handlerName.EventHandler.RecordEnable=true
I
handlerName.EventHandler.RecordLatch=10
fo
handlerName.EventHandler.SnapshotChannels[0]=1
r
handlerName.EventHandler.SnapshotChannels[1]=1
We
…
handlerName.EventHandler.SnapshotEnable=false
st
handlerName.EventHandler.SnapshotPeriod=3
Eu
handlerName.EventHandler.SnapshotTimes=0
ro
handlerName.EventHandler.TimeSection[0][0]=1 01:00:00-24:00:00
handlerName.EventHandler.TimeSection[0][1]=1 01:00:00-24:00:00…
pe
…
Te
handlerName.EventHandler.TimeSection[6][5]=1 01:00:00-24:00:00
handlerName.EventHandler.TipEnable=true
c hn
handlerName.EventHandler. ExAlarmOutEnable=true
ic
handlerName.ExAlarmOutChannels[0] =2
handlerName.ExAlarmOutChannels[1]=3
a l
…
Parameters in URL:
handlerName can be one of below four formats:
Alarm[ChannelNo].EventHandler
Comment
MotionDetect [ChannelNo]. EventHandler
BlindDetect [ChannelNo]. EventHandler
LossDetect [ChannelNo]. EventHandler
Set event handler config
Table 4-101
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
General APIs 75
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
OK
Return
Comment In below paramName, Meaning of handlerName is the same with GetEventHandler.
Appendix:
out channel ch
TP
function.
Range is [10—300].
I
handlerName.EventHandler.AlarmOutLatch Integer
the time to output alarm
r
Range is [0—255].
Alarm signal dejitter
Eu
ignored.
Range is [0—300].
Te
handlerName.EventHandler.LogEnable bool
alarm.
a
handlerName.EventHandler.MailEnable bool
for alarm.
Range is {None, Preset,
Tour, Pattern}
This is PTZ action linked
handlerName.EventHandler.PtzLink[ch][0] string
with events.
ch is PTZ channel index
which starts from 0.
General APIs 76
paramName paramValue type Description
This is the parameter of
PtzLink[ch][0],
If PtzLink[ch]][0] is
Preset: this is preset point.
handlerName.EventHandler.PtzLink[ch][1] integer
Tour: this is tour path
number.
Pattern: this is pattern
number.
handlerName.EventHandler.PtzLinkEnable Bool Enable/Disable PTZ link.
Range is {0, 1}
0 – do not record on video
handlerName.EventHandler.RecordChannels[ch] Integer channel ch
Da
1 – record. on video
hu
channel ch
a
Enable/Disable record
handlerName.EventHandler.RecordEnable bool
function.
HT
Range is [10—300].
TP
Range is {0, 1}
fo
0 — do not snapshot on
r
1 — snapshot on video
st
channel ch
Enable/Disable snapshot
handlerName.EventHandler.SnapshotEnable bool
Eu
function.
ro
Range is [0—255].
pe
Frames between
handlerName.EventHandler.SnapshotPeriod integer snapshots.
Te
0 means continuously
c
Range is [0—65535]
ic
snapshot.
General APIs 77
paramName paramValue type Description
It's an effective time period
for eventHanlder everyday.
wd (week day) range is [0—
6] (Sunday—Saturday)
ts (time section) range is
[0-23], it's index of time
section table.
Format: mask
hh:mm:ss-hh:mm:ss
Mask: {0,1}, hh: [0 — 24],
handlerName.EventHandler.TimeSection[wd][ts] String mm: [00—59], ss: [00—59]
Da
not used.
Mask 1: this time section is
a
used.
HT
TP
Example:
TimeSection[1][0]=1
AP
12:00:00-18:00:00
I
Means EventHandler is
fo
Enable/Disable local
handlerName.EventHandler.TipEnable bool
st
Table 4-102
ic
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Alarm
a l
Method GET
Description Get alarm config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Alarm
table.Alarm[0].Enable=false
table.Alarm[0].EventHandler….(output of EventHandler is described in
GetEventHandler)
Success
table.Alarm[0].Name=Door1
Return
table.Alarm[0].SensorType=NC
table.Alarm[1]….
…
Comment —
General APIs 78
Set alarm config
Table 4-103
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramVal
Syntax
ue>[&<paramName>=<paramValue>…]
Method GET
Description Set alarm config.
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:
hu
SetEventHandler.
Alarm[input].Name string Name of alarm input channel.
AP
Table 4-104
ro
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AlarmOut
pe
Method GET
Description Get alarm out config.
Te
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AlarmOut
c
Success table.AlarmOut[alarmOutChannel].Mode=0
hn
Return table.AlarmOut[alarmOutChannel].Name=Beep
ic
Parameters in Response:
a
Comment
alarmOutChannel: the alarm out channel index which starts from 0.
l
Table 4-105
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set alarm out config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AlarmOut[0].Mode=0
Example
&AlarmOut[0].Name=port1
Success
OK
Return
General APIs 79
Comment port in below ParamName is alarm out port index, start form 0.
Appendix:
Syntax http://<server>/cgi-bin/alarm.cgi?action=getInSlots
hu
Method GET
a
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getInSlots
Success
TP
result=2
Return
AP
Comment —
I
Table 4-107
We
Syntax http://<server>/cgi-bin/alarm.cgi?action=getOutSlots
st
Method GET
Description Get alarm output channel number.
Eu
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getOutSlots
ro
Success
result=1
pe
Return
Comment —
Te
c
Table 4-108
a
Syntax http://<server>/cgi-bin/alarm.cgi?action=getInState
l
Method GET
Description Get alarm input state for all channels.
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getInState
Success
result=3
Return
A bit in the response result indicates a channel alarm states, result 3 means alarm
Comment
channel 1 and channel 2 have alarm now.
General APIs 80
4.9.7 Get States of Alarm Output Channels
Table 4-109
Syntax http://<server>/cgi-bin/alarm.cgi?action=getOutState
Method GET
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-110
HT
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=BlindDetect
Method GET
TP
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=BlindDetect
I
head. Enable=false
Success
head. EventHandler= (output of EventHandler is described in GetEventHandler)
fo
Return
head. Level=3
r
Parameters in Response:
We
head= table.BlindDetect[ChannelNo]
Comment
st
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
Eu
Table 4-111
pe
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Te
Method GET
c hn
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&BlindDetect[0].Enabl
Example
e=true
a l
Success
OK
Return
Parameters in URL:
In table below,
Comment head= BlindDetect[ChannelNo]
ChannelNo: integer, array index starts from 0, which means video channel (equals to
video channel index -1, and so 0 means channel 1).
Appendix:
General APIs 81
ParamName ParamValue type Description
Setting of EventHandler is described in
head. EventHandler —
SetEventHandler.
Range is [1—6].
Sensitivity of blind detection.
head. Level integer
1: lowest sensitivity.
6: highest sensitivity.
Table 4-112
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=LossDetect
Da
Method GET
hu
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=LossDetect
HT
head=table.LossDetect [ChannelNo]
Comment
I
ChannelNo: integer, array index starts from 0, which means video channel (equals to
fo
Table 4-113
st
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Eu
Method GET
ro
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LossDetect[0].Enabl
Example
e=true
Te
Success
OK
c
Return
hn
Parameters in URL:
ic
In table below,
a
ChannelNo: integer, array index starts from 0, which means video channel(equals to
video channel index -1, and so 0 means channel 1).
Appendix:
General APIs 82
4.9.10 Login Failure Event
Get login failure event config
Table 4-114
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
Return head. EventHandler= (output of EventHandler is described in GetEventHandler)
Parameters in Response:
Comment
Da
head= table.LoginFailureAlarm
hu
Table 4-115
HT
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
TP
alue>[&<paramName>=<paramValue>…]
Method GET
AP
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LoginFailureAlarm.E
Example
fo
nable=true
r
Success
OK
Return
We
Parameters in URL:
st
head= LoginFailureAlarm
ro
Appendix:
pe
SetGeneralConfig.
Setting of EventHandler is described in
a
head. EventHandler —
l
SetEventHandler.
Table 4-116
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageNotExist
Method GET
Description Get storage not exist event config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=StorageNotEx
General APIs 83
ist
StorageNotExist.Enable=false
Success
StorageNotExist.EventHandler= (output of EventHandler is described in
Return
GetEventHandler)
Comment —
Set storage not exist event config
Table 4-117
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set storage not exist event config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageNotExist.Ena
Example
Da
ble=true
Success
hu
OK
Return
a
Comment —
HT
Appendix:
TP
StorageNotExist.EventHandler
SetEventHandler.
r
We
Table 4-118
ro
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageFailure
pe
Method GET
Description Get storage failure event config.
Te
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=StorageFailur
c
Example
hn
e
StorageFailure.Enable=false
ic
Success
StorageFailure.EventHandler= (output of EventHandler is described in
a
Return
l
GetEventHandler)
Comment —
Set storage access failure event config
Table 4-119
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set storage failure event config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageFailure.Enabl
Example
e=true
General APIs 84
Success
OK
Return
Comment —
Appendix:
Table 4-120
hu
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageLowSpace
a
Method GET
HT
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=StorageLowS
Example
pace
AP
StorageLowSpace.Enable=false
I
Success
StorageLowSpace.EventHandler= (output of EventHandler is described in
Return
fo
GetEventHandler)
r
Comment —
We
Table 4-121
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Eu
Syntax
alue>[&<paramName>=<paramValue>…]
ro
Method GET
pe
Example
nable=true
c hn
Success
OK
Return
ic
Comment —
a l
Appendix:
Table 4-122
General APIs 85
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
Success NetAbort.Enable=false
Return NetAbort.EventHandler= (output of EventHandler is described in GetEventHandler)
Comment —
Set net abort event config
Table 4-123
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Da
Example
e
a
Success
HT
OK
Return
TP
Comment —
AP
Appendix:
I
SetEventHandler.
st
Table 4-124
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=IPConflict
Te
Method GET
c hn
Success IPConflict.Enable=false
a l
Table 4-125
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set IP Conflict event config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&IPConflict.Enable=tr
ue
General APIs 86
Success OK
Return
Comment —
Appendix:
http://<server>/cgi-bin/eventManager.cgi?action=getEventIndexes&code=<eventCode
hu
Syntax
>
a
Method GET
HT
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
I
ocal
channels[0]=0
fo
channels[1]=2
r
Success channels[2]=3
We
Return …
st
(This response means event happened on channel 0, channel 2 and channel 3 while
video channel index starts from 0)
Eu
Parameters in URL:
ro
eventCode includes:
pe
General APIs 87
VideoMotion%2CVideoLoss%2CVideoBlind]
http://192.168.1.108/cgi-bin/eventManager.cgi?action=attach&codes=[All]&heartbeat=5
HTTP Code: 200 OK\r\n
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
Content-Type: text/plain\r\n
Content-Length: <data length>\r\n
Da
<eventInfo>\r\n\r\n
hu
--<boundary>\r\n
Content-Type: text/plain\r\n
a
<eventInfo>\r\n\r\n
TP
For example:
AP
Connection: close\r\n
Content-Type: multipart/x-mixed-replace; boundary=myboundary\r\n\r\n
st
Body:
Eu
--myboundary\r\n
ro
Content-Type: text/plain\r\n
Content-Length: 39\r\n
pe
Code=VideoMotion;action=Start;index=0\r\n\r\n
Te
--myboundary\r\n
Content-Type: text/plain\r\n
c hn
Content-Length: 38\r\n
ic
Code=VideoBlind;action=Start;index=0\r\n\r\n
--myboundary\r\n
a l
Content-Type: text/plain\r\n
Content-Length: 9\r\n
Heartbeat\r\n\r\n
--myboundary\r\n
…
eventCode can be any one of the standard codes defined in DHIIF, or "All".
All means all kinds of the eventcode.
eventcode include:
Comment
VideoMotion: motion detection event
VideoLoss: video loss detection event
VideoBlind: video blind detection event.
General APIs 88
AlarmLocal: alarm detection event.
CrossLineDetection: tripwire event
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
VideoUnFocus: defocus detect event
WanderDetection: loitering detection event
RioterDetection: People Gathering event
ParkingDetection: parking detection event
Da
MDResult: motion detection data reporting event. The motion detect window
contains 18 rows and 22 columns. The event info contains motion detect data with mask
AP
of every row.
I
index=0", but for some specific events, they will contain an another parameter named
Eu
the specific events and datainfo are listed in the appendix below this table.
pe
Te
keepalive: If this param exist, the client must send any data to device by this
connection in cycle. The keepalive is in range
c hn
of [1,60] second.
ic
For example:
The keeplive data can be the string "keep alive".
a l
General APIs 89
(0,0) 8191,0
X
(0,8191) (8191,8191)
Appendix B: CrossLineDetection
points.
a
Example:
r
{
We
"DetectLine":[
st
[1292,3469],
Eu
[6535,3373],
ro
…..
pe
],
Te
c
"Direction" : "LeftToRight"
hn
}
ic
a
Appendix C: CrossRegionDetection
l
General APIs 90
Sample ParamValue type Description
The value can be "Appear", "Disappear",
"Action": "Cross", string
"Cross","Inside"
Ony if the "Action" is "Cross", this element
"Direction" : "Enter" string is valid.
It can be "Enter", "Leave", "Both".
Example:
"DetectRegion":[
[1893,2377],
[5734,2377],
Da
hu
[5661,6296],
a
…..
HT
],
TP
"Action": "Cross",
AP
"Direction" : "Enter"
I
fo
}
r
[1893,2377], Point
obey the coordinate system mentioned in
the appendix A)
Te
[5734,2377], Point —
c
—
hn
[5661,6296], Point
ic
Example:
a l
"DetectRegion":[
[1893,2377],
[5734,2377],
…..
Appendix E: NumberStat
General APIs 91
Sample ParamValue type Description
"Number" : 120, int The number in the region
"EnteredNumber" : 180, int The number enter the region
"ExitedNumber" : 60, int The number leave the region
"Type" : "EnterOver" string It can be "EnterOver", "ExitOver", "InsideOver".
Example:
"Number" : 120,
"EnteredNumber" : 180,
"ExitedNumber" : 60,
Da
"Type" : "EnterOver"
hu
}
a
Appendix F: FaceDetection
HT
TP
Table 4-128
Sample ParamValue type Description
AP
"Faces":[{ Array —
I
Rectangle
[2992,136,6960,8192] point.
The third is the x's value of the
Eu
right-bottom point.
ro
right-bottom point
Te
Example:
c hn
{
ic
"Faces":[{
a l
"BoundingBox": [2992,136,6960,8192]
},…{}]
Appendix G: ManNumDetection
General APIs 92
Sample ParamValue type Description
It is a rectangle, contains two points, one
means left-top,one means right-bottom.
The first element is x's value of the left-top
point.
"BoundingBox": The second is y's value of the left-top
Rectangle
[2992,136,6960,8192], point.
The third is the x's value of the
right-bottom point.
The fourth is the y's value of the
right-bottom point
"Stature":175 int The unit is cm.
Example:
Da
hu
{
a
"ManList":[{
HT
"BoundingBox": [2992,136,6960,8192],
TP
"Stature":175
AP
},…{}]
I
fo
}
r
Appendix H: FaceFeatureAbstract
We
"Infos":[{ Array —
It can be
Eu
"Process":In Process;
"Process" : 20, int The process of the abstract
Te
Example:
a l
"Infos":[{
"State": "Success",
"Process": 20,
"UID": "1234",
"GroupID": "00001",
},…{}]
General APIs 93
Appendix I: CrowdDetection
Example:
"CrowdList" : [{
Da
"Center" : [5734,2377],,
hu
a
"Radius" : 10
HT
},…{}]
TP
"RegionList" : [ {
AP
"RegionID" : 0,
I
"PeopleNum" : 100
fo
r
},…{}]
We
}
st
Table 4-129
pe
Syntax http://<server>/cgi-bin/eventManager.cgi?action=getCaps
Method GET
Te
Example http://192.168.1.108/cgi-bin/eventManager.cgi?action=getCaps
hn
caps.AlarmOutEnable=true
ic
caps.BeepEnable=true
a
caps.DejitterEnable=true
l
caps.MMSEnable=true
caps.MailEnable=true
Success
caps.MonitorTourEnable=true
Return
caps.PtzLinkEnable=true
caps.RecordEnable=true
caps.SnapshotEnable=true
caps.TimeSectionEnable=true
caps.TipEnable=true
Comment —
General APIs 94
4.9.19 NetAlarm
Table 4-130
http://<server>/cgi-bin/netAlarm.cgi?action=setState&channel=<ChannelNo>&alarm=<A
Syntax
larm>[&name=<Name>&trigger=<Trigger>&desc=<Desc>]
Method GET
Description Set the netalarm state.
http://192.168.1.108/cgi-bin/netAlarm.cgi?action=setState&channel=1&alarm=true&nam
Example
e=somke&trigger=SmokingSensor&desc=Zone8
Success
OK
Return
Parameters in URL:
ChannelNo: integer, alarm channel index which starts from 1
Da
Alarm: bool, the state of the alarm, the value can be true and false, true means the alarm
hu
is start.
a
Name: string, the name of the alarm, optional parameter, the length of this value should
HT
Optional parameter, the length of this value should less than 32.
I
Desc: string, the description of the alarm, optional parameter, the length of this value
fo
4.9.20 GetSupportedEvents
We
st
Table 4-131
Syntax http://<server>/cgi-bin/eventManager.cgi?action=getExposureEvents
Eu
Method GET
ro
Example http://192.168.1.108/cgi-bin/eventManager.cgi?action=getExposureEvents
events[0]=VideoMotion
Te
events[1]=AlarmLocal
c
Success
hn
events[2]=FaceDetection
Return
events[3]=VideoMotion
ic
…
a l
Comment —
4.10 PTZ
Table 4-132
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Ptz
Method GET
General APIs 95
Description Get PTZ config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Ptz
table.Ptz[port].Address=8
table.Ptz[port].Attribute[0]=115200
table.Ptz[port].Attribute[1]=8
table.Ptz[port].Attribute[2]=Even
Success
table.Ptz[port].Attribute[3]=1
Return
table.Ptz[port].Homing[0]=0
table.Ptz[port].Homing[1]=30
table.Ptz[port].NumberInMatrixs=0
table.Ptz[port].ProtocolName=NONE
Parameters in Response:
Comment
port is PTZ port index, start form 0.
Da
Table 4-133
a
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
HT
alue>[&<paramName>=<paramValue>…]
TP
Method GET
Description Set PTZ config.
AP
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Ptz[0].Address=192.
I
168.0.1&Ptz[0].Attribute[0]=9600
fo
Success OK
r
Return
Comment port in below ParamName is PTZ port index, start form 0.
We
st
Appendix:
Eu
Ptz[port].Address integer
connected to this port, distinguish them by this
address.
Te
Ptz[port].Attribute[0] integer
hn
General APIs 96
ParamName ParamValue type Description
PTZ protocol name depends on PTZ capability.
Ptz[port].ProtocolName string
Refer to GetProtocolList to get the protocol list.
Return info.Coaxial[0]=HD-CVI
hu
info.Coaxial[1]=HD-CVI2.0
a
Table 4-135
I
Syntax http://<server>/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps[&channel=<ChannelNo>]
fo
Method GET
r
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps&channel=1
st
caps.AlarmLen=0
caps.AuxMax=8
Eu
caps.AuxMin=1
ro
caps.CamAddrMax=255
pe
caps.CamAddrMin=1
caps.Flip=false
Te
caps.Focus=false
c
caps.Interval=200
hn
caps.Iris=false
ic
caps.Menu=false
a
Success caps.MonAddrMax=255
l
Return caps.MonAddrMin=0
caps.Name=DH-SD1
caps.Pan=false
caps.PanSpeedMax=255
caps.PanSpeedMin=1
caps.PatternMax=5
caps.PatternMin=1
caps.PresetMax=80
caps.PresetMin=1
caps.Tile=false
caps.TileSpeedMax=255
General APIs 97
caps.TileSpeedMin=1
caps.TourMax=7
caps.TourMin=0
caps.Type=1
caps.Zoom=false
Parameters in URL:
Comment
ChannelNo: PTZ channel index which starts from 1.
Appendix:
CamAddrMax
Maximum/Minimum channel address.
hu
CamAddrMin
a
MonAddrMax
Maximum/Minimum monitor address.
I
MonAddrMin
Name Name of the operation protocol.
fo
PanSpeedMax
We
PatternMax
Maximum/Minimum pattern path number.
PatternMin
Eu
PresetMax
ro
TileSpeedMax
c
TileSpeedMin
TourMax
ic
General APIs 98
status.ZoomStatus=Idle
status.PresetID=10
status.Position=120,12,2
Comment ChannelNo: integer, video channel index which starts from 1.
Table 4-137
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.
Da
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Up&arg1=0&arg2=1
hu
&arg3=0
a
Example
http://192.168.1.108/cgi-bin/ptz.cgi?action=stop&channel=1&code=Up&arg1=0&arg2=1&
HT
arg3=0
TP
Success
OK
Return
AP
Parameters in URL:
I
code is PTZ operation, and arg1, arg2, arg3 are arguments of operation.
code and argN values are listed in table below.
We
larger 、Aperture smaller) would take effects temporarily, PTZ will auto—adjust the
aperture after the auto—exposure recovery time (15 mins)
Eu
Comment The default focus mode of PTZ is semi—auto, PTZ control or other operations will trigger
ro
There is no zoom times parameter for ZoomWide and ZoomTele command, if you need to
change zoom times, see "5.1.2 Video in Zoom".
Te
c
Appendix:
hn
Up Tile up 0 0
l
8]
Vertical speed, range is [1—
Down Tile down 0 0
8]
Horizontal speed, range is
Left Pan left 0 0
[1—8]
Horizontal speed, range is
Right Pan right 0 0
[1—8]
Vertical speed, range is Horizontal speed, range is
LeftUp Pan left and tile up 0
[1—8] [1—8]
Vertical speed, range is Horizontal speed, range is
RightUp Pan right and tile up 0
[1—8] [1—8]
General APIs 99
Code Code description arg1 arg2 arg3
Vertical speed, range is Horizontal speed, range is
LeftDown Pan left and tile down 0
[1—8] [1—8]
Vertical speed, range is Horizontal speed, range is
RightDown Pan right and tile down 0
[1—8] [1—8]
ZoomWide Zoom out 0 0 0
ZoomTele Zoom in 0 0 0
FocusNear Focus near 0 0 0
FocusFar Focus far 0 0 0
IrisLarge Aperture larger 0 0 0
IrisSmall Aperture smaller 0 0 0
Start the continuous movement
Da
Table 4-138
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Continuously&arg1=<a
hu
Syntax
rg1>&arg2=<arg2>&arg3=<arg3>&arg4=<arg4>
a
Method GET
HT
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Continuously&arg1=
Example
5&arg2=5&arg3=5&arg4=60
AP
Success
I
OK
Return
fo
Parameters in URL:
r
Comment
arg3 is zoom speed, range is [-100—100];
Eu
arg4 is timeout value,the measurement unit is second, it's an integer greater than 0,the
PTZ will stop moving automatically if timeout value reached and no"stop"command
ro
Table 4-139
c
http://<server>/cgi-bin/ptz.cgi?action=stop&channel=<ch>&code=Continuously&arg1=0&
hn
Syntax
arg2=0&arg3=0&arg4=0
ic
Method GET
a
http://192.168.1.108/cgi-bin/ptz.cgi?action=stop&channel=1&code=Continuously&arg1=
Example
0&arg2=0&arg3=0&arg4=0
Success
OK
Return
Parameters in URL:
Comment
ch is PTZ channel index which starts from 1. Range is [1 — n].
3D positioning
Table 4-140
http://<server>/cgi-bin/ptzBase.cgi?action=moveDirectly&channel=<ChannelNo>&start
Syntax
Point[0]=<startX>&startPoint[1]=<startY>&endPoint[0]=<endX>&endPoint[1]=<endY>
Table 4-141
Da
http://<server>/cgi-bin/ptz.cgi?action=moveRelatively&channel=<ch>&arg1=<arg1>&arg2
Syntax
=<arg2>&arg3=<arg3>
hu
Method GET
a
http://192.168.1.108/cgi-bin/ptz.cgi?action=moveRelatively&channel=1&arg1=1&arg2=1&
TP
Example
arg3=1
Success
AP
OK
Return
I
Parameters in URL:
fo
Table 4-142
pe
http://<server>/cgi-bin/ptz.cgi?action=moveAbsolutely&channel=<ch>&arg1=<arg1>&arg
Syntax
2=<arg2>&arg3=<arg3>
Te
Method GET
c
http://192.168.1.108/cgi-bin/ptz.cgi?action=moveAbsolutely&channel=1&arg1=1&arg2=1&
ic
Example
arg3=1
a l
Success
OK
Return
Parameters in URL:
ch is PTZ channel index which starts from 1. Range is [1 — n].
arg1 is absolute horizontal coordinate
Comment
arg2 is absolute vertical coordinate
arg3 is absolute zoom coordinate
The normalization of above three values is[-1,1]
Table 4-143
Syntax http://<server>/cgi-bin/ptz.cgi?action=getPresets[&channel=<ChannelNo>]
Method GET
Description Get preset of PTZ control.
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getPresets&channel=1
presets[0].Index=1
Success presets[0].Name=Preset 1
Return presets[0].Type=0
…
Da
Parameters in URL:
hu
Table 4-144
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=GotoPreset&arg1=0&a
AP
Syntax
rg2=<index>&arg3=0
I
Method GET
fo
Description Go to preset.
r
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=GotoPreset&arg1=0&
Example
arg2=1&arg3=0
We
Success
st
OK
Return
Eu
Parameters in URL:
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
ro
Set preset
Te
Table 4-145
c
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=SetPreset&arg1=0&ar
hn
Syntax
g2=<index>&arg3=0
ic
Method GET
a
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=SetPreset&arg1=0&a
Example
rg2=2&arg3=0
Success
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
Table 4-146
Syntax http://<server>/cgi-bin/ptz.cgi?action=setPreset&channel=<ch>&arg1=<index>&arg2=<
Table 4-147
Da
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=ClearPreset&arg1=0&
Syntax
arg2=<index>&arg3=0
hu
Method GET
a
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=ClearPreset&arg1=0
Example
TP
&arg2=1&arg3=0
Success
AP
OK
Return
I
Parameters in URL:
fo
4.10.7 Tour
st
Eu
Table 4-148
pe
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=StartTour&arg1=<index
Syntax
>&arg2=0&arg3=0
Te
Method GET
c
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=StartTour&arg1=1&arg
ic
Example
2=0&arg3=0
a
Success
l
OK
Return
Parameters in URL:
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
arg1 is the number of tour route
Stop the tour
Table 4-149
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=StopTour&arg1=<index
Syntax
>&arg2=0&arg3=0
Method GET
Description Stop the tour.
Table 4-150
http://<server>/cgi-bin/ptz.cgi?action=setTour&channel=<ch>&arg1=<index>&arg2=<nam
Syntax
e>
Method GET
Da
Descriptio Add tour group, including set the tour route and name. Frequently used with add tour
n preset.
hu
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=setTour&channel=1&arg1=1&arg2=1
a
Success
HT
OK
Return
TP
Parameters in URL:
ch is PTZ channel index which starts from 1. Range is [1 — n].
AP
Comment
arg1 is the number of tour route
I
Table 4-151
We
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=ClearTour&arg1=<inde
Syntax
st
x>&arg2=0&arg3=0
Method GET
Eu
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=ClearTour&arg1=1&ar
Example
pe
g2=0&arg3=0
Success
Te
OK
Return
c
Parameters in URL:
hn
Table 4-152
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=AddTour&arg1=<index
Syntax
1>&arg2=<index2>&arg3=0
Method GET
Description Add preset to tour group.
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=AddTour&arg1=1&arg
Example
2=2&arg3=0
Success
OK
Return
Comment Parameters in URL:
Table 4-153
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=DelTour&arg1=<index1
Syntax
>&arg2=<index2>&arg3=0
Method GET
Description Delete the specified preset from a particular tour group.
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=DelTour&arg1=1&arg2
Example
=2&arg3=0
Success
OK
Da
Return
Parameters in URL:
hu
Comment
arg1 is the number of tour route
HT
4.10.8 Scan
AP
I
Table 4-154
r
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=SetLeftLimit&arg1=<ind
Syntax
We
ex>&arg2=0&arg3=0
st
Method GET
Description Set left boundary.
Eu
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=SetLeftLimit&arg1=1&
Example
ro
arg2=0&arg3=0
pe
Success
OK
Return
Te
Parameters in URL:
c
Table 4-155
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=SetRightLimit&arg1=<in
Syntax
dex>&arg2=0&arg3=0
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
Parameters in URL:
Comment
ch is PTZ channel index which starts from 1. Range is [1 — n].
Table 4-156
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=AutoScanOn&arg1=<in
Syntax
dex>&arg2=0&arg3=0
Method GET
Description Start scanning.
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=AutoScanOn&arg1=1
Example
&arg2=0&arg3=0
Success
OK
Return
Parameters in URL:
Da
Stop scan
a
HT
Table 4-157
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=AutoScanOff&arg1=<in
TP
Syntax
dex>&arg2=0&arg3=0
AP
Method GET
I
Example
&arg2=0&arg3=0
r
Success
We
OK
Return
st
Parameters in URL:
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
Eu
4.10.9 Pattern
Te
Table 4-158
ic
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=SetPatternBegin&arg1=
Syntax
<index>&arg2=0&arg3=0
al
Method GET
Description Start pattern record.
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=SetPatternBegin&arg1
Example
=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
Stop pattern record
Table 4-160
hu
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=StartPattern&arg1=<ind
a
Syntax
ex>&arg2=0&arg3=0
HT
Method GET
TP
Example
arg2=0&arg3=0
I
Success
OK
fo
Return
r
Parameters in URL:
ch is PTZ channel index which starts from 1. Range is [1 — n].
We
Comment
arg1 is pattern number
st
Stop pattern
Eu
Table 4-161
ro
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=StopPattern&arg1=<ind
Syntax
pe
ex>&arg2=0&arg3=0
Method GET
Te
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=StopPattern&arg1=1&
hn
Example
arg2=0&arg3=0
ic
Success
a
OK
Return
l
Parameters in URL:
Comment ch is PTZ channel index which starts from 1. Range is [1 — n].
arg1 is pattern number
4.10.10 Pan
Start pan
Table 4-162
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=AutoPanOn&arg1=0&ar
Syntax
g2=0&arg3=0
Table 4-163
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=AutoPanOff&arg1=0&ar
Syntax
g2=0&arg3=0
Da
Method GET
Description Stop pan.
hu
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=AutoPanOff&arg1=0&
a
Example
arg2=0&arg3=0
HT
Success
OK
TP
Return
AP
Parameters in URL:
Comment
ch is PTZ channel index which starts from 1. Range is [1 — n].
I
fo
Table 4-164
Eu
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=PtzAutoMovement
ro
Method GET
pe
ment
c
table.PtzAutoMovement[port][Task].Enable = true
hn
table.PtzAutoMovement[port][Task].TimeSection[week][section] = 0 00:00:00-23:59:59
ic
…
a
table.PtzAutoMovement[port][Task].Fuction = None
l
table.PtzAutoMovement[port][Task].ScanId = 0
Success
table.PtzAutoMovement[port][Task].PresetId = 0
Return
table.PtzAutoMovement[port][Task].PatternId = 0
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:
port is PTZ port index, start from 0.
Comment
Task is the number of task, start from 0.
week: from 1 to 7.
Table 4-165
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set PTZ auto movement.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&PtzAutoMovement[0]
Example
[0].Function=Preset&PtzAutoMovement[0][0].PresetId=1
Success
OK
Return
Parameters in URL:
Da
In table below,
head=PtzAutoMovement[port][task]
hu
week: from 1 to 7.
TP
Appendix:
I
timeSchedule[week][section]=1 10:00:00-11:00:00
head. TimeSection timeSchedule
We
…
head. Fuction string Range is {Scan, Preset, Pattern, Tour}.
st
Table 4-166
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Restart&arg1=0&arg
Syntax
2=0&arg3=0
Method GET
Description PTZ restart.
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Restart&arg1=0&ar
Example
g2=0&arg3=0
Success
OK
Return
Comment Parameters in URL:
Parameters in URL:
Comment
hu
Table 4-168
I
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Menu&arg1=0&arg2
Syntax
fo
=0&arg3=0
r
Method GET
Description Enter the menu.
We
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=Menu&arg1=0&arg
st
Example
2=0&arg3=0
Eu
Success
OK
Return
ro
Parameters in URL:
pe
Comment
ch is PTZ channel index which starts from 1. Range is [1 — n].
Te
Table 4-169
hn
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Exit&arg1=0&arg2=0&
ic
Syntax
arg3=0
a
Method GET
l
Table 4-170
Syntax http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=Enter&arg1=0&arg2=0
Table 4-171
http://<server>/cgi-bin/ptz.cgi?action=start&channel=<ch>&code=<code>&arg1=<arg1
Syntax
Da
>&arg2=<arg2>&arg3=<arg3>
Method GET
hu
http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=1&code=MenuUp&arg1=0&
HT
Example
arg2=0&arg3=0
TP
Success
OK
Return
AP
Parameters in URL:
I
code is PTZ operation, and arg1, arg2, arg3 are arguments of operation.
r
Appendix:
st
MenuUp MenuUp 0 0 0
ro
MenuDown MenuDown 0 0 0
pe
MenuLeft MenuLeft 0 0 0
MenuRight MenuRight 0 0 0
Te
c
4.11 Record
hn
ic
Table 4-172
Syntax http://<server>/cgi-bin/recordManager.cgi?action=getCaps
Method GET
Description Get record manager capabilities.
Example http://192.168.1.108/cgi-bin/recordManager.cgi?action=getCaps
caps.MaxPreRecordTime=30
caps.PacketLengthRange[0]=1
Success
caps.PacketLengthRange[1]=60
Return
caps.PacketSizeRange[0]=131072
caps.PacketSizeRange[1]=2097152
Table 4-173
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Record
Method GET
Da
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Record
a
table.Record[channel].PreRecord=6
HT
table.Record[channel].TimeSection[weekday][0]=1 00:00:00-24:00:00
TP
table.Record[channel].TimeSection[weekday][1]=0 02:00:00-24:00:00
Success
table.Record[channel].TimeSection[weekday][2]=0 03:00:00-24:00:00
AP
Return
table.Record[channel].TimeSection[weekday][3]=0 04:00:00-24:00:00
I
table.Record[channel].TimeSection[weekday][4]=0 05:00:00-24:00:00
fo
table.Record[channel].TimeSection[weekday][5]=0 06:00:00-24:00:00
r
Parameters in Response:
channel: integer, array index starts from 0, which means video channel(equals to video
We
Table 4-174
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
Te
alue>[&<paramName>=<paramValue>…]
c
Method GET
hn
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Record[0].TimeSecti
a
on[0][0]=6 00:00:00-23:59:59
l
Example Set record time to every Sunday all day. Record type is motion detection and alarm.
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.).
Success
OK
Return
Parameters in URL:
In table below,
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
ts: time section index
Table 4-175
We
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=RecordMode
st
Method GET
Description Get record mode config.
Eu
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RecordMode
ro
Success
table.RecordMode[Channel].Mode=0
pe
Return
Parameters in Response:
Te
Comment Channel: integer, array index starts from 0, which means video channel (equals to
c
Table 4-176
a l
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>
Method GET
Description Set record mode config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RecordMode[0].Mod
Example
e=0
Success
OK
Return
Parameters in URL:
Comment In table below,
Channel: integer, array index starts from 0, which means video channel (equals to
Appendix:
Table 4-177
Da
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MediaGlobal
hu
Method GET
a
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MediaGlobal
TP
Success
table.MediaGlobal.SnapFormatAs=MainFormat
Return
AP
Comment —
I
Table 4-178
r
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
We
Syntax
alue>
st
Method GET
Description Set media global config.
Eu
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MediaGlobal.SnapF
Example
ro
ormatAs=MainFormat
pe
Success
OK
Return
Te
Comment —
c hn
Appendix:
ic
Table 4-179
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=factory.create
Method GET
Description Create a media file finder.
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=factory.create
Success result=08137
Table 4-180
http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile&object=<objectId>&condition
.Channel=<ChannelNo>&condition.StartTime=<start>&condition.EndTime=<end>[&c
Syntax
ondition.Dirs[0]=<dir>&condition.Types[0]=<type>&condition.Flags[0]=<flags>&conditi
on.Events[0]=<event>&condition.VideoStream=<stream>]
Method GET
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
"VideoMotion", file type is "dav", and time between 2014-1-1 12:00:00 and 2015-1-10
Da
n.Channel=1&condition.Dirs[0]
=/mnt/dvr/sda0&condition.Types[0]=dav&condition.Eve
a
nts[0]=AlarmLocal&condition.Events[1]=VideoMotion&condition.StartTime=2014-1-1%2
HT
012:00:00&condition.EndTime=2015-1-10%2012:00:00&condition.VideoStream=Main
TP
Success
OK
Return
AP
Start to find a file with the above condition. If files exist, return OK, else return Error.
I
Parameters in URL:
fo
objecteId: The object Id is the finder created before. You must create a finder before
r
finding files.
ChannelNo: integer, video channel index which starts from 1.
We
dir : in which directories you want to find the file. It is an array. The index starts from 0.
The range of dir is {"/mnt/dvr/sda0", "/mnt/dvr/sda1"}. This condition can be omitted. If
Eu
Comment type : which types of the file you want to find. It is an array. The index starts from 0. The
pe
range of type is {"dav", "jpg", "mp4"}. If omitted, find files with all the types.
flags : which flags of the file you want to find. It is an array. The index starts from 0. The
Te
"Traffic*"}. This condition can be omitted. If omitted, find files of all the events.
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.
Step 3 Get the media file information found by the finder.
Table 4-181
http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=<objectId>&cou
Syntax
nt=<fileCount>
Method GET
Description Find the next files no more than fileCount.
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&cou
Example
nt=100
Appendix:
Da
Field in Description
hu
Response
a
Channel
condition.Channel -1.
TP
Table 4-182
pe
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=close&object=<objectId>
Te
Method GET
Description Stop finding.
c
hn
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=close&object=08137
ic
Success
OK
a
Return
l
Comment —
Step 5 Destroy the finder.
Table 4-183
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=destroy&object=<objectId>
Method GET
Description Destroy the media file finder.
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=destroy&object=08137
Success
OK
Return
Comment —
Table 4-184
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
Method GET
Start to find media files satisfied the common conditions and FaceDetection conditions
Description
with the finder.
[ Request Params ] ( key=value format at URL )
Da
Search directory list, if omit, search all. Each dir path max
+Dirs array<string> O
string length is 259.
Eu
++FaceDetecti
object R DB filter for FaceDetection
pe
onRecordFilter
Picture type, if omit, means search all type.
Te
+++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
[ Response Params ] ( OK )
[ Example ]
Table 4-185
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
Da
Method GET
hu
+CutLength int R File length that cut between start time and end time
Te
items[0].SummaryNew[0].Value.TimeStamp.UTC=134652732
hu
items[0].SummaryNew[0].Value.TimeStamp.UTCMS=134
items[0].SummaryNew[0].Value.Sex=Man
a
items[0].SummaryNew[0].Value.Age=30
HT
items[0].SummaryNew[0].Value.Glasses=1
TP
items[0].SummaryNew[0].Value.Mask=2
items[0].SummaryNew[0].Value.Beard=1
AP
…
I
This API is the same as the API in "4.11.5 Find Media Files".
r
This API is the same as the API in "4.11.5 Find Media Files".
st
Step 2 Start to find media files satisfied the common conditions and FaceRecognition
Te
Table 4-186
hn
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
ic
Method GET
a
Description Start to find media files satisfied the common conditions and FaceRecognition conditions
l
dress
hu
+++Person object O Search condition of history person and the similar face group
person candidates
TP
Type "Unknown"
++++ID string O Person ID of CertificateType, max string length is 31
Eu
++++GroupID string O The identity of the Face Group that this Person in. max string
ro
length is 63
pe
++++Mask int O Mask Status, 0: all, 1: not wearing mask, 2: wearing mask
c hn
nge
[ Response Params ] ( OK )
[ Example ]
Request GET
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Ch
annel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-10%2012
:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.Events[0]=FaceRecogn
ition&condition.DB.FaceRecognitionRecordFilter.RegType=RecSuccess&condition.DB.Fac
eRecognitionRecordFilter.StartTime=2014-1-1%2012:00:00&condition.DB.FaceRecognition
RecordFilter.EndTime=2015-1-10%2012:00:00&condition.DB.FaceRecognitionRecordFilter.
Person.Sex=Male&condition.DB.FaceRecognitionRecordFilter.Person.Country=CN&conditi
Table 4-187
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
Method GET
Description Get the media file information found by the finder
Da
+CutLength int R File length that cut between start time and end time
+Length int O File length of the whole file
pe
+++MachineAd
l
eType "Unknown"
TP
State
I
[ Example ]
fo
GET
Request http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=1
r
00
We
found=100
st
items[0].Channel=1
items[0].StartTime=2011-1-1 12:00:00
Eu
items[0].EndTime=2011-1-1 13:00:00
ro
items[0].Type=jpg
pe
items[0].Events[0]=FaceRecognition
items[0].FilePath =/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
Te
items[0].Length =790
c
items[0].SummaryNew[0].Key=FaceRecognitionRecord
hn
items[0].SummaryNew[0].Value.RecResult=1
ic
Respons items[0].SummaryNew[0].Value.MachineAddress=BinJiang
a
e items[0].SummaryNew[0].Value.IsGlobalScene=true
l
items[0].SummaryNew[0].Value.ImageInfo.Length=123
items[0].SummaryNew[0].Value.ImageInfo.FilePath=/tmp/1.jpg
items[0].SummaryNew[0].Value.Object.Sex=Man
items[0].SummaryNew[0].Value.Object.Age=40
items[0].SummaryNew[0].Value.Object.Glasses=1
items[0].SummaryNew[0].Value.Object.Eye=2
items[0].SummaryNew[0].Value.Object.Mouth=1
items[0].SummaryNew[0].Value.Candidates[0].Similarity=50
items[0].SummaryNew[0].Value.Candidates[0].Person.Name=ZhangSan
items[0].SummaryNew[0].Value.Candidates[0].Person.Birthday=1980-01-01
This API is the same as the API in "4.11.5 Find Media Files".
HT
Step 2 Start to find media files satisfied the common conditions and HumanTrait conditions
TP
Table 4-188
I
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
fo
Method GET
Start to find media files satisfied the common conditions and HumanTrait conditions with
r
Description
the finder.
We
+Channel int R
1, use -1 to search all video channel.
+StartTime string O Start time to search, ex: "2010-05-25 12:05:00"
Te
[ Example ]
hu
GET
a
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condition.Ch
HT
annel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-10%2012
:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.Events[0]=HumanTrait
TP
&condition.DB.HumanTraitRecordFilter.HumanAttributes.CoatColor[0]=White&condition.DB
AP
Request .HumanTraitRecordFilter.HumanAttributes.CoatColor[1]=Yellow&condition.DB.HumanTraitR
ecordFilter.HumanAttributes.CoatType=1&condition.DB.HumanTraitRecordFilter.HumanAttr
I
ibutes.HasHat=2&condition.DB.HumanTraitRecordFilter.HumanAttributes.Sex=Man&conditi
fo
on.DB.HumanTraitRecordFilter.HumanAttributes.Age[0]=30&condition.DB.HumanTraitReco
r
rdFilter.HumanAttributes.Age[1]=50&condition.DB.HumanTraitRecordFilter.HumanAttribute
We
s.HairStyle=1
st
Respons
OK
e
Eu
Table 4-189
pe
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
Method GET
Te
Descripti
c
on
ic
string O
Color HumanTrait for available values,
hu
++++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
TP
int O
ella umbrella
We
+++FaceAttribu
ro
++++Mask int O
mask
hn
++++Glass Int O
l
items[0].SummaryNew.Value.HumanAttributes.CoatColor=White
hu
items[0].SummaryNew.Value.HumanAttributes.CoatType=1
a
items[0].SummaryNew.Value.HumanAttributes.TrousersColor=Black
items[0].SummaryNew.Value.HumanAttributes.TrousersType=1
HT
items[0].SummaryNew.Value.HumanAttributes.HasHat=2
TP
Respons items[0].SummaryNew.Value.HumanAttributes.HasBag=1
e items[0].SummaryNew.Value.HumanAttributes.Sex=Man
AP
items[0].SummaryNew.Value.HumanAttributes.Age=30
I
items[0].SummaryNew.Value.HumanAttributes.HairStyle=2
fo
items[0].SummaryNew.Value.HumanAttributes.HasUmbrella=1
r
items[0].SummaryNew.Value.HumanAttributes.Bag=0
We
items[0].SummaryNew.Value.HumanAttributes.Cap=2
st
items[0].SummaryNew.Value.FaceAttributes.Sex=Man
items[0].SummaryNew.Value.FaceAttributes.Age=35
Eu
items[0].SummaryNew.Value.FaceAttributes.Mask=0
ro
items[0].SummaryNew.Value.FaceAttributes.Beard=1
items[0].SummaryNew.Value.FaceAttributes.Glass=2
pe
items[0].SummaryNew.Value.FaceAttributes.Emotion=Smile
Te
items[0].SummaryNew.Value.FacePath=/mnt/2010/8/11/dav/15:40:50.jpg
items[0].SummaryNew.Value.FaceScenePath=/mnt/2010/8/11/dav/15:40:51.jpg
c hn
…
ic
This API is the same as the API in "4.11.5 Find Media Files".
l
Table 4-190
+Flags array<string> O
"Mosaic", "Cutout"
r
+Events array<string> O
Ignored, use Event under DB param.
st
Search directory list, if omit, search all. Each dir path max
+Dirs array<string> O
string length is 259.
Eu
<compare
+++Event O Event condition, ex: [ "||", "TrafficGate", "Alarm*" ]
c
condition>
hn
<compare
Speed condition, ex: [ "<>", 40, 80 ]
ic
+++Speed O
condition>
a
<compare Plate type condition, use compare condition format, ex: ["==",
l
+++PlateType O
condition> "Armed"],
<compare Plate color condition, use compare condition format, ex: ["==",
+++PlateColor O
condition> "Blue"],
+++VehicleCol <compare Vehicle color condition, use compare condition format, ex:
O
or condition> ["==", "White"],
[ Response Params ] ( OK )
[ Example ]
GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condit
Request ion.Channel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-1
0%2012:00:00&condition.Types[0]=jpg&condition.Flags[0]=Event&condition.DB.TrafficCar.
Table 4-191
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
Method GET
Descripti
Get the media file information found by the finder
on
[ Request Params ] ( key=value format at URL )
Da
er
c
+++VehicleCol
string O Vehicle color, ex: "Yellow", "Blue", … etc
a
or
l
items[0].Summary.TrafficCar.Speed=70
hu
items[0].Summary.TrafficCar.Event=TrafficJunction
…
a
This API is the same as the API in "4.11.5 Find Media Files".
TP
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 IVS conditions with the
st
finder
Eu
Table 4-192
ro
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
pe
Method GET
Start to find media files satisfied the common conditions and IVS conditions with the
Te
Description
finder.
c
[ Example ]
hu
GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=08137&condit
a
ion.Channel=1&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-1-1
HT
Request 0%2012:00:00&condition.Types[0]=jpg&condition.DB.IVS.Rule=CrossLineDetection&cond
ition.DB.IVS.Action=Cross&condition.DB.IVS.ObjectType[0]=Human&condition.DB.IVS.Ob
TP
jectType[1]=NonMotor
AP
Response OK
Step 3 Get the media file information found by the finder
I
fo
Table 4-193
r
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
Method GET
We
items[0].Summary.IVS.Action=Cross
hu
items[0].Summary.IVS.ObjectType=Human
a
…
Step 4 Close the finder.
HT
This API is the same as the API in "4.11.5 Find Media Files".
TP
This API is the same as the API in "4.11.5 Find Media Files".
st
Step 2 Start to find media files satisfied the common conditions and NonMotor conditions with
the finder
Eu
Table 4-194
ro
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile
pe
Method GET
Start to find media files satisfied the common conditions and NonMotor conditions with
Te
Description
the finder.
c hn
"CoachMotorcycle"
+++Helmet int O Helmet status, 0 : unknown, 1 : without helmet, 2 : with helmet
HT
[ Response Params ] ( OK )
TP
[ Example ]
AP
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
I
Request 0%2012:00:00&condition.Types[0]=jpg&condition.DB.NonMotorRecordFilter.NumOfCyclin
fo
g=2&condition.DB.NonMotorRecordFilter.Color=White&condition.DB.NonMotorRecordFilt
r
er.Category=Bicycle&condition.DB.NonMotorRecordFilter.Helmet=1
We
Response OK
st
Table 4-195
Eu
URL http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile
ro
Method GET
pe
"CoachMotorcycle"
+++Helmet int O Helmet status, 0 : unknown, 1 : without helmet, 2 : with helmet
HT
[ Example ]
TP
GET http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&
Request
AP
count=100
found=100
I
items[0].Channel=1
fo
items[0].StartTime=2011-1-1 12:00:00
r
items[0].EndTime=2011-1-1 13:00:00
We
items[0].Type=jpg
st
items[0].Events[0]=NonMotorDetect
items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/15:40:50.jpg
Response
Eu
items[0].Length=790
ro
items[0].SummaryNew.Key=NonMotorRecordFilter
pe
items[0].SummaryNew.Value.NumOfCycling=2
items[0].SummaryNew.Value.Color=White
Te
items[0].SummaryNew.Value.Category=Bicycle
c
items[0].SummaryNew.Value.Helmet=1
hn
…
ic
This API is the same as the API in "4.11.5 Find Media Files".
l
e=<starttime>&endTime=<endtime>[&subtype=<typeNo>]
hu
Method GET
a
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-
HT
Example
10-8%2013:00:01&endTime=2012-10-8%2014:00:01&subtype=0
TP
Content-Type: Application/octet-stream
Success Content-Length:<fileLength>
I
Return Body:
fo
<data>
r
<data>
We
Parameters in URL:
st
0-Main Stream
Comment
ro
1-Extra Stream 1
pe
2-Extra Stream 2
starttime & endtime: video start time and end time. Time format: yyyy-mm-dd
Te
hh:mm:ss
c hn
users[0].Name=admin
Success
a
users[0].Reserved=true
Return
HT
users[0].Sharable=true
users[0]. AuthList=<authList>
TP
users[1].Group=admin
AP
…
Comment —
I
fo
Table 4-200
st
Syntax http://<server>/cgi-bin/userManager.cgi?action=getActiveUserInfoAll
Method GET
Eu
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=getActiveUserInfoAll
pe
users[0].name=admin
users[0].ip=10.43.2.16
Success
Te
users[0].group=admin
Return
c
users[0].clienttype=web3.0
hn
users[0].logintime=2011-11-08 09:51:03
ic
Comment —
a l
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=getGroupInfoAll
hu
group[0].Name=admin
a
group[0].Memo=administrator group
group[0]. AuthorityList=<authList>
HT
Success
group[1].Name=user
TP
Return
group[1].Memo=user group
AP
group[1]. AuthorityList=<authList>
group[2]….
I
Comment —
fo
r
Table 4-203
http://<server>/cgi-bin/userManager.cgi?action=addUser&user.Name=<userName>&u
Eu
Syntax ser.Password=<userPassword>&user.Group=<userGroup>&user.Sharable=<userSh
ro
arable>[&user.Memo=<userMemo>&user.Reserved=<userReserved>]
pe
Method GET
Description Add a user.
Te
http://192.168.1.108/cgi-bin/userManager.cgi?action=addUser&user.Name=George&us
Example
c
er.Password=123456&user.Group=user&user.Sharable=true&user.Reserved=false
hn
Success
ic
OK
Return
a
Parameters in URL:
l
userGroup: string, the range is "admin"and "user". In different group, the user has
Comment different authorities.
userSharable: bool, true means allow multi-point login.
userReserved: bool, true means this user can't be deleted.
http://192.168.1.108/cgi-bin/userManager.cgi?action=modifyUser&name=George&user
Example
a
.Group=admin
HT
Success
OK
Return
TP
Comment User is identified by <UserName>, other params are the same with AddUser.
AP
Table 4-206
r
http://<server>/cgi-bin/userManager.cgi?action=modifyPassword&name=<username>
We
Syntax
&pwd=<newPwd>&pwdOld=<oldPwd>
st
Method GET
Description Modify user password.
Eu
http://192.168.1.108/cgi-bin/userManager.cgi?action=modifyPassword&name=George
Example
ro
&pwd=abcdef&pwdOld=123456
pe
Success
OK
Return
Te
4.13 Log
ic
a l
Table 4-207
http://<server>/cgi-bin/log.cgi?action=startFind&condition.StartTime=<start>&condition
Syntax
.EndTime=<end>[& condition.Type=<type>]
Method GET
Description Start to find log.
Find log between 2011-1-1 12:00:00 and 2011-1-10 12:00:00, URL is:
Example
http://192.168.1.108/cgi-bin/log.cgi?action=startFind&condition.StartTime=2011-1-1%2
Table 4-208
Syntax http://<server>/cgi-bin/log.cgi?action=doFind&token=<TokenValue>&count=<logCount>
Method GET
Da
Example http://192.168.1.108/cgi-bin/log.cgi?action=doFind&token=1&count=100
a
found=2
HT
items[0].RecNo=789
TP
items[0].Time=2011-05-20 11:59:10
items[0].Type=ClearLog
AP
items[0].User=admin
I
Success items[1].Detail.Compression=H.264->MJPG
fo
Return items[1].Detail.Data=Encode
r
items[1].RecNo=790
items[1].Time=2011-05-20 11:59:21
We
items[1].Type=SaveConfig
st
items[1].User=System
…
Eu
Parameters in URL:
ro
The TokenValue is got by startFind in the above section, and logCount is the count of
pe
Comment
logs for this query.
The maximum value of logCount is 100.
Te
c
Appendix:
hn
Field in Description
ic
Response
a l
Table 4-209
Syntax http://<server>/cgi-bin/log.cgi?action=stopFind&token=<TokenValue>
Method GET
Syntax http://<server>/cgi-bin/log.cgi?action=clear
Method GET
Da
Example http://192.168.1.108/cgi-bin/log.cgi?action=clear
a
Success
OK
HT
Return
—
TP
Comment
AP
Table 4-211
fo
http://<server>/cgi-bin/Log.backup?action=All&condition.StartTime=<startTime>&condi
r
Syntax
tion.EndTime=<endTime>
We
Method GET
st
Download the log information between the start time and the end time as a file named
Description
Log. Backup default.
Eu
http://192.168.1.108/cgi-bin/Log.backup?action=All&condition.StartTime=2014-8-25%2
ro
Example
000:02:32&condition.EndTime=2020-8-25%2001:02:32
pe
HTTP/1.1 200 OK
CONTENT-LENGTH: 743087
Te
CONNECTION: close
c
&w_User: default
a
Success
&Time: 2014-09-01 15:20:45
l
Return
&Type: VideoLoss
&Content: EventType: VideoLoss
channel: <8>
StartTime: 2014-09-01 15:20:45
…
Parameters in URL:
startTime/endTime: the start/end time when log info built. 24 hour Format, as:
Comment
yyyy-mm-dd hh:mm:ss.
For example:
4.14 Upgrader
Host: 192.168.1.108
a
Connection: keep-alive
HT
Content-Length: xxxxxxxxx
AP
Example -----------------------------8655433224198
I
Content-Type: application/octet-stream
r
Firmware data….
We
st
-----------------------------8655433224198--
Success
Eu
OK
Return
ro
Comment —
pe
Table 4-213
Syntax http://<server>/cgi-bin/upgrader.cgi?action=getState
ic
Method GET
a l
Use this message to upload the firmware, and when the device receiving all the data
Description successfully, it will start to upgrade the device, and then use the getState method to get
the state.
Example http://192.168.1.108/cgi-bin/upgrader.cgi?action=getState
Success state.State=Upgrading
Return state.Progress=45
Parameters in Response:
State: the state of the upgrade, it can be Preparing, Downloading, DownloadFailed,
Comment
Upgrading, Invalid, Failed, Succeeded, Cancelled, and NotEnoughMemory.
Progress: the progress of the upgrade.
Table 5-1
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInFocus
Da
Method GET
hu
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInFocus
table.VideoInFocus[0][0].FocusLimit=100
HT
table.VideoInFocus[0][0].FocusLimitSelectMode=Manual
TP
table.VideoInFocus[0][0].IRCorrection=0
table.VideoInFocus[0][0].Mode=3
AP
table.VideoInFocus[0][0].Sensitivity=1
I
table.VideoInFocus[0][1].FocusLimit=100
fo
table.VideoInFocus[0][1].FocusLimitSelectMode=Manual
Success
r
table.VideoInFocus[0][1].IRCorrection=0
Return
We
table.VideoInFocus[0][1].Mode=3
st
table.VideoInFocus[0][1].Sensitivity=1
table.VideoInFocus[0][2].FocusLimit=100
Eu
table.VideoInFocus[0][2].FocusLimitSelectMode=Manual
ro
table.VideoInFocus[0][2].IRCorrection=0
table.VideoInFocus[0][2].Mode=3
pe
table.VideoInFocus[0][2].Sensitivity=1
Te
Comment —
c
Table 5-2
ic
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
a
Syntax
l
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video input focus config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInFocus[0][0].F
Example
ocusLimit=1000
Success
OK
Return
Appendix:
Range is 0,1,2
head. Sensitivity integer
a
Table 5-3
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInZoom
We
Method GET
st
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInZoom
table.VideoInZoom[0][0].DigitalZoom=true
ro
table.VideoInZoom[0][0].Speed=7
pe
table.VideoInZoom[0][0].ZoomLimit=4
table.VideoInZoom[0][1].DigitalZoom=true
Te
Success
table.VideoInZoom[0][1].Speed=0
c
Return
hn
table.VideoInZoom[0][1].ZoomLimit=4
ic
table.VideoInZoom[0][2].DigitalZoom=false
table.VideoInZoom[0][2].Speed=7
a l
table.VideoInZoom[0][2].ZoomLimit=4
Comment —
Set video in zoom config
Table 5-4
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video input zoom config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInZoom[0][0].D
Example
igitalZoom=false&VideoInZoom[0][0].Speed=8
Appendix:
Table 5-5
AP
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInSharpness
I
Method GET
fo
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInSharp
Example
ness
We
table.VideoInSharpness[0][0].Level=4
st
table.VideoInSharpness[0][0].Mode=1
Eu
table.VideoInSharpness[0][0].Sharpness=8
table.VideoInSharpness[0][1].Level=4
ro
Success
table.VideoInSharpness[0][1].Mode=1
pe
Return
table.VideoInSharpness[0][1].Sharpness=8
table.VideoInSharpness[0][2].Level=4
Te
table.VideoInSharpness[0][2].Mode=1
c hn
table.VideoInSharpness[0][2].Sharpness=8
Comment —
ic
Table 5-6
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video input sharpness settings.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInSharpness[0]
Example
[0].Level=10&VideoInSharpness[0][0].Mode=1&VideoInSharpness[0][0].Sharpness=0
Success
OK
Return
Comment Parameters in URL:
Appendix:
Table 5-7
TP
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInMode
Method GET
AP
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInMode
fo
table.VideoInMode[0].Config[0]=1
r
table.VideoInMode[0].Mode=0
table.VideoInMode[0].TimeSection[0][0]=0 00:00:00-23:59:59
We
table.VideoInMode[0].TimeSection[0][1]=0 00:00:00-23:59:59
st
table.VideoInMode[0].TimeSection[0][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][3]=0 00:00:00-23:59:59
Eu
table.VideoInMode[0].TimeSection[0][4]=0 00:00:00-23:59:59
ro
table.VideoInMode[0].TimeSection[0][5]=0 00:00:00-23:59:59
pe
table.VideoInMode[0].TimeSection[1][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][1]=0 00:00:00-23:59:59
Te
table.VideoInMode[0].TimeSection[1][2]=0 00:00:00-23:59:59
c hn
table.VideoInMode[0].TimeSection[1][3]=0 00:00:00-23:59:59
Success
table.VideoInMode[0].TimeSection[1][4]=0 00:00:00-23:59:59
ic
Return
table.VideoInMode[0].TimeSection[1][5]=0 00:00:00-23:59:59
a l
table.VideoInMode[0].TimeSection[2][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][0]=0 00:00:00-23:59:59
hu
table.VideoInMode[0].TimeSection[6][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][2]=0 00:00:00-23:59:59
a
table.VideoInMode[0].TimeSection[6][3]=0 00:00:00-23:59:59
HT
table.VideoInMode[0].TimeSection[6][4]=0 00:00:00-23:59:59
TP
table.VideoInMode[0].TimeSection[6][5]=0 00:00:00-23:59:59
Comment —
AP
Table 5-8
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
r
Syntax
alue>[&<paramName>=<paramValue>…]
We
Method GET
st
Example
e=0
ro
Success
pe
OK
Return
Parameters in URL:
Te
In table below,
Comment
head = VideoInMode [ChannelNo]
ic
ChannelNo: integer, array index starts from 0, which means video channel (equals to
a l
Appendix:
Table 5-9
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInDayNight
Method GET
Description Get video in day night mode shift config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInDayNight
Da
table.VideoInDayNight[0][0].Delay=10
hu
table.VideoInDayNight[0][0].Mode=Brightness
table.VideoInDayNight[0][0].Sensitivity=2
a
table.VideoInDayNight[0][0].Type=Mechanism
HT
table.VideoInDayNight[0][1].Delay=10
TP
Success table.VideoInDayNight[0][1].Mode=Brightness
Return table.VideoInDayNight[0][1].Sensitivity=2
AP
table.VideoInDayNight[0][1].Type=Mechanism
I
table.VideoInDayNight[0][2].Delay=10
fo
table.VideoInDayNight[0][2].Mode=Brightness
r
table.VideoInDayNight[0][2].Sensitivity=2
We
table.VideoInDayNight[0][2].Type=Mechanism
VideoInDayNight[ChannelNo][ConfigNo]:
st
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Eu
Table 5-10
c
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
hn
Syntax
alue>[&<paramName>=<paramValue>…]
ic
Method GET
a l
Appendix:
Range is [3-30].
head. Delay integer
hu
5.1.6 Lighting
HT
TP
Table 5-11
I
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Lighting
fo
Method GET
r
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Lighting
table.Lighting[0][0].Correction=50
st
table.Lighting[0][0].FarLight[0].Angle=0
Eu
table.Lighting[0][0].FarLight[0].Light=0
table.Lighting[0][0].Mode=ZoomPrio
ro
table.Lighting[0][0].NearLight[0].Angle=0
pe
table.Lighting[0][0].NearLight[0].Light=0
Te
table.Lighting[0][0].Sensitive=3
table.Lighting[0][1].Correction=50
c hn
table.Lighting[0][1].FarLight[0].Angle=0
ic
table.Lighting[0][1].FarLight[0].Light=0
Success
table.Lighting[0][1].Mode=ZoomPrio
a
Return
l
table.Lighting[0][1].NearLight[0].Angle=0
table.Lighting[0][1].NearLight[0].Light=0
table.Lighting[0][1].Sensitive=3
table.Lighting[0][2].Correction=50
table.Lighting[0][2].FarLight[0].Angle=0
table.Lighting[0][2].FarLight[0].Light=0
table.Lighting[0][2].Mode=ZoomPrio
table.Lighting[0][2].NearLight[0].Angle=0
table.Lighting[0][2].NearLight[0].Light=0
table.Lighting[0][2].Sensitive=3
Comment Lighting[ChannelNo][ConfigNo]:
Table 5-12
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set lighting config.
Turn on light:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Lighting[0][0].FarLig
Da
ht[0].Light=10&Lighting[0][0].NearLight[0].Light=90&Lighting[0][0].Mode=Manual
Example
hu
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Lighting[0][0].Correct
HT
ion=50&Lighting[0][0].Mode = ZoomPrio
TP
Success
OK
Return
AP
Parameters in URL:
I
Lighting[0][0].FarLight[0].Light+ Lighting[0][0].NearLight[0].Light<=100.
st
Appendix:
Eu
Light mode.
The range is {"Manual", "Auto", "Off",
pe
Manual mode.
ic
Light compensation.
l
5.2 Wiper
Method GET
hu
Example http://192.168.1.108/cgi-bin/rainBrush.cgi?action=moveContinuously&interval=5
HT
Success
OK
TP
Return
Second: integer, rain brush movement time interval which start from 1.
AP
Comment
ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
I
fo
Table 5-14
We
Syntax http://<server>/cgi-bin/rainBrush.cgi?action=stopMove[&channel=<ChannelNo>]
st
Method GET
Eu
Success
pe
OK
Return
Te
Comment ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
c hn
Table 5-15
a l
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
Success
OK
Return
Comment ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
Example http://192.168.1.108/cgi-bin/storageDevice.cgi?action=factory.getPortInfo
a
info.Total=2
info.Plug=1
HT
Success info.Mask=1
TP
Return info.Bad=0
info.IDE=1
AP
info.Esata=4
I
Comment —
fo
r
Table 6-2
Syntax http://<server>/cgi-bin/storageDevice.cgi?action=factory.getCollect
Eu
Method GET
ro
Example http://192.168.1.108/cgi-bin/storageDevice.cgi?action=factory.getCollect
list[0]="/dev/sda0"
Success
Te
list[1]="/dev/sda1"
Return
c
list[2]="/dev/sg1"
hn
Comment —
ic
a
Table 6-3
Syntax http://<server>/cgi-bin/storageDevice.cgi?action=getDeviceAllInfo
Method GET
Description Get all the storage device information.
Example http://192.168.1.108/cgi-bin/storageDevice.cgi?action=getDeviceAllInfo
Method GET
hu
Example http://192.168.1.108/cgi-bin/storage.cgi?action=getCaps
HT
Success caps.RedundantDisk.Support=false
Return caps.SupportRemoteLimit=true
TP
Comment —
AP
Table 6-5
r
http://<server>/cgi-bin/storageDevice.cgi?action=setDevice&type=FormatPatition&path=
Syntax
We
<path>
st
Method GET
Description Format camera SD card.
Eu
http://192.168.1.108/cgi-bin/storageDevice.cgi?action=setDevice&type=FormatPatition&
ro
Example
path= /dev/sda
pe
Success
OK
Return
Te
Comment path : The stringValue is got from cgi API "Get storage device information"
hn
6.2 NAS
l
Table 6-6
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=NAS
Method GET
Description Get all the directories on the NAS server.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=NAS
Table 6-7
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Da
Method GET
hu
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NAS[0].Name=nas0
Example
HT
1&NAS[0].Enable=true
TP
Success
OK
Return
AP
Parameters in URL:
I
In table below,
Comment
fo
Head =NAS[index]
r
Appendix:
st
Table 6-8
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=RecordStoragePoi
Syntax
nt
Method GET
Description Get record storage point config.
Table 6-9
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Da
Syntax
alue>[&<paramName>=<paramValue>…]
hu
Method GET
a
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RecordStoragePoint[
Example
TP
0].TimingRecord.Local=local
Success
AP
OK
Return
I
Parameters in URL:
fo
In table below,
r
ch: integer, array index starts from 0, which means video channel(equals to video
Comment channel index -1, and so 0 means channel 1).
We
Appendix:
pe
RecordStoragePoint [ch].[recType].
string Redundant directory name.
ic
Redundant
RecordStoragePoint [ch].[recType].
a
Remote
When remote directory recovers, auto
RecordStoragePoint [ch].[recType].
bool synchronize local directory to remote
AutoSync
directory or not.
From the remote directory recovering
time, how long the data needs to be
RecordStoragePoint [ch].[recType].
integer synchronized. The unit is hour. If it is
AutoSyncRange
0, all the data needs to be
synchronized.
Table 6-10
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup
Method GET
Da
http://192.168.1.168/cgi-bin/configManager.cgi?action=getConfig&name=StorageGrou
a
Example
p
HT
table.StorageGroup[0].Channels[0].MaxPictures=0
TP
table.StorageGroup[0].FileHoldTime=0
table.StorageGroup[0].Memo=For Reading & Writing Files
AP
table.StorageGroup[0].Name=ReadWrite
I
table.StorageGroup[0].OverWrite=true
fo
table.StorageGroup[0].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S
r
][%R].jpg
table.StorageGroup[0].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.
We
Success %s[%E][%O@%S][%R].dav
st
Return table.StorageGroup[1].Channels[0].MaxPictures=0
table.StorageGroup[1].FileHoldTime=0
Eu
table.StorageGroup[1].Name=Remote
pe
table.StorageGroup[1].OverWrite=true
table.StorageGroup[1].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S
Te
][%R].jpg
c hn
table.StorageGroup[1].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.
%s[%E][%O@%S][%R].da
ic
Comment —
a l
Table 6-11
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set storage group config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageGroup[0].Na
Example
me=main
Success
OK
Return
Appendix:
written.
StorageGroup[Index]. Channels[ch].
TP
6.4 SDEncrypt
I
fo
Table 6-12
st
http://<server>/cgi-bin/SDEncrypt.cgi?action=encrypt&deviceName=<deviceName>&p
Syntax
assword=<password>
Eu
Method GET
ro
http://192.168.1.108/cgi-bin/SDEncrypt.cgi?action=encrypt&deviceName=/dev/mmc0&
Example
password=123456
Te
Success
c
OK
hn
Return
ic
Comment
l
(cgi-bin/storageDevice.cgi?action=getDeviceAllInfo).
password: The stringValue Card is Encrypted
me>&password=<password>
hu
Method GET
a
http://192.168.1.108/cgi-bin/SDEncrypt.cgi?action=clearPassword&deviceName=/dev/
Example
mmc0&password=123456
TP
Success
OK
AP
Return
If set successfully, return true, else return false.
I
deviceName: The stringValue is got from cgi API Get storage device information
fo
Comment
(cgi-bin/storageDevice.cgi?action=getDeviceAllInfo).
r
Table 6-15
ro
http://<server>/cgi-bin/SDEncrypt.cgi?action=modifyPassword&deviceName=<device
Syntax
pe
Name>&password=<password>&oldPassword=<oldPassword>
Method GET
Te
http://192.168.1.108/cgi-bin/SDEncrypt.cgi?action=clearPassword&deviceName=/dev/
hn
Example
mmc0&password=123456&oldPassword=admin123
ic
Success
OK
a
Return
l
Table 6-17
AP
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageHealthAlar
Syntax
I
m
fo
Method GET
r
Example
m
st
table.StorageHealthAlarm.Enable=true
Eu
Success table.StorageHealthAlarm.LowerLimit=10
Return table.StorageHealthAlarm.EventHandler= (output of EventHandler is described in
ro
GetEventHandler)
pe
Comment —
Set StorageHealthAlarm config
Te
c
Table 6-18
hn
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
ic
Syntax
alue>[&<paramName>=<paramValue>…]
a
Method GET
l
7.1.1 GUISet
Get GUISet config
Table 7-1
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=GUISet
Da
Method GET
hu
Description Get the GUI settings. Every video out screen has a group setting.
a
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=GUISet
table.GUISet[index]. WindowAlpha =128
HT
table.GUISet[index]. TimeTitlePos[0]=0
table.GUISet[index]. TimeTitlePos[1]=0
AP
table.GUISet[index]. TimeTitlePos[2]=8191
I
table.GUISet[index]. TimeTitlePos[3]=8191
fo
table.GUISet[index]. MenuShowOption =0
r
table.GUISet[index]. ChannelTitlePos[1]=0
ro
table.GUISet[index]. ChannelTitlePos[2]=8191
table.GUISet[index]. ChannelTitlePos[3]=8191
pe
…
c
Parameters in Response :
Comment
hn
Table 7-2
l
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
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
Example
pha=192&GUISet[0].TimeTitleEnable=false&GUISet[0].MenuShowOption=1
Success
OK
Return
Appendix:
GUISet[index].TimeTitlePos[3] integer
hu
GUISet[index].MenuAutoHideTime integer
directory.
AP
GUISet[index].ChannelTitlePos[0] integer
We
GUISet[index].ChannelTitlePos[1] integer
The position of the channel title.
st
GUISet[index].ChannelTitlePos[2] integer
GUISet[index].ChannelTitlePos[3] integer
Eu
Table 7-3
l
Syntax http://<server>/cgi-bin/split.cgi?action=getMode&channel=<ChannelNo>
Method GET
Description Get the split screen mode.
Example http://192.168.1.108/cgi-bin/split.cgi?action=getMode&channel=1
Success mode=split1
Return group=4
Parameters in URL:
Comment
ChannelNo: the display screen No. Start from 1 and <= 2.
Set split screen mode
/ "FitDisplayUnit4"};
hu
group: the No. of a group which contains certain number channels. For example, if 16
a
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.
HT
TP
We
Table 7-5
st
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MonitorTour
Method GET
Eu
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MonitorTour
pe
table.MonitorTour[ch].Enable=128
table.MonitorTour[ch].Interval=true
Success
Te
table.MonitorTour[ch].Mask.Split1=0,1,5
Return
c
table.MonitorTour[ch].Mask.Split8=0,1,5
hn
table.MonitorTour[ch].Collections=Favortite1, Favortite2…
ic
Comment —
a
Table 7-6
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set monitor tour config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MonitorTour[0].Enabl
Example
e=true
Success
OK.
Return
Comment Parameters in URL:
Appendix:
http://<server>/cgi-bin/split.cgi?action=enableTour&channel=<ChannelNo>&enable=<fl
Syntax
hu
ag>
a
Method GET
HT
Success
OK
AP
Return
I
Table 7-8
ro
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MonitorCollection
Method GET
pe
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MonitorCollec
Example
tion
c hn
table.MonitorCollection.collectionname. Mode=Split1
ic
table.MonitorCollection.collectionname.Windows[winno].Enable= true
a
table.MonitorCollection.collectionname.Windows[winno].Device=device1
l
Success table.MonitorCollection.collectionname.Windows[winno].VideoChannel=5
Return table.MonitorCollection.collectionname.Windows[winno].VideoStream=Main
table.MonitorCollection.collectionname.Windows[winno].AudioChannel=5
table.MonitorCollection.collectionname.Windows[winno].AudioStream=Main
…
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
winno: integer, the array index which equals to the window index in a screen and starts
a
from 0.
HT
Appendix:
TP
Collect. Windows[winno].
integer The video channel.
We
VideoChannel
st
Collect. Windows[winno].
integer The audio channel.
ro
AudioChannel
pe
Example http://192.168.1.108/cgi-bin/devVideoAnalyse.cgi?action=getcaps&channel=1
a
caps.CalibrateBoxs[0]=2
caps.CalibrateBoxs[1]=3
HT
caps.ComplexSizeFilter=false
TP
caps.MaxCelibateAreas=10
caps.MaxExcludeRegions=0
AP
caps.MaxInternalOptions=512
I
caps.MaxModules=1
fo
caps.MaxPointOfLine=20
r
caps.MaxPointOfRegion=20
We
caps.MaxRules=10
st
caps.MaxStaffs=4
caps.SpecifiedObjectFilter=true
Eu
caps.SupportedRules[0]=CrossLineDetection
ro
caps.SupportedRules[1]=CrossRegionDetection
Success
caps.SupportedRules[2]=LeftDetection
pe
Return
caps.SupportedRules[3]=TakenAwayDetection
Te
caps.SupportedScene[0]=Normal
caps.SupportedScene[1]=FaceDetection
c hn
caps.SupportedScene[2]=VideoDiagnosis
ic
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalSt
a
affs[0]=0
l
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalSt
affs[1]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs
[0]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs
[1]=0
caps.SupportedScenes.StereoNumber.SupportedRules.ManNumDetection.SupportLoc
alDataStore=false
Parameters in URL:
Comment
ChannelNo: integer, video channel index which starts from 1.
Table 8-2
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseGlob
Syntax
al
Method GET
Description Get video analyse global config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyse
Example
Global
head.Scene.Type=Normal
head.Scene.PtzPresetId=1
Da
head.Scene.Depth=Far
hu
head.Scene.Detail.CameraAngle=30
a
head.Scene.Detail.CameraDistance=10.000000
Success
head.Scene.Detail.CameraHeight=6.200000
HT
Return
head.TimePeriod.Day[0]=8:00:00
TP
head.TimePeriod.Day[1]=20:00:00
head.TimePeriod.Night[0]=20:00:00
AP
head.TimePeriod.Night[1]=8:00:00
I
…
fo
Parameters in Response :
r
head =table.VideoAnalyseGlobal[ChannelNo]
Comment
We
ChannelNo: integer, array index starts from 0, which means video channel(equals to
st
Table 8-3
ro
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
pe
Syntax
alue>[&<paramName>=<paramValue>...]
Method GET
Te
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoAnalyseGlobal[
Example
0].Scene.Type=Normal&VideoAnalyseGlobal[0].Scene.PtzPresetId=1
ic
Success
a
OK
l
Return
Parameters in URL:
paramName and paramValue are as table below.
In table below, head =VideoAnalyseGlobal[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).
ParamName start with head.Scene.Detail depends on head.Scene.Type.
Appendix
etc.
hu
Table 8-4
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule
We
Method GET
st
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyse
Example
Rule
ro
head.Name= line1
pe
head.Type=CrossLineDetection
Success head.VideoAnalyseRule[0][0].Enable =true
Te
GetEventHandler)
…
ic
Parameters in Response :
a l
Table 8-5
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video analyse rules config.
Appendix
Da
hu
"CrossRegionDetection", "LeftDetection",
TP
"TakenAwayDetection",
"VideoAbnormalDetection", "FaceDetection",
AP
"VideoUnFocus", "WanderDetection",
fo
"RioterDetection", "ParkingDetection",
r
"MoveDetection", "NumberStat"}.
We
"Both"}.
hn
Adapt to {"CrossLineDetection",
l
head.
integer "CrossRegionDetection", "LeftDetection",
Config .SizeFilter.MaxSize[0]
"TakenAwayDetection", "FaceDetection",
"WanderDetection", "RioterDetection",
"ParkingDetection", "MoveDetection"}.
head. Maximum height. The height of the object must
integer
Config .SizeFilter.MaxSize[1] not be beyond maximum height.
head. Minimum width. The width of the object must not
integer
Config .SizeFilter.MinSize[0] be less than minimum width.
head. Minimum height. The height of the object must
integer
Config .SizeFilter.MinSize[1] not be beyond minimum height.
Config.DetectRegion[2][0]
hu
head.
integer The start point of DetectRegion 2;
a
Config.DetectRegion[2][1]
Range is 1 — 600, adapt to {"LeftDetection",
HT
"TakenAwayDetection", "WanderDetection"}.
TP
integer
{"NumberStat"}.
We
{"NumberStat"}.
Range is 0 — 100000000, adapt to
head. Config. InsideThreshold
Eu
integer
{"NumberStat"}.
ro
pe
a
Table 8-6
l
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidgetNumb
Syntax
erStat
Method GET
Description Get OSD config when display number status information of people.
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget
Example
NumberStat
head.EncodeBlend=true
Success head.ShowEnterNum=true
Return head.ShowExitNum=true
head.TextAlign=0
Table 8-7
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.
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidgetNumber
Example
Da
Stat[0].EncodeBlend=true&VideoWidgetNumberStat[0].ShowEnterNum=true
Success
hu
OK
Return
a
Parameters in URL:
HT
In table below,
Comment
head =VideoWidgetNumberStat[ChannelNo]
AP
ChannelNo: integer, array index starts from 0, which means video channel(equals to
I
Appendix
r
Table 8-8
ic
http://<server>/cgi-bin/heatMap.cgi?action=getPicByTime&channel=<ChannelNo>&St
Syntax
a
artTime=<start>&EndTime=<end>
l
Method GET
Description Get binary data of heat map.
http://192.168.1.108/cgi-bin/heatMap.cgi?action=getPicByTime&channel=1&StartTime
Example
=2015-08-20%2000:00:00&EndTime=2015-08-21%2023:59:59
Content-Type: application/binarytet-stream
Success
Content-Length:<heatMap size>
Return
<HeatMap data>
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
Comment
start/end: the start/end time of Heat Map info. 24 hour Format, as: yyyy-mm-dd
hh:mm:ss.
8.3 FishEye
The method described in the Section 4.5.13(Get video input capability) should be used fisrst.In
hu
the response, it will contain these message "caps.FishEye=false", if the value of the FishEye is
a
true, Then you can use the method described below to get the detail capability.
HT
Table 8-9
TP
http://<server>/cgi-bin/devVideoInput.cgi?action=getCapsEx&channel=<ChannelNo>&
Syntax
AP
name=VideoInFishEye
Method GET
I
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCapsEx&channel=1&name=
r
Example
VideoInFishEye
We
caps.Type=Chip
st
caps.MountMode[0]=WallMode
caps.MountMode[1]=CeilMode
Eu
……
ro
caps.CalibrateMode[0]=Original
Success
pe
caps.CalibrateMode[1]=Config
Return
caps.CalibrateMode[2]=Panorama
Te
……
c
caps.EPtzCmd[0]=Up
hn
caps.EPtzCmd[1]=Down
ic
…….
a
Parameters in Response:
l
Type: string, it can be Chip, Plugin, and ChipAndPlugin. Chip means only support
calibrate by device.
Plugin means only support calibrate by plugin. ChipAndPlugin means support
both.
MountMode: string and array.and MountMode means the install mode, it can be
Comment
WallMode,CeilMode, FloorMode,180CeilMode.
CalibrateMode: string and array. It can be Original, Config, Panorama,
DoublePanorama, OriginalPlusThreeEPtzRegion, Single, FourEPtzRegion,
TwoEPtzRegion, and Normal.
EPtzCmd: string and array. It can be ZoomIn, ZoomOut, Up, Down, Left, Right,
RotateClock, RotateAntiClock, Stop, TapView, and ShowRegion.
Table 8-10
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=FishEye
Method GET
Description Get FishEye config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=FishEye
head.PlaceHolder=1
Success
head.CalibrateMode=Original
Return
……..
Parameters in Response:
Da
head = table.FishEye[ChannelNo]
hu
ChannelNo: integer, array index starts from 0, which means video channel (equals to
a
Table 8-11
fo
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
r
alue>[&<paramName>=<paramValue>…]
Method GET
We
der=1
ro
pe
Example
Mode=Panorama
c hn
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&FishEye[0].Calibrate
a l
8.4 CrowdDistriMap
Table 8-13
HT
http://<server>/cgi-bin/crowdDistriMap.cgi?action=attach&channel=<ChannelNo>[&he
Syntax
artbeat=<Heartbeat>]
TP
Method GET
AP
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
I
HTTP/1.1 200 OK
fo
Connection: close
We
st
--<boundary>
Content-Type: text/plain
Eu
CrowdStatData[0].Channel=1
CrowdStatData[0].GloabalPeopleNum =10
Te
CrowdStatData[0].RegionNum =1
c
CrowdStatData[0].RegionPeopleList[0].RegionID=0
hn
Success CrowdStatData[0].RegionPeopleList[0].Region[0][0]=10
ic
Return CrowdStatData[0].RegionPeopleList[0].Region[0][1]=10
a
CrowdStatData[0].RegionPeopleList[0].Region[1][0]=10
l
CrowdStatData[0].RegionPeopleList[0].Region[1][1]=100
…
CrowdStatData[0].RegionPeopleList[0].RegionPeopleNum=100
CrowdStatData[0].CrowdEventNum =2
CrowdStatData[0].CrowdList[0].Center=2
CrowdStatData[0].CrowdList[0].Radius=2
CrowdStatData[0].RegionEventNum =2
CrowdStatData[0].RegionList[0].Region[0][0]=10
CrowdStatData[0].RegionList[0].Region[0][1]=10
CrowdStatData[0].RegionList[0].Region[1][0]=10
CrowdStatData[0].RegionList[0].Region[1][0]=100
Heartbeat
--<boundary>
Content-Type: text/plain
Content-Length: <data length>
CrowdStatData[0].Channel=1
Da
…
hu
Region is Polygon, has a list of points, every point has x and y , so Region[0][0] is first
TP
Heartbeat: integer, range is [1,60],unit is second.If the URL contains this parameter,
fo
and the value is 5, it means every 5 seconds the device should send the heartbeat
r
Table 8-14
ro
http://<server>/cgi-bin/crowdDistriMap.cgi?action=getSummary&channel=<ChannelNo
Syntax
>
pe
Method GET
Te
Description Get crowd distribuite map information, return info only once.
c
Example http://<server>/cgi-bin/crowdDistriMap.cgi?action=getSummary&channel=1
hn
CrowdStatData[0].Channel=1
ic
CrowdStatData[0].GloabalPeopleNum =10
a
CrowdStatData[0].RegionNum =1
l
CrowdStatData[0].RegionPeopleList[0].RegionID=0
CrowdStatData[0].RegionPeopleList[0].Region[0][0]=10
CrowdStatData[0].RegionPeopleList[0].Region[0][1]=10
Success CrowdStatData[0].RegionPeopleList[0].Region[1][0]=10
Return CrowdStatData[0].RegionPeopleList[0].Region[1][1]=100
…
CrowdStatData[0].RegionPeopleList[0].RegionPeopleNum=100
CrowdStatData[0].CrowdEventNum =2
CrowdStatData[0].CrowdList[0].Center=2
CrowdStatData[0].CrowdList[0].Radius=2
CrowdStatData[0].RegionEventNum =2
Method GET
hu
http://192.168.1.108/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus&condition.L
Example
ane[0]=0&condition.Lane[1]=255
HT
status[0].Lane=0
status[0].PictureId=5
AP
status[0].TrafficCar.CountInGroup=1
I
Success
…
fo
Return
status[1].Lane=1
r
status[1].PictureId=4
We
status[1].TrafficCar.CountInGroup=1
…
st
Parameters in URL:
Eu
Parameters in Response :
ic
Appendix
Table 9-3
hu
http://<server>/cgi-bin/trafficSnap.cgi?action=<Action>&channel=<ChannelNo>&nam
Syntax
a
e=UnlicensedVehicle
HT
Method GET
Description Open or Close the unlicensed vehicle detection.
TP
http://192.168.1.108/cgi-bin/trafficSnap.cgi?action=open&channel=1&name=Unlicense
Example
AP
dVehicle
Success
I
OK
Return
fo
Parameters in URL:
r
9.1.4 Snap
Eu
ro
Table 9-4
pe
Syntax http://<server>/cgi-bin/trafficSnap.cgi?action=manSnap&channel=<ChannelNo>
Method GET
Te
Take a snapshot manually. For intelligent traffic device, it should use this method to take
c
a snapshot.
hn
But, the response is not image data.If you want to get the image data, please follow
ic
these steps:
Description
a
1. Use the method mentioned chapter (4.4.3 Subscribe to snapshot) to subscribe the
l
Return …
a
status[1].Lane=1
status[1]. Status = NoPark
HT
…
TP
Parameters in Response :
Comment
Status : Park or NoPark
AP
I
Table 9-6
st
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ParkingSpaceLight
Syntax
State
Eu
Method GET
ro
Use this method. It can get the light state config. For example, it can know that when the
pe
Description space is free, then the light should be green, and the space is full, the light should be
red.
Te
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ParkingSpace
c
Example
hn
LightState
table.ParkingSpaceLightState.SpaceFree.Blue=0
ic
table.ParkingSpaceLightState.SpaceFree.Green=1
a l
table.ParkingSpaceLightState.SpaceFree.Pink=0
table.ParkingSpaceLightState.SpaceFree.Purple=0
table.ParkingSpaceLightState.SpaceFree.Red=0
table.ParkingSpaceLightState.SpaceFree.White=0
Success
table.ParkingSpaceLightState.SpaceFree.Yellow=0
Return
table.ParkingSpaceLightState.SpaceFull.Blue=0
table.ParkingSpaceLightState.SpaceFull.Green=0
table.ParkingSpaceLightState.SpaceFull.Pink=0
table.ParkingSpaceLightState.SpaceFull.Purple=0
table.ParkingSpaceLightState.SpaceFull.Red=1
table.ParkingSpaceLightState.SpaceFull.White=0
table.ParkingSpaceLightState.SpaceOverLine.White=0
hu
table.ParkingSpaceLightState.SpaceOverLine.Yellow=1
table.ParkingSpaceLightState.SpaceSpecial.Blue=0
a
table.ParkingSpaceLightState.SpaceSpecial.Green=0
HT
table.ParkingSpaceLightState.SpaceSpecial.Pink=0
TP
table.ParkingSpaceLightState.SpaceSpecial.Purple=0
table.ParkingSpaceLightState.SpaceSpecial.Red=0
AP
table.ParkingSpaceLightState.SpaceSpecial.White=0
I
table.ParkingSpaceLightState.SpaceSpecial.Yellow=1
fo
Parameters in Response :
r
There are five conditions about the space light state: SpaceFree, SpaceFull,
We
SpaceOrder, SpaceOverLine, and SpaceSpecial. For each condition, you can choose
the light state.
st
Comment
The state value is integer. It can be 0, 1, 2.
Eu
0 means close;
ro
1 means open;
2 means twinkle.
pe
Table 9-7
c
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
hn
Syntax
alue>[&<paramName>=<paramValue>…]
ic
Method GET
a
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ParkingSpaceLightSt
ate.SpaceFree.Blue=1&ParkingSpaceLightState.SpaceFree.Green=0&ParkingSpaceLi
Example ghtState.SpaceFree.Pink=0&ParkingSpaceLightState.SpaceFree.Purple=0&ParkingSp
aceLightState.SpaceFree.Red=0&ParkingSpaceLightState.SpaceFree.White=0&Parkin
gSpaceLightState.SpaceFree.Yellow=0
Success
OK
Return
Comment —
Table 9-9
http://<server>/cgi-bin/trafficParking.cgi?action=setLightState&state[Index].LightNo=<L
AP
Syntax aneNumber>&state[Index].Color=<Color>&state[Index].State=<State>&state[Index].
I
Enable=<Enable>
fo
Method GET
r
Example
&state[0].Color=Red&state[0].State=0&state[0].Enable=true
st
Success
OK
Eu
Return
Parameters in URL:
ro
State: integer, it can be 0, 1, 2.0 means close;1 means open;2 means twinkle;
c hn
Table 9-10
http://<server>/cgi-bin/ConfigManager.cgi?action=getConfig&name=ParkingSpaceAcces
URL
sFilter
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 )
Respons table.ParkingSpaceAccessFilter.Type=TrustList
hu
e table.ParkingSpaceAccessFilter.TrustList[0]=172.24.2.14
a
table.ParkingSpaceAccessFilter.BannedList[0]=172.24.2.15
HT
Table 9-11
http://<server>/cgi-bin/ConfigManager.cgi?action=setConfig&name=ParkingSpaceAccessFi
AP
URL
lter
I
Method GET
fo
Descripti
Set Parking Space Access Filter config.
r
on
We
ParkingSpaceAc
object R ParkingSpaceAccessFilter config object
Eu
cessFilter
ro
[ Example ]
ic
GET
a
http://10.0.0.8/cgi-bin/ConfigManager.cgi?action=getConfig&action=setConfig&ParkingSpa
l
Request
ceAccessFilter.Enable=true&ParkingSpaceAccessFilter.Type=TrustList&ParkingSpaceAcce
ssFilter.TrustList[0]=172.24.2.14&ParkingSpaceAccessFilter.BannedList[0]=172.24.2.15
Respons
<none>
e
Table 9-13
http://<server>/cgi-bin/trafficRecord.cgi?action=uploadFile&Type=TrafficBlackList&form
HT
Syntax
at=<Format>&code=<Code>
TP
Method POST
AP
Upload a blacklist file into the deivce, and the device will import the data of the file.This
Description
operation may take a long time.
I
POST
fo
/cgi-bin/trafficRecord.cgi?action=uploadFile&Type=TrafficBlackList&format=CSV&code
r
=UTF-8 HTTP/1.1
We
Host: 192.168.1.108
st
Connection: keep-alive
Content-Length:XXXX
Eu
Content-Type: multipart/form-data;
ro
boundary=----WebKitFormBoundaryooT6JTCbuezAQeDy
Example
pe
------WebKitFormBoundaryooT6JTCbuezAQeDy
Te
Content-Type: application/vnd.ms-excel
hn
ic
File data….
a l
------WebKitFormBoundaryooT6JTCbuezAQeDy--
Success
OK
Return
Parameters in URL:
Comment Format: string, for the blacklist, the value is fixed to "CSV".
Code: string, for the blacklist, the value can be "utf-8"or "GB2312".
Table 9-15
hu
Syntax http://<server>/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=TrafficFlow
a
Method GET
HT
Example http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=getFileExportState&name=Traffi
cFlow
AP
Success state=0
I
Return
fo
state: integer,the value can be 0(success),1(fail), 2(running), 3(the file is invalid), 4(the
We
Table 9-16
Syntax http://<server>/cgi-bin/trafficRecord.cgi?action=downloadFile&Type=TrafficFlow
Eu
Method GET
ro
Example http://192.168.1.108/cgi-bin/trafficRecord.cgi?action=download&filename=TrafficFlow
Success File data
Te
Return
c
Comment —
hn
ic
a l
Method GET
hu
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getCaps&channel=1
caps.PresetModes = Indoor
HT
caps.Brightness.Max = 100
TP
caps.Brightness.Min = 0
caps.Brightness.Step = 1
AP
caps.Sharpness.Max= 100
I
caps.Sharpness.Min = 0
fo
caps.Sharpness.Step = 5
r
caps.EZoom.Max= 24
We
caps.EZoom.Min = 0
st
caps.EZoom.Step = 1
caps. ThermographyGamma.Max= 8
Eu
caps. ThermographyGamma.Min = -8
ro
caps. ThermographyGamma.Step = 1
Success
caps. SmartOptimizer.Max= 100
pe
Return
caps. SmartOptimizer.Min = 0
Te
caps. SmartOptimizer.Step = 5
caps. Agc.Max= 255
c hn
caps. Agc.Min = 0
ic
caps. Agc.Step = 5
a
caps. AgcMaxGain.Min = 0
caps. AgcMaxGain.Step = 5
caps. AgcPlateau.Max= 100
caps. AgcPlateau.Min = 0
caps. AgcPlateau.Step = 5
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
ons
Da
Method GET
hu
Description Thermography options contain EZoom, Colorization, and SmartOptimizer and so on.
a
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Thermograph
Example
HT
yOptions
TP
head.EZoom=0
head.Colorization=White Hot
AP
head.SmartOptimizer=10
I
head.OptimizedRegion.Type=Custom
fo
head.OptimizedRegion.Enable= true
r
head.OptimizedRegion.Regions[i][0u]=0
head.OptimizedRegion.Regions[i][1u]=0
We
head.OptimizedRegion.Regions[i][2u]=0
st
Success
head.OptimizedRegion.Regions[i][3u]=0
Return
head.Agc=10
Eu
head.AgcMaxGain=10
ro
head.AgcPlateau=10
pe
head.Mode="HighTemperature"
head.Auto.LowToHigh=13
Te
head.Auto.LHROI=15
c
head.Auto.HighToLow=12
hn
head.Auto.HLROI=95
ic
Parameters in Response:
a l
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]
ChannelNo: integer, array index starts from 0, which means video channel(equals to
video channel index -1, and so 0 means channel 1).
i: the array index starts from 0.
Appendix
Da
hu
Range is [0—24].
head. EZoom integer Range and step are got from interface in "10.1.1
HT
Range is [0—100].
r
head. SmartOptimizer integer Range and step are got from interface in "10.1.1
We
25%", "Custom"}.
ro
OptimizedRegion.Regions[i][ integer
i: the region index, starts from 0.
c
0u]
hn
head.
Range is [0—8191].
ic
OptimizedRegion.Regions[i][ integer
i: the region index, starts from 0.
a
1u]
l
head.
Range is [0—8191].
OptimizedRegion.Regions[i][ integer
i: the region index, starts from 0.
2u]
head.
Range is [0—8191].
OptimizedRegion.Regions[i][ integer
i: the region index, starts from 0.
3u]
Range is [0—255].
head. Agc integer Range and step are got from interface in "10.1.1
Get Capability of Thermography".
Range is [0—255].
head. AgcMaxGain integer
Range and step are got from interface in "10.1.1
Table 10-4
hu
http://<server>/cgi-bin/ThermographyManager.cgi?action=getExternSystemInfo&chann
Syntax
a
el=<ChannelNo>
HT
Method GET
Description Get extern system Info.
TP
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getExternSystemInfo&
Example
AP
channel=1
I
sysInfo.SerialNumber = 11111111123
Success sysInfo.SoftwareVersion = 2222222222222
fo
sysInfo.LibVersion = 4444444444
We
Parameters in URL:
Comment
st
Table 10-5
http://<server>/cgi-bin/ThermographyManager.cgi?action=getPresetParam&channel=<
Te
Syntax
ChannelNo>&mode=<modeType>
c
Method GET
hn
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getPresetParam&chan
a
Example
nel=1&mode=Default
l
presetInfo.Brightness = 50
presetInfo.Sharpness= 50
presetInfo.EZoom= 12
presetInfo.ThermographyGamma= 0
Success presetInfo.Colorization= "White Hot"
Return presetInfo.SmartOptimizer= 10
presetInfo.OptimizedRegion.Type= Full Screen
presetInfo.OptimizedRegion.Enable= Full Screen
presetInfo.OptimizedRegion.Regions[i][0u]=0
presetInfo.OptimizedRegion.Regions[i][1u]=0
Table 10-6
http://<server>/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion&chann
HT
Syntax
el=<ChannelNo>
TP
Method GET
Description Get optimized region info.
AP
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion&c
I
Example
hannel=1
fo
optimizedRegion.Enable= true
We
Success optimizedRegion.Regions[i][0u]=0
st
Return optimizedRegion.Regions[i][1u]=0
optimizedRegion.Regions[i][2u]=0
Eu
optimizedRegion.Regions[i][3u]=0
ro
Parameters in URL:
pe
Comment
Te
Parameters in Response:
c
Table 10-7
http://<server>/cgi-bin/ThermographyManager.cgi?action=enableShutter&channel=<C
Syntax
hannelNo>&enable=<Enable>
Method GET
Description Shutter control, whether enable shutter.
http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=enableShutter&channel
Example
=1&enable=true
Success
OK
Return
Comment Parameters in URL:
OK
Return
hu
Parameters in URL:
a
Table 10-9
I
http://<server>/cgi-bin/ThermographyManager.cgi?action=doFFC&channel=<Channel
fo
Syntax
No>
r
Method GET
We
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=doFFC&channel=1
Success
Eu
OK
Return
ro
Parameters in URL:
Comment
pe
10.2 Radiometry
c hn
Table 10-10
http://<server>/cgi-bin/RadiometryManager.cgi?action=getCaps[&channel=<ChannelN
Syntax
o>]
Method GET
Description Get the capabilities of radiometry manager.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getCaps&channel=1
caps.TotalNum.MaxNum=8
caps.TotalNum.Spot.MaxSpots=8
Success
caps.TotalNum.Line.MaxLines=1
Return
caps.TotalNum.Area.MaxAreas=8
caps.TemperPresets.MaxPresets=256
caps.MeterInfo.ReflectedTemperature.Step=1
hu
caps.MeterInfo.RelativeHumidity.Max=100
caps.MeterInfo.RelativeHumidity.Min=0
a
caps.MeterInfo.RelativeHumidity.Default=0
HT
caps.MeterInfo.RelativeHumidity.Step=1
TP
caps.MeterInfo.AtmosphericTemperature.Max=100
caps.MeterInfo.AtmosphericTemperature.Min=0
AP
caps.MeterInfo.AtmosphericTemperature.Default=0
I
caps.MeterInfo.AtmosphericTemperature.Step=1
fo
caps.Statistics.MinPeriod=60
r
caps.Isotherm.MaxTemp=327.0
We
caps.Isotherm.MinTemp=-20.0
Parameters in URL:
st
Comment
ChannelNo: integer, video channel index which starts from 1.
Eu
Table 10-11
c
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingTherm
hn
Syntax
ometry
ic
Method GET
a
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=HeatImaging
Example
Thermometry
Table 10-12
a
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
HT
alue>[&<paramName>=<paramValue>…]
TP
Method GET
Description Set HeatImagingThermometry Config
AP
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&HeatImagingThermo
Example
I
metry.RelativeHumidity=50&HeatImagingThermometry.ObjectDistance=20.3
fo
Success
OK
r
Return
Parameters in URL:
We
Comment
The paramName and paramValue are in the table below.
st
Appendix
Eu
The Atmospheric
c hn
in getCaps.
a l
ColorBarDisplay
hu
Table 10-13
fo
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ThermometryRule
r
Method GET
Description Get thermometry rule.
We
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Thermometry
st
Example
Rule
Eu
head.Enable = true
head.PresetId =0
ro
head.RuleId=0
pe
head.Name=SpotName
head.Type=Spot
Te
head.MeterRegion.Coordinates[PointNo][0]= 0
c hn
head.MeterRegion.Coordinates[PointNo][1]= 0
ic
…
head.T=3
a l
Success head.Alarm.Id=0
Return head.Alarm.Enable=true
head.Alarm.Result =Max
head.Alarm.AlarmCondition=Below
head.Alarm.Threshold=20.0
head.Alarm.Hysteresis=0.1
head.Alarm.Duration=30
head.LocalParameters.Enable=true
head.LocalParameters.ObjectEmissivity=0.95
head.LocalParameters.ObjectDistance=0.95
head.LocalParameters.RefalectedTemp=0
Table 10-14
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Da
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ThermometryRule[0]
a
Example
[0].Name=name1
HT
Success
OK
TP
Return
Parameters in URL:
AP
In table below,
r
head = ThermometryRule[ChannelNo][RuleNo]
Comment ChannelNo: integer, array index starts from 0, which means video channel (equals to
We
Alarm= AlarmSetting[AlarmNo]
ro
Appendix
Te
interface in
GetCurrentProtocolCaps.
Range [0—MaxNum]
head. RuleId integer MaxNum is got from interface
in getCaps.
Radiometry rule name.
head. Name string
char[64]
head. Type string Range is {Spot, Line, Area }.
Range [0—8091]
head. MeterRegion.Coordinates[PointNo] [0] integer The Xscale of Region/Line
point
ISO}
hu
Above }
HT
Unit is second
head. LocalParameters.Enable bool Enable/Disable
I
Range [0 — 1]
fo
Object distance
We
in getCaps.
Object Reflected Temperature
Eu
in getCaps.
pe
Table 10-15
http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingTemp
a
Syntax
l
er
Method GET
Description Get Heat Imaging Temper config
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingT
Example
emper
Success head.Enable=false
Return head.EventHandler. paramName = paramValue
Parameters in Response:
head= table.HeatImagingTemper[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 10-16
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set Heat Imaging Temper config
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&HeatImagingTemper[
Example
0].Enable=false&HeatImagingTemper[0].EventHandler.BeepEnable=false
Success
OK
Return
Parameters in URL:
The paramName and paramValue are in the table below.
Da
head= HeatImagingTemper[ChannelNo]
a
ChannelNo: integer, array index starts from 0, which means video channel (equals to
HT
Appendix
AP
SetEventHandler.
We
Table 10-17
ro
http://<server>/cgi-bin/RadiometryManager.cgi?action=getRandomPointTemper&chann
Syntax
el=<ChannelNo>&coordinate[0]=x &coordinate[1]=y
pe
Method GET
Te
Example
hn
channel=1&coordinate[0]=1024&coordinate[1]=1024
ic
Success TempInfo.Type=Spot
a
Return TempInfo.TemperAver=27.5
l
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
Appendix
GetCurrentProtocolCaps.
a
GetThermometryRuleConfig.
I
Table 10-19
st
http://<server>/cgi-bin/RadiometryManager.cgi?action=startFind&condition.StartTime=
Eu
Syntax <StartTimeValue>&condition.EndTime=<EndTimeValue>&condition.Type=<TypeVal
ue>&condition.channel=<ChannelValue>&condition.Period=<PeriodValue>
ro
Method GET
pe
http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=startFind&condition.StartTi
Example me=2010-04-01%200:00:00&condition.EndTime=2010-04-08%200:00:00&condition.Ty
chn
pe=Spot&condition.channel=1&condition.Period=5
ic
Success token=46878
Return totalCount=333
a l
Appendix
info[i].Coordinate[0]=1024
Return
hu
info[i].Coordinate[1]=2048
a
info[i].Channel=0
info[i].TemperatureUnit=Centigrade
HT
info[i].QueryTemperInfo.TemperAve=50.1
TP
info[i].QueryTemperInfo.TemperMax=50.2
info[i].QueryTemperInfo.TemperMin=50.0
AP
Parameters in URL:
I
token: query token, get from interface of the first step above.
fo
Params in Resp:
st
Table 10-21
ro
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=stopFind&token=<tokenvalue>
pe
Method GET
Description Stop to find the history data of temperature values.
Te
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=stopFind&token=46878
c
hn
Success
OK
Return
ic
Comment token: query token, get from interface of the first step.
a
l
Parameters in URL:
hu
Table 10-23
I
http://<server>/cgi-bin/RadiometryManager.cgi?action=attachProc&channel=<Channel
fo
Syntax
No>
r
Method GET
We
Description Subscribe to radiometry data of a channel. It needs to cooperate with interface below.
st
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=attachProc&channel=2
--<boundary>\r\n
Eu
Content-Type: text/plain\r\n
ro
dataInfo.Height=0
dataInfo.Width=0
Te
dataInfo.Channel=0
c
dataInfo.Time=2010-05-25 00:00:00
hn
dataInfo.Length=0
ic
Success dataInfo.sensorType="Tau"
a
Return dataInfo.Unzip.ParamR=1
l
dataInfo.Unzip.ParamB=1
dataInfo.Unzip.ParamF=1
dataInfo.Unzip.ParamO=1
--<boundary>\r\n
Content-Type: application/http\r\n
Content-Length: <data length>\r\n\r\n
<Binary data>
Comment ChannelNo: integer, video channel index which starts from 1.
Table 10-25
TP
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=FireWarning
Method GET
AP
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=FireWarning
fo
head.Enable=true
r
head.PresetId=0
head.Row = 31
We
head.Col = 40
st
head.Mode="Auto"
Eu
head.TimeDurationEnable=false
head.FireDuration= 15
ro
head.DetectWindow[windowsNum].Regions[0]=123468789
pe
head.DetectWindow[windowsNum].Regions[1]=123468789
Success
head.DetectWindow[windowsNum].Regions[2]=123468789
Te
Return
head.DetectWindow[windowsNum].Regions[3]=123468789
c hn
head.DetectWindow[windowsNum].Postion[0]=0
head.DetectWindow[windowsNum].Postion[1]=0
ic
head.DetectWindow[windowsNum].Postion[2]=0
a l
head.DetectWindow[windowsNum].Postion[3]=0
head.DetectWindow[windowsNum].Sensitivity = 95
head. DetectWindow[windowsNum].Id=1
head.DetectWindow[windowsNum].Name="windName"
head.EventHandler=(output of EventHandler is described in GetEventHandler)
Parameters in Response:
head= table.FireWarning[ChannleNo][RuleNum]
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Comment
video channel index -1, and so 0 means channel 1).
RuleNum: integer,array index starts from 0,which means rules in each Preset,
If FireWarningMode is "SpaceExClude", then only the first rule used.
OK
Return
hu
Appendix:
HT
SpaceExClude mode
head.FireDuration integer fire last times
Eu
Setting of EventHandler is
c
head.EventHandler EventHandler
described in SetEventHandler.
hn
ic
Table 10-27
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=FireWarningMode
Method GET
Description Get FireWarningMode config.
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=FireWarningMo
Example
de
Success
head.Mode="PtzPreset"
Return
Parameters in Response:
Comment
head= table.FireWarningMode[ChannelNo]
OK
Return
hu
Appendix:
HT
http://192.168.1.108/cgi-bin/accessControl.cgi?action=openDoor&channel=1&UserID=
a
Example
101&Type=Remote
HT
Success
OK
TP
Return
Parameters in URL:
AP
Table 11-2
Syntax http://<server>/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=<ChannelNo>
Eu
Method GET
ro
Example http://192.168.1.108/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=1
Success
Te
Info.status=Open
Return
c
hn
Parameters in URL :
ChannelNo: integer, the index of door, starts from 1.
ic
Comment
Parameters in Response :
a l
Table 11-4
http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControlCustomPa
hu
URL
ssword
a
Method GET
HT
name string R
"AccessControlCustomPassword".
fo
OpenDoorPass
string R Ths user’s open door password.
We
word
AlarmPassword string O Ths user’s alarm password.
st
Doors array<int> R The index of the doors that custom password can open.
Eu
The index of the time sections of each door that this card can
TimeSections array<int> O
ro
open.
VTOPosition string O VTO position number.
pe
OriginSmartGate
string O The origin smart gateway address.
ic
Way
a
R/
Name Type Param Description
O
RecNo int R The record id.
[ Example ]
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
a
Doors array<int> R The index of the doors that custom password can open.
TP
[ Response Params ] ( OK )
I
[ Example ]
fo
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=update&name=AccessContr
r
olCustomPassword&recno=12345&UserID=102&OpenDoorPassword=123456&Doors[0]
Request
We
=1&Doors[1]=3&Doors[2]=5&ValidDateStart=20151022%20093811&ValidDateEnd=2015
1222%20093811
st
Response OK
Eu
Table 11-6
c
http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=AccessControlCustomPa
hn
URL
ssword
ic
Method GET
a
Descriptio
l
Table 11-7
http://<server>/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControlCustomPass
URL
word
Method GET
Descriptio
Remove all the access control custom password records
n
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Access user card and fingerprint record name, should be
name string R
"AccessControlCustomPassword".
Da
[ Response Params ] ( OK )
[ Example ]
hu
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControl
a
Request
CustomPassword
HT
Response OK
TP
Table 11-8
r
http://<server>/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCustomPass
We
URL
word
st
Method GET
Description Find Access control custom password by condition.
Eu
Request omPassword&condition.UserID=103&StartTime=123456700&EndTime=123456800&count
hu
=100
a
totalCount=1000
HT
found=100
records[0].RecNo=12345
TP
records[0].CreateTime=123456789
AP
records[0].UserID=103
records[0].OpenDoorPassword=123456
I
records[0].Doors[0]=1
fo
records[0].Doors[1]=3
r
records[0].Doors[2]=5
We
records[0].VTOPosition=01018001
st
records[0].ValidStart=20151022 093811
records[0].ValidEnd=20151222 093811
Response
Eu
…
ro
records[1].RecNo=13579
pe
records[1].CreateTime=123456799
records[1].UserID=103
Te
records[0].OpenDoorPassword=123456
c
records[1].Doors[0]=2
hn
records[1].Doors[1]=4
ic
records[1].Doors[2]=6
a
records[1].VTOPosition=01018002
l
records[1].ValidStart=20151022 093811
records[1].ValidEnd=20151222 093811
…
Find Access control custom password by recno
Table 11-9
http://<server>/cgi-bin/recordUpdater.cgi?action=get&name=AccessControlCustomPas
URL
sword
Method GET
Description Find Access control custom password by recno.
[ Request Params ] ( key=value format in URL )
record.RecNo=3
hu
record.CreateTime=123456789
a
record.UserID=103
HT
record.OpenDoorPassword=123456
record.Doors[0]=1
TP
Response record.Doors[1]=3
AP
record.Doors[2]=5
I
record.VTOPosition=01018001
record.ValidStart=20151022 093811
fo
record.ValidEnd=20151222 093811
r
…
We
st
Custom Password
ro
pe
Table 11-10
http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCar
URL
Te
d
c
Method GET
hn
Description Get the total number of records of the access control custom password.
ic
AlarmRecord
+CustomPasswo
hu
int O
Print support
TP
+OnlySingleDoo
int O Support single door auth type, 0 : not support, 1 : support
rAuth
AP
+SpecialDaysSc
object O Special days schedule capabilities
fo
hedule
r
++MaxSpecialD
uint O Max special days schedule number
aysSchedules
st
++MaxTimePeri
uint O Max time periods per day.
Eu
odsPerDay
ro
++MaxSpecialD
uint O Max special day groups.
ayGroups
pe
++MaxDaysInSp
uint O Max special days in special day group.
Te
ecialDayGroup
[ Example ]
c hn
Response count=150
a l
Description Subscribe the video talk status. When client disconnect, it will unsubscribe.
hu
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=attachState
a
SID=315
TP
state.State=Answer
state.Talkback.Pack=RTP
AP
state.Talkback.Protocol=UDP
I
state.Talkback.Type=Talk
fo
state.Talkback.Audio.AudioPort=6000
r
state.Talkback.Audio.Format[0].Compression=PCM
We
Success state.Talkback.Audio.Format[0].Frequency=44000
st
Return state.Talkback.Audio.Format[0].Depth=16
state.Talkback.Audio.Format[1].Compression=G.711A
Eu
state.Talkback.Audio.Format[1].Frequency=44000
ro
state.Talkback.Audio.Format[1].Depth=16
state.Talkback.Video.VideoPort=7000
pe
state.Talkback.Video.Format[0].Compression=H.264
Te
state.Talkback.Video.Format[0].Frequency=90000
state.Talkback.Video.Format[1].Compression=MJPG
c hn
…
ic
state.Talkback. MediaAddr=224.10.10.10
a
Parameters in Response:
l
Success
OK
hu
Return
a
Parameters in URL:
HT
Table 12-4
r
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=cancel
We
Method GET
st
Success
OK
ro
Return
pe
Comment —
Te
Table 12-5
ic
http://<server>/cgi-bin/VideoTalkPeer.cgi?action=answer&Talkback.Protocol=<protoco
Syntax
a
l>&Talkback.Type=<type>&Talkback.MediaAddr=<addr>…
l
Method GET
Description Answer the call.
http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=answer&Talkback.Protocol=UDP
Example
&Talkback.Type=Talk&Talkback.MediaAddr=224.10.10.10
Success
OK
Return
Parameters in URL:
protocol: the transmit protocol
Comment
type: video talk type.
addr: addr to get stream
12.1.7 Hang Up
Da
Table 12-7
hu
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=hangup
a
Method GET
HT
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=hangup
Success
AP
OK
Return
I
Comment —
fo
r
Table 12-8
ro
http://<server>/cgi-bin/recordFinder.cgi?action=find&name=VideoTalkLog[&condition.C
Syntax
pe
allType=<Type>&condition.EndState=<State>&count=<countNo>]
Method GET
Te
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=VideoTalkLog&conditi
hn
Example
on.CallType=Incoming&condion.EndState=Missed&count=500
ic
totalCount=1000
a
found=500
l
records[0].RecNo=789
Success records[0].CreateTime=123456789
Return records[0].CallType=Incoming
records[0].EndState=Received
records[0].PeerNumber=501
…
Parameters in URL:
Type: call type
Comment
State: end state of the call
countNo: the number of records to get
Syntax t=<Content>&ExpirTime=<ExpirTime>&IssueTime=<IssueTime>&Title=<Title>&User
hu
=<User>&State=<State>&ReadFlag=<ReadFlag>
a
Method GET
HT
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
AP
2:00:00&Title=Anounce1&User=101&State=0&ReadFlag=0
I
Success
RecNo=<RecNo>
fo
Return
r
Parameters in URL:
Content: Announcement Content
We
Comment
User: the number the Announcement issued to
ro
stream>[&condition.flags[0]=<flag>&condition.events[0]=<event>&combineMode.granu
hu
larity=<granularityValue>&combineMode.types[0]=<combineType>]
Method GET
a
Find a file in channel 1. Event type is "AlarmLocal" or "VideoMotion". Time lines between
TP
URL is:
I
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
r
ndition.streamType=Main&condition.flags[0]=Event&condition.events[0]=AlarmLocal&co
We
ndition.events[1]=VideoMotion&combineMode.granularity=16&combineMode.types[0]=A
st
larmLocal&combineMode.types[0]=VideoMotion
Success
result=08137
Eu
Return
ro
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.
pe
Parameters in URL:
Te
flag: which flags of the file you want to find. It is an array. The index starts from 0. The
ic
range of flag is {"Timing", "Marked", "Event", "Restrict"}. If omitted, find files with all the
a
flags.
l
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", "VideoLoss"}. This condition can be
omitted. If omitted, find files of all the events.
stream: which video stream type you want to find. The range of stream is {"Main",
"Extra1", "Extra2", "Extra3"}.
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:
items[0]. Channel =1
items[0]. StartTime =2011-1-1 13:00:00
items[0]. EndTime =2011-1-1 14:00:00
items[0]. Events[0]=AlarmLocal
Da
items[0]. VideoStream=Main
hu
File 3:
items[0]. Channel =1
AP
items[0]. Events[0]=AlarmLocal
r
items[0]. VideoStream=Main
We
Table 13-2
pe
http://<server>/cgi-bin/FileFindHelper.cgi?action=startMotionFind&condition.channel=<C
Te
hannelNo>&condition.startTime=<start>&condition.endTime=<end>&condition.streamT
Syntax ype=<stream>&motionRegion.senseLevel=<level>[&motionRegion.rects[rectNo][0]=<r
c hn
ect0>&motionRegion.rects[rectNo][1]=<rect1>&motionRegion.rects[rectNo][2]=<rect2>
ic
&motionRegion.rects[rectNo][3]=<rect3>]
a
Method GET
l
level: the motion sensitive level, range is 0–6, 0 represent all level
rectNo: the rects array index, start from 1
a
rect0 & rect1 & rect2 & rect3 : relative coordinates, rect0 and rect2 range is 0—21, rect1
HT
and rect3 range is 0—17. {0,0,0,0} top—left, {21,0,0,0} top—right, {0,17,0,0} bottom
TP
Table 13-3
r
http://<server>/cgi-bin/FileFindHelper.cgi?action=findNext&findId=<findId>&count=<fileCo
Syntax
We
unt>
st
Method GET
Descriptio
Find the next files no more than fileCount number.
Eu
n
ro
Example http://192.168.1.108/cgi-bin/FileFindHelper.cgi?action=findNext&findId=08137&count=100
pe
found=1
items[0]. channel =1
Te
Success
items[0]. fileType =dav
Return
ic
items[0]. events[0]=AlarmLocal
a
items[0]. streamType=Main
l
http://<server>/cgi-bin/FileFindHelper.cgi?action=getBoundFile&condition.channel=1&co
a
Example ndition.startTime=2014-1-1%2012:00:00&condition.endTime=2015-1-10%2012:00:00&c
HT
ondition.streamType=Main&condition.flags[0]=Timing
found=2
TP
items[0]. channel =1
AP
items[0]. streamType=Main
r
items[1]. channel =1
items[1]. startTime =2011-1-1 13:00:00
Eu
items[1]. streamType=Main
items[1]. length =790
Te
13.2 BandLimit
a l
%2021:02:32&condition.EndTime=2014-7-3%2023:02:32&condition.Channel[0]=1&con
hu
dition.Channel[1]=3
a
Success
OK
Return
HT
In table below:
TP
Appendix:
fo
"RecordRestrict"}.
st
Table 13-8
hn
http://<server>cgi-bin/FileManager.cgi?action=cancelConditionList&condition.Types[0]
ic
Syntax =<paramValue>&condition.StartTime=<paramValue>&condition.EndTime=<paramVa
a
lue>&condition.Channel[0]=<paramValue>
l
Method GET
Description Cancel protection of record files.
http://192.168.1.108/cgi-bin/FileManager.cgi?action=cancelConditionList&condition.Ty
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&
condition.Channel[1]=3
Success
OK
Return
Comment paramValue as Appendix above.
OK
Return
hu
Table 13-10
AP
Syntax http://<server>/cgi-bin/global.cgi?action=getDST
I
Method GET
fo
Example http://192.168.1.108/cgi-bin/global.cgi?action=getDST
Success
We
result = 1
Return
st
Table 14-1
http://<server>/cgi-bin/coaxialControlIO.cgi?action=control&[channel=<channelno>]&[i
Syntax
Da
nfo[0].Type=<type>]&[info[0].IO=<io>
hu
Method GET
Description Control white light or speaker
a
http://192.168.1.108/cgi-bin/coaxialControlIO.cgi?action=control&channel=1&info[0].Ty
HT
Example
pe=1&info[0].IO=0
TP
Success status.whitelight=on
Return status.speaker=on
AP
channelno: video channel index for white light,for siren it's audio output channel, The
I
Comment channel number is default 0 if the request is not carried the param
fo
Appendix:
We
st
Table 14-2
Syntax http://<server>/cgi-bin/coaxialControlIO.cgi?action= getstatus&[channel=<channelno>]
Te
Method GET
c hn
Return status.speaker=on
Comment channelno: video channel index
Table 14-3
Syntax http://<server>/cgi-bin/pirAlarm.cgi?action=getPirParam&[channel=<channelNo>]
Comm 218
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
head.PirLink.LightingLink.LightLinkType=Filcker
head.PirLink.LightingLink.FilckerIntevalTime=5
head.PirLink.LightingLink.LightDuration=10
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
head.PirLink.TimeSection[weekday][2]=0 03:00:00-24:00:00
head.PirLink.TimeSection[weekday][3]=0 04:00:00-24:00:00
Da
head.PirLink.TimeSection[weekday][4]=0 05:00:00-24:00:00
hu
head.PirLink.TimeSection[weekday][5]=0 06:00:00-24:00:00
a
head.RecordEnable=true
head.RecordChannels=[0, 1, 2]
HT
head.RecordLatch=10
TP
head.AlarmOutEnable=true
head.AlarmOutChannels=[1, 4]
AP
Success
head.AlarmOutLatch=10
I
Return
head.SnapshotEnable=true
fo
head.SnapshotChannels=[2, 4]
r
head.MailEnable=true
We
head.AlarmBellEnable=true
st
head.AlarmBellLatch=10
head.Dejitter=0
Eu
head.LogEnable=true
ro
head.DetectWindow[0].Level=3
head.DetectWindow[0].Id=0
pe
head.DetectWindow[0].Name=Region0
Te
head.DetectWindow[0].Sensitive=58
head.DetectWindow[0].Threshold=4
c
hn
head.DetectWindow[0].Region[0]=3932160
ic
head.DetectWindow[0].Region[1]=3932160
a
…
l
…
head. DetectWindow [1]…
if a device has one or more pir, PirParam is a array
channel : video channel index
Comment
weekday : range is [0-6] (Sunday - Saturday)
head=configEx[channelNo]
set pir parameter
Table 14-4
http://<server>/cgi-bin/pirAlarm.cgi?action=setPirParam&[channel=<channelNo>]&<pa
Syntax
ramName>=<paramValue>...&<paramName>=<paramValue>
Comm 219
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
OK
Return
channel : video channel index
Comment
head=configEx[channelNo]
Appendix:
WinNum
hu
[WinNum].Level
Range is [1—6].
AP
Sensitivity of pir
1: lowest sensitivity.
I
6: highest sensitivity.
fo
head.DetectWindow
string It is the name of a detect window.
We
[WinNum].Name
st
Range is [0—100].
head.DetectWindow
integer It presents more sensitive if the value is
Eu
[WinNum].Sensitive
larger.
ro
Range is [0—100].
head.DetectWindow [WinNum].
pe
Comm 220
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
1=Line 2
…
…
MotionDetect[0].Region[0] = 4194303
HT
22 blocks is monitored.
MotionDetect[0].Region[1] =0: motion in
AP
blocks is monitored.
We
Staurday)
ts (time section) range is [0 — 23],
Eu
Comm 221
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.
Range is [10—300].
head. PirLink.AlarmOutLatch Integer Unit is seconds, indicates the time to
output alarm after input alarm is cleared.
Range is {0, 1}
head. PirLink.SnapshotChannels[ch] integer 0 — do not snapshot on video channel ch
1 — snapshot on video channel ch
Da
Range is [0—255].
a
Comm 222
15 Other APIs
15.1 Discover Devices
Example http://192.168.1.108/cgi-bin/deviceDiscovery.cgi?action=attach&DeviceClass=VTO
hu
deviceInfo[index].AlarmInputChannels=8
a
deviceInfo[index].AlarmOutputChannels=0
HT
deviceInfo[index].DeviceClass=VTO
TP
deviceInfo[index].DeviceType=VTO2000A
deviceInfo[index].HttpPort=80
AP
deviceInfo[index].IPv4Address.DefaultGateway=172.12.0.1
I
deviceInfo[index].IPv4Address.DhcpEnable=false
fo
deviceInfo[index].IPv4Address.IPAddress=172.12.7.102
deviceInfo[index].IPv4Address.SubnetMask=255.255.0.0
r
deviceInfo[index].IPv6Address.DefaultGateway=2008::1
We
Success
deviceInfo[index].IPv6Address.DhcpEnable=false
st
Return
deviceInfo[index].IPv6Address.IPAddress=2008::6/112
deviceInfo[index].Mac=00:01:5b:01:44:77
Eu
deviceInfo[index].MachineName=YZZ4DZ008D00031
ro
deviceInfo[index].Port=37777
pe
deviceInfo[index].RemoteVideoInputChannels=0
deviceInfo[index].SerialNo=YZZ4DZ008D00031
Te
deviceInfo[index].Vendor=Multi
c
deviceInfo[index].Version=1.200.0.0
hn
deviceInfo[index].VideoInputChannels=1
ic
deviceInfo[index].VideoOutputChannels=16
a
Parameters in URL:
l
15.2 Flashlight
Table 15-3
a
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramV
HT
Syntax
alue>[&<paramName>=<paramValue>…]
TP
Method GET
Description Set Flashlight config.
AP
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&FlashLight.Enable=tr
Example
I
ue&FlashLight.TimeSection[1][0]=1%2012:00:00-18:00:00
fo
Success
OK
r
Return
—
We
Comment
st
Appendix:
Eu
section table.
ic
Example:
TimeSection[1][0]=1 12:00:00—18:00:00
Means flash light is effective between 12:00:00 and
18:00:00 at Monday.
Comment —
hu
Stop Application
a
Syntax http://<server>/cgi-bin/installManager.cgi?action=stop&appname=xxx&appid=yyy
HT
Method GET
Description Stop application.
TP
http://192.168.1.108/cgi-bin/installManager.cgi?action=stop&appname=FaceDemo&ap
Example
AP
pid=1
I
Success
OK
Return
fo
Comment —
r
We
st
Eu
ro
pe
Te
c hn
ic
a l
Table 16-1
hu
URL http://<server>/cgi-bin/videoStatServer.cgi?action=getSummary
Method GET
a
"ExitedSubtotal"param.
+EnteredSubto
object O People enter stat.
Te
tal
c
++TotalInTime
l
AI APIs 226
++ManStayStat array<object> O The entering and leaving stat of people that leaved.
+++EnterTime string O People enter time, ex: 2012-01-04 00:00:00.
+++ExitTime string O People leave time, ex: 2012-01-04 00:00:45.
[ Example ]
Request GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=getSummary&channel=1
summary.Channel=0
summary.RuleName=NumberStat
summary.EnteredSubtotal.Today=0
summary.EnteredSubtotal.Total=14
summary.EnteredSubtotal.TotalInTimeSection=0
summary.ExitedSubtotal.Today=0
Respons
summary.ExitedSubtotal.Total=32
e
summary.ExitedSubtotal.TotalInTimeSection=0
Da
summary.InsideSubtotal.Total=65
hu
summary.InsideSubtotal.ManStayStat[0].EnterTime=2012-01-04 00:00:00
a
summary.InsideSubtotal.ManStayStat[0].ExitTime=2012-01-04 00:00:45
summary.InsideSubtotal.ManStayStat[1].EnterTime=2012-01-04 00:00:00
HT
summary.InsideSubtotal.ManStayStat[1].ExitTime=2012-01-04 00:00:45
TP
AP
Start to find
fo
Table 16-2
r
URL http://<server>/cgi-bin/videoStatServer.cgi?action=startFind
We
Method GET
st
Start to find video stat info, in response, there is a token for further info finding process,
Description
and there is a totalCount shows how many data count(s).
Eu
+Granularity string R
l
AI APIs 227
[ Example ]
GET
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=startFind&channel=1&condition.St
Request
artTime=2011-01-01%2012:00:00&condition.EndTime=2011-01-10%2012:00:00&condition
.Granularity=Hour&condition.RuleType=NumberStat&condition.MinStayTime=20
token=12345
Response
totalCount=56
Get the find result
Table 16-3
URL http://<server>/cgi-bin/videoStatServer.cgi?action=doFind
Method GET
Description Get the find result of Video Stat info with channel, token, begin Number and count.
Da
channel int O
NOTE: must be the same as startFind.
HT
Token for this search, use this token to get result and stop
token int R
TP
searching.
beginNumber int R The start count. It must be between 0 and totalCount -1.
AP
stat is in "InsideSubtotal"param
+RuleName string R
"NumberStat": count people enter and leave region,
pe
"ExitedSubtotal"param.
+StartTime string O Find time range start, ex: 2012-01-04 00:00:00.
chn
+EnteredSubto
int O Total enter num.
a
tal
l
+ExitedSubtota
int O Total leave num.
l
+InsideSubtotal int O Total inside num.
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=doFind&channel=1&token=1234
5&beginNumber=0&count=20
AI APIs 228
found=20
info[0].Channel=0
info[0].RuleName=NumberStat
info[0].StartTime=2012-03-14 00:00:00
info[0].EndTime=2012-04-14 00:00:00
info[0].EnteredSubtotal=14
info[0].ExitedSubtotal=5
info[0].InsideSubtotal=65
Response
info[1].Channel=0
info[1].RuleName=NumberStat
info[1].StartTime=2012-03-14 00:00:00
info[1].EndTime=2012-04-14 00:00:00
info[1].EnteredSubtotal=14
Da
info[1].ExitedSubtotal=5
hu
info[1].InsideSubtotal=65
…
a
Table 16-4
URL http://<server>/cgi-bin/videoStatServer.cgi?action=stopFind
AP
Method GET
I
channel int O
NOTE: must be the same as startFind.
st
Token for this search, use this token to get result and stop
token int R
search.
Eu
[ Response Params ] ( OK )
ro
[ Example ]
pe
GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=stopFind&channel=1&token
Request
=12345
Te
Response OK
c hn
ic
Table 16-5
URL http://<server>/cgi-bin/videoStatServer.cgi?action=clearSectionStat
Method GET
Description Clear the people count information.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
channel int O Video channel index which starts from 1, default is 1.
[ Response Params ] ( OK )
[ Example ]
Request GET http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=clearSectionStat&channel=1
AI APIs 229
Response OK
Table 16-6
URL http://<server>/cgi-bin/videoStatServer.cgi?action=attach
Method GET
Description Subscribe the people count information.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
channel int O Video channel index which starts from 1, default is 1.
Send heartbeat interval, range is [1, 60],unit is second. If the
Da
param.
Eu
+EnteredSubtota
object O People enter stat.
l
ro
ction
ic
AI APIs 230
GET
Request
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=attach&channel=1&heartbeat=5
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed
--<boundary>
Content-Type: text/plain
Content-Length: <length>
summary.Channel=0
summary.RuleName=NumberStat
Da
summary.EnteredSubtotal.Today=0
hu
summary.EnteredSubtotal.Total=14
summary.EnteredSubtotal.TotalInTimeSection=0
a
summary.ExitedSubtotal.Today=0
HT
summary.ExitedSubtotal.Total=32
TP
summary.ExitedSubtotal.TotalInTimeSection=0
summary.InsideSubtotal.Total=65
AP
Response
summary.InsideSubtotal.ManStayStat[0].EnterTime=2012-01-04 00:00:00
I
summary.InsideSubtotal.ManStayStat[0].ExitTime=2012-01-04 00:00:45
fo
summary.InsideSubtotal.ManStayStat[1].EnterTime=2012-01-04 00:00:00
r
summary.InsideSubtotal.ManStayStat[1].ExitTime=2012-01-04 00:00:45
We
--<boundary>
Content-Type: text/plain
st
Content-Length: 11
Eu
ro
Heartbeat
--<boundary>
pe
Content-Type: text/plain
Te
Content-Length: <length>
c hn
summary.Channel=0
ic
summary.RuleName=NumberStat
summary.EnteredSubtotal.Today=0
a l
summary.EnteredSubtotal.Total=14
…
Table 16-7
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
Description When people number triggers the rule, send this event.
[ Event Params ] ( JSON format )
Name Type R/O Param Description
AI APIs 231
Number int R Total number in detect region.
EnteredNumber int R Total number that enter the detect region.
ExitedNumber int R Total number that leave the detect region.
Number overrun type, it can be: "EnterOver", "ExitOver",
Type string R
"InsideOver".
[ Example ]
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Code=NumberStat;action=Start;index=0;data={
Event "Number": 120,
"EnteredNumber": 180,
Da
"ExitedNumber": 60,
hu
"Type": "EnterOver"
a
}
--<boundary>
HT
TP
Table 16-8
fo
Description When people number triggers the rule, send this event.
[ Event Params ] ( JSON format )
We
Array<obje
ManList R The people info list.
Eu
ct>
The detected people bounding box, 4 interge, refer to x's value
ro
+BoundingBox Array<int> R
right-bottom point, y's value of right-bottom point. Coordinate
remap to 0 — 8192.
Te
[ Example ]
ic
--<boundary>
Content-Type: text/plain
a l
Content-Length: <length>
Code=ManNumDetection;action=pulse;index=0;data={
Event
"ManList": [ { "BoundingBox": [2992,1136,4960,5192], "Stature": 170 },
{ "BoundingBox": [4392,4136,6960,6512], "Stature": 175 },
{…}, … ]
}
--<boundary>
AI APIs 232
16.1.2 FaceRecognitionServer
Table 16-9
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=createGroup
Method GET
Description Create a face group.
[ Request Params ] ( key=value format at URL )
Name Type R/O Param Description
groupName string R The face group name, max string length is 127.
Da
groupID string R The identity of the created face group, max string length is 63.
TP
[ Example ]
GET
AP
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=createGroup&groupName
I
=Test1&groupDetail=ForTest1
fo
Response groupID=10000
r
We
Table 16-10
Eu
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=modifyGroup
ro
Method GET
pe
groupID string R The identity of the face group, max string length is 63.
hn
groupName string R The name of the the face group, max string length is 127.
ic
groupDetail string O Description detail of the face group, max string length is 255.
a l
[ Response Params ] ( OK )
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=modifyGroup&groupID=10
000&groupName=Test1&groupDetail=ForTest1
Response OK
Table 16-11
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=deleteGroup
AI APIs 233
Method GET
Description Delete a face group.
[ 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.
[ Response Params ] ( OK )
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=deleteGroup&groupID=100
00
Response OK
Da
There are two ways to deploy the group. One is based on the group (putDisposition), and the
a
Table 16-12
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=putDisposition
AP
Method GET
I
Deploy the face group to some video channels. If the video channel has been deployed
fo
Description
already, it will change the similary.
r
groupID string R The identity of the face group, max string length is 63.
list Array<object> R List of disposition info.
Eu
[ Example ]
hn
GET
ic
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=putDisposition&groupID=1
a
0000&list[0].channel=1&list[0].similary=80&list[1].channel=2&list[1].similary=70
l
report[0]=true
Response
report[1]=false
Delete some disposition from group
Table 16-13
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=deleteDisposition
Method GET
Descripti
Remove the deployment of face group from some video channels.
on
[ Request Params ] ( key=value format at URL )
Name Type R/O Param Description
AI APIs 234
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.
[ Response Params ] ( key=value format )
Name Type R/O Param Description
report array<bool> R Result of deleting disposition for each request channel.
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=deleteDisposition&groupID
=10000&channel[0]=1&channel[1]=2
report[0]=true
Response
report[1]=false
set disposition group to channel
Da
Table 16-14
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=setGroup
hu
Method GET
a
Deploy some face groups to one video channel. If the video channel has been deployed
HT
Descripti
already, it will change the similary.
on
TP
channel.
We
+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.
st
[ Response Params ] ( OK )
Eu
[ Example ]
ro
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=setGroup&channel=1&list
pe
[0].groupID=10000&list[0].similary=80&list[1].groupID=10002&list[1].similary=75
Te
Response OK
c
Table 16-15
ic
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=getGroup
a l
Method GET
Get the Deployment about the video channel.
Descripti
Note: If the video channel does not deploy any group, then the response will be success
on
with empty http body.
[ Request Params ] ( key=value format at URL )
Name Type R/O Param Description
channel int R Video channel index which starts from 1.
[ Response Params ] (key=value format)
Name Type R/O Param Description
groupID Array<int> R The identity of the face group, max string length is 63.
similary Array<int> R The threshold of the face similary, 0 — 100.
AI APIs 235
[ Example ]
Request GET http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=getGroup&channel=1
groupID[0]=10001
groupID[1]=10003
groupID[2]=10006
….
Response
similary[0]=80
similary[1]=75
similary[2]=85
….
Table 16-16
hu
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=findGroup
a
Method GET
HT
Description Find the face group. If the groupID is not present in the URL, it will return all the groups.
TP
groupID string O The identity of the face group, max string length is 63.
I
+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.
st
+groupDetail string O Description detail of the face group, max string length is 255.
Eu
[ Example ]
Te
AI APIs 236
GroupList[0].groupID=00001
GroupList[0].groupName=Test1
GroupList[0].groupDetail=ForTest1
GroupList[0].groupSize=30
GroupList[0].channels[0]=1
GroupList[0].channels[1]=2
…
GroupList[0].similarity[0]=80
GroupList[0].similarity[1]=75
…
Response
GroupList[1].groupID=00003
GroupList[1].groupName=Test3
GroupList[1].groupDetail=ForTest3
Da
GroupList[1].groupSize=50
hu
GroupList[1].channels[0]=1
GroupList[1].channels[1]=2
a
…
HT
GroupList[1].similarity[0]=70
TP
GroupList[1].similarity[1]=85
…
AP
I
Start ReAbstract
We
Table 16-17
st
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=groupReAbstract
Method GET
Eu
Description About the process of the re-extract, the device will use an event named
pe
groupID Array<int> R The identity of the face group, max string length is 63.
[ Response Params ] (key=value format)
ic
Table 16-18
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopGroupReAbstract
Method GET
AI APIs 237
Descripti
Stop the abstract features process.
on
[ Request Params ] ( key=value format at URL )
Name Type R/O Param Description
token int R The identity of this operation.
[ Response Params ] ( OK )
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=stopGroupReAbstract&tok
en=12345
Response OK
Da
Table 16-19
a
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=addPerson
HT
Method POST
TP
The identity of the face group that this person to add. Max string
groupID string R
fo
length is 63.
r
according to ISO3166.
ro
"Unknown".
c
uid string R The id for this Person, max string length is 31.
l
[ 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
Request
Content-Type: image/jpeg
Content-Length: <image size>
AI APIs 238
16.1.2.8 Modify Person
Table 16-20
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=modifyPerson
Method POST
Modify a person's info.
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.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
uid string R The identity of the Person, max string length is 31.
Da
The identity of the Face Group that this Person in. max string
groupID string R
length is 63.
hu
"Unknown".
We
[ Example ]
Eu
POST
ro
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=modifyPerson&uid=0005&grou
pID=10000&name=ZhangSan&birthday=1980-01-05&sex=Male&country=CN&province=
pe
ZheZhang&city=Hangzhou HTTP/1.1
Request
Te
Content-Type: image/jpeg
Content-Length: <image size>
c hn
ic
Response OK
l
Table 16-21
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=deletePerson
Method GET
Description Delete a person from a group.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
uid string R The identity of the person, max string length is 31.
AI APIs 239
The identity of the face group that this Person in. max string
groupID string R
length is 63.
[ Response Params ] ( OK )
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=deletePerson&uid=001&gr
oupID=10000
Response OK
Table 16-22
Da
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFind
hu
Method GET
a
Description
Note: the returned token will be expired after 60 seconds without any doFind call.
TP
+GroupID Array<string> R The list of identity of the face group, max string length is 63.
fo
+Country
according to ISO3166.
Eu
+CertificateType
"Unknown".
Te
Token for this search, use this token to get result and stop
l
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]
Request
=10000&condition.GroupID[1]=10003&person.Sex=Male&person.Country=CN&person.F
eatureState=1
token=123456789
Response
totalCount=24
Get find result
AI APIs 240
Table 16-23
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFind
Method GET
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.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Token for this search, use this token to get result and stop
token uint R
search.
The index in search result, should between 0 and totalCount
index uint R
–1.
[ Response Params ] ( JSON format )
Name Type R/O Param Description
Da
+UID string R The identity of the person, max string length is 31.
a
string R The identity of the face group that this Person in. max string
+GroupID
HT
length is 63.
+Name string R The person name, max string length is 63.
TP
+CertificateType
"Unknown".
+ID string O Person ID of CertificateType, max string length is 31.
Eu
[ Example ]
pe
GET
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFind&token=123456789&in
Te
dex=0
c hn
HTTP/1.1 200 OK
Server: Device/1.0
ic
Content-Length: <length>
--<boundary>
Content-Type: text/plain
Response
Content-Length: <length>
person.UID=0005
person.GroupID=10000
person.Name=ZhangSan
person.Birthday=1980-01-01
person.Sex=Male
AI APIs 241
person.Country=CN
person.Province=ZheJiang
person.City=HangZhou
person.CertificateType=IC
person.ID=1234567890
person.FeatureState=0
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>
Table 16-24
hu
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFind
a
Method GET
HT
Descripti
Stop the search session.
TP
on
[ Request Params ] ( key=value format in URL )
AP
The token for this search, use this token to get result and stop
token uint R
fo
search.
r
[ Response Params ] ( OK )
[ Example ]
We
GET
st
Request
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFind&token=123456789
Eu
Response OK
ro
pe
Table 16-25
hn
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=reAbstract
ic
Method GET
a
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 )
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=reAbstract&uid[0]=001&ui
d[1]=002
AI APIs 242
Response OK
Stop ReAbstract
Table 16-26
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopReAbstract
Method GET
Descripti
Stop the abstract features process.
on
[ Request Params ] ( None )
[ Response Params ] ( OK )
[ Example ]
Request GET http://192.168.1.108/cgi-bin/faceRecognitionServer.cgi?action=stopReAbstract
Respons
OK
Da
e
hu
a
Table 16-27
AP
http://<server>/cgi-bin/ConfigManager.cgi?action=getConfig&name=FaceRecognitionAla
URL
I
rm
Method GET
fo
+FaceRecognitio
ro
array<object> R Each face group has one config object in this array.
nAlarm
pe
++GroupID String R The face group ID, max string length is 63.
++GroupName String R The face group name, max string length is 127.
Te
++AlarmOutEna
c
++AlarmChannel Array<object> R Each AlarmOut channel has one config object in this array.
ic
+++AlarmRuleM
l
AI APIs 243
table.FaceRecognitionAlarm[0].GroupID=0017
table.FaceRecognitionAlarm[0].GroupName=wsd
table.FaceRecognitionAlarm[0].AlarmOutEnable=true
table.FaceRecognitionAlarm[0].AlarmChannel[0].AlarmRuleMask=0
table.FaceRecognitionAlarm[0].AlarmChannel[0].AlarmOutLatch=5
table.FaceRecognitionAlarm[0].AlarmChannel[1].AlarmRuleMask=0
table.FaceRecognitionAlarm[0].AlarmChannel[1].AlarmOutLatch=8
…
Response
table.FaceRecognitionAlarm[1].GroupID=0018
table.FaceRecognitionAlarm[1].GroupName=cst
table.FaceRecognitionAlarm[1].AlarmOutEnable=true
table.FaceRecognitionAlarm[1].AlarmChannel[0].AlarmRuleMask=0
table.FaceRecognitionAlarm[1].AlarmChannel[0].AlarmOutLatch=10
Da
table.FaceRecognitionAlarm[1].AlarmChannel[1].AlarmRuleMask=0
hu
table.FaceRecognitionAlarm[1].AlarmChannel[1].AlarmOutLatch=15
…
a
URL http://<server>/cgi-bin/ConfigManager.cgi?action=setConfig
TP
Method GET
Descripti
AP
FaceRecognition
array<object> R Each face group has one config object in this array.
We
Alarm
st
+GroupID String R The face group ID, max string length is 63.
+GroupName String R The face group name, max string length is 127.
Eu
+AlarmOutEnabl
Bool R Enable AlarmOut or not.
ro
e
pe
+AlarmChannel Array<object> R Each AlarmOut channel has one config object in this array.
Alarm rule mask.
++AlarmRuleMa
Te
++AlarmOutLatc
ic
[ Response Params ] ( OK )
l
[ Example ]
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
AI APIs 244
Table 16-28
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindByPic
Method POST
Start to find person in face groups by picture. The search may last for some time, so the
response may push at regular intervals until 100% Progress
Description Note: If you want to find person in face groups by person info, see above "Find
Person"API.
Note: The returned token will be expired after 60 seconds without any doFind call.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
GroupID array<string> R Face groups to find, max string length is 63.
Similarity int R Similarity percent, 1 — 100.
MaxCandidate int O Max Candidate result number.
Da
The token of this search, use this token to get result and stop
token uint R
HT
search.
progress uint R Search Progress, 100 means finished.
TP
[ Example ]
I
POST
http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindByPic&GroupID[0]=0000
fo
1&GroupID[1]=00003&Similarity=80&MaxCandidate=500
r
<JPEG data>
Eu
HTTP/1.1 200 OK
ro
Server: Device/1.0
pe
--<boundary>
hn
Content-Type: application/json
ic
Content-Length: <length>
a l
{ "token": 123456789,
"progress": 60
"totalCount": -1
AI APIs 245
}
--<boundary>
Content-Type: application/json
Content-Length: <length>
{ "token": 123456789,
"progress": 100
"totalCount": 350
}
--<boundary>--
Get the find result
Table 16-29
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindByPic
Da
Method GET
hu
Get the find result, reply using multipart format, first part is json string to describe all
a
Descripti candidate person, then the following parts are the person's pictures, refer by UID and
HT
Note: the returned token will be expired after 60 seconds without any doFind call.
[ Request Params ] ( key=value format in URL )
AP
Token for this search, use this token to get result and stop
token uint R
fo
search.
r
++UID string R System id for this Person, max string length is 31.
The identity of the Face Group that this Person in. max string
c
++GroupID string R
hn
length is 63.
ic
AI APIs 246
GET
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindByPic&token=12345678
9&index=0&count=10
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Connection: closed
--<boundary>
Content-Type: application/json
Content-Length: <length>
{ "Found" : 10,
Da
"Candidates" : [
hu
{
"person" : {
a
"UID" : "0001",
HT
"GroupID" : "001",
TP
"Name" : "ZhangSan",
"Birthday" : "1980-01-05",
AP
"Sex" : "Male",
I
...
fo
},
r
"Similarity" : 85
We
},
Response
{
st
"person" : {
Eu
"UID" : "0002",
ro
"GroupID" : "002",
"Name" : "LiSi",
pe
"Birthday" : "1980-01-06",
Te
"Sex" : "Male",
...
c hn
},
ic
"Similarity" : 80
},
a l
{ ... }, ...
]
}
--<boundary>
Content-Info: UID=0001&GroupID=001
Content-Type: image/jpeg
Content-Length: <length>
AI APIs 247
Content-Type: image/jpeg
Content-Length: <length>
Table 16-30
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindByPic
Method GET
Descripti
Stop the search session.
on
[ Request Params ] ( key=value format in URL )
Da
Token for this search, use this token to get result and stop
a
token uint R
search.
HT
[ Response Params ] ( OK )
TP
[ Example ]
GET
AP
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindByPic&token=12345678
I
9
fo
Response OK
r
We
Start to find
Eu
Table 16-31
ro
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=startFindHistoryByPic
pe
Method POST
Start to find person in capture history by picture. The search may last for some time, so
Te
Description Note: If you want to find person in capture history by person info, please refer to
hn
"mediaFileFind"API.
ic
Note: the returned token will be expired after 60 seconds without any doFind call.
a
AI APIs 248
progress uint R Search Progress, 100 means finished.
totalCount int R Result num, return -1 means still searching.
[ Example ]
POST
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
milarity=80&MaxCandidate=500
Request
Content-Type: image/jpeg
Content-Length: <image size>
<JPEG data>
HTTP/1.1 200 OK
Server: Device/1.0
Da
Connection: closed
a
--<boundary>
HT
Content-Type: application/json
TP
Content-Length: <length>
AP
{ "token": 123456789,
I
"progress": 20
fo
"totalCount": -1
r
}
We
--<boundary>
st
Content-Type: application/json
Response
Content-Length: <length>
Eu
ro
{ "token": 123456789,
"progress": 60
pe
"totalCount": -1
Te
}
--<boundary>
c hn
Content-Type: application/json
ic
Content-Length: <length>
a l
{ "token": 123456789,
"progress": 100
"totalCount": 350
}
--<boundary>--
Get find result
Table 16-32
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindHistoryByPic
Method GET
Descripti Get the find result, reply by multipart, first part is json string to describe all candidate person,
AI APIs 249
on then the following part is the person's picture, refer by UID in part header Content-Info.
Note: the returned token will be expired after 60 seconds without any doFind call.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Token for this search, use this token to get result and stop
token uint R
search.
The index in search result, should between 0 and totalCount
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
Found int R Number of result person that return.
Candidates Array<object> R Candidates Person.
Da
++UID string R System id for this Person, max string length is 63.
a
[ Example ]
I
GET
fo
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=doFindHistoryByPic&token=12
3456789&index=0&count=12
r
HTTP/1.1 200 OK
We
Server: Device/1.0
st
--<boundary>
pe
Content-Type: application/json
Content-Length: <length>
Te
c
{ "Found" : 12,
hn
"Candidates" : [
ic
Response {
a
"person" : {
l
"UID" : "0001",
"Sex" : "Male",
"Age" : 30,
"Glasses": 1
},
"Similarity" : 85
},
{
"person" : {
"UID" : "0002",
AI APIs 250
"Sex" : "Male",
"Age" : 50,
"Glasses": 2
},
"Similarity" : 80
},
{ ... }, ...
]
}
--<boundary>
Content-Info: UID=0001
Content-Type: image/jpeg
Content-Length: <length>
Da
hu
Content-Info: UID=0002
HT
Content-Type: image/jpeg
TP
Content-Length: <length>
AP
--<boundary>
fo
...
r
Stop finding
We
Table 16-33
st
URL http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindHistoryByPic
Method GET
Eu
Descripti
ro
Stop finding.
on
pe
Token for this search, use this token to get result and stop
c
token uint R
hn
searching.
[ Response Params ] ( OK )
ic
[ Example ]
a l
GET
Request http://<server>/cgi-bin/faceRecognitionServer.cgi?action=stopFindHistoryByPic&token=1
23456789
Response OK
Table 16-34
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
When the video channel disposition with some face group, and the video channel detect
Description
a face, send this event.
AI APIs 251
[ Event Params ] ( JSON format )
Name Type R/O Param Description
Faces Array<object> R The detected faces info.
The detected face 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.
+Sex string O Sex, it can be "Man", "Woman".
+Age int O Age.
+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".
Da
+Eye int O Eye status, 0: not detected, 1: close eye, 2: open eye.
hu
+Mouth int O Mouth status, 0: not detected, 1: close mouth, 2: open mouth.
a
+Mask int O Mask status, 0: not detected, 1: not wearing mask, 2: wearing
HT
mask.
+Beard int O Beard status, 0: not detected, 1: no beard, 2: has beard.
TP
[ Example ]
AP
--<boundary>
I
Content-Type: text/plain
Content-Length: <length>
fo
r
Code=FaceDetection;action=Start;index=0;data={
We
"Sex": "Man",
"Age": 40,
Eu
Event
"Feature": [ "WearGlasses", "Smile"],
ro
"Eye": 2,
pe
"Mouth": 1,
"Mask": 1,
Te
"Beard": 2
c
}, {…}, … ]
hn
}
ic
--<boundary>
a l
Table 16-35
Usage Refer to "4.4.3 Subscribe to Snapshot"for how to subscribe event
When the video channel disposition with some face group, and the video channel detect
Description
a face, after recognize in the face groups, send this event.
[ Event Params ] ( key=value format )
Name Type R/O Param Description
Events array<object> R Event info array.
+EventBaseInf object R Base info of event.
AI APIs 252
o
++Code String R Event Code. It should be FaceRecognition.
++Action String R Event Action. It can be "Start", "Stop" or "Pulse".
++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.
+Candidates array<object> O The Candidates person list.
++Person object O The information of candidate person.
+++UID string R The identity of the Person, max string length is 31.
The identity of the Face Group that this Person in. max string
+++GroupID string R
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".
Da
+++Country string O
according to ISO3166.
a
++Feature array<string> O
"Disgust", "Fear", "Surprise", "Neutral", "Laugh", "Happy",
ro
"Confused", "Scream".
pe
++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.
Te
++Mask int O
hn
mask.
++Beard int O Beard status, 0: not detected, 1: no beard, 2: has beard.
ic
[ Example ]
a l
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Events[0].EventBaseInfo .Code=FaceRecognition
Event Events[0].EventBaseInfo .Action=Pulse
Events[0].EventBaseInfo .Index=0
Events[0].UID=00105
Events[0].Candidates[0].Person.UID=0012
Events[0].Candidates[0].Person.GroupID=10000
Events[0].Candidates[0].Person.Name=ZhangSan
AI APIs 253
Events[0].Candidates[0].Person.Birthday=1980-01-02
Events[0].Candidates[0].Person.Sex=Male
…
Events[0].Candidates[0].Similarity=80
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
…
Events[0].Candidates[1].Similarity=75
…
Events[0].Face.Sex=Man
Da
Events[0].Face.Age=20
hu
Events[0].Face.Feature[0]=SunGlasses
Events[0].Face.Feature[1]=Smile
a
Events[0].Face.Eye=2
HT
Events[0].Face.Mouth=1
TP
Events[0].Face.Mask=1
Events[0].Face.Beard=2
AP
--<boundary>
I
Content-Type: image/jpeg
fo
Table 16-36
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
Te
When Re-Abstract Feature By Group or By Person, the abstract progress detail will send
Description
c
in this event.
hn
AI APIs 254
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Code=FaceFeatureAbstract;action=Start;index=0;data={
"Infos": [ { "State": "Progress",
Event
"Progress": 30,
"UID": "20005",
"GroupID": "10000"
}, {…}, … ]
}
--<boundary>
Da
Table 16-37
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
AP
remap to 0 — 8192.
ro
[ Example ]
pe
--<boundary>
Content-Type: text/plain
Te
Content-Length: <length>
c hn
Event
Code=LeftDetection;action=pulse;index=0;data={
ic
}
l
--<boundary>
Table 16-38
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
Description When detect some object was taken away, send this event.
[ Event Params ] ( JSON format )
Name Type R/O Param Description
Object object R The object that was taken away.
AI APIs 255
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.
[ Example ]
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Event
Code=TakenAwayDetection;action=pulse;index=0;data={
"Object": { "BoundingBox": [2992,1136,4960,5192] }
}
--<boundary>
Da
hu
Table 16-39
TP
+BoundingBox Array<int> R
—bottom point, y's value of right—bottom point. Coordinate
st
remap to 0 — 8192.
The object wandering tracks, array of polyline, one polyline
Eu
Array<Array<
Tracks O for one object, polyline is array of points, point is array of two
ro
Array<int>>>
int, x's value and y's value. Coordinate remap to 0 — 8192.
pe
[ Example ]
--<boundary>
Te
Content-Type: text/plain
c hn
Content-Length: <length>
ic
Code=WanderDetection;action=start;index=0;data={
a l
AI APIs 256
16.1.3.4 [Event] StayDetection
Table 16-40
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
+BoundingBox Array<int> O
—bottom point, y's value of right—bottom point. Coordinate
remap to 0 — 8192.
Da
+BoundingBox Array<int> O
—bottom point, y's value of right—bottom point. Coordinate
HT
remap to 0 — 8192.
TP
[ Example ]
--<boundary>
AP
Content-Type: text/plain
I
Content-Length: <length>
fo
r
Code=StayDetection;action=start;index=0;data={
Event "Object": { "BoundingBox": [2992,1136,4960,5192] },
We
{ "BoundingBox": [4392,4136,6960,6512] },
{…}, … ]
Eu
}
ro
--<boundary>
pe
Te
Table 16-41
ic
AI APIs 257
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".
++Age int O Age.
++Angle int O Angle, 0: unknown, 1: front, 2: side, 3: back.
Coat color, can be: "White", "Orange", "Pink", "Black",
"Red", "Yellow", "Gray", "Blue", "Green", "Purple", "Brown",
"Sliver", "Darkviolet", "Maroon", "Dimgray", "Whitesmoke",
++CoatColor string O "Darkorange", "Mistyrose", "Tomato", "Olive", "Gold",
"Darkolivegreen", "Chartreuse", "Greenyellow",
"Forestgreen", "Seagreen", "Chartreuse", "Deepskyblue",
Da
"Cyan", "Other".
hu
++HasHat int O Has hat or not, 0: unknown, 1: not has hat, 2: has hat.
AP
++HasBag int O Has bag or not, 0: unknown, 1: not has bag, 2: has bag.
Has umbrella or not, 0: unknown, 1: not has umbrella, 2: has
I
++HasUmbrella int O
umbrella.
fo
++Bag int O
knapsack, 4: draw-bar box.
We
++HairStyle int O
4: updo, 5: hiddened.
ro
+FaceAttributes object O If the human's face can be detected, find it's attributes.
The detected face bounding box, 4 interge, refer to x's value
Te
AI APIs 258
Glasses status, 0: unknown, 1: not wearing, 2: normal
++Glass Int O
Glasses, 3: sun glasses, 4: black frame glasses.
[ Example ]
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Events[0].EventBaseInfo .Code=HumanTrait
Events[0].EventBaseInfo .Action=Pulse
Events[0].EventBaseInfo .Index=0
Events[0].HumanAttributes.BoundingBox[0]=1341
Events[0].HumanAttributes.BoundingBox[1]=2451
Events[0].HumanAttributes.BoundingBox[2]=4513
Da
Events[0].HumanAttributes.BoundingBox[3]=4135
hu
Events[0].HumanAttributes.Sex=Man
a
Events[0].HumanAttributes.Age=30
Events[0].HumanAttributes.CoatColor=White
HT
Events[0].HumanAttributes.CoatType=1
TP
Events[0].HumanAttributes.TrousersColor=Black
Events[0].HumanAttributes.TrousersType=1
AP
Event Events[0].HumanAttributes.HasHat=1
I
Events[0].HumanAttributes.HasBag=2
fo
Events[0].FaceAttributes.BoundingBox[0]=1341
r
Events[0].FaceAttributes.BoundingBox[1]=2451
We
Events[0].FaceAttributes.BoundingBox[2]=4513
st
Events[0].FaceAttributes.BoundingBox[3]=4135
Events[0].FaceAttributes.Sex=Man
Eu
Events[0].FaceAttributes.Age=30
ro
Events[0].FaceAttributes.Feature[0]=Smile
Events[0].FaceAttributes.Eye=2
pe
Events[0].FaceAttributes.Mouth=1
Te
Events[0].FaceAttributes.Glass=1
--<boundary>
c hn
Content-Type: image/jpeg
ic
Table 16-42
Usage Refer to "4.9.17 Subscribe to Event Message"for how to subscribe event
Description When detect some object cross the line, send this event.
[ Event Params ] ( JSON format )
Name Type R/O Param Description
AI APIs 259
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
remap to 0 — 8192.
Objects array<object> O If detect several object, store in this array.
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.
[ Example ]
--<boundary>
Content-Type: text/plain
Da
Content-Length: <length>
hu
Event
a
Code=CrossLineDetection;action=pulse;index=0;data={
"Object": { "BoundingBox": [2992,1136,4960,5192] }
HT
}
TP
--<boundary>
AP
I
Table 16-43
r
Description When detect some object cross the region, send this event
st
+BoundingBox Array<int> R
—bottom point, y's value of right-bottom point. Coordinate
c hn
remap to 0 — 8192.
ic
AI APIs 260
--<boundary>
Content-Type: text/plain
Content-Length: <length>
Event
Code=CrossRegionDetection;action=pulse;index=0;data={
"Object": { "BoundingBox": [2992,1136,4960,5192] }
}
--<boundary>
Table 16-44
TP
URL http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=<RecordName>
Method GET
AP
PlateNumber string R
unique.
MasterOfCar string O The car owner, max string length is 15
Eu
PlateColor string O Plate color, max string length is 31, ex: "Yellow", "Blue", … etc.
ro
VehicleColor string O
etc.
c hn
AI APIs 261
16.2.1.2 Update Traffic BlackList/RedList Record
Table 16-45
URL http://<server>/cgi-bin/recordUpdater.cgi?action=update&name=<RecordName>
Method GET
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.
a
[ Example ]
I
GET
fo
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=update&name=TrafficBlackList&re
r
Request cno=12345&PlateNumber=AC00001&MasterOfCar=ZhangSan&PlateColor=Yellow&Vehi
We
cleColor=Blue&BeginTime=2011-01-01%2012:00:00&CancelTime=2011-01-10%2012:00
:00
st
Response OK
Eu
ro
Table 16-46
Te
URL http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=<RecordName>
c
Method GET
hn
Descripti
ic
AI APIs 262
16.2.1.4 Find Traffic BlackList/RedList Record
Table 16-47
URL http://<server>/cgi-bin/recordFinder.cgi?action=find&name=<RecordName>
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.
StartTime string O The start of the record's CreateTime.
Da
+PlateNumberV Car plate number substring, match any car plate number that
HT
string O
ague contain this substring, max string length is 47.
TP
+PlateNumberV array<string
O Car plate number substring array, max string length is 47.
agueGroup >
AP
+QueryResultBe
int O Begin number in the result set, default is 0.
fo
gin
r
array<object
records R The records that returned.
ro
>
+RecNo int R Record id.
pe
param> record>
a
[ Example ]
l
GET
Request http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=TrafficBlackList&condition.
PlateNumber=AC00001&StartTime=123456700&EndTime=123456800&count=100
totalCount=1000
found=100
records[0].RecNo=12345
Respons records[0].CreateTime=123456789
e records[0].PlateNumber=AC00001
records[0].MasterOfCar=ZhangSan
…
records[1].RecNo=13579
AI APIs 263
records[1].CreateTime=123456799
records[1].PlateNumber=AC00001
records[1].MasterOfCar=LiSi
…
Table 16-48
Usage Refer to "4.4.3 Subscribe to Snapshot"for how to subscribe event
Description When detects vehicle passing, send this event.
Da
+IndexInGroup int O The index of this event in the event group, start from 1.
r
video.
+Speed int O Vehicle speed, unit is km/hour.
Eu
AI APIs 264
++Country string O Country info. Max string length is 19.
++Speed int O Vehicle speed, unit is km/hour.
++Event string O The event info, ex: "TrafficJunction".
+CommInfo object O Traffic event common info.
++Seat array<object> O Vehicle front seat info.
+++Type string O Front seat type. It can be: "Main""Slave".
Some driver status. It can be some of the following:
+++Status array<string> O
"Smoking", "Calling".
Sunshade status. It can be: "Unknow", "WithSunShade",
+++SunShade string O
"WithoutSunShade".
The detected sun shade bounding box, 4 interge, refer to
x's value of left-top point, y's value of left-top point, x's
+++ShadePos Array<int> O
value of right-bottom point, y's value of right-bottom point.
Da
"WithoutSafeBelt".
HT
[ Example ]
--<boundary>
TP
Content-Type: text/plain
AP
Content-Length: <length>
I
Events[0].EventBaseInfo.Code=TrafficJunction
fo
Events[0].EventBaseInfo.Action=Pulse
r
Events[0].EventBaseInfo.Index=0
We
Events[0].GroupID=123
st
Events[0].CountInGroup=3
Events[0].IndexInGroup=1
Eu
Events[0].Lane=0
ro
Events[0].Vehicle.BoundingBox[0]=1341
pe
Events[0].Vehicle.BoundingBox[1]=2451
Events[0].Vehicle.BoundingBox[2]=4513
Te
Events[0].Vehicle.BoundingBox[3]=4135
Event
c
Events[0].Vehicle.Text=Audi
hn
Events[0].Vehicle.SubText=A6L
ic
Events[0].Vehicle.SubBrand=5
a
Events[0].Vehicle.BrandYear=2
l
Events[0].TrafficCar.RecNo=123
Events[0].TrafficCar.PlateNumber=AC00003
Events[0].TrafficCar.PlateColor=Yellow
Events[0].TrafficCar.VehicleColor=Blue
Events[0].TrafficCar.BoundingBox[0]=1341
Events[0].TrafficCar.BoundingBox[1]=2451
Events[0].TrafficCar.BoundingBox[2]=4513
Events[0].TrafficCar.BoundingBox[3]=4135
Events[0].TrafficCar.Country=China
Events[0].CommInfo.Seat[0].Type=Main
Events[0].CommInfo.Seat[0].Status[0]=Smoking
AI APIs 265
Events[0].CommInfo.Seat[0].SunShade=WithSunShade
Events[0].CommInfo.Seat[0].ShadePos[0]=2021
Events[0].CommInfo.Seat[0].ShadePos[1]=3041
Events[0].CommInfo.Seat[0].ShadePos[2]=2151
Events[0].CommInfo.Seat[0].ShadePos[3]=3661
Events[0].CommInfo.Seat[0].SafeBelt=WithoutSafeBelt
…
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>
Event params is the same as TrafficJunction, except for event Code is TrafficRetrograde.
AP
Table 16-49
r
+IndexInGroup int O The index of this event in the event group, start from 1.
a
Events[0].EventBaseInfo.Code=TrafficJam
AI APIs 266
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].GroupID=123
Events[0].CountInGroup=3
Events[0].IndexInGroup=1
Events[0].Lane=0
Events[0].StartJaming=123456789
Events[0].AlarmInterval=180
Events[0].JamLenght=70
Events[0].JamRealLength=120
…
--<boundary>
Content-Type: image/jpeg
Da
--<boundary>
HT
TP
Event params is the same as TrafficJunction, except for event Code is TrafficUnderSpeed,
fo
Table 16-50
[ Extra Event Params ] ( key=value format )
st
+SpeedLimit array<int> O Speed limit, 2 integer, min speed and max speed.
ro
+UnderSpeeding
int O Percentage of under speed.
Percentage
pe
Te
Event params is the same as TrafficJunction, except for event Code is TrafficOverSpeed, and add
a
following params:
l
Table 16-51
[ 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.
+SpeedingPerce
int O Percentage of over speed.
ntage
Table 16-52
AI APIs 267
Usage Refer to "4.4.3 Subscribe to Snapshot"for how to subscribe event
Description When detects human in the lane, send this event
[ Event Params ] ( key=value format )
Name Type R/O Param Description
Events array<object> R Event info array.
+EventBaseInfo object R Base info of event.
++Code String R Event Code. It should be TrafficPedestrain.
++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
+Vehicle object O Actually this is the human that detected, not vehicle.
hu
++BoundingBox Array<int> R The detected car bounding box, 4 interge, refer to x's value
HT
[ Example ]
I
Event --<boundary>
fo
Content-Type: text/plain
Content-Length: <length>
r
We
Events[0].EventBaseInfo.Code=TrafficPedestrain
st
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Eu
Events[0].GroupID=123
ro
Events[0].CountInGroup=3
pe
Events[0].IndexInGroup=1
Events[0].Lane=0
Te
Events[0].Vehicle.Category=Passerby
c
Events[0].Vehicle.BoundingBox[0]=1341
hn
Events[0].Vehicle.BoundingBox[1]=2451
ic
Events[0].Vehicle.BoundingBox[2]=4513
a
Events[0].Vehicle.BoundingBox[3]=4135
l
…
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>
AI APIs 268
16.2.2.7 [Event] TrafficParking
When detects vehicle illegal parking, send this event.
Event params is the same as TrafficJunction, except for event Code is TrafficParking, and
remove param "speed", add following params:
Table 16-53
[ Extra Event Params ] ( key=value format )
Name Type R/O Param Description
+StartParking int O The start time of parking, UTC seconds.
+AlarmInterval int O The alarm interval.
+ParkingAllowed
int O The allowed time of parking.
Time
Da
hu
Table 16-54
AP
Description When traffic flow trigger the rule, send this event
fo
FlowStates array<object> R Traffic flow info, each object in list is traffic flow info about
st
one lane.
+Lane int R Lane number, start from 0.
Eu
[ Example ]
l
Event --<boundary>
Content-Type: text/plain
Content-Length: xxxx
Code=TrafficFlowStat;action=Pulse;index=0;data={
"FlowStates": [ { "Lane": 0,
"Flow": 50,
"Period": 5,
"DrivingDirection": [ "Approach", "Hangzhou", "Shanghai"]
}, {…}, … ]
}
AI APIs 269
--<boundary>
Table 16-55
URL http://<server>/cgi-bin/recordFinder.cgi?action=find&name=TrafficFlow
Method GET
Description Find traffic flow history record.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
name string R The name of record table. It should be "TrafficFlow".
count int O Max result to return, default is 1024.
Da
means congestion.
c
[ Example ]
hn
Request GET
ic
http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=TrafficFlow&condition.Cha
a
nnel=0&condition.Lane=0&StartTime=123456700&EndTime=123456800&count=100
l
Respons totalCount=1000
e found=100
records[0].RecNo=12345
records[0].CreateTime=123456789
records[0].StaticsticsTime=123456789
records[0].Period=300
records[0].Channel=0
records[0].Lane=0
records[0].Vehicles=250
records[0].AverageSpeed=25.4
…
AI APIs 270
records[1].RecNo=13579
records[1].CreateTime=123456799
records[1].StaticsticsTime=123456799
records[1].Period=300
records[1].Channel=0
records[1].Lane=0
records[1].Vehicles=220
records[1].AverageSpeed=21.8
…
Table 16-56
URL http://<server>/cgi-bin/Attendance.cgi?action=addUser
AP
Method GET
I
[ Response Params ] ( OK )
ro
[ Example ]
pe
GET
Request http://<server>/cgi-bin/Attendance.cgi?action=addUser&UserID=102&UserName=Zhang
Te
San&Password=123456
c
hn
Response OK
ic
a
Table 16-57
URL http://<server>/cgi-bin/Attendance.cgi?action=modifyUser
Method GET
Modify an access user.
Description
Note: You should provide at lease one optional param to update.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
UserID string R The user's id.
UserName string O The user's name.
AI APIs 271
CardNo string O The user's card number.
Password string O The user's password.
[ Response Params ] ( OK )
[ Example ]
GET
Request http://<server>/cgi-bin/Attendance.cgi?action=modifyUser&UserID=102&UserName=Zhan
gSan&Password=123456
Response OK
Table 16-58
Da
URL http://<server>/cgi-bin/Attendance.cgi?action=deleteUser
Method GET
hu
[ Example ]
I
Response OK
r
We
Table 16-59
ro
URL http://<server>/cgi-bin/Attendance.cgi?action=getUser
pe
Method GET
Description Get an access user's information.
Te
AI APIs 272
{ "UserInfo": {
"UserID": 102,
Response "UserName": "ZhangSan",
"Password": "123456"
}
Find all access user
Table 16-60
URL http://<server>/cgi-bin/Attendance.cgi?action=findUser
Method GET
Description Get all information of access user.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Da
[ Example ]
We
{ "Total": 1000,
"UserInfo": [ {
Eu
"UserID": 102,
ro
}, { … } … ]
Te
}
c hn
Table 16-61
l
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=add
Method POST
Description Add an access user face.
[ Request Params ] ( JSON format in body )
Name Type R/O Param Description
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.
AI APIs 273
The user's face feature, encode with base64, max array size
is 20, and max string size is 2k.
+FaceData array<string> O
Note: There must be at least one between FaceData and
PhotoData.
The user's face photo, encode with base64, max array size is
5, and max string size is 200k.
+PhotoData array<string> O
Note: There must be at least one between FaceData and
PhotoData.
[ Response Params ] ( OK )
[ Example ]
POST http://<server>/cgi-bin/FaceInfoManager.cgi?action=add
Content-Type: application/json
Content-Length: <length>
Da
hu
{ "UserID": "102",
a
"Info": {
Request
"UserName": "ZhangSan",
HT
}
I
}
fo
Response OK
r
We
Table 16-62
Eu
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=update
ro
Method POST
pe
The user's room num list, max array size is 32, max string
+RoomNo array<string> O
size is 12.
The user's face feature, encode with base64, max array size
is 20, and max string size is 2k.
+FaceData array<string> O
Note: There must be at least one between FaceData and
PhotoData.
The user's face photo, encode with base64, max array size is
5, max string size is 200k.
+PhotoData array<string> O
Note: There must be at least one between FaceData and
PhotoData.
[ Response Params ] ( OK )
AI APIs 274
[ Example ]
POST http://<server>/cgi-bin/FaceInfoManager.cgi?action=update
Content-Type: application/json
Content-Length: <length>
{ "UserID": "102",
"Info": {
Request
"UserName": "ZhangSan",
"RoomNo": ["301", "303", …],
"FaceData": ["xxxx", "xxxx", …],
"PhotoData": ["yyyy", "yyyy", …]
}
}
Da
Response OK
hu
a
Table 16-63
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=remove
AP
Method GET
I
[ Response Params ] ( OK )
st
[ Example ]
Eu
Table 16-64
ic
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=startFind
a
Method GET
l
Descripti
Start to find access user face.
on
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Condition object O Search condition.
+UserID string O The user's id.
[ Response Params ] ( JSON format )
Name Type R/O Param Description
The token of this search, use this token to get result and stop
Token int O
search.
AI APIs 275
Total int O Result num, return 0 if not found.
[ Example ]
Request GET http://<server>/cgi-bin/FaceInfoManager.cgi?action=startFind
{ "Token": 1234,
Response "Total": 20
}
Get the find result
Table 16-65
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=doFind
Method GET
Descripti
Get the find result.
on
Da
The token of this search, use this token to get result and stop
a
Token int R
search.
HT
Offset int R Offset in the result record set, range is [0, Total – 1].
TP
The user's face photo's MD5 hash string, max array size is 5,
+MD5 array<string> O
We
[ Example ]
GET
Eu
Request http://<server>/cgi-bin/FaceInfoManager.cgi?action=doFind&Token=1234&Offset=0&Coun
ro
t=20
{ "Info": [ {
pe
"UserID": "102",
Te
}, { … }, … ]
hn
}
ic
Table 16-66
URL http://<server>/cgi-bin/FaceInfoManager.cgi?action=stopFind
Method GET
Description Stop the find session.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Token for this search, use this token to get result and stop
Token int R
search.
[ Response Params ] ( OK )
[ Example ]
Request GET http://<server>/cgi-bin/FaceInfoManager.cgi?action=stopFind&Token=1234
AI APIs 276
Response OK
Table 16-67
URL http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControlCard
Method GET
Description Insert access user card info.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Access user card and fingerprint record name, should be
name string R
Da
"AccessControlCard".
CardName string R Access user card name, max string length is 32.
hu
of following:
1 << 0: report the loss of the card
AP
CardType int O 0 : Normal Card, 1: VIP Card, 2: Visitor Card, 3: Patrol Card, 4:
Blacklist Card, 5: Stress Card, 0xff: Mother Card
ro
Doors array<int> O The index of the doors that this card can open.
Te
The index of the time sections of each door that this card can
TimeSections array<int> O
open.
c hn
AI APIs 277
Response RecNo=12345
Add access user card with fingerprint
Table 16-68
URL http://<server>/cgi-bin/recordUpdater.cgi?action=insertEx&name=AccessControlCard
Method POST
Description Insert access user card and fingerprint.
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Access user card and fingerprint record name, should be
name string R
"AccessControlCard".
CardName string R Access user card name, max string length is 32.
CardNo string R Access user card number.
Da
of following:
a
1 << 5: the card is arrearage but still can open the door,
fo
CardType int O 0: Normal Card, 1: VIP Card, 2: Visitor Card, 3: Patrol Card, 4:
Blacklist Card, 5: Stress Card, 0xff: Mother Card
st
Doors array<int> O The index of the doors that this card can open.
The index of the time sections of each door that this card can
ro
TimeSections array<int> O
open.
pe
FingerprintPack
object O The fingerprint packet info.
a
et
l
AI APIs 278
POST
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insertEx&name=AccessControlCar
d&CardName=ZhangSan&CardNo=12345&UserID=102&CardStatus=0&Password=12345
6&Doors[0]=1&Doors[1]=3&Doors[2]=5&VTOPosition=01018001&ValidDateStart=201510
22%20093811&ValidDateEnd=20151222%20093811&FingerprintPacket.Length=500&Fin
Request
gerprintPacket.Count=3
Content-Type: application/octet-stream
Content-Length: <length>
Table 16-69
HT
URL http://<server>/cgi-bin/recordUpdater.cgi?action=update&name=AccessControlCard
TP
Method GET
Update access user card info.
Description
AP
CardName string O Access user card name, max string length is 31.
Eu
…<other param> — —
They are all optional.>
[ Response Params ] ( OK )
Te
[ Example ]
c hn
GET
ic
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&
a l
CardType=0&Password=123456&Doors[0]=1&Doors[1]=3&Doors[2]=5&ValidDateStart=
20151022%20093811&ValidDateEnd=20151222%20093811
Response OK
Update access user card and fingerprint
Table 16-70
URL http://<server>/cgi-bin/recordUpdater.cgi?action=updateEx&name=AccessControlCard
Method POST
Update access user card info and fingerprint.
Description
Note: You should provide at lease one optional param to update.
[ Request Params ] ( key=value format in URL )
AI APIs 279
Name Type R/O Param Description
Access user card and fingerprint record name, should be
name string R
"AccessControlCard".
recno int R The record id.
CardName string O Access user card name, max string length is 32.
CardNo string O Access user card number.
UserID string O The user's id.
…<See above insert command for other params of the record.
…<other param>
They are all optional.>
FingerprintPack
object O The fingerprint packet info.
et
+Length int O The length of each fingerprint packet.
+Count int O The count of fingerprint packet.
Da
[ Response Params ] ( OK )
hu
[ Example ]
a
POST
HT
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=updateEx&name=AccessControlC
ard&recno=12345&CardName=ZhangSan&CardNo=12345&UserID=102&CardStatus=0
TP
&CardType=0&Password=123456&Doors[0]=1&Doors[1]=3&Doors[2]=5&ValidDateStart
AP
=20151022%20093811&ValidDateEnd=20151222%20093811&FingerprintPacket.Length
Request
I
=500&FingerprintPacket.Count=3
Content-Type: application/octet-stream
fo
Content-Length: <length>
r
We
Response OK
Eu
Table 16-71
Te
URL http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=AccessControlCard
c hn
Method GET
ic
Descriptio
Remove the access user card and fingerprint record.
n
a l
AI APIs 280
Delete all Access user card and fingerprint records
Table 16-72
URL http://<server>/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControlCard
Method GET
Descriptio
Remove all the access user card and fingerprint records.
n
[ Request Params ] ( key=value format in URL )
Name Type R/O Param Description
Access user card and fingerprint record name, should be
name string R
"AccessControlCard".
[ Response Params ] ( OK )
[ Example ]
Da
GET
Request
http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=clear&name=AccessControlCard
hu
Response OK
a
HT
Table 16-73
I
URL http://<server>/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCard
fo
Method GET
r
AI APIs 281
Card status, 0 means normal, and abnormal status can be
sum of following:
1 << 0: report the loss of the card
1 << 1: the card is withdrawed
+CardStatus int R 1 << 2: the card is frozen
1 << 3: the card is arrearage
1 << 4: the card exceeds the time limit
1 << 5: the card is arrearage but still can open the door,
and there will be voice prompts.
The card type:
+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.
Da
+Doors array<int> O The index of the doors that this card can open.
hu
The index of the time sections of each door that this card can
+TimeSections array<int> O
a
open.
+VTOPosition string O VTO position number.
HT
GET http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCard
fo
Request
&condition.UserID=103&StartTime=123456700&EndTime=123456800&count=100
r
We
st
Eu
ro
pe
Te
c hn
ic
a l
AI APIs 282
totalCount=1000
found=100
records[0].RecNo=12345
records[0].CreateTime=123456789
records[0].CardName=ZhangSan
records[0].CardNo=300
records[0].UserID=103
records[0].CardStatus=0
records[0].CardType=0
records[0].Doors[0]=1
records[0].Doors[1]=3
records[0].Doors[2]=5
records[0].VTOPosition=01018001
Da
records[0].ValidStart=20151022 093811
hu
records[0].ValidEnd=20151222 093811
records[0].IsValid=true
a
Response …
HT
records[1].RecNo=13579
TP
records[1].CreateTime=123456799
records[1].StaticsticsTime=123456799
AP
records[1].CardName=ZhangSan
I
records[1].CardNo=302
fo
records[1].UserID=103
r
records[1].CardStatus=0
We
records[1].CardType=0
records[1].Doors[0]=2
st
records[1].Doors[1]=4
Eu
records[1].Doors[2]=6
records[1].VTOPosition=01018002
ro
records[1].ValidStart=20151022 093811
pe
records[1].ValidEnd=20151222 093811
Te
records[1].IsValid=true
…
c
hn
Table 16-74
a
URL http://<server>/cgi-bin/recordUpdater.cgi?action=get&name=AccessControlCard
l
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.
[ Response Params ] (key=value format)
Name Type R/O Param Description
record object R The record that returned.
+RecNo int R The record id.
AI APIs 283
+CreateTime int R 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.>
[ Example ]
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=get&name=AccessControlCar
Request
d&recno=4
record.RecNo=4
record.CreateTime=123456789
record.CardName=ZhangSan
record.CardNo=300
record.UserID=103
Da
record.CardStatus=0
hu
record.CardType=0
a
Response record.Doors[0]=1
HT
record.Doors[1]=3
record.Doors[2]=5
TP
record.VTOPosition=01018001
AP
record.ValidStart=20151022 093811
record.ValidEnd=20151222 093811
I
record.IsValid=true
fo
…
r
Table 16-75
st
URL http://<server>/cgi-bin/recordUpdater.cgi?action=getEx&name=AccessControlCard
Method GET
Eu
AI APIs 284
GET http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=getEx&name=AccessControl
Request
Card&recno=4
HTTP/1.1 200 OK
Server: Device/1.0
Content-Type: multipart/x-mixed-replace; boundary=<boundary>
Content-Length: <length>
--<boundary>
Content-Type: text/plain
Content-Length: <length>
record.RecNo=4
record.CreateTime=123456789
Da
record.CardName=ZhangSan
hu
record.CardNo=300
record.UserID=103
a
record.CardStatus=0
HT
record.CardType=0
TP
Response
record.Doors[0]=1
record.Doors[1]=3
AP
record.Doors[2]=5
I
record.VTOPosition=01018001
fo
record.ValidStart=20151022 093811
r
record.ValidEnd=20151222 093811
We
record.IsValid=true
…
st
record.FingerprintPacket.Length=500
Eu
record.FingerprintPacket.Count=3
ro
--<boundary>
Content-Type: application/octet-stream
pe
Content-Length: <length>
Te
--<boundary>--
ic
a
l
16.3.1.13 Get the Total Number of Records of Access User Card and
Fingerprint
Table 16-76
http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCar
URL
d
Method GET
Description Get the total number of records of the access user card record.
[ Request Params ] ( key=value format in URL )
AI APIs 285
Name Type R/O Param Description
Access user card and fingerprint record name, should be
name string R
"AccessControlCard".
[ Response Params ] ( key=value )
count int R The total number of records.
[ Example ]
GET
Request http://192.168.1.108/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessContr
olCard
Response count=150
Table 16-77
Usage Refer to "4.4.3 Subscribe to Snapshot"for how to subscribe event
TP
Description When user trying to open the door, send this event.
AP
0: by password
hn
1: by access card
ic
Events[0].EventBaseInfo.Code=TrafficJam
AI APIs 286
Events[0].EventBaseInfo.Action=Pulse
Events[0].EventBaseInfo.Index=0
Events[0].RecNo=123
Events[0].Name=Door1
Events[0].Type=Entry
Events[0].Status=1
Events[0].Method=1
Events[0].CardNo=09DDAABB
Events[0].UserID=101
…
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>
Da
hu
Table 16-78
I
URL http://<server>/cgi-bin/recordFinder.cgi?action=find&name=<RecordName>
fo
Method GET
Description Find AccessControl record.
r
AI APIs 287
+UserID string R The user's id.
+Type string R The event type. It can be: "Entry", "Exit".
Open door result. It can be: 0—failed, 1—success.
+Status int O
If this param does not exist, that means success.
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
+Door int O The index of the door.
+ReaderID string O The access user card ID of reader.
Da
+RecordURL string O The record video's URL, max string length is 127.
HT
[ Example ]
GET http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCard
TP
Request
Rec&StartTime=123456700&EndTime=123456800&condition.CardNo=12001&count=100
AP
totalCount=1000
I
found=100
records[0].RecNo=12345
fo
records[0].CreateTime=123456789
r
records[0].CardNo=12001
We
records[0].CardName=ZhangSan
st
records[0].UserID=ZhangSan
records[0].Type=Entry
Eu
records[0].Method=1
Response
ro
…
pe
records[1].RecNo=13579
records[1].CreateTime=123456799
Te
records[1].CardNo=12001
c
records[1].CardName=ZhangSan
hn
records[1].UserID=ZhangSan
ic
records[1].Type=Exit
a
records[1].Method=1
l
AI APIs 288
AI APIs 289
al
ic
chn
Te
pe
ro
Eu
st
We
r
fo
I
AP
TP
HT
a
hu
Da