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: [Link]
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>
[Link]=0.5
[Link]=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/[Link]?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@[Link]: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@[Link]: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 [Link] or
[Link]
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
[Link]
Syntax
<paramName>=<paramValue>…]
TP
Method POST
AP
is:
r
[Link]
We
1
st
example:
POST /cgi-bin/[Link]?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
[Link]
l
example:
POST /cgi-bin/[Link]?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
[Link]
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
[Link]
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:
[Link]
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 [Link]
l
Method GET
Description Get snap config.
Example [Link]
[Link][0].HolidayEnable=false
[Link][0].TimeSection[0][0]=6 [Link]-[Link]
[Link][0].TimeSection[0][1]=0 [Link]-[Link]
Success [Link][0].TimeSection[0][2]=0 [Link]-[Link]
Return [Link][0].TimeSection[0][3]=0 [Link]-[Link]
[Link][0].TimeSection[0][4]=0 [Link]-[Link]
[Link][0].TimeSection[0][5]=0 [Link]-[Link]
[Link][0].TimeSection[1][0]=6 [Link]-[Link]
General APIs 11
[Link][0].TimeSection[1][1]=0 [Link]-[Link]
[Link][0].TimeSection[1][2]=0 [Link]-[Link]
[Link][0].TimeSection[1][3]=0 [Link]-[Link]
[Link][0].TimeSection[1][4]=0 [Link]-[Link]
[Link][0].TimeSection[1][5]=0 [Link]-[Link]
…
Response format:
table. Snap[channelNo].TimeSection[weekday][configNo]=1 [Link]-[Link]
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
[Link]
a
Syntax
alue>[&<paramName>=<paramValue>…]
HT
Method GET
TP
Example
[0][0]=1%[Link]-[Link]
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 [Link] [Link][?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 [Link] or
[Link]
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
[Link]
TP
Syntax s=[<eventCode>,<eventCode>...][&channel=<ChannelNo>][&heartbeat=<Heartbeat
>]
AP
Method GET
I
[Link]
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].[Link]= 42949485818.0
Te
Events[0].[Link]=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 [Link] 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
[Link]
Syntax
am
Method GET
Description Get max extra stream count.
[Link]
Example
raStream
Success
[Link]=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 [Link]
Method GET
Description Get video color config.
Example [Link]
Success head. Brightness=50
Return head. Contrast=50
head. Hue=50
head. Saturation=50
Da
head= [Link][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
[Link]
st
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Eu
[Link]
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 [Link].
TimeSection
Example:
0 [Link]-[Link], means this config is not effective.
1 [Link]-[Link], means this config is effective between
Da
Table 4-16
TP
Syntax [Link]
Method GET
AP
Example [Link]
fo
Success [Link][0]=1
r
Return [Link][1]=2
We
[Link][2]=4
st
[Link]=SplitSnap
[Link][0].CoverAreaPercent=100
Eu
[Link][0].CoverCount=4
ro
[Link][0].LadenBitrate=162201600
pe
[Link][0].MaxCIFPFrameSize=40
[Link][0].MaxExtraStream=1
Te
[Link][0].MinCIFPFrameSize=7
c
[Link][0].RecordIndividualResolution=true
hn
[Link][0].SupportIndividualResolution=true
ic
[Link][0].TitleCount=4
a
Comment —
l
General APIs 16
[Link]=448,2560
[Link]=H.264,MJPG
[Link]=25
[Link]=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
Success [Link]=80,448
Return [Link]=H.264,MJPG
[Link]=25
[Link]=D1,CIF
[Link]=H.264,MJPG
[Link]=2048 x 1536,1080,SXGA, 1280 x 960,720,D1,CIF
Parameters in URL:
ChannelNo: integer,video channel index which starts from [Link] 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 [Link]
Te
Method GET
c
Example [Link]
ic
[Link][0].MainFormat[0].[Link]=64
a
[Link][0].MainFormat[0].[Link][0]=0
l
[Link][0].MainFormat[0].[Link]=G.711A
[Link][0].MainFormat[0].[Link]=16
[Link][0].MainFormat[0].[Link]=8000
[Link][0].MainFormat[0].[Link]=0
Success
[Link][0].MainFormat[0].[Link]=DHAV
Return
[Link][0].MainFormat[0].AudioEnable=true
[Link][0].MainFormat[0].[Link]=1920x1080
[Link][0].MainFormat[0].[Link]=4096
[Link][0].MainFormat[0].[Link]=CBR
[Link][0].MainFormat[0].[Link]=H.264
[Link][0].MainFormat[0].[Link]=1080P
General APIs 19
[Link][0].MainFormat[0].[Link]=18
[Link][0].MainFormat[0].[Link]=36
[Link][0].MainFormat[0].[Link]=1080
[Link][0].MainFormat[0].[Link]=DHAV
[Link][0].MainFormat[0].[Link]=High
[Link][0].MainFormat[0].[Link]=4
[Link][0].MainFormat[0].[Link]=6
[Link][0].MainFormat[0].[Link]=1
[Link][0].MainFormat[0].[Link]=1920
[Link][0].MainFormat[0].VideoEnable=true
[Link][0].MainFormat[1].[Link]=64
[Link][0].MainFormat[1].[Link][0]=0
[Link][0].MainFormat[1].[Link]=G.711A
Da
[Link][0].MainFormat[1].[Link]=16
hu
[Link][0].MainFormat[1].[Link]=8000
[Link][0].MainFormat[1].[Link]=0
a
[Link][0].MainFormat[1].[Link]=DHAV
HT
[Link][0].MainFormat[1].AudioEnable=true
TP
[Link][0].MainFormat[1].[Link]=1920x1080
[Link][0].MainFormat[1].[Link]=4096
AP
[Link][0].MainFormat[1].[Link]=CBR
I
[Link][0].MainFormat[1].[Link]=H.264
fo
[Link][0].MainFormat[1].[Link]=1080P
r
[Link][0].MainFormat[1].[Link]=18
We
[Link][0].MainFormat[1].[Link]=36
[Link][0].MainFormat[1].[Link]=1080
st
[Link][0].MainFormat[1].[Link]=DHAV
Eu
[Link][0].MainFormat[1].[Link]=High
[Link][0].MainFormat[1].[Link]=4
ro
[Link][0].MainFormat[1].[Link]=6
pe
[Link][0].MainFormat[1].[Link]=1
Te
[Link][0].MainFormat[1].[Link]=1920
[Link][0].MainFormat[1].VideoEnable=true
c hn
[Link][0].MainFormat[2].[Link]=64
ic
[Link][0].MainFormat[2].[Link][0]=0
[Link][0].MainFormat[2].[Link]=G.711A
a l
[Link][0].MainFormat[2].[Link]=16
[Link][0].MainFormat[2].[Link]=8000
[Link][0].MainFormat[2].[Link]=0
[Link][0].MainFormat[2].[Link]=DHAV
[Link][0].MainFormat[2].AudioEnable=true
[Link][0].MainFormat[2].[Link]=1920x1080
[Link][0].MainFormat[2].[Link]=4096
[Link][0].MainFormat[2].[Link]=CBR
[Link][0].MainFormat[2].[Link]=H.264
[Link][0].MainFormat[2].[Link]=1080P
[Link][0].MainFormat[2].[Link]=18
General APIs 20
[Link][0].MainFormat[2].[Link]=36
[Link][0].MainFormat[2].[Link]=1080
[Link][0].MainFormat[2].[Link]=DHAV
[Link][0].MainFormat[2].[Link]=High
[Link][0].MainFormat[2].[Link]=4
[Link][0].MainFormat[2].[Link]=6
[Link][0].MainFormat[2].[Link]=1
[Link][0].MainFormat[2].[Link]=1920
[Link][0].MainFormat[2].VideoEnable=true
[Link][0].MainFormat[3].[Link]=64
[Link][0].MainFormat[3].[Link][0]=0
[Link][0].MainFormat[3].[Link]=G.711A
[Link][0].MainFormat[3].[Link]=16
Da
[Link][0].MainFormat[3].[Link]=8000
hu
[Link][0].MainFormat[3].[Link]=0
[Link][0].MainFormat[3].[Link]=DHAV
a
[Link][0].MainFormat[3].AudioEnable=true
HT
[Link][0].MainFormat[3].[Link]=704x576
TP
[Link][0].MainFormat[3].[Link]=2048
[Link][0].MainFormat[3].[Link]=VBR
AP
[Link][0].MainFormat[3].[Link]=H.264
I
[Link][0].MainFormat[3].[Link]=25
fo
[Link][0].MainFormat[3].[Link]=50
r
[Link][0].MainFormat[3].[Link]=576
We
[Link][0].MainFormat[3].[Link]=DHAV
[Link][0].MainFormat[3].[Link]=Main
st
[Link][0].MainFormat[3].[Link]=4
Eu
[Link][0].MainFormat[3].[Link]=6
[Link][0].MainFormat[3].[Link]=1
ro
[Link][0].MainFormat[3].[Link]=704
pe
[Link][0].MainFormat[3].VideoEnable=true
Te
[Link][0].ExtraFormat[0].[Link]=64
…
c hn
[Link][0].SnapFormat[0].[Link]=64
ic
…
a
l
General APIs 21
Parameters in Response:
The format of the config is [Link]. 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
[Link]
Syntax
fo
alue>[&<paramName>=<paramValue>...]
Method GET
r
[Link]
st
Example
at[0].[Link]=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
[Link] integer
Range depends on capability in GetVideoConfigCaps
Range is {CBR, VBR}
[Link] string CBR: constant bitrates
VBR: variable bitrates
Range is {MPEG4, MPEG2, MPEG1, MJPG, H.263,
[Link] 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
[Link] float
per frame.
Da
second.
a
Range is [1—100].
Group of picture, it's the interval of I Frame,
HT
[Link] integer
Example: GOP=50, means there is one I frame every
TP
49 P or B frames
AP
[Link] 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
[Link] string
GetAudioConfigCaps
[Link] integer Audio sampling depth
[Link] 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,
[Link] integer
3: 6.7 kbps,
4: 7.4 kbps,
5: 7.95 kbps,
6: 10.2 kbps,
7: 12.2 kbps,
[Link] bool Enable/Disable audio
Da
Table 4-20
TP
Syntax [Link]
Method GET
AP
[Link]
Example
fo
ROI
r
Success
[Link]=false
Return
We
Parameters in Response:
st
head=[Link][ChannelNo]
Comment
ChannelNo: integer, array index starts from 0, which means video channel (equals to
Eu
Table 4-21
Te
[Link]
Syntax
c
alue>[&<paramName>=<paramValue>…]
hn
Method GET
ic
[Link]
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 [Link]
Method GET
Description Get the title of the video channel.
Example [Link]
Success
[Link][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
[Link]
Syntax
alue>
fo
Method GET
r
[Link]
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 [Link]
Success
result=1
Return
Comment —
Success result=2
hu
Return
a
Comment —
HT
Table 4-26
I
Syntax [Link]
nputChannels
fo
Method GET
r
Example [Link]
st
moteInputChannels
Success [Link]=16
Eu
Return
ro
Table 4-27
a
Syntax [Link]
l
Method GET
Description Get video standard config.
Example [Link]
d
Success [Link]=PAL
Return
Comment —
Set video standard
Table 4-28
Syntax [Link]
General APIs 26
alue>
Method GET
Description Set video standard config.
Example [Link]
Success OK
Return
Comment VideoStandard: string, range is {PAL, NTSC} Video Standard.
Table 4-29
Da
Syntax [Link]
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 [Link]
Success [Link][0]=0
AP
Return [Link][1]=0
I
[Link][2]=0
fo
[Link][3]=128
r
[Link]=true
[Link][0]=255
We
[Link][1]=255
st
[Link][2]=255
Eu
[Link][3]=0
[Link][0]=0
ro
[Link][1]=8191
pe
[Link][2]=0
[Link][3]=8191
Te
…
c hn
[Link][Channel].Covers[CoReg] (or)
a l
[Link][Channel].TimeTitle
[Link][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
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video widget config.
[Link]
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].
[Link][0]
BackColor[0]:red value
Te
[Link][1]
integer BackColor[1]:green value
c
[Link][2]
hn
BackColor[2]:blue value
[Link][3]
BackColor[3]: alpha value
ic
Range is [0—255].
[Link][0]
FrontColor[0]:red value
[Link][1]
integer FrontColor[1]:green value
[Link][2]
FrontColor[2]:blue value
[Link][3]
FrontColor[3]: alpha value
Range is [0—8191].
[Link][0] Rect[0]: top left corner x coordinate (left)
[Link][1] Rect[1]: top left corner y coordinate (top)
integer
[Link][2] Rect[2]: bottom right x coordinate (right)
[Link][3] Rect[3]: bottom right y coordinate
(bottom)
General APIs 28
ParamName ParamValue type Description
[Link][0]
[Link][1]
integer
[Link][2]
[Link][3]
[Link] bool Range is the same with headCover.
[Link][0]
[Link][1]
integer
[Link][2]
[Link][3]
Only use the value of (left, top),the value
[Link][0]
of (right, bottom) is the same as (left, top)
[Link][1]
integer Rect[0], Rect[1] are used, and Rect[2]
[Link][2]
Da
[Link][0] headChannelTitle
[Link][1] These are configs about User-defined
I
integer
[Link][2] title.
fo
[Link][3]
r
[Link] bool
We
[Link][0]
st
[Link][1]
integer
[Link][2]
Eu
[Link][3]
ro
[Link][0]
pe
[Link][1]
integer
[Link][2]
Te
[Link][3]
c
[Link][0]
hn
[Link][1]
integer
ic
[Link][2]
a
[Link][3]
l
[Link] bool
[Link][0] Range is the same with
[Link][1] headChannelTitle.
integer
[Link][2] These are configs about time title.
[Link][3]
[Link][0]
[Link][1]
integer
[Link][2]
[Link][3]
[Link] bool True: Display week within the time title.
General APIs 29
4.5.13 Get Video Input Capability
Table 4-31
Syntax [Link]
Method GET
Description Get video input capabilities.
Example [Link]
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. [Link][0]=0
a
caps. [Link][1]=100
l
caps. [Link]=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. [Link][0]=0
st
caps. [Link][1]=100
Eu
caps. [Link]=true
caps. [Link][0]=0
ro
caps. [Link][1]=100
pe
caps. [Link]=true
Te
caps. [Link]=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
[Link]
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
[Link]
Syntax
ro
cusNo>&zoom=<zoomNo>[&channel=<ChannelNo>]
pe
Method GET
Description Adjust magnification and the focus continuously.
Te
[Link]
hn
=0.02&zoom=-1
ic
Example
and when the motor is moving, we send below command to let it stop:
a
[Link]
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 [Link]
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
[Link]
Syntax
pe
No>]
Method GET
Te
Example [Link]
hn
[Link]=0.5
ic
Success
[Link]=0.5
Return
a
[Link]=Normal
l
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
Comment Parameters in Response:
The range of [Link] is "Normal" and "Autofocus". This command must be
continual executed until [Link] is "Normal".
General APIs 34
Method GET
Description Get the coordinates of the current window.
Example [Link]
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
[Link]
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 [Link]
Method GET
a l
General APIs 35
head. [Link]=0
head. [Link]=0
head. [Link]=0
head. [Link]=0
head. Flip=false
head. Gain=50
head. GainAuto=true
head. IrisAuto=false
head. Mirror=false
head. [Link]=0
head. [Link]=0
head. [Link][0]=3096
head. [Link][1]=3096
Da
head. [Link][2]=5096
hu
head. [Link][3]=5096
head. [Link]=50
a
head. [Link]=2
HT
head. [Link]=0
TP
head. [Link]=0
head. NightOptions.ExposureValue1=0
AP
head. NightOptions.ExposureValue2=40
I
head. [Link]=125
fo
head. [Link]=false
r
head. [Link]=50
We
head. [Link]=true
head. [Link]=50
st
head. [Link]=50
Eu
head. [Link]=50
head. [Link]=0
ro
head. [Link]=50
pe
head. [Link]=0
Te
head. [Link]=true
head. [Link]=false
c
hn
head. [Link]=3
ic
head. [Link]=50
head. NightOptions.Rotate90=0
a l
head. [Link]=0
head. [Link]=0
head. [Link]=0
head. [Link]=23
head. [Link]=59
head. [Link]=59
head. [Link]=4
head. [Link]=Auto
head. [Link]=0
head. [Link]=0
head. [Link]=0
General APIs 36
head. [Link]=0
head. [Link][0]=3096
head. [Link][1]=3096
head. [Link][2]=5096
head. [Link][3]=5096
head. [Link]=50
head. [Link]=1
head. [Link]=0
head. [Link]=0
head. NormalOptions.ExposureValue1=0
head. NormalOptions.ExposureValue2=40
head. [Link]=125
head. [Link]=false
Da
head. [Link]=50
hu
head. [Link]=true
head. [Link]=50
a
head. [Link]=50
HT
head. [Link]=50
TP
head. [Link]=0
head. [Link]=50
AP
head. [Link]=0
I
head. [Link]=true
fo
head. [Link]=false
r
head. [Link]=0
We
head. [Link]=50
head. NormalOptions.Rotate90=0
st
head. [Link]=0
Eu
head. [Link]=0
head. [Link]=0
ro
head. [Link]=23
pe
head. [Link]=59
Te
head. [Link]=59
head. [Link]=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 = [Link][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
[Link]
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:
[Link]
xposureMode=0&VideoInOptions[0].ExposureSpeed=0
[Link]
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:
[Link]
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
[Link]
martIRExposure=true
Eu
ro
[Link]
Te
p=true
Mirror:
c hn
[Link]
ic
rror=true
Or turn 90°:
a l
[Link]
otate90=1
General APIs 38
[Link]
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. [Link] integer
1: always flash
2: auto flash
Range is {0,1, 2, 3}
Trigger mode:
0: low level
head. [Link] 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]
[Link] integer
ic
Nightoptions.
true: IrisAuto
head. [Link] bool
false: No IrisAuto
head. Range is [00—23]
integer
[Link] Sunrise hour.
head. Range is [00—59]
integer
[Link] Sunrise minute
head. Range is [00—59]
integer
[Link] Sunrise second
head. Sunset time. Its range is same with sunrise
integer
[Link] 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
[Link] time and before sunrise time.
head.
integer
[Link]
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
[Link] 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
[Link]
head.
AP
integer
[Link]
I
head.
fo
[Link] float
r
1
We
head.
st
[Link] float
2
Eu
[Link] Example:
c
String
[Link] same with head. ExposureSpeed.
a
head.
l
integer
[Link]
head.
[Link] integer
hase
head.
integer
[Link]
head. [Link] integer
head.
integer
[Link]
General APIs 42
ParamName ParamValue type Description
head.
integer
[Link]
head.
integer
[Link]
head. [Link] integer
head. [Link] integer
head. NightOptions.Rotate90 integer
head.
[Link] integer
eshold
head.
bool
[Link]
Da
head.
integer
hu
[Link]
a
head.
HT
[Link] integer
e
TP
head.
AP
[Link] integer
nd
I
head.
fo
integer
[Link]
r
head.
We
integer
[Link]
st
[Link] integer
ed
Te
head.
c
[Link] float
hn
e1
ic
head.
a
[Link] float
l
e2
head. [Link] integer
head.
bool
[Link]
head.
integer
[Link]
head.
integer
[Link]
head.
integer
[Link]
General APIs 43
ParamName ParamValue type Description
head.
String
[Link]
head.
[Link] integer
vel
head.
[Link] integer
Phase
head.
integer
[Link]
head.
integer
[Link]
Da
head.
hu
[Link] integer
a
r
HT
head.
[Link] integer
TP
e
AP
head.
[Link] integer
I
n
fo
head.
integer
st
NormalOptions.Rotate90
Eu
Table 4-40
Te
Syntax [Link]
c
hn
Method GET
ic
[Link][0]=0
[Link][1]=0
[Link][2]=0
[Link][3]=0
[Link]=50
Success
[Link]. Contrast =50
Return
[Link]. Satuation =50
[Link]. Hue =50
[Link]. Width =800
[Link]. Height=600
[Link]. BPP =16
General APIs 44
[Link]. Format ="Auto"
[Link]. RefreshRate =60
…
Parameters in Response:
head = [Link][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
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video out config.
Da
[Link]
hu
Example
[Link]=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 [Link]
Method GET
General APIs 45
Description Get smart code config.
Example [Link]
Success [Link]=false
Return [Link][0]=false
Parameters in Response:
head = [Link][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
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Da
Method GET
Description Set smart code config.
hu
[Link]
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
[Link] bool Open or close the smart code of the main stream.
[Link][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 [Link]
Method GET
Description Get general config.
Example [Link]
[Link]=Test001
Success [Link]=8
Return [Link]="binjiangqv jiangnandadao weiyelu"
[Link]="jiaojing yidui
Comment —
Set general config
General APIs 46
Table 4-45
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set general config.
[Link]
Example
me=MyIPC
Success
OK
Return
Comment —
Appendix:
Table 4-46
Syntax [Link]
fo
Method GET
r
Example [Link]
st
Success
result = 2011-7-3 [Link]
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 [Link]
ic
Method GET
a l
4.6.4 Locales
Get locales config
General APIs 47
Table 4-48
Syntax [Link]
Method GET
Description Get locales config
Example [Link]
[Link]=false
[Link]=1
[Link]=0
[Link]=0
[Link]=1
[Link]=2
Success [Link]=2011
Return [Link]=0
Da
[Link]=0
hu
[Link]=0
a
[Link]=1
[Link]=1
HT
[Link]=2011
TP
[Link]=yyyy-MM-dd HH:mm:ss
Comment —
AP
Table 4-49
r
[Link]
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
[Link] Integer [1, 2, 3, 4, -1]: use week day.
1 = first week, 2 = second, 3 = third, 4 = fourth, -1 =
last.
[Link] Integer Range is [2000-2038]
[Link]
[Link]
Range is the same with items in [Link].
[Link]
Integer [Link] table and [Link] table
[Link]
define the time range of DST.
[Link]
[Link]
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 [Link]
Method GET
Description Get the list of supported languages.
Example [Link]
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 [Link]
Method GET
Description Get system language config.
Example [Link]
Success
[Link]=SimpChinese
Return
Comment —
Set language config
Da
Table 4-52
hu
[Link]
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 [Link]
ic
Method GET
a
Example [Link]
Success [Link]=false
Return [Link][0]=[Link]
[Link][1]=[Link]
[Link]=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
[Link][index] string Banned IP address list
[Link][index] string Trusted IP address list
[Link] bool Enable/Disable access filter function
Range is {TrustList, BannedList},
TrustList: Trust list is used, banned list
[Link] string is not used.
BannedList: Banned list is used, trust
list is not used.
Table 4-54
hu
Syntax [Link]
a
Method GET
HT
Example [Link]
[Link]. AutoRebootDay=3
AP
[Link]. AutoRebootHour=0
I
[Link]. AutoRebootMinute=0
fo
[Link]. AutoShutdownDay=1
Success
r
[Link]. AutoShutdownHour=0
Return
[Link]. AutoShutdownMinute=0
We
[Link]. AutoStartUpDay=1
st
[Link]. AutoStartUpHour=2
[Link]. AutoStartUpMinute=0
Eu
Comment —
ro
Table 4-55
Te
[Link]
Syntax
c
alue>[&<paramName>=<paramValue>…]
hn
Method GET
ic
[Link]
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 [Link]
Method GET
ro
Example [Link]
Te
[Link][0]=3
[Link][1]=0
c hn
[Link][2]=0
ic
[Link][3]=0
[Link][4]=0
al
Success [Link][5]=0
Return [Link][6]=0
[Link][7]=0
[Link][8]=0
[Link][9]=1610612739
[Link][10]=0
[Link][11]=0
Comment —
Set holiday config
Table 4-57
General APIs 52
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set holiday config.
[Link]
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
[Link][monthIndex] integer
presents the second day of a month is
AP
Table 4-58
st
Syntax [Link]
Method GET
Eu
Description Get the device type displaying which is not the real type.
ro
Example [Link]
pe
Success
type=DVR
Return
Te
Comment —
c hn
Table 4-59
l
Syntax [Link]
Method GET
Description Get the device hardware version.
Example [Link]
Success
version=1.00
Return
Comment —
General APIs 53
4.6.12 Get Serial Number of Device
Table 4-60
Syntax [Link]
Method GET
Description Get the device serial number.
Example [Link]
Success
sn=YZC0GZ05100020
Return
Comment —
Table 4-61
hu
Syntax [Link]
a
Method GET
HT
Example [Link]
Success
AP
name=YZC0GZ05100020
Return
I
Comment —
fo
r
Table 4-62
st
Syntax [Link]
Eu
Method GET
ro
serialNumber= PA1FQ15900207
Success
Te
deviceType=27
Return
processor= ST7108
c hn
Comment —
ic
Table 4-63
Syntax [Link]
Method GET
Description Get the vendor information.
Example [Link]
Success
vendor=TTT
Return
Comment —
General APIs 54
4.6.16 Get Software Information
Table 4-64
Syntax [Link]
Method GET
Description Get the software information.
Example [Link]
Success
version=2.212.0000.0.R,build:2013-11-14
Return
Comment —
Table 4-65
hu
Syntax [Link]
a
Method GET
HT
Example [Link]
Success
AP
version=2.4.2
Return
I
Comment —
fo
r
Table 4-66
st
Syntax [Link]
Eu
Method GET
ro
Success
version=2.0.0
Te
Return
Comment —
c hn
ic
Table 4-67
Syntax [Link]
Method GET
Description Get the device class.
Example [Link]
Success
class=HDVR
Return
Comment —
General APIs 55
4.6.20 Onvif Service Authorization
Get config of Onvif service authorization
Table 4-68
Syntax [Link]
Method GET
Description Get user global config.
Example [Link]
Success
[Link]=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
[Link]
HT
Syntax
eck=<flag>
TP
Method GET
Description Enable onvif login check or not.
AP
[Link]
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 [Link]
Te
Method GET
Description Download all the settings of a device as a file named [Link] by default.
c hn
Example [Link]
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 [Link]
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 [Link]
r
mes[1]=<yyy>[&…]
We
Method GET
st
Success OK
ro
Return
pe
4.6.24 Reboot
hn
ic
Table 4-73
a
Syntax [Link]
l
Method GET
Description Reboot the device.
Example [Link]
Success
OK
Return
Comment If successful, response OK. If fail, response Error.
4.6.25 Shutdown
Table 4-74
General APIs 57
Syntax [Link]
Method GET
Description Shutdown the device.
Example [Link]
Success
OK
Return
Comment If successful, response OK. If fail, response Error.
4.6.26 FactoryReset
Table 4-75
Syntax [Link]
Method GET
Da
Description Reset the configuration for the device to the factory default.
hu
Example [Link]
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 [Link]
Te
Method GET
c
Example [Link]
ic
Success
a
tc=0001...1101
Return
l
4.7 Network
General APIs 58
Description Get all of the system network interfaces.
Example [Link]
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 [Link]
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 [Link]
ro
[Link]=eth0
pe
[Link]=ttt
[Link]=badak
Te
[Link]=[Link]
c hn
[Link]=false
Success
[Link][0]=[Link]
ic
Return
[Link][1]=[Link]
al
[Link]=[Link]
[Link]=1500
[Link]=[Link]
[Link]=[Link]
Comment interface in response is network interface name, such as eth0, eth2…
Set network config
Table 4-79
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set network basic config.
General APIs 59
[Link]
Example
&[Link]=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
[Link]
Network.
TP
Network.
string IP address of first DNS server.
[Link][0]
I
Network.
fo
Network.
We
xx:xx:xx:xx:xx:xx.
Network.
pe
[Link]
c
[Link]
hn
[Link] Example:
l
[Link]
4.7.3 PPPoE
Get PPPoE config
Table 4-80
Syntax [Link]
Method GET
Description Get PPPoE config.
Example [Link]
General APIs 60
[Link]=false
Success
[Link]=123456
Return
[Link]=123456
Comment —
Table 4-81
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set PPPoE config.
[Link]
Example
user1&[Link]=123456
Da
Success
OK
hu
Return
a
Comment —
HT
Appendix:
TP
4.7.4 DDNS
We
st
Table 4-82
Syntax [Link]
ro
Method GET
pe
Example [Link]
Success [Link][index].Address=[Link]
c hn
Return [Link][index].Enable=true
ic
[Link][index].HostName=[Link]
a
[Link][index].KeepAlive=10
l
[Link][index].Password=none
[Link][index].Port=5050
[Link][index].Protocol= Quick DDNS
[Link][index].UserName=user1
[Link][index].[Link]=false
[Link][index].[Link]=[Link]
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 [Link]
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set DDNS config.
Example [Link]
[Link]&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 [Link]
Method GET
Description Get Email config.
Example [Link]
[Link]=[Link]
Success [Link]=true
Return [Link]=true
[Link]=true
General APIs 62
[Link]=true
[Link]=false
[Link]=61
[Link]=123456
[Link]=26
[Link][0]=x@[Link]
[Link][1]=y@[Link]
[Link][2]=z@[Link]
[Link]=x@[Link]
[Link]=false
[Link]=DVRMessage
[Link]=anonymity
Comment —
Da
Table 4-85
a
[Link]
Syntax
HT
alue>[&<paramName>=<paramValue>…]
TP
Method GET
Description Set Email config.
AP
[Link]
Example
I
[Link]&[Link]=false
fo
Success
OK
r
Return
Comment —
We
st
Appendix:
General APIs 63
4.7.6 WLan
Get WLan config
Table 4-86
Syntax [Link]
Method GET
Description Get Wlan config.
Example [Link]
[Link]=true
[Link]=off
[Link]=false
[Link]=0
Da
[Link]=Hex
Success
hu
[Link][0]=password1
Return
a
[Link][1]=password2
[Link][2]=password3
HT
[Link][3]=password4
TP
[Link]=Auto
[Link]=ttt
AP
Comment —
I
Table 4-87
r
[Link]
We
Syntax
alue>[&<paramName>=<paramValue>…]
st
Method GET
Description Set WLan config.
Eu
[Link]
ro
Example
rue&[Link]=Hex
pe
Success
OK
Return
Te
Appendix:
ic
General APIs 64
ParamName ParamValue type Description
[Link][2] string a—z, A—Z]
For HEX key type: 64bits encryption key length is 10,
[Link][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
[Link] 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.
[Link] string SSID.
Da
hu
Table 4-88
HT
[Link]
TP
Syntax
ue>[&<paramName>=<paramValue>…]
AP
Method GET
Description Search Wi-Fi device information.
I
[Link]
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=[Link]
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 [Link]
General APIs 65
Method GET
Description Get UPnP config.
Example [Link]
Success [Link]=true
Return [Link][index].Enable=true
[Link][index].InnerPort=80
[Link][index].OuterPort=8080
[Link][index].Protocol=TCP
[Link][index].ServiceName=HTTP
Comment index in response is the UPNP map table index, start from 0.
Set UPnP config
Table 4-90
Da
Syntax [Link]
alue>[&<paramName>=<paramValue>…]
hu
Method GET
a
Example [Link]
TP
[Link][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].
[Link][index].InnerPort integer
ro
[Link][index].OuterPort integer
Outer port number.
Te
Table 4-91
Syntax [Link]
Method GET
Description Get UPnP Status.
Example [Link]
[Link]=[Link]
[Link]=[Link]
Success [Link][0]=Failed
Return [Link][1]=Failed
[Link][2]=Failed
[Link][3]=Failed
General APIs 66
[Link]=Unknown
[Link]=false
Comment —
4.7.10 NTP
Get NTP config
Table 4-92
Syntax [Link]
Method GET
Description Get NTP config
Example [Link]
Da
[Link]=[Link]
[Link]=false
hu
Success
[Link]=38
a
Return
[Link]=9
HT
[Link]=31
TP
Comment —
Set NTP config
AP
Table 4-93
I
[Link]
fo
Syntax
Value>[&<paramName>=<paramValue>…]
r
Method GET
We
[Link]
Example
[Link]&[Link]=true
Eu
Success
OK
ro
Return
pe
Comment —
Te
4.7.11 RTSP
c hn
Table 4-94
a l
Syntax [Link]
Method GET
Description Get RTSP config.
Example [Link]
[Link]=true
Success [Link]=554
Return [Link]=40000
[Link]=20000
Comment —
Set RTSP config
General APIs 67
Table 4-95
[Link]
Syntax
Value>[&<paramName>=<paramValue>…]
Method GET
Description Set RTSP config.
[Link]
Example
[Link]=554
Success
OK
Return
Comment —
Appendix:
Table 4-96
r
Syntax [Link]
We
Method GET
Description Get alarm server config.
st
Example [Link]
Eu
[Link]=[Link]
ro
[Link]=false
[Link]=
pe
Success [Link]=8888
Te
Return [Link]=ttt
[Link]=[Link]
c hn
[Link]=2
ic
[Link]=admin
—
a
Comment
l
Table 4-97
[Link]
Syntax
Value>[&<paramName>=<paramValue>…]
Method GET
Description Set Alarm Server config.
[Link]
Example
s=[Link]&[Link]=false
Success
OK
Return
General APIs 68
Comment —
Appendix:
Table 4-98
HT
Syntax [Link]
Method GET
TP
Description Motion detect config of a video channel contains Enable, MotionDetectWindow and
AP
EventHandler.
Example [Link]
I
Success [Link][0].Enable=false
fo
Return [Link][0].[Link]=1
r
[Link][0].[Link][0]=0
We
[Link][0].[Link]=true
st
[Link][0].[Link]=10
[Link][0].[Link]=false
Eu
[Link][0].[Link]=5
ro
[Link][0].[Link]=0
pe
[Link][0].[Link]=1
[Link][0].[Link][0]=0
Te
[Link][0].[Link]=false
c
[Link][0].[Link]=false
hn
[Link][0].[Link]=10
ic
[Link][0].[Link]=true
a
[Link][0].[Link]=false
l
[Link][0].[Link]=1
[Link][0].[Link][0]=0
[Link][0].[Link]=false
[Link][0].[Link]=false
[Link][0].[Link][0][0]=None
[Link][0].[Link][0][1]=1
[Link][0].[Link]=false
[Link][0].[Link]=1
[Link][0].[Link][0]=0
[Link][0].[Link]=true
[Link][0].[Link]=10
General APIs 69
[Link][0].[Link]=1
[Link][0].[Link][0]=0
[Link][0].[Link]=false
[Link][0].[Link][0][0]=1 [Link]-[Link]
[Link][0].[Link][0][1]=0 [Link]-[Link]
[Link][0].[Link][0][2]=0 [Link]-[Link]
[Link][0].[Link][0][3]=0 [Link]-[Link]
[Link][0].[Link][0][4]=0 [Link]-[Link]
[Link][0].[Link][0][5]=0 [Link]-[Link]
[Link][0].[Link][1][0]=1 [Link]-[Link]
[Link][0].[Link][1][1]=0 [Link]-[Link]
[Link][0].[Link][1][2]=0 [Link]-[Link]
[Link][0].[Link][1][3]=0 [Link]-[Link]
Da
[Link][0].[Link][1][4]=0 [Link]-[Link]
hu
[Link][0].[Link][1][5]=0 [Link]-[Link]
[Link][0].[Link][2][0]=1 [Link]-[Link]
a
[Link][0].[Link][2][1]=0 [Link]-[Link]
HT
[Link][0].[Link][2][2]=0 [Link]-[Link]
TP
[Link][0].[Link][2][3]=0 [Link]-[Link]
[Link][0].[Link][2][4]=0 [Link]-[Link]
AP
[Link][0].[Link][2][5]=0 [Link]-[Link]
I
[Link][0].[Link][3][0]=1 [Link]-[Link]
fo
[Link][0].[Link][3][1]=0 [Link]-[Link]
r
[Link][0].[Link][3][2]=0 [Link]-[Link]
We
[Link][0].[Link][3][3]=0 [Link]-[Link]
[Link][0].[Link][3][4]=0 [Link]-[Link]
st
[Link][0].[Link][3][5]=0 [Link]-[Link]
Eu
[Link][0].[Link][4][0]=1 [Link]-[Link]
[Link][0].[Link][4][1]=0 [Link]-[Link]
ro
[Link][0].[Link][4][2]=0 [Link]-[Link]
pe
[Link][0].[Link][4][3]=0 [Link]-[Link]
Te
[Link][0].[Link][4][4]=0 [Link]-[Link]
[Link][0].[Link][4][5]=0 [Link]-[Link]
c hn
[Link][0].[Link][5][0]=1 [Link]-[Link]
ic
[Link][0].[Link][5][1]=0 [Link]-[Link]
[Link][0].[Link][5][2]=0 [Link]-[Link]
a l
[Link][0].[Link][5][3]=0 [Link]-[Link]
[Link][0].[Link][5][4]=0 [Link]-[Link]
[Link][0].[Link][5][5]=0 [Link]-[Link]
[Link][0].[Link][6][0]=1 [Link]-[Link]
[Link][0].[Link][6][1]=0 [Link]-[Link]
[Link][0].[Link][6][2]=0 [Link]-[Link]
[Link][0].[Link][6][3]=0 [Link]-[Link]
[Link][0].[Link][6][4]=0 [Link]-[Link]
[Link][0].[Link][6][5]=0 [Link]-[Link]
[Link][0].[Link]=false
[Link][0].[Link]=1
General APIs 70
[Link][0].[Link][0]=0
[Link][0].[Link]=false
[Link][0].[Link]=
[Link][0].[Link]=false
[Link][0].MotionDetectWindow[0].Id=0
[Link][0].MotionDetectWindow[0].Name=Region1
[Link][0].MotionDetectWindow[0].Region[0]=4194303
[Link][0].MotionDetectWindow[0].Region[1]=4194303
[Link][0].MotionDetectWindow[0].Region[2]=4194303
[Link][0].MotionDetectWindow[0].Region[3]=4194303
[Link][0].MotionDetectWindow[0].Region[4]=4194303
[Link][0].MotionDetectWindow[0].Region[5]=4194303
[Link][0].MotionDetectWindow[0].Region[6]=4194303
Da
[Link][0].MotionDetectWindow[0].Region[7]=4194303
hu
[Link][0].MotionDetectWindow[0].Region[8]=4194303
[Link][0].MotionDetectWindow[0].Region[9]=4194303
a
[Link][0].MotionDetectWindow[0].Region[10]=4194303
HT
[Link][0].MotionDetectWindow[0].Region[11]=4194303
TP
[Link][0].MotionDetectWindow[0].Region[12]=4194303
[Link][0].MotionDetectWindow[0].Region[13]=4194303
AP
[Link][0].MotionDetectWindow[0].Region[14]=4194303
I
[Link][0].MotionDetectWindow[0].Region[15]=4194303
fo
[Link][0].MotionDetectWindow[0].Region[16]=4194303
r
[Link][0].MotionDetectWindow[0].Region[17]=4194303
We
[Link][0].MotionDetectWindow[0].Sensitive=60
[Link][0].MotionDetectWindow[0].Threshold=5
st
[Link][0].MotionDetectWindow[0].Window[0]=0
Eu
[Link][0].MotionDetectWindow[0].Window[1]=0
[Link][0].MotionDetectWindow[0].Window[2]=8191
ro
[Link][0].MotionDetectWindow[0].Window[3]=8191
pe
[Link][0].MotionDetectWindow[1].Id=1
Te
[Link][0].MotionDetectWindow[1].Name=Region2
[Link][0].MotionDetectWindow[1].Region[0]=0
c hn
[Link][0].MotionDetectWindow[1].Region[1]=0
ic
[Link][0].MotionDetectWindow[1].Region[2]=0
[Link][0].MotionDetectWindow[1].Region[3]=0
a l
[Link][0].MotionDetectWindow[1].Region[4]=0
[Link][0].MotionDetectWindow[1].Region[5]=0
[Link][0].MotionDetectWindow[1].Region[6]=0
[Link][0].MotionDetectWindow[1].Region[7]=0
[Link][0].MotionDetectWindow[1].Region[8]=0
[Link][0].MotionDetectWindow[1].Region[9]=0
[Link][0].MotionDetectWindow[1].Region[10]=0
[Link][0].MotionDetectWindow[1].Region[11]=0
[Link][0].MotionDetectWindow[1].Region[12]=0
[Link][0].MotionDetectWindow[1].Region[13]=0
[Link][0].MotionDetectWindow[1].Region[14]=0
General APIs 71
[Link][0].MotionDetectWindow[1].Region[15]=0
[Link][0].MotionDetectWindow[1].Region[16]=0
[Link][0].MotionDetectWindow[1].Region[17]=0
[Link][0].MotionDetectWindow[1].Sensitive=60
[Link][0].MotionDetectWindow[1].Threshold=5
[Link][0].MotionDetectWindow[1].Window[0]=0
[Link][0].MotionDetectWindow[1].Window[1]=0
[Link][0].MotionDetectWindow[1].Window[2]=0
[Link][0].MotionDetectWindow[1].Window[3]=0
[Link][0].MotionDetectWindow[2].Id=2
[Link][0].MotionDetectWindow[2].Name=Region3
[Link][0].MotionDetectWindow[2].Region[0]=0
[Link][0].MotionDetectWindow[2].Region[1]=0
Da
[Link][0].MotionDetectWindow[2].Region[2]=0
hu
[Link][0].MotionDetectWindow[2].Region[3]=0
[Link][0].MotionDetectWindow[2].Region[4]=0
a
[Link][0].MotionDetectWindow[2].Region[5]=0
HT
[Link][0].MotionDetectWindow[2].Region[6]=0
TP
[Link][0].MotionDetectWindow[2].Region[7]=0
[Link][0].MotionDetectWindow[2].Region[8]=0
AP
[Link][0].MotionDetectWindow[2].Region[9]=0
I
[Link][0].MotionDetectWindow[2].Region[10]=0
fo
[Link][0].MotionDetectWindow[2].Region[11]=0
r
[Link][0].MotionDetectWindow[2].Region[12]=0
We
[Link][0].MotionDetectWindow[2].Region[13]=0
[Link][0].MotionDetectWindow[2].Region[14]=0
st
[Link][0].MotionDetectWindow[2].Region[15]=0
Eu
[Link][0].MotionDetectWindow[2].Region[16]=0
[Link][0].MotionDetectWindow[2].Region[17]=0
ro
[Link][0].MotionDetectWindow[2].Sensitive=60
pe
[Link][0].MotionDetectWindow[2].Threshold=5
Te
[Link][0].MotionDetectWindow[2].Window[0]=0
[Link][0].MotionDetectWindow[2].Window[1]=0
c hn
[Link][0].MotionDetectWindow[2].Window[2]=0
ic
[Link][0].MotionDetectWindow[2].Window[3]=0
[Link][0].MotionDetectWindow[3].Id=3
a l
[Link][0].MotionDetectWindow[3].Name=Region4
[Link][0].MotionDetectWindow[3].Region[0]=0
[Link][0].MotionDetectWindow[3].Region[1]=0
[Link][0].MotionDetectWindow[3].Region[2]=0
[Link][0].MotionDetectWindow[3].Region[3]=0
[Link][0].MotionDetectWindow[3].Region[4]=0
[Link][0].MotionDetectWindow[3].Region[5]=0
[Link][0].MotionDetectWindow[3].Region[6]=0
[Link][0].MotionDetectWindow[3].Region[7]=0
[Link][0].MotionDetectWindow[3].Region[8]=0
[Link][0].MotionDetectWindow[3].Region[9]=0
General APIs 72
[Link][0].MotionDetectWindow[3].Region[10]=0
[Link][0].MotionDetectWindow[3].Region[11]=0
[Link][0].MotionDetectWindow[3].Region[12]=0
[Link][0].MotionDetectWindow[3].Region[13]=0
[Link][0].MotionDetectWindow[3].Region[14]=0
[Link][0].MotionDetectWindow[3].Region[15]=0
[Link][0].MotionDetectWindow[3].Region[16]=0
[Link][0].MotionDetectWindow[3].Region[17]=0
[Link][0].MotionDetectWindow[3].Sensitive=60
[Link][0].MotionDetectWindow[3].Threshold=5
[Link][0].MotionDetectWindow[3].Window[0]=0
[Link][0].MotionDetectWindow[3].Window[1]=0
[Link][0].MotionDetectWindow[3].Window[2]=0
Da
[Link][0].MotionDetectWindow[3].Window[3]=0
hu
[Link][0].OsdTwinkleEnable=false
[Link][0].PirMotionLevel=3
a
Comment —
HT
Table 4-99
AP
[Link]
Syntax
I
alue>[&<paramName>=<paramValue>…]
fo
Method GET
Description Set motion detection config.
r
[Link]
st
ble=true
Eu
Example
[Link]
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:
[Link]
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 [Link]
Method GET
Description Get event handler settings.
Example [Link]
General APIs 74
ntHandler
[Link][0]=1
[Link][1]=1
…
[Link]=false
[Link]=10
[Link]=true
[Link]=0
[Link]=30
[Link]=true
[Link]=true
[Link][0][0]=None
[Link][0][1]=0
Da
[Link][1][0]=None
hu
[Link][1][1]=0
…
a
[Link]=false
HT
[Link][0]=1
TP
Success [Link][1]=1
Return …
AP
[Link]=true
I
[Link]=10
fo
[Link][0]=1
r
[Link][1]=1
We
…
[Link]=false
st
[Link]=3
Eu
[Link]=0
ro
[Link][0][0]=1 [Link]-[Link]
[Link][0][1]=1 [Link]-[Link]…
pe
…
Te
[Link][6][5]=1 [Link]-[Link]
[Link]=true
c hn
[Link]. ExAlarmOutEnable=true
ic
[Link][0] =2
[Link][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 [Link]
General APIs 75
alue>[&<paramName>=<paramValue>…]
Method GET
Description Modify event handler settings.
[Link]
Example
[Link][0]=1&Alarm[0].[Link]=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
[Link] Integer
the time to output alarm
r
Range is [0—255].
Alarm signal dejitter
Eu
ignored.
Range is [0—300].
Te
[Link] bool
alarm.
a
[Link] bool
for alarm.
Range is {None, Preset,
Tour, Pattern}
This is PTZ action linked
[Link][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.
[Link][ch][1] integer
Tour: this is tour path
number.
Pattern: this is pattern
number.
[Link] Bool Enable/Disable PTZ link.
Range is {0, 1}
0 – do not record on video
[Link][ch] Integer channel ch
Da
1 – record. on video
hu
channel ch
a
Enable/Disable record
[Link] 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
[Link] bool
Eu
function.
ro
Range is [0—255].
pe
Frames between
[Link] 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],
[Link][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
[Link]-[Link]
I
Means EventHandler is
fo
Enable/Disable local
[Link] bool
st
Table 4-102
ic
Syntax [Link]
a l
Method GET
Description Get alarm config.
Example [Link]
[Link][0].Enable=false
[Link][0].EventHandler….(output of EventHandler is described in
GetEventHandler)
Success
[Link][0].Name=Door1
Return
[Link][0].SensorType=NC
[Link][1]….
…
Comment —
General APIs 78
Set alarm config
Table 4-103
[Link]
Syntax
ue>[&<paramName>=<paramValue>…]
Method GET
Description Set alarm config.
Example [Link]
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 [Link]
pe
Method GET
Description Get alarm out config.
Te
Example [Link]
c
Success [Link][alarmOutChannel].Mode=0
hn
Return [Link][alarmOutChannel].Name=Beep
ic
Parameters in Response:
a
Comment
alarmOutChannel: the alarm out channel index which starts from 0.
l
Table 4-105
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set alarm out config.
[Link]
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 [Link]
hu
Method GET
a
Example [Link]
Success
TP
result=2
Return
AP
Comment —
I
Table 4-107
We
Syntax [Link]
st
Method GET
Description Get alarm output channel number.
Eu
Example [Link]
ro
Success
result=1
pe
Return
Comment —
Te
c
Table 4-108
a
Syntax [Link]
l
Method GET
Description Get alarm input state for all channels.
Example [Link]
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 [Link]
Method GET
Description Get alarm output state for all channels.
Example [Link]
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 [Link]
Method GET
TP
Example [Link]
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= [Link][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
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Te
Method GET
c hn
[Link]
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 [Link]
Da
Method GET
hu
Example [Link]
HT
head=[Link] [ChannelNo]
Comment
I
ChannelNo: integer, array index starts from 0, which means video channel (equals to
fo
Table 4-113
st
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Eu
Method GET
ro
[Link]
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 [Link]
Method GET
Description Get login failure alarm config.
[Link]
Example
larm
Success head. Enable=false
Return head. EventHandler= (output of EventHandler is described in GetEventHandler)
Parameters in Response:
Comment
Da
head= [Link]
hu
Table 4-115
HT
[Link]
Syntax
TP
alue>[&<paramName>=<paramValue>…]
Method GET
AP
[Link]
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 [Link]
Method GET
Description Get storage not exist event config.
Example [Link]
General APIs 83
ist
[Link]=false
Success
[Link]= (output of EventHandler is described in
Return
GetEventHandler)
Comment —
Set storage not exist event config
Table 4-117
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set storage not exist event config.
[Link]
Example
Da
ble=true
Success
hu
OK
Return
a
Comment —
HT
Appendix:
TP
[Link]
SetEventHandler.
r
We
Table 4-118
ro
Syntax [Link]
pe
Method GET
Description Get storage failure event config.
Te
[Link]
c
Example
hn
e
[Link]=false
ic
Success
[Link]= (output of EventHandler is described in
a
Return
l
GetEventHandler)
Comment —
Set storage access failure event config
Table 4-119
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set storage failure event config.
[Link]
Example
e=true
General APIs 84
Success
OK
Return
Comment —
Appendix:
Table 4-120
hu
Syntax [Link]
a
Method GET
HT
[Link]
Example
pace
AP
[Link]=false
I
Success
[Link]= (output of EventHandler is described in
Return
fo
GetEventHandler)
r
Comment —
We
Table 4-121
[Link]
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 [Link]
Method GET
Description Get net abort event config.
Example [Link]
Success [Link]=false
Return [Link]= (output of EventHandler is described in GetEventHandler)
Comment —
Set net abort event config
Table 4-123
[Link]
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 [Link]
Te
Method GET
c hn
Success [Link]=false
a l
Table 4-125
Syntax [Link]
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set IP Conflict event config.
Example [Link]
ue
General APIs 86
Success OK
Return
Comment —
Appendix:
[Link]
hu
Syntax
>
a
Method GET
HT
Description Not all events support this command. Do not recommend to use it, use Attach command
instead.
AP
[Link]
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]
[Link]
HTTP Code: 200 OK\r\n
Cache-Control: no-cache\r\n
Pragma: no-cache\r\n
Expires: Thu, 01 Dec 2099 [Link] 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 [Link]
Method GET
Te
Example [Link]
hn
[Link]=true
ic
[Link]=true
a
[Link]=true
l
[Link]=true
[Link]=true
Success
[Link]=true
Return
[Link]=true
[Link]=true
[Link]=true
[Link]=true
[Link]=true
Comment —
General APIs 94
4.9.19 NetAlarm
Table 4-130
[Link]
Syntax
larm>[&name=<Name>&trigger=<Trigger>&desc=<Desc>]
Method GET
Description Set the netalarm state.
[Link]
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 [Link]
Eu
Method GET
ro
Example [Link]
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 [Link]
Method GET
General APIs 95
Description Get PTZ config.
Example [Link]
[Link][port].Address=8
[Link][port].Attribute[0]=115200
[Link][port].Attribute[1]=8
[Link][port].Attribute[2]=Even
Success
[Link][port].Attribute[3]=1
Return
[Link][port].Homing[0]=0
[Link][port].Homing[1]=30
[Link][port].NumberInMatrixs=0
[Link][port].ProtocolName=NONE
Parameters in Response:
Comment
port is PTZ port index, start form 0.
Da
Table 4-133
a
Syntax [Link]
HT
alue>[&<paramName>=<paramValue>…]
TP
Method GET
Description Set PTZ config.
AP
Example [Link]
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 [Link][0]=HD-CVI
hu
[Link][1]=HD-CVI2.0
a
Table 4-135
I
Syntax [Link]
fo
Method GET
r
Example [Link]
st
[Link]=0
[Link]=8
Eu
[Link]=1
ro
[Link]=255
pe
[Link]=1
[Link]=false
Te
[Link]=false
c
[Link]=200
hn
[Link]=false
ic
[Link]=false
a
Success [Link]=255
l
Return [Link]=0
[Link]=DH-SD1
[Link]=false
[Link]=255
[Link]=1
[Link]=5
[Link]=1
[Link]=80
[Link]=1
[Link]=false
[Link]=255
General APIs 97
[Link]=1
[Link]=7
[Link]=0
[Link]=1
[Link]=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
[Link]=Idle
[Link]=10
[Link]=120,12,2
Comment ChannelNo: integer, video channel index which starts from 1.
Table 4-137
[Link]
Syntax
rg1>&arg2=<arg2>&arg3=<arg3>
Method GET
Description PTZ basic movement.
Da
[Link]
hu
&arg3=0
a
Example
[Link]
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
[Link]
hu
Syntax
rg1>&arg2=<arg2>&arg3=<arg3>&arg4=<arg4>
a
Method GET
HT
[Link]
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
[Link]
hn
Syntax
arg2=0&arg3=0&arg4=0
ic
Method GET
a
[Link]
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
[Link]
Syntax
Point[0]=<startX>&startPoint[1]=<startY>&endPoint[0]=<endX>&endPoint[1]=<endY>
Table 4-141
Da
[Link]
Syntax
=<arg2>&arg3=<arg3>
hu
Method GET
a
[Link]
TP
Example
arg3=1
Success
AP
OK
Return
I
Parameters in URL:
fo
Table 4-142
pe
[Link]
Syntax
2=<arg2>&arg3=<arg3>
Te
Method GET
c
[Link]
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 [Link]
Method GET
Description Get preset of PTZ control.
Example [Link]
presets[0].Index=1
Success presets[0].Name=Preset 1
Return presets[0].Type=0
…
Da
Parameters in URL:
hu
Table 4-144
[Link]
AP
Syntax
rg2=<index>&arg3=0
I
Method GET
fo
Description Go to preset.
r
[Link]
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
[Link]
hn
Syntax
g2=<index>&arg3=0
ic
Method GET
a
[Link]
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 [Link]
Table 4-147
Da
[Link]
Syntax
arg2=<index>&arg3=0
hu
Method GET
a
[Link]
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
[Link]
Syntax
>&arg2=0&arg3=0
Te
Method GET
c
[Link]
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
[Link]
Syntax
>&arg2=0&arg3=0
Method GET
Description Stop the tour.
Table 4-150
[Link]
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 [Link]
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
[Link]
Syntax
st
x>&arg2=0&arg3=0
Method GET
Eu
[Link]
Example
pe
g2=0&arg3=0
Success
Te
OK
Return
c
Parameters in URL:
hn
Table 4-152
[Link]
Syntax
1>&arg2=<index2>&arg3=0
Method GET
Description Add preset to tour group.
[Link]
Example
2=2&arg3=0
Success
OK
Return
Comment Parameters in URL:
Table 4-153
[Link]
Syntax
>&arg2=<index2>&arg3=0
Method GET
Description Delete the specified preset from a particular tour group.
[Link]
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
[Link]
Syntax
We
ex>&arg2=0&arg3=0
st
Method GET
Description Set left boundary.
Eu
[Link]
Example
ro
arg2=0&arg3=0
pe
Success
OK
Return
Te
Parameters in URL:
c
Table 4-155
[Link]
Syntax
dex>&arg2=0&arg3=0
Method GET
Description Set right boundary.
[Link]
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
[Link]
Syntax
dex>&arg2=0&arg3=0
Method GET
Description Start scanning.
[Link]
Example
&arg2=0&arg3=0
Success
OK
Return
Parameters in URL:
Da
Stop scan
a
HT
Table 4-157
[Link]
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
[Link]
Syntax
<index>&arg2=0&arg3=0
al
Method GET
Description Start pattern record.
[Link]
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
[Link]
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
[Link]
Syntax
pe
ex>&arg2=0&arg3=0
Method GET
Te
[Link]
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
[Link]
Syntax
g2=0&arg3=0
Table 4-163
[Link]
Syntax
g2=0&arg3=0
Da
Method GET
Description Stop pan.
hu
[Link]
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 [Link]
ro
Method GET
pe
ment
c
[Link][port][Task].Enable = true
hn
[Link][port][Task].TimeSection[week][section] = 0 [Link]-[Link]
ic
…
a
[Link][port][Task].Fuction = None
l
[Link][port][Task].ScanId = 0
Success
[Link][port][Task].PresetId = 0
Return
[Link][port][Task].PatternId = 0
[Link][port][Task].TourId = 0
[Link][port][Task].[Link] = 30
[Link][port][Task].SnapshotEnable = false
[Link][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
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set PTZ auto movement.
[Link]
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 [Link]-[Link]
head. TimeSection timeSchedule
We
…
head. Fuction string Range is {Scan, Preset, Pattern, Tour}.
st
Table 4-166
[Link]
Syntax
2=0&arg3=0
Method GET
Description PTZ restart.
[Link]
Example
g2=0&arg3=0
Success
OK
Return
Comment Parameters in URL:
Parameters in URL:
Comment
hu
Table 4-168
I
[Link]
Syntax
fo
=0&arg3=0
r
Method GET
Description Enter the menu.
We
[Link]
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
[Link]
ic
Syntax
arg3=0
a
Method GET
l
Table 4-170
Syntax [Link]
Table 4-171
[Link]
Syntax
Da
>&arg2=<arg2>&arg3=<arg3>
Method GET
hu
[Link]
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 [Link]
Method GET
Description Get record manager capabilities.
Example [Link]
[Link]=30
[Link][0]=1
Success
[Link][1]=60
Return
[Link][0]=131072
[Link][1]=2097152
Table 4-173
Syntax [Link]
Method GET
Da
Example [Link]
a
[Link][channel].PreRecord=6
HT
[Link][channel].TimeSection[weekday][0]=1 [Link]-[Link]
TP
[Link][channel].TimeSection[weekday][1]=0 [Link]-[Link]
Success
[Link][channel].TimeSection[weekday][2]=0 [Link]-[Link]
AP
Return
[Link][channel].TimeSection[weekday][3]=0 [Link]-[Link]
I
[Link][channel].TimeSection[weekday][4]=0 [Link]-[Link]
fo
[Link][channel].TimeSection[weekday][5]=0 [Link]-[Link]
r
Parameters in Response:
channel: integer, array index starts from 0, which means video channel(equals to video
We
Table 4-174
[Link]
Syntax
Te
alue>[&<paramName>=<paramValue>…]
c
Method GET
hn
[Link]
a
on[0][0]=6 [Link]-[Link]
l
Example Set record time to every Sunday all day. Record type is motion detection and alarm.
In this example, "6 [Link]-[Link]" 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 [Link]
st
Method GET
Description Get record mode config.
Eu
Example [Link]
ro
Success
[Link][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
[Link]
Syntax
alue>
Method GET
Description Set record mode config.
[Link]
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 [Link]
hu
Method GET
a
Example [Link]
TP
Success
[Link]=MainFormat
Return
AP
Comment —
I
Table 4-178
r
[Link]
We
Syntax
alue>
st
Method GET
Description Set media global config.
Eu
[Link]
Example
ro
ormatAs=MainFormat
pe
Success
OK
Return
Te
Comment —
c hn
Appendix:
ic
Table 4-179
Syntax [Link]
Method GET
Description Create a media file finder.
Example [Link]
Success result=08137
Table 4-180
[Link]
.Channel=<ChannelNo>&[Link]=<start>&[Link]=<end>[&c
Syntax
[Link][0]=<dir>&[Link][0]=<type>&[Link][0]=<flags>&conditi
[Link][0]=<event>&[Link]=<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 [Link] and 2015-1-10
Da
[Link]=1&[Link][0]
=/mnt/dvr/sda0&[Link][0]=dav&[Link]
a
nts[0]=AlarmLocal&[Link][1]=VideoMotion&[Link]=2014-1-1%2
HT
[Link]&[Link]=2015-1-10%[Link]&[Link]=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
[Link]
Syntax
nt=<fileCount>
Method GET
Description Find the next files no more than fileCount.
[Link]
Example
nt=100
Appendix:
Da
Field in Description
hu
Response
a
Channel
[Link] -1.
TP
Table 4-182
pe
Syntax [Link]
Te
Method GET
Description Stop finding.
c
hn
Example [Link]
ic
Success
OK
a
Return
l
Comment —
Step 5 Destroy the finder.
Table 4-183
Syntax [Link]
Method GET
Description Destroy the media file finder.
Example [Link]
Success
OK
Return
Comment —
Table 4-184
URL [Link]
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 [Link]
Da
Method GET
hu
+CutLength int R File length that cut between start time and end time
Te
items[0].SummaryNew[0].[Link]=134652732
hu
items[0].SummaryNew[0].[Link]=134
items[0].SummaryNew[0].[Link]=Man
a
items[0].SummaryNew[0].[Link]=30
HT
items[0].SummaryNew[0].[Link]=1
TP
items[0].SummaryNew[0].[Link]=2
items[0].SummaryNew[0].[Link]=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 [Link]
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
[Link]
annel=1&[Link]=2014-1-1%[Link]&[Link]=2015-1-10%2012
:00:00&[Link][0]=jpg&[Link][0]=Event&[Link][0]=FaceRecogn
ition&[Link]=RecSuccess&[Link]
[Link]=2014-1-1%[Link]&[Link]
[Link]=2015-1-10%[Link]&[Link].
[Link]=Male&[Link]=CN&conditi
Table 4-187
URL [Link]
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 [Link]
r
00
We
found=100
st
items[0].Channel=1
items[0].StartTime=2011-1-1 [Link]
Eu
items[0].EndTime=2011-1-1 [Link]
ro
items[0].Type=jpg
pe
items[0].Events[0]=FaceRecognition
items[0].FilePath =/mnt/dvr/sda0/2010/8/11/dav/[Link].jpg
Te
items[0].Length =790
c
items[0].SummaryNew[0].Key=FaceRecognitionRecord
hn
items[0].SummaryNew[0].[Link]=1
ic
Respons items[0].SummaryNew[0].[Link]=BinJiang
a
e items[0].SummaryNew[0].[Link]=true
l
items[0].SummaryNew[0].[Link]=123
items[0].SummaryNew[0].[Link]=/tmp/[Link]
items[0].SummaryNew[0].[Link]=Man
items[0].SummaryNew[0].[Link]=40
items[0].SummaryNew[0].[Link]=1
items[0].SummaryNew[0].[Link]=2
items[0].SummaryNew[0].[Link]=1
items[0].SummaryNew[0].[Link][0].Similarity=50
items[0].SummaryNew[0].[Link][0].[Link]=ZhangSan
items[0].SummaryNew[0].[Link][0].[Link]=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 [Link]
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 [Link]"
Te
[ Example ]
hu
GET
a
[Link]
HT
annel=1&[Link]=2014-1-1%[Link]&[Link]=2015-1-10%2012
:00:00&[Link][0]=jpg&[Link][0]=Event&[Link][0]=HumanTrait
TP
&[Link][0]=White&[Link]
AP
Request .[Link][1]=Yellow&[Link]
[Link]=1&[Link]
I
[Link]=2&[Link]=Man&conditi
fo
[Link][0]=30&[Link]
r
[Link][1]=50&[Link]
We
[Link]=1
st
Respons
OK
e
Eu
Table 4-189
pe
URL [Link]
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].[Link]=White
hu
items[0].[Link]=1
a
items[0].[Link]=Black
items[0].[Link]=1
HT
items[0].[Link]=2
TP
Respons items[0].[Link]=1
e items[0].[Link]=Man
AP
items[0].[Link]=30
I
items[0].[Link]=2
fo
items[0].[Link]=1
r
items[0].[Link]=0
We
items[0].[Link]=2
st
items[0].[Link]=Man
items[0].[Link]=35
Eu
items[0].[Link]=0
ro
items[0].[Link]=1
items[0].[Link]=2
pe
items[0].[Link]=Smile
Te
items[0].[Link]=/mnt/2010/8/11/dav/[Link].jpg
items[0].[Link]=/mnt/2010/8/11/dav/[Link].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 [Link]
Request [Link]=1&[Link]=2014-1-1%[Link]&[Link]=2015-1-1
0%[Link]&[Link][0]=jpg&[Link][0]=Event&[Link].
Table 4-191
URL [Link]
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].[Link]=70
hu
items[0].[Link]=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 [Link]
pe
Method GET
Start to find media files satisfied the common conditions and IVS conditions with the
Te
Description
finder.
c
[ Example ]
hu
GET [Link]
a
[Link]=1&[Link]=2014-1-1%[Link]&[Link]=2015-1-1
HT
Request 0%[Link]&[Link][0]=jpg&[Link]=CrossLineDetection&cond
[Link]=Cross&[Link][0]=Human&[Link]
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 [Link]
Method GET
We
items[0].[Link]=Cross
hu
items[0].[Link]=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 [Link]
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 [Link]
[Link]=1&[Link]=2014-1-1%[Link]&[Link]=2015-1-1
I
Request 0%[Link]&[Link][0]=jpg&[Link]
fo
g=2&[Link]=White&[Link]
r
[Link]=Bicycle&[Link]=1
We
Response OK
st
Table 4-195
Eu
URL [Link]
ro
Method GET
pe
"CoachMotorcycle"
+++Helmet int O Helmet status, 0 : unknown, 1 : without helmet, 2 : with helmet
HT
[ Example ]
TP
GET [Link]
Request
AP
count=100
found=100
I
items[0].Channel=1
fo
items[0].StartTime=2011-1-1 [Link]
r
items[0].EndTime=2011-1-1 [Link]
We
items[0].Type=jpg
st
items[0].Events[0]=NonMotorDetect
items[0].FilePath=/mnt/dvr/sda0/2010/8/11/dav/[Link].jpg
Response
Eu
items[0].Length=790
ro
items[0].[Link]=NonMotorRecordFilter
pe
items[0].[Link]=2
items[0].[Link]=White
Te
items[0].[Link]=Bicycle
c
items[0].[Link]=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.
[Link]
HT
Example
10-8%[Link]&endTime=2012-10-8%[Link]&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 [Link]
Method GET
Eu
Example [Link]
pe
users[0].name=admin
users[0].ip=[Link]
Success
Te
users[0].group=admin
Return
c
users[0].clienttype=web3.0
hn
users[0].logintime=2011-11-08 [Link]
ic
Comment —
a l
Example [Link]
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
[Link]
Eu
Syntax [Link]=<userPassword>&[Link]=<userGroup>&[Link]=<userSh
ro
arable>[&[Link]=<userMemo>&[Link]=<userReserved>]
pe
Method GET
Description Add a user.
Te
[Link]
Example
c
[Link]=123456&[Link]=user&[Link]=true&[Link]=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.
[Link]
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
[Link]
We
Syntax
&pwd=<newPwd>&pwdOld=<oldPwd>
st
Method GET
Description Modify user password.
Eu
[Link]
Example
ro
&pwd=abcdef&pwdOld=123456
pe
Success
OK
Return
Te
4.13 Log
ic
a l
Table 4-207
[Link]
Syntax
.EndTime=<end>[& [Link]=<type>]
Method GET
Description Start to find log.
Find log between 2011-1-1 [Link] and 2011-1-10 [Link], URL is:
Example
[Link]
Table 4-208
Syntax [Link]
Method GET
Da
Example [Link]
a
found=2
HT
items[0].RecNo=789
TP
items[0].Time=2011-05-20 [Link]
items[0].Type=ClearLog
AP
items[0].User=admin
I
Success items[1].[Link]=H.264->MJPG
fo
Return items[1].[Link]=Encode
r
items[1].RecNo=790
items[1].Time=2011-05-20 [Link]
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 [Link]
Method GET
Syntax [Link]
Method GET
Da
Example [Link]
a
Success
OK
HT
Return
—
TP
Comment
AP
Table 4-211
fo
[Link]
r
Syntax
[Link]=<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
[Link]
ro
Example
[Link]&[Link]=2020-8-25%[Link]
pe
HTTP/1.1 200 OK
CONTENT-LENGTH: 743087
Te
CONNECTION: close
c
&w_User: default
a
Success
&Time: 2014-09-01 [Link]
l
Return
&Type: VideoLoss
&Content: EventType: VideoLoss
channel: <8>
StartTime: 2014-09-01 [Link]
…
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: [Link]
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 [Link]
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 [Link]
Success [Link]=Upgrading
Return [Link]=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 [Link]
Da
Method GET
hu
Example [Link]
[Link][0][0].FocusLimit=100
HT
[Link][0][0].FocusLimitSelectMode=Manual
TP
[Link][0][0].IRCorrection=0
[Link][0][0].Mode=3
AP
[Link][0][0].Sensitivity=1
I
[Link][0][1].FocusLimit=100
fo
[Link][0][1].FocusLimitSelectMode=Manual
Success
r
[Link][0][1].IRCorrection=0
Return
We
[Link][0][1].Mode=3
st
[Link][0][1].Sensitivity=1
[Link][0][2].FocusLimit=100
Eu
[Link][0][2].FocusLimitSelectMode=Manual
ro
[Link][0][2].IRCorrection=0
[Link][0][2].Mode=3
pe
[Link][0][2].Sensitivity=1
Te
Comment —
c
Table 5-2
ic
[Link]
a
Syntax
l
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video input focus config.
[Link]
Example
ocusLimit=1000
Success
OK
Return
Appendix:
Range is 0,1,2
head. Sensitivity integer
a
Table 5-3
Syntax [Link]
We
Method GET
st
Example [Link]
[Link][0][0].DigitalZoom=true
ro
[Link][0][0].Speed=7
pe
[Link][0][0].ZoomLimit=4
[Link][0][1].DigitalZoom=true
Te
Success
[Link][0][1].Speed=0
c
Return
hn
[Link][0][1].ZoomLimit=4
ic
[Link][0][2].DigitalZoom=false
[Link][0][2].Speed=7
a l
[Link][0][2].ZoomLimit=4
Comment —
Set video in zoom config
Table 5-4
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video input zoom config.
[Link]
Example
igitalZoom=false&VideoInZoom[0][0].Speed=8
Appendix:
Table 5-5
AP
Syntax [Link]
I
Method GET
fo
[Link]
Example
ness
We
[Link][0][0].Level=4
st
[Link][0][0].Mode=1
Eu
[Link][0][0].Sharpness=8
[Link][0][1].Level=4
ro
Success
[Link][0][1].Mode=1
pe
Return
[Link][0][1].Sharpness=8
[Link][0][2].Level=4
Te
[Link][0][2].Mode=1
c hn
[Link][0][2].Sharpness=8
Comment —
ic
Table 5-6
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set video input sharpness settings.
[Link]
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 [Link]
Method GET
AP
Example [Link]
fo
[Link][0].Config[0]=1
r
[Link][0].Mode=0
[Link][0].TimeSection[0][0]=0 [Link]-[Link]
We
[Link][0].TimeSection[0][1]=0 [Link]-[Link]
st
[Link][0].TimeSection[0][2]=0 [Link]-[Link]
[Link][0].TimeSection[0][3]=0 [Link]-[Link]
Eu
[Link][0].TimeSection[0][4]=0 [Link]-[Link]
ro
[Link][0].TimeSection[0][5]=0 [Link]-[Link]
pe
[Link][0].TimeSection[1][0]=0 [Link]-[Link]
[Link][0].TimeSection[1][1]=0 [Link]-[Link]
Te
[Link][0].TimeSection[1][2]=0 [Link]-[Link]
c hn
[Link][0].TimeSection[1][3]=0 [Link]-[Link]
Success
[Link][0].TimeSection[1][4]=0 [Link]-[Link]
ic
Return
[Link][0].TimeSection[1][5]=0 [Link]-[Link]
a l
[Link][0].TimeSection[2][0]=0 [Link]-[Link]
[Link][0].TimeSection[2][1]=0 [Link]-[Link]
[Link][0].TimeSection[2][2]=0 [Link]-[Link]
[Link][0].TimeSection[2][3]=0 [Link]-[Link]
[Link][0].TimeSection[2][4]=0 [Link]-[Link]
[Link][0].TimeSection[2][5]=0 [Link]-[Link]
[Link][0].TimeSection[3][0]=0 [Link]-[Link]
[Link][0].TimeSection[3][1]=0 [Link]-[Link]
[Link][0].TimeSection[3][2]=0 [Link]-[Link]
[Link][0].TimeSection[3][3]=0 [Link]-[Link]
[Link][0].TimeSection[3][4]=0 [Link]-[Link]
[Link][0].TimeSection[6][0]=0 [Link]-[Link]
hu
[Link][0].TimeSection[6][1]=0 [Link]-[Link]
[Link][0].TimeSection[6][2]=0 [Link]-[Link]
a
[Link][0].TimeSection[6][3]=0 [Link]-[Link]
HT
[Link][0].TimeSection[6][4]=0 [Link]-[Link]
TP
[Link][0].TimeSection[6][5]=0 [Link]-[Link]
Comment —
AP
Table 5-8
[Link]
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 [Link]
Method GET
Description Get video in day night mode shift config.
Example [Link]
Da
[Link][0][0].Delay=10
hu
[Link][0][0].Mode=Brightness
[Link][0][0].Sensitivity=2
a
[Link][0][0].Type=Mechanism
HT
[Link][0][1].Delay=10
TP
Success [Link][0][1].Mode=Brightness
Return [Link][0][1].Sensitivity=2
AP
[Link][0][1].Type=Mechanism
I
[Link][0][2].Delay=10
fo
[Link][0][2].Mode=Brightness
r
[Link][0][2].Sensitivity=2
We
[Link][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
[Link]
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 [Link]
fo
Method GET
r
Example [Link]
[Link][0][0].Correction=50
st
[Link][0][0].FarLight[0].Angle=0
Eu
[Link][0][0].FarLight[0].Light=0
[Link][0][0].Mode=ZoomPrio
ro
[Link][0][0].NearLight[0].Angle=0
pe
[Link][0][0].NearLight[0].Light=0
Te
[Link][0][0].Sensitive=3
[Link][0][1].Correction=50
c hn
[Link][0][1].FarLight[0].Angle=0
ic
[Link][0][1].FarLight[0].Light=0
Success
[Link][0][1].Mode=ZoomPrio
a
Return
l
[Link][0][1].NearLight[0].Angle=0
[Link][0][1].NearLight[0].Light=0
[Link][0][1].Sensitive=3
[Link][0][2].Correction=50
[Link][0][2].FarLight[0].Angle=0
[Link][0][2].FarLight[0].Light=0
[Link][0][2].Mode=ZoomPrio
[Link][0][2].NearLight[0].Angle=0
[Link][0][2].NearLight[0].Light=0
[Link][0][2].Sensitive=3
Comment Lighting[ChannelNo][ConfigNo]:
Table 5-12
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set lighting config.
Turn on light:
[Link]
Da
ht[0].Light=10&Lighting[0][0].NearLight[0].Light=90&Lighting[0][0].Mode=Manual
Example
hu
[Link]
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 [Link]
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 [Link]
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 [Link]
Method GET
Description Control the wiper to move once.
Example [Link]
Success
OK
Return
Comment ChannelNo: integer, video channel index which starts from 1, default 1 if not specified.
Example [Link]
a
[Link]=2
[Link]=1
HT
Success [Link]=1
TP
Return [Link]=0
[Link]=1
AP
[Link]=4
I
Comment —
fo
r
Table 6-2
Syntax [Link]
Eu
Method GET
ro
Example [Link]
list[0]="/dev/sda0"
Success
Te
list[1]="/dev/sda1"
Return
c
list[2]="/dev/sg1"
hn
Comment —
ic
a
Table 6-3
Syntax [Link]
Method GET
Description Get all the storage device information.
Example [Link]
Method GET
hu
Example [Link]
HT
Success [Link]=false
Return [Link]=true
TP
Comment —
AP
Table 6-5
r
[Link]
Syntax
We
<path>
st
Method GET
Description Format camera SD card.
Eu
[Link]
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 [Link]
Method GET
Description Get all the directories on the NAS server.
Example [Link]
Table 6-7
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Da
Method GET
hu
[Link]
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
[Link]
Syntax
nt
Method GET
Description Get record storage point config.
Table 6-9
[Link]
Da
Syntax
alue>[&<paramName>=<paramValue>…]
hu
Method GET
a
[Link]
Example
TP
0].[Link]=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 [Link]
Method GET
Da
[Link]
a
Example
p
HT
[Link][0].Channels[0].MaxPictures=0
TP
[Link][0].FileHoldTime=0
[Link][0].Memo=For Reading & Writing Files
AP
[Link][0].Name=ReadWrite
I
[Link][0].OverWrite=true
fo
[Link][0].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S
r
][%R].jpg
[Link][0].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.
We
Success %s[%E][%O@%S][%R].dav
st
Return [Link][1].Channels[0].MaxPictures=0
[Link][1].FileHoldTime=0
Eu
[Link][1].Name=Remote
pe
[Link][1].OverWrite=true
[Link][1].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S
Te
][%R].jpg
c hn
[Link][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
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set storage group config.
[Link]
Example
me=main
Success
OK
Return
Appendix:
written.
StorageGroup[Index]. Channels[ch].
TP
6.4 SDEncrypt
I
fo
Table 6-12
st
[Link]
Syntax
assword=<password>
Eu
Method GET
ro
[Link]
Example
password=123456
Te
Success
c
OK
hn
Return
ic
Comment
l
(cgi-bin/[Link]?action=getDeviceAllInfo).
password: The stringValue Card is Encrypted
me>&password=<password>
hu
Method GET
a
[Link]
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/[Link]?action=getDeviceAllInfo).
r
Table 6-15
ro
[Link]
Syntax
pe
Name>&password=<password>&oldPassword=<oldPassword>
Method GET
Te
[Link]
hn
Example
mmc0&password=123456&oldPassword=admin123
ic
Success
OK
a
Return
l
Table 6-17
AP
[Link]
Syntax
I
m
fo
Method GET
r
Example
m
st
[Link]=true
Eu
Success [Link]=10
Return [Link]= (output of EventHandler is described in
ro
GetEventHandler)
pe
Comment —
Set StorageHealthAlarm config
Te
c
Table 6-18
hn
[Link]
ic
Syntax
alue>[&<paramName>=<paramValue>…]
a
Method GET
l
7.1.1 GUISet
Get GUISet config
Table 7-1
Syntax [Link]
Da
Method GET
hu
Description Get the GUI settings. Every video out screen has a group setting.
a
Example [Link]
[Link][index]. WindowAlpha =128
HT
[Link][index]. TimeTitlePos[0]=0
[Link][index]. TimeTitlePos[1]=0
AP
[Link][index]. TimeTitlePos[2]=8191
I
[Link][index]. TimeTitlePos[3]=8191
fo
[Link][index]. MenuShowOption =0
r
[Link][index]. ChannelTitlePos[1]=0
ro
[Link][index]. ChannelTitlePos[2]=8191
[Link][index]. ChannelTitlePos[3]=8191
pe
…
c
Parameters in Response :
Comment
hn
Table 7-2
l
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set the GUI settings. Every video out screen has a group setting.
[Link]
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 [Link]
Method GET
Description Get the split screen mode.
Example [Link]
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 [Link]
Method GET
Eu
Example [Link]
pe
[Link][ch].Enable=128
[Link][ch].Interval=true
Success
Te
[Link][ch].Mask.Split1=0,1,5
Return
c
[Link][ch].Mask.Split8=0,1,5
hn
[Link][ch].Collections=Favortite1, Favortite2…
ic
Comment —
a
Table 7-6
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set monitor tour config.
[Link]
Example
e=true
Success
OK.
Return
Comment Parameters in URL:
Appendix:
[Link]
Syntax
hu
ag>
a
Method GET
HT
Success
OK
AP
Return
I
Table 7-8
ro
Syntax [Link]
Method GET
pe
[Link]
Example
tion
c hn
[Link]. Mode=Split1
ic
[Link][winno].Enable= true
a
[Link][winno].Device=device1
l
Success [Link][winno].VideoChannel=5
Return [Link][winno].VideoStream=Main
[Link][winno].AudioChannel=5
[Link][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 [Link]
a
[Link][0]=2
[Link][1]=3
HT
[Link]=false
TP
[Link]=10
[Link]=0
AP
[Link]=512
I
[Link]=1
fo
[Link]=20
r
[Link]=20
We
[Link]=10
st
[Link]=4
[Link]=true
Eu
[Link][0]=CrossLineDetection
ro
[Link][1]=CrossRegionDetection
Success
[Link][2]=LeftDetection
pe
Return
[Link][3]=TakenAwayDetection
Te
[Link][0]=Normal
[Link][1]=FaceDetection
c hn
[Link][2]=VideoDiagnosis
ic
[Link]
a
affs[0]=0
l
[Link]
affs[1]=0
[Link]
[0]=0
[Link]
[1]=0
[Link]
alDataStore=false
Parameters in URL:
Comment
ChannelNo: integer, video channel index which starts from 1.
Table 8-2
[Link]
Syntax
al
Method GET
Description Get video analyse global config.
[Link]
Example
Global
[Link]=Normal
[Link]=1
Da
[Link]=Far
hu
[Link]=30
a
[Link]=10.000000
Success
[Link]=6.200000
HT
Return
[Link][0]=[Link]
TP
[Link][1]=[Link]
[Link][0]=[Link]
AP
[Link][1]=[Link]
I
…
fo
Parameters in Response :
r
head =[Link][ChannelNo]
Comment
We
ChannelNo: integer, array index starts from 0, which means video channel(equals to
st
Table 8-3
ro
[Link]
pe
Syntax
alue>[&<paramName>=<paramValue>...]
Method GET
Te
[Link]
Example
0].[Link]=Normal&VideoAnalyseGlobal[0].[Link]=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 [Link] depends on [Link].
Appendix
etc.
hu
Table 8-4
Syntax [Link]
We
Method GET
st
[Link]
Example
Rule
ro
[Link]= line1
pe
[Link]=CrossLineDetection
Success [Link][0][0].Enable =true
Te
GetEventHandler)
…
ic
Parameters in Response :
a l
Table 8-5
[Link]
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 .[Link][0]
"TakenAwayDetection", "FaceDetection",
"WanderDetection", "RioterDetection",
"ParkingDetection", "MoveDetection"}.
head. Maximum height. The height of the object must
integer
Config .[Link][1] not be beyond maximum height.
head. Minimum width. The width of the object must not
integer
Config .[Link][0] be less than minimum width.
head. Minimum height. The height of the object must
integer
Config .[Link][1] not be beyond minimum height.
[Link][2][0]
hu
head.
integer The start point of DetectRegion 2;
a
[Link][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
[Link]
Syntax
erStat
Method GET
Description Get OSD config when display number status information of people.
[Link]
Example
NumberStat
[Link]=true
Success [Link]=true
Return [Link]=true
[Link]=0
Table 8-7
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set OSD config when display number status information of people.
[Link]
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
[Link]
Syntax
a
artTime=<start>&EndTime=<end>
l
Method GET
Description Get binary data of heat map.
[Link]
Example
=2015-08-20%[Link]&EndTime=2015-08-21%[Link]
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 [Link]
hu
the response, it will contain these message "[Link]=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
[Link]
Syntax
AP
name=VideoInFishEye
Method GET
I
[Link]
r
Example
VideoInFishEye
We
[Link]=Chip
st
[Link][0]=WallMode
[Link][1]=CeilMode
Eu
……
ro
[Link][0]=Original
Success
pe
[Link][1]=Config
Return
[Link][2]=Panorama
Te
……
c
[Link][0]=Up
hn
[Link][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 [Link] 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 [Link]
Method GET
Description Get FishEye config.
Example [Link]
[Link]=1
Success
[Link]=Original
Return
……..
Parameters in Response:
Da
head = [Link][ChannelNo]
hu
ChannelNo: integer, array index starts from 0, which means video channel (equals to
a
Table 8-11
fo
[Link]
Syntax
r
alue>[&<paramName>=<paramValue>…]
Method GET
We
der=1
ro
pe
Example
Mode=Panorama
c hn
[Link]
a l
8.4 CrowdDistriMap
Table 8-13
HT
[Link]
Syntax
artbeat=<Heartbeat>]
TP
Method GET
AP
Description Subscribe the crowd distribuite map information, return info at regular time.
Example [Link]
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 [Link] 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
[Link]
Syntax
>
pe
Method GET
Te
Description Get crowd distribuite map information, return info only once.
c
Example [Link]
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
[Link]
Example
ane[0]=0&[Link][1]=255
HT
status[0].Lane=0
status[0].PictureId=5
AP
status[0].[Link]=1
I
Success
…
fo
Return
status[1].Lane=1
r
status[1].PictureId=4
We
status[1].[Link]=1
…
st
Parameters in URL:
Eu
Parameters in Response :
ic
Appendix
Table 9-3
hu
[Link]
Syntax
a
e=UnlicensedVehicle
HT
Method GET
Description Open or Close the unlicensed vehicle detection.
TP
[Link]
Example
AP
dVehicle
Success
I
OK
Return
fo
Parameters in URL:
r
9.1.4 Snap
Eu
ro
Table 9-4
pe
Syntax [Link]
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 [Link] 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
[Link]
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
[Link]
c
Example
hn
LightState
[Link]=0
ic
[Link]=1
a l
[Link]=0
[Link]=0
[Link]=0
[Link]=0
Success
[Link]=0
Return
[Link]=0
[Link]=0
[Link]=0
[Link]=0
[Link]=1
[Link]=0
[Link]=0
hu
[Link]=1
[Link]=0
a
[Link]=0
HT
[Link]=0
TP
[Link]=0
[Link]=0
AP
[Link]=0
I
[Link]=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
[Link]
hn
Syntax
alue>[&<paramName>=<paramValue>…]
ic
Method GET
a
[Link]
[Link]=1&[Link]=0&ParkingSpaceLi
Example [Link]=0&[Link]=0&ParkingSp
[Link]=0&[Link]=0&Parkin
[Link]=0
Success
OK
Return
Comment —
Table 9-9
[Link]
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
[Link]
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 [Link]=TrustList
hu
e [Link][0]=[Link]
a
[Link][0]=[Link]
HT
Table 9-11
[Link]
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
[Link]
l
Request
[Link]=true&[Link]=TrustList&ParkingSpaceAcce
[Link][0]=[Link]&[Link][0]=[Link]
Respons
<none>
e
Table 9-13
[Link]
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 [Link]
Description
operation may take a long time.
I
POST
fo
/cgi-bin/[Link]?action=uploadFile&Type=TrafficBlackList&format=CSV&code
r
=UTF-8 HTTP/1.1
We
Host: [Link]
st
Connection: keep-alive
Content-Length:XXXX
Eu
Content-Type: multipart/form-data;
ro
boundary=----WebKitFormBoundaryooT6JTCbuezAQeDy
Example
pe
------WebKitFormBoundaryooT6JTCbuezAQeDy
Te
Content-Type: application/[Link]-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 [Link]
a
Method GET
HT
Example [Link]
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 [Link]
Eu
Method GET
ro
Example [Link]
Success File data
Te
Return
c
Comment —
hn
ic
a l
Method GET
hu
Example [Link]
[Link] = Indoor
HT
[Link] = 100
TP
[Link] = 0
[Link] = 1
AP
[Link]= 100
I
[Link] = 0
fo
[Link] = 5
r
[Link]= 24
We
[Link] = 0
st
[Link] = 1
caps. [Link]= 8
Eu
caps. [Link] = -8
ro
caps. [Link] = 1
Success
caps. [Link]= 100
pe
Return
caps. [Link] = 0
Te
caps. [Link] = 5
caps. [Link]= 255
c hn
caps. [Link] = 0
ic
caps. [Link] = 5
a
caps. [Link] = 0
caps. [Link] = 5
caps. [Link]= 100
caps. [Link] = 0
caps. [Link] = 5
[Link][i]= Ironbow2
[Link][j]= Full Screen
Parameters in URL:
ChannelNo: integer, video channel index which starts from 1.
Comment
Parameters in Response:
Table 10-2
[Link]
Syntax
ons
Da
Method GET
hu
Description Thermography options contain EZoom, Colorization, and SmartOptimizer and so on.
a
[Link]
Example
HT
yOptions
TP
[Link]=0
[Link]=White Hot
AP
[Link]=10
I
[Link]=Custom
fo
[Link]= true
r
[Link][i][0u]=0
[Link][i][1u]=0
We
[Link][i][2u]=0
st
Success
[Link][i][3u]=0
Return
[Link]=10
Eu
[Link]=10
ro
[Link]=10
pe
[Link]="HighTemperature"
[Link]=13
Te
[Link]=15
c
[Link]=12
hn
[Link]=95
ic
Parameters in Response:
a l
Table 10-3
[Link]
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
[Link][i][ integer
i: the region index, starts from 0.
c
0u]
hn
head.
Range is [0—8191].
ic
[Link][i][ integer
i: the region index, starts from 0.
a
1u]
l
head.
Range is [0—8191].
[Link][i][ integer
i: the region index, starts from 0.
2u]
head.
Range is [0—8191].
[Link][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
[Link]
Syntax
a
el=<ChannelNo>
HT
Method GET
Description Get extern system Info.
TP
[Link]
Example
AP
channel=1
I
[Link] = 11111111123
Success [Link] = 2222222222222
fo
[Link] = 4444444444
We
Parameters in URL:
Comment
st
Table 10-5
[Link]
Te
Syntax
ChannelNo>&mode=<modeType>
c
Method GET
hn
[Link]
a
Example
nel=1&mode=Default
l
[Link] = 50
[Link]= 50
[Link]= 12
[Link]= 0
Success [Link]= "White Hot"
Return [Link]= 10
[Link]= Full Screen
[Link]= Full Screen
[Link][i][0u]=0
[Link][i][1u]=0
Table 10-6
[Link]
HT
Syntax
el=<ChannelNo>
TP
Method GET
Description Get optimized region info.
AP
[Link]
I
Example
hannel=1
fo
[Link]= true
We
Success [Link][i][0u]=0
st
Return [Link][i][1u]=0
[Link][i][2u]=0
Eu
[Link][i][3u]=0
ro
Parameters in URL:
pe
Comment
Te
Parameters in Response:
c
Table 10-7
[Link]
Syntax
hannelNo>&enable=<Enable>
Method GET
Description Shutter control, whether enable shutter.
[Link]
Example
=1&enable=true
Success
OK
Return
Comment Parameters in URL:
OK
Return
hu
Parameters in URL:
a
Table 10-9
I
[Link]
fo
Syntax
No>
r
Method GET
We
Example [Link]
Success
Eu
OK
Return
ro
Parameters in URL:
Comment
pe
10.2 Radiometry
c hn
Table 10-10
[Link]
Syntax
o>]
Method GET
Description Get the capabilities of radiometry manager.
Example [Link]
[Link]=8
[Link]=8
Success
[Link]=1
Return
[Link]=8
[Link]=256
[Link]=1
hu
[Link]=100
[Link]=0
a
[Link]=0
HT
[Link]=1
TP
[Link]=100
[Link]=0
AP
[Link]=0
I
[Link]=1
fo
[Link]=60
r
[Link]=327.0
We
[Link]=-20.0
Parameters in URL:
st
Comment
ChannelNo: integer, video channel index which starts from 1.
Eu
Table 10-11
c
[Link]
hn
Syntax
ometry
ic
Method GET
a
[Link]
Example
Thermometry
Table 10-12
a
[Link]
Syntax
HT
alue>[&<paramName>=<paramValue>…]
TP
Method GET
Description Set HeatImagingThermometry Config
AP
[Link]
Example
I
[Link]=50&[Link]=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 [Link]
r
Method GET
Description Get thermometry rule.
We
[Link]
st
Example
Rule
Eu
[Link] = true
[Link] =0
ro
[Link]=0
pe
[Link]=SpotName
[Link]=Spot
Te
[Link][PointNo][0]= 0
c hn
[Link][PointNo][1]= 0
ic
…
head.T=3
a l
Success [Link]=0
Return [Link]=true
[Link] =Max
[Link]=Below
[Link]=20.0
[Link]=0.1
[Link]=30
[Link]=true
[Link]=0.95
[Link]=0.95
[Link]=0
Table 10-14
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Da
[Link]
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. [Link][PointNo] [0] integer The Xscale of Region/Line
point
ISO}
hu
Above }
HT
Unit is second
head. [Link] bool Enable/Disable
I
Range [0 — 1]
fo
Object distance
We
in getCaps.
Object Reflected Temperature
Eu
in getCaps.
pe
Table 10-15
[Link]
a
Syntax
l
er
Method GET
Description Get Heat Imaging Temper config
[Link]
Example
emper
Success [Link]=false
Return [Link]. paramName = paramValue
Parameters in Response:
head= [Link][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
[Link]
Syntax
alue>[&<paramName>=<paramValue>…]
Method GET
Description Set Heat Imaging Temper config
[Link]
Example
0].Enable=false&HeatImagingTemper[0].[Link]=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
[Link]
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 [Link]=Spot
a
Return [Link]=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
[Link]
Eu
Syntax <StartTimeValue>&[Link]=<EndTimeValue>&[Link]=<TypeVal
ue>&[Link]=<ChannelValue>&[Link]=<PeriodValue>
ro
Method GET
pe
[Link]
Example me=2010-04-01%[Link]&[Link]=2010-04-08%[Link]&[Link]
chn
pe=Spot&[Link]=1&[Link]=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].[Link]=50.1
TP
info[i].[Link]=50.2
info[i].[Link]=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 [Link]
pe
Method GET
Description Stop to find the history data of temperature values.
Te
Example [Link]
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
[Link]
fo
Syntax
No>
r
Method GET
We
Description Subscribe to radiometry data of a channel. It needs to cooperate with interface below.
st
Example [Link]
--<boundary>\r\n
Eu
Content-Type: text/plain\r\n
ro
[Link]=0
[Link]=0
Te
[Link]=0
c
[Link]=2010-05-25 [Link]
hn
[Link]=0
ic
Success [Link]="Tau"
a
Return [Link]=1
l
[Link]=1
[Link]=1
[Link]=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 [Link]
Method GET
AP
Example [Link]
fo
[Link]=true
r
[Link]=0
[Link] = 31
We
[Link] = 40
st
[Link]="Auto"
Eu
[Link]=false
[Link]= 15
ro
[Link][windowsNum].Regions[0]=123468789
pe
[Link][windowsNum].Regions[1]=123468789
Success
[Link][windowsNum].Regions[2]=123468789
Te
Return
[Link][windowsNum].Regions[3]=123468789
c hn
[Link][windowsNum].Postion[0]=0
[Link][windowsNum].Postion[1]=0
ic
[Link][windowsNum].Postion[2]=0
a l
[Link][windowsNum].Postion[3]=0
[Link][windowsNum].Sensitivity = 95
head. DetectWindow[windowsNum].Id=1
[Link][windowsNum].Name="windName"
[Link]=(output of EventHandler is described in GetEventHandler)
Parameters in Response:
head= [Link][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
[Link] integer fire last times
Eu
Setting of EventHandler is
c
[Link] EventHandler
described in SetEventHandler.
hn
ic
Table 10-27
Syntax [Link]
Method GET
Description Get FireWarningMode config.
[Link]
Example
de
Success
[Link]="PtzPreset"
Return
Parameters in Response:
Comment
head= [Link][ChannelNo]
OK
Return
hu
Appendix:
HT
[Link]
a
Example
101&Type=Remote
HT
Success
OK
TP
Return
Parameters in URL:
AP
Table 11-2
Syntax [Link]
Eu
Method GET
ro
Example [Link]
Success
Te
[Link]=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
[Link]
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 [Link]
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 [Link]
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
[Link]
hn
URL
ssword
ic
Method GET
a
Descriptio
l
Table 11-7
[Link]
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 [Link]
a
Request
CustomPassword
HT
Response OK
TP
Table 11-8
r
[Link]
We
URL
word
st
Method GET
Description Find Access control custom password by condition.
Eu
Request omPassword&[Link]=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
[Link]
URL
sword
Method GET
Description Find Access control custom password by recno.
[ Request Params ] ( key=value format in URL )
[Link]=3
hu
[Link]=123456789
a
[Link]=103
HT
[Link]=123456
[Link][0]=1
TP
Response [Link][1]=3
AP
[Link][2]=5
I
[Link]=01018001
[Link]=20151022 093811
fo
[Link]=20151222 093811
r
…
We
st
Custom Password
ro
pe
Table 11-10
[Link]
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 [Link]
a
SID=315
TP
[Link]=Answer
[Link]=RTP
AP
[Link]=UDP
I
[Link]=Talk
fo
[Link]=6000
r
[Link][0].Compression=PCM
We
Success [Link][0].Frequency=44000
st
Return [Link][0].Depth=16
[Link][1].Compression=G.711A
Eu
[Link][1].Frequency=44000
ro
[Link][1].Depth=16
[Link]=7000
pe
[Link][0].Compression=H.264
Te
[Link][0].Frequency=90000
[Link][1].Compression=MJPG
c hn
…
ic
[Link]. MediaAddr=[Link]
a
Parameters in Response:
l
Success
OK
hu
Return
a
Parameters in URL:
HT
Table 12-4
r
Syntax [Link]
We
Method GET
st
Success
OK
ro
Return
pe
Comment —
Te
Table 12-5
ic
[Link]
Syntax
a
l>&[Link]=<type>&[Link]=<addr>…
l
Method GET
Description Answer the call.
[Link]
Example
&[Link]=Talk&[Link]=[Link]
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 [Link]
a
Method GET
HT
Example [Link]
Success
AP
OK
Return
I
Comment —
fo
r
Table 12-8
ro
[Link]
Syntax
pe
allType=<Type>&[Link]=<State>&count=<countNo>]
Method GET
Te
[Link]
hn
Example
[Link]=Incoming&[Link]=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
[Link]
Example ontent=stringData&ExpirTime=2012-01-01%[Link]&IssueTime=2012-01-01%201
AP
[Link]&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>[&[Link][0]=<flag>&[Link][0]=<event>&[Link]
hu
larity=<granularityValue>&[Link][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 [Link]
fo
[Link]=2014-1-1%[Link]&[Link]=2015-1-10%[Link]&co
r
[Link]=Main&[Link][0]=Event&[Link][0]=AlarmLocal&co
We
[Link][1]=VideoMotion&[Link]=16&[Link][0]=A
st
larmLocal&[Link][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 [Link]
items[0]. EndTime =2011-1-1 [Link]
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
[Link]
Te
hannelNo>&[Link]=<start>&[Link]=<end>&[Link]
Syntax ype=<stream>&[Link]=<level>[&[Link][rectNo][0]=<r
c hn
ect0>&[Link][rectNo][1]=<rect1>&[Link][rectNo][2]=<rect2>
ic
&[Link][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
[Link]
Syntax
We
unt>
st
Method GET
Descriptio
Find the next files no more than fileCount number.
Eu
n
ro
Example [Link]
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
[Link]
a
Example [Link]=2014-1-1%[Link]&[Link]=2015-1-10%[Link]&c
HT
[Link]=Main&[Link][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 [Link]
Eu
items[1]. streamType=Main
items[1]. length =790
Te
13.2 BandLimit
a l
%[Link]&[Link]=2014-7-3%[Link]&[Link][0]=1&con
hu
[Link][1]=3
a
Success
OK
Return
HT
In table below:
TP
Appendix:
fo
"RecordRestrict"}.
st
Table 13-8
hn
[Link]
ic
Syntax =<paramValue>&[Link]=<paramValue>&[Link]=<paramVa
a
lue>&[Link][0]=<paramValue>
l
Method GET
Description Cancel protection of record files.
[Link]
pes[0]=RecordRestrict&[Link][1]=RecordProtect&[Link]=2014-
Example
7-3%[Link]&[Link]=2014-7-3%[Link]&[Link][0]=1&
[Link][1]=3
Success
OK
Return
Comment paramValue as Appendix above.
OK
Return
hu
Table 13-10
AP
Syntax [Link]
I
Method GET
fo
Example [Link]
Success
We
result = 1
Return
st
Table 14-1
[Link]
Syntax
Da
nfo[0].Type=<type>]&[info[0].IO=<io>
hu
Method GET
Description Control white light or speaker
a
[Link]
HT
Example
pe=1&info[0].IO=0
TP
Success [Link]=on
Return [Link]=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 [Link] getstatus&[channel=<channelno>]
Te
Method GET
c hn
Return [Link]=on
Comment channelno: video channel index
Table 14-3
Syntax [Link]
Comm 218
Method GET
Description Get pir parameter.
Example [Link]
[Link]=true
[Link]=true
[Link]=Filcker
[Link]=5
[Link]=10
[Link]=TimeSection
[Link][weekday][0]=1 [Link]-[Link]
[Link][weekday][1]=0 [Link]-[Link]
[Link][weekday][2]=0 [Link]-[Link]
[Link][weekday][3]=0 [Link]-[Link]
Da
[Link][weekday][4]=0 [Link]-[Link]
hu
[Link][weekday][5]=0 [Link]-[Link]
a
[Link]=true
[Link]=[0, 1, 2]
HT
[Link]=10
TP
[Link]=true
[Link]=[1, 4]
AP
Success
[Link]=10
I
Return
[Link]=true
fo
[Link]=[2, 4]
r
[Link]=true
We
[Link]=true
st
[Link]=10
[Link]=0
Eu
[Link]=true
ro
[Link][0].Level=3
[Link][0].Id=0
pe
[Link][0].Name=Region0
Te
[Link][0].Sensitive=58
[Link][0].Threshold=4
c
hn
[Link][0].Region[0]=3932160
ic
[Link][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
[Link]
Syntax
ramName>=<paramValue>...&<paramName>=<paramValue>
Comm 219
Method GET
Description Set pir parameter.
[Link]
Example
Enable=true&configEx[1].[Link]=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
[Link]
string It is the name of a detect window.
We
[WinNum].Name
st
Range is [0—100].
[Link]
integer It presents more sensitive if the value is
Eu
[WinNum].Sensitive
larger.
ro
Range is [0—100].
[Link] [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. [Link][ch] integer 0 — do not output alarm at alarm out
channel ch
1 — output alarm at alarm out channel ch
head. [Link] bool Enable/Disable alarm out function.
Range is [10—300].
head. [Link] Integer Unit is seconds, indicates the time to
output alarm after input alarm is cleared.
Range is {0, 1}
head. [Link][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 [Link]
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].[Link]=[Link]
I
deviceInfo[index].[Link]=false
fo
deviceInfo[index].[Link]=[Link]
deviceInfo[index].[Link]=[Link]
r
deviceInfo[index].[Link]=2008::1
We
Success
deviceInfo[index].[Link]=false
st
Return
deviceInfo[index].[Link]=2008::6/112
deviceInfo[index].Mac=[Link]
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=[Link]
hn
deviceInfo[index].VideoInputChannels=1
ic
deviceInfo[index].VideoOutputChannels=16
a
Parameters in URL:
l
15.2 Flashlight
Table 15-3
a
[Link]
HT
Syntax
alue>[&<paramName>=<paramValue>…]
TP
Method GET
Description Set Flashlight config.
AP
[Link]
Example
I
ue&[Link][1][0]=1%[Link]-[Link]
fo
Success
OK
r
Return
—
We
Comment
st
Appendix:
Eu
section table.
ic
Example:
TimeSection[1][0]=1 [Link]—[Link]
Means flash light is effective between [Link] and
[Link] at Monday.
Comment —
hu
Stop Application
a
Syntax [Link]
HT
Method GET
Description Stop application.
TP
[Link]
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 [Link]
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 [Link].
+++ExitTime string O People leave time, ex: 2012-01-04 [Link].
[ Example ]
Request GET [Link]
[Link]=0
[Link]=NumberStat
[Link]=0
[Link]=14
[Link]=0
[Link]=0
Respons
[Link]=32
e
[Link]=0
Da
[Link]=65
hu
[Link][0].EnterTime=2012-01-04 [Link]
a
[Link][0].ExitTime=2012-01-04 [Link]
[Link][1].EnterTime=2012-01-04 [Link]
HT
[Link][1].ExitTime=2012-01-04 [Link]
TP
AP
Start to find
fo
Table 16-2
r
URL [Link]
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
[Link]
Request
artTime=2011-01-01%[Link]&[Link]=2011-01-10%[Link]&condition
.Granularity=Hour&[Link]=NumberStat&[Link]=20
token=12345
Response
totalCount=56
Get the find result
Table 16-3
URL [Link]
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 [Link].
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 [Link]
5&beginNumber=0&count=20
AI APIs 228
found=20
info[0].Channel=0
info[0].RuleName=NumberStat
info[0].StartTime=2012-03-14 [Link]
info[0].EndTime=2012-04-14 [Link]
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 [Link]
info[1].EndTime=2012-04-14 [Link]
info[1].EnteredSubtotal=14
Da
info[1].ExitedSubtotal=5
hu
info[1].InsideSubtotal=65
…
a
Table 16-4
URL [Link]
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 [Link]
Request
=12345
Te
Response OK
c hn
ic
Table 16-5
URL [Link]
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 [Link]
AI APIs 229
Response OK
Table 16-6
URL [Link]
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
[Link]
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>
[Link]=0
[Link]=NumberStat
Da
[Link]=0
hu
[Link]=14
[Link]=0
a
[Link]=0
HT
[Link]=32
TP
[Link]=0
[Link]=65
AP
Response
[Link][0].EnterTime=2012-01-04 [Link]
I
[Link][0].ExitTime=2012-01-04 [Link]
fo
[Link][1].EnterTime=2012-01-04 [Link]
r
[Link][1].ExitTime=2012-01-04 [Link]
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
[Link]=0
ic
[Link]=NumberStat
[Link]=0
a l
[Link]=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 [Link]
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 [Link]
I
=Test1&groupDetail=ForTest1
fo
Response groupID=10000
r
We
Table 16-10
Eu
URL [Link]
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 [Link]
000&groupName=Test1&groupDetail=ForTest1
Response OK
Table 16-11
URL [Link]
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 [Link]
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 [Link]
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 [Link]
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 [Link]
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 [Link]
=10000&channel[0]=1&channel[1]=2
report[0]=true
Response
report[1]=false
set disposition group to channel
Da
Table 16-14
URL [Link]
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 [Link]
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 [Link]
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 [Link]
groupID[0]=10001
groupID[1]=10003
groupID[2]=10006
….
Response
similary[0]=80
similary[1]=75
similary[2]=85
….
Table 16-16
hu
URL [Link]
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 [Link]
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 [Link]
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 [Link]
en=12345
Response OK
Da
Table 16-19
a
URL [Link]
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
[Link]
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
[Link] Modify Person
Table 16-20
URL [Link]
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
[Link]
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 [Link]
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 [Link]
oupID=10000
Response OK
Table 16-22
Da
URL [Link]
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
[Link]
Request
=10000&[Link][1]=10003&[Link]=Male&[Link]=CN&person.F
eatureState=1
token=123456789
Response
totalCount=24
Get find result
AI APIs 240
Table 16-23
URL [Link]
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 [Link]
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>
[Link]=0005
[Link]=10000
[Link]=ZhangSan
[Link]=1980-01-01
[Link]=Male
AI APIs 241
[Link]=CN
[Link]=ZheJiang
[Link]=HangZhou
[Link]=IC
[Link]=1234567890
[Link]=0
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>
Table 16-24
hu
URL [Link]
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
[Link]
Eu
Response OK
ro
pe
Table 16-25
hn
URL [Link]
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 [Link]
d[1]=002
AI APIs 242
Response OK
Stop ReAbstract
Table 16-26
URL [Link]
Method GET
Descripti
Stop the abstract features process.
on
[ Request Params ] ( None )
[ Response Params ] ( OK )
[ Example ]
Request GET [Link]
Respons
OK
Da
e
hu
a
Table 16-27
AP
[Link]
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
[Link][0].GroupID=0017
[Link][0].GroupName=wsd
[Link][0].AlarmOutEnable=true
[Link][0].AlarmChannel[0].AlarmRuleMask=0
[Link][0].AlarmChannel[0].AlarmOutLatch=5
[Link][0].AlarmChannel[1].AlarmRuleMask=0
[Link][0].AlarmChannel[1].AlarmOutLatch=8
…
Response
[Link][1].GroupID=0018
[Link][1].GroupName=cst
[Link][1].AlarmOutEnable=true
[Link][1].AlarmChannel[0].AlarmRuleMask=0
[Link][1].AlarmChannel[0].AlarmOutLatch=10
Da
[Link][1].AlarmChannel[1].AlarmRuleMask=0
hu
[Link][1].AlarmChannel[1].AlarmOutLatch=15
…
a
URL [Link]
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
[Link]
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 [Link]
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
[Link]
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 [Link]
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 [Link]
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 [Link]
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 [Link]
I
9
fo
Response OK
r
We
Start to find
Eu
Table 16-31
ro
URL [Link]
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
[Link]
l=0&StartTime=2018-01-13T[Link]Z&EndTime=2018-01-14T[Link]Z&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 [Link]
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 [Link]
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 [Link]
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 [Link]
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].[Link]=0012
Events[0].Candidates[0].[Link]=10000
Events[0].Candidates[0].[Link]=ZhangSan
AI APIs 253
Events[0].Candidates[0].[Link]=1980-01-02
Events[0].Candidates[0].[Link]=Male
…
Events[0].Candidates[0].Similarity=80
Events[0].Candidates[1].[Link]=0014
Events[0].Candidates[1].[Link]=10000
Events[0].Candidates[1].[Link]=Lisi
Events[0].Candidates[1].[Link]=1980-01-05
Events[0].Candidates[1].[Link]=Male
…
Events[0].Candidates[1].Similarity=75
…
Events[0].[Link]=Man
Da
Events[0].[Link]=20
hu
Events[0].[Link][0]=SunGlasses
Events[0].[Link][1]=Smile
a
Events[0].[Link]=2
HT
Events[0].[Link]=1
TP
Events[0].[Link]=1
Events[0].[Link]=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
[Link] [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].[Link][0]=1341
Events[0].[Link][1]=2451
Events[0].[Link][2]=4513
Da
Events[0].[Link][3]=4135
hu
Events[0].[Link]=Man
a
Events[0].[Link]=30
Events[0].[Link]=White
HT
Events[0].[Link]=1
TP
Events[0].[Link]=Black
Events[0].[Link]=1
AP
Event Events[0].[Link]=1
I
Events[0].[Link]=2
fo
Events[0].[Link][0]=1341
r
Events[0].[Link][1]=2451
We
Events[0].[Link][2]=4513
st
Events[0].[Link][3]=4135
Events[0].[Link]=Man
Eu
Events[0].[Link]=30
ro
Events[0].[Link][0]=Smile
Events[0].[Link]=2
pe
Events[0].[Link]=1
Te
Events[0].[Link]=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 [Link]
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
[Link] Update Traffic BlackList/RedList Record
Table 16-45
URL [Link]
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
[Link]
r
Request cno=12345&PlateNumber=AC00001&MasterOfCar=ZhangSan&PlateColor=Yellow&Vehi
We
cleColor=Blue&BeginTime=2011-01-01%[Link]&CancelTime=2011-01-10%2012:00
:00
st
Response OK
Eu
ro
Table 16-46
Te
URL [Link]
c
Method GET
hn
Descripti
ic
AI APIs 262
[Link] Find Traffic BlackList/RedList Record
Table 16-47
URL [Link]
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 [Link]
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].[Link]=TrafficJunction
fo
Events[0].[Link]=Pulse
r
Events[0].[Link]=0
We
Events[0].GroupID=123
st
Events[0].CountInGroup=3
Events[0].IndexInGroup=1
Eu
Events[0].Lane=0
ro
Events[0].[Link][0]=1341
pe
Events[0].[Link][1]=2451
Events[0].[Link][2]=4513
Te
Events[0].[Link][3]=4135
Event
c
Events[0].[Link]=Audi
hn
Events[0].[Link]=A6L
ic
Events[0].[Link]=5
a
Events[0].[Link]=2
l
Events[0].[Link]=123
Events[0].[Link]=AC00003
Events[0].[Link]=Yellow
Events[0].[Link]=Blue
Events[0].[Link][0]=1341
Events[0].[Link][1]=2451
Events[0].[Link][2]=4513
Events[0].[Link][3]=4135
Events[0].[Link]=China
Events[0].[Link][0].Type=Main
Events[0].[Link][0].Status[0]=Smoking
AI APIs 265
Events[0].[Link][0].SunShade=WithSunShade
Events[0].[Link][0].ShadePos[0]=2021
Events[0].[Link][0].ShadePos[1]=3041
Events[0].[Link][0].ShadePos[2]=2151
Events[0].[Link][0].ShadePos[3]=3661
Events[0].[Link][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].[Link]=TrafficJam
AI APIs 266
Events[0].[Link]=Pulse
Events[0].[Link]=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].[Link]=TrafficPedestrain
st
Events[0].[Link]=Pulse
Events[0].[Link]=0
Eu
Events[0].GroupID=123
ro
Events[0].CountInGroup=3
pe
Events[0].IndexInGroup=1
Events[0].Lane=0
Te
Events[0].[Link]=Passerby
c
Events[0].[Link][0]=1341
hn
Events[0].[Link][1]=2451
ic
Events[0].[Link][2]=4513
a
Events[0].[Link][3]=4135
l
…
--<boundary>
Content-Type: image/jpeg
Content-Length: <image size>
AI APIs 268
[Link] [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 [Link]
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
[Link]
a
nnel=0&[Link]=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 [Link]
AP
Method GET
I
[ Response Params ] ( OK )
ro
[ Example ]
pe
GET
Request [Link]
Te
San&Password=123456
c
hn
Response OK
ic
a
Table 16-57
URL [Link]
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 [Link]
gSan&Password=123456
Response OK
Table 16-58
Da
URL [Link]
Method GET
hu
[ Example ]
I
Response OK
r
We
Table 16-59
ro
URL [Link]
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 [Link]
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 [Link]
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 [Link]
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 [Link]
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 [Link]
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 [Link]
AP
Method GET
I
[ Response Params ] ( OK )
st
[ Example ]
Eu
Table 16-64
ic
URL [Link]
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 [Link]
{ "Token": 1234,
Response "Total": 20
}
Get the find result
Table 16-65
URL [Link]
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 [Link]
ro
t=20
{ "Info": [ {
pe
"UserID": "102",
Te
}, { … }, … ]
hn
}
ic
Table 16-66
URL [Link]
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 [Link]
AI APIs 276
Response OK
Table 16-67
URL [Link]
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 [Link]
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
[Link]
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&[Link]=500&Fin
Request
[Link]=3
Content-Type: application/octet-stream
Content-Length: <length>
Table 16-69
HT
URL [Link]
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
[Link]
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 [Link]
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
[Link]
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&[Link]
Request
I
=500&[Link]=3
Content-Type: application/octet-stream
fo
Content-Length: <length>
r
We
Response OK
Eu
Table 16-71
Te
URL [Link]
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 [Link]
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
[Link]
hu
Response OK
a
HT
Table 16-73
I
URL [Link]
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 [Link]
fo
Request
&[Link]=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 [Link]
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 [Link]
Request
d&recno=4
[Link]=4
[Link]=123456789
[Link]=ZhangSan
[Link]=300
[Link]=103
Da
[Link]=0
hu
[Link]=0
a
Response [Link][0]=1
HT
[Link][1]=3
[Link][2]=5
TP
[Link]=01018001
AP
[Link]=20151022 093811
[Link]=20151222 093811
I
[Link]=true
fo
…
r
Table 16-75
st
URL [Link]
Method GET
Eu
AI APIs 284
GET [Link]
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>
[Link]=4
[Link]=123456789
Da
[Link]=ZhangSan
hu
[Link]=300
[Link]=103
a
[Link]=0
HT
[Link]=0
TP
Response
[Link][0]=1
[Link][1]=3
AP
[Link][2]=5
I
[Link]=01018001
fo
[Link]=20151022 093811
r
[Link]=20151222 093811
We
[Link]=true
…
st
[Link]=500
Eu
[Link]=3
ro
--<boundary>
Content-Type: application/octet-stream
pe
Content-Length: <length>
Te
--<boundary>--
ic
a
l
[Link] Get the Total Number of Records of Access User Card and
Fingerprint
Table 16-76
[Link]
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 [Link]
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].[Link]=TrafficJam
AI APIs 286
Events[0].[Link]=Pulse
Events[0].[Link]=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 [Link]
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 [Link]
TP
Request
Rec&StartTime=123456700&EndTime=123456800&[Link]=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