Amcrest HTTP API SDK v2.10
Amcrest HTTP API SDK v2.10
com
Document History
Contents
1 Overview ........................................................................................................................................................... 10
2 References ......................................................................................................................................................... 10
3 Definitions ......................................................................................................................................................... 10
1
Amcrest Technologies LLC | www.amcrest.com
2
Amcrest Technologies LLC | www.amcrest.com
3
Amcrest Technologies LLC | www.amcrest.com
4
Amcrest Technologies LLC | www.amcrest.com
4.11.6 Download media file with the file name ............................................................................................... 150
5
Amcrest Technologies LLC | www.amcrest.com
6
Amcrest Technologies LLC | www.amcrest.com
7
Amcrest Technologies LLC | www.amcrest.com
8
Amcrest Technologies LLC | www.amcrest.com
13.1.2 Get the file information found by the finder ......................................................................................... 228
9
Amcrest Technologies LLC | www.amcrest.com
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, for controlling camera
functions (PTZ, Focus etc.) and for 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.
2 References
[1]. RFC 2616 Hypertext Transfer Protocol-HTTP/1.1
[2]. RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax and Semantics
[3]. RFC 2617 HTTP Authentication: Basic and Digest Access Authentication
3 Definitions
3.1 Abbreviations
API Application programming interface in the document, it especially presents application programming interface of
video products.
In URL syntax and in descriptions of API parameters, text in italic within angle brackets denotes content that should be
replaced with either a value or a string. When replacing the text string, the angle brackets must also be replaced.
For example, <server> in the URL syntax is replaced with the string 192.168.1.108.
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,
10
Amcrest Technologies LLC | www.amcrest.com
The API syntax must follow the standard of URI. (RFC 3986: Uniform Resource Identifiers (URI) Generic Syntax); that is,
spaces and other reserved characters (;, /, ?, :, @, =, +, , and $) within a name-value pair should be
replaced with %< ASCII hex>. For example, the blank should be replaced with %20.
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} denotes the valid value of an integer among 0, 1, 2 and 3.
[] following a string denotes an array. The index is usually an integer and starts from 0. For example,
Snap[channel] may be Snap[0] or Snap[1].
The variable may be different types: string, integer, bool or float. Integer is 32 bits. The range of bool is true and
false.
protocol: URL scheme for the particular request. The http and https protocols are both supported in this specification. So
http, as most of the APIs default protocol except several RTSP APIs, can be replaced by https.
server: Server could be hostname[: port]. The hostname can be IP address or the fully qualified domain name of an IP
device. The port is the port number of server listening for TCP connections. If the port is not given, the default port is
assumed. For HTTP, the default port is 80. For HTTPS, the default port is 443.
abs_path: The Request-URI for the resources is abs_path. The abs_path in this specification is most often of the form
/cgi-bin/*.cgi.
query: The query field is a string of information to be interpreted by the resource. It consists of resource-related
parameters. And it must be listed in name-value pair syntax (p1=v1&p2=v2&&pn=vn).
For example:
http://192.168.1.108/cgi-bin/snapshot.cgi?channel=1
11
Amcrest Technologies LLC | www.amcrest.com
Return:
Table 3-1
If the request fits with syntax but an error occurs while the server handles it, the response would like this:
HTTP/1.1 200 OK
Error
12
Amcrest Technologies LLC | www.amcrest.com
HTTP/1.1 200 OK
Error
ErrorID=2, Detail= Invalid Request!
Table 3-2
0 Invalid Authority! The user fails in authentication or doesnt include the right
accessing the resource.
5 Server internal error! An error occurs when server handles the request.
3.5 Authentication
Video products support either basic authentication or digest authentication. If the http request does not provide valid
Authorization information, video products would return HTTP status code 401 and information for authentication. Video
products return the required resource only if authorization correct.
For example:
1. When basic authentication fails, response is:
13
Amcrest Technologies LLC | www.amcrest.com
The client encodes the username and password with base64, and then sends it to server. A valid Authorization like this:
The client calculates the digest authorization using information like username, password, nonce, HTTP method and URI
with MD5, and then sends it to server.
For example:
4 General APIs
The requests specified in this section are supported by all video products.
Syntax rtsp://<username>:<password>@<ip>:<port>/cam/realmonitor?channel=<ChannelNo>&subtype=<ty
14
Amcrest Technologies LLC | www.amcrest.com
peNo>
Description
Get real-time media stream.
Example
We request the extra stream 1 of channel 1, the URL is:
rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
Success Return media stream data
Comment
<username>: a valid users username.
<typeNo>: the stream type. The <typeNo> of main stream is 0, extra stream 1 is 1, extra stream 2 is 2.
The extra stream counts can be obtained in GetMaxExtraStreamCounts. If the stream does not exist or
not enabled, response will be error.
It also supplies basic authentication and digest authentication ways. The authentication process is
similar with Authentication.
Syntax rtsp://<username>:<password>@<ip>:<port>/cam/playback?channel=<ChannelNo>&starttime=<starttime>
&endtime=<endtime>
Description
Get playback media stream.
Example rtsp://admin:[email protected]:554/cam/playback?channel=1&starttime=2012_09_15_12_37_05&endti
me=2012_09_15_18_34_14
Success Return media stream data
Comment Its similar with GetRtspStream. Except there are parameters starttime and endtime.
15
Amcrest Technologies LLC | www.amcrest.com
Syntax rtsp://<username>:<password>@<ip>:<port>/<filename>
Description
Get specific file stream.
Example rtsp://admin:[email protected]:554//mnt/sd/2015-09-16/001/dav/20/20.32.08-20.32.28[M][0@0][0].
dav
Success Return media stream data
Comment
Its similar with GetRtspStream.
Syntax http://<server>/cgi-bin/mjpg/video.cgi[?channel=<ChannelNo>&subtype=<typeNo>]
Method GET
Description
Get a video stream encoded by mjpg.
Example
To get a video stream of channel 1, main stream, the URL can be
http://192.168.1.108/cgi-bin/mjpg/video.cgi
or
http://192.168.1.108/cgi-bin/mjpg/video.cgi?channel=1&subtype=0
Success Return
Video stream encoded by MJPG.
For example:
Body:
--<boundary>
16
Amcrest Technologies LLC | www.amcrest.com
Content-Type: image/jpeg
Content-Length:<image size>
--<boundary>
Comment
ChannelNo: integer, the 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:
0-Main Stream
1-Extra Stream 1
2-Extra Stream 2
Syntax http://<server>/cgi-bin/realmonitor.cgi?action=getStream[&channel=<ChannelNo>&subtype=<typeNo
>]
Method GET
Description
Get a video stream.
Example http://192.168.1.108/cgi-bin/realmonitor.cgi?action=getStream&channel=1&subtype=0
Success Return
HTTP Code: 200 OK
Content-Type: Application/octet-stream
Body:
<data>
<data>
Comment
ChannelNo: integer, the video channel index which starts from 1, default 1 if not specified..
0-Main Stream
1-Extra Stream 1
2-Extra Stream 2
17
Amcrest Technologies LLC | www.amcrest.com
Compared to 4.1.1 GetStream using RTSP, it is another way to get stream. This is a way to use http
protocol to get real monitor stream. The data format is shown in appendix.
Syntax http://<server>/cgi-bin/playBack.cgi?action=getStream[&channel=<ChannelNo>&subtype=<typeNo>]
&startTime=<startTime>&endTime=<endTime>
Method GET
Description
Playback stream using http protocol
Example http://192.168.1.108/cgi-bin/playBack.cgi?action=getStream&channel=1&subtype=0&startTime=2012-
10-8%2013:00:01&endTime=2012-10-8%2014:00:01
Success Return
HTTP Code: 200 OK
Content-Type: Application/octet-stream
Body:
streamId=<streamId>\r\n
<data>
<data>
Comment
ChannelNo: integer, the video channel index which starts from 1, default 1 if not specified.
0-Main Stream
1-Extra Stream 1
2-Extra Stream 2
starttime & endtime: video start time and end time. Time format: yyyy-mm-dd hh:mm:ss
Compared to Playback using RTSP, it is another way of get playback stream. This is a way to use http
protocol to get playback stream. The data format is shown in appendix.
18
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/playBack.cgi?action=control&streamId=<streamId>&cmd=<cmd>&<paramNa
me>=<paramValue>[&<paramName>=<paramValue>...]
Method GET
Description
Control the playback stream, used to control the stream which built by action=getStream.
Example http://192.168.1.108/cgi-bin/playBack.cgi?action=control&streamId=0&cmd=play&speed=1&iframe=0
Success Return
Pause/Cancel:
OK
Play:
OK
operateId=1
Comment
cmd=play
speed=<speed>: optional, default speed=1, if speed > 0, play back forward, else if speed < 0, playback
backward(param iframe is ignored, only support iframe playback backward);
seekTime=<seekTime>: seek time, optional, default playback from the stream current point;
cmd=pause
cmd=cancel
operateId: represent current control operation, after control playback, the video extend header will
has same operateid as this value.
19
Amcrest Technologies LLC | www.amcrest.com
4.3 Audio
Syntax http://<server>/cgi-bin/devAudioInput.cgi?action=getCollect
Method GET
Description Get Audio input channel number.
Example http://192.168.1.108/cgi-bin/devAudioInput.cgi?action=getCollect
Success Return
result=1
Syntax http://<server>/cgi-bin/devAudioOutput.cgi?action=getCollect
Method GET
Description Get Audio output channel number.
Example http://192.168.1.108/cgi-bin/devAudioOutput.cgi?action=getCollect
Success Return
result=1
Syntax http://<server>/cgi-bin/audio.cgi?action=postAudio&<paramName>=<paramValue>[&<paramName>
=<paramValue>...]
Method POST
Description Post audio
Example
Example for single part
The URL of transmit a single part, channel 1 audio stream(encoded with G.711 A-law) is:
http://192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=singlepart&channel=1
20
Amcrest Technologies LLC | www.amcrest.com
example:
Content-Length: 9999999
<Audio data>
<Audio data>
The URL of transmit a multipart, channel 1 audio stream(encoded with G.711 A-law) is:
http://192.168.1.108/cgi-bin/audio.cgi?action=postAudio&httptype=multipart&channel=1
example:
--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800
<Audio data>
--<boundary>
Success Return OK
Comment
Params in URL:
21
Amcrest Technologies LLC | www.amcrest.com
MIME Description
Audio/PCM
Audio/ADPCM
Audio/G.711A
Audio/G.711Mu
Audio/G.726
Audio/G.729
Audio/MPEG2
Audio/AMR
Audio/AAC
Syntax http://<server>/cgi-bin/audio.cgi?action=getAudio&<paramName>=<paramValue>[&<paramName>=
<paramValue>...]
Method GET
Description
Get audio
Example
Example for single part
The URL of Request a single part, channel 1 audio stream(encoded with G.711 A-law) is:
http://192.168.1.108/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=1
22
Amcrest Technologies LLC | www.amcrest.com
If the request was successful, the server returns a continuous flow of audio packets. The content type is
only set at the beginning of the connection.
Return:
Body:
<Audio data>
<Audio data>
The URL of Request a multipart, channel 1 audio stream(encoded with G.711 A-law) is:
http://192.168.1.108/cgi-bin/audio.cgi?action=getAudio&httptype=multipart&channel=1
If the request was successful, the server returns a continuous flow of audio packets. The content type is
multipart/x-mixed-replace and each audio packet ends with a boundary string.
Return:
--<boundary>
Content-Type: Audio/G.711A
Content-Length: 800
<Audio data>
--<boundary>
Success Return OK
Comment
Params in URL:
Appendix:
23
Amcrest Technologies LLC | www.amcrest.com
4.4 Snapshot
4.4.1 Snap
Table 4-12
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Snap
Method GET
Description Get Snap config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Snap
Success Return
table.Snap[0].HolidayEnable=false
table.Snap[0].TimeSection[0][0]=6 00:00:00-23:59:59
table.Snap[0].TimeSection[0][1]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[0][2]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[0][3]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[0][4]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[0][5]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[1][0]=6 00:00:00-23:59:59
table.Snap[0].TimeSection[1][1]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[1][2]=0 00:00:00-23:59:59
24
Amcrest Technologies LLC | www.amcrest.com
table.Snap[0].TimeSection[1][3]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[1][4]=0 00:00:00-23:59:59
table.Snap[0].TimeSection[1][5]=0 00:00:00-23:59:59
Comment
Response format:
channel is video channel number, weekday range is [0-6] (Sunday - Saturday). configNo is the index of
time section config. There are many time sections each day.
Table 4-13
Syntax
http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Snap config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Snap[0].TimeSection[0][0]=1%201
2:00:00-18:00:00
Success Return OK
Comment
In below table,
ch = channel index
Appendix:
25
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/snapshot.cgi[?channel=<ChannelNo>]
Method GET
Description Get a snapshot of a video channel.
Example
To get a snapshot of video channel 1, the URL can be
http://192.168.1.108/cgi-bin/snapshot.cgi
or
http://192.168.1.108/cgi-bin/snapshot.cgi?channel=1
Success Return Image of jpg format.
Comment ChannelNo: integer, the video channel index which starts from 1, default 1 if not specified.
Syntax http://<server>/cgi-bin/snapManager.cgi?action=attachFileProc&Flags[0]=Event&Events=[<eventCode>
,<eventCode>,] [&channel=<ChannelNo>]
Method GET
Description Subscribe pictures when that event of code eventCode happens.
Example http://192.168.1.108/cgi-bin/snapManager.cgi?action=attachFileProc&Flags[0]=Event&Events=[VideoM
otion%2CVideoLoss]
26
Amcrest Technologies LLC | www.amcrest.com
Success Return
--<boundary>\r\n
Content-Type: text/plain\r\n
Events[0].Code=TrafficJunction
Events[0].CountInGroup=1
Events[0].IndexInGroup=1
Events[0].Lane=1
Events[0].Data.PTS= 42949485818.0
Events[0].TrafficCar.PlateNumber= A12345
Events[0].TrafficCar. DeviceAddress=
Events[1].Code=TrafficJunction
--<boundary>
Content-Type: image/jpeg
Content-Length:<image size>
--<boundary>
Comment
ChannelNo: integer, the video channel index which starts from 1, default 1 if not specified.
eventCode includes:
27
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream
Method GET
Description Get max extra stream count
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxExtraStream
Success Return table.MaxExtraStream=1
Comment MaxExtraStream: max extra stream numbers. It can be 1, 2 or 3.
Table 4-17
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor
Method GET
Description Get Video Color config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoColor
Success Return
head. Brightness=50
head. Contrast=50
head. Hue=50
head. Saturation=50
head= table.VideoColor[ChannelNo][ColorConfigNo]
0 = Color Config 1
1 = Color Config 2
28
Amcrest Technologies LLC | www.amcrest.com
Table 4-18
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Video Color config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoColor[1][0].Brightness=50
Success Return OK
Comment
In below table, head=VideoColor[ChannelNo][ColorConfigNo]
0 = Color Config 1
1 = Color Config 2
Appendix:
29
Amcrest Technologies LLC | www.amcrest.com
Example:
Syntax http://<server>/cgi-bin/encode.cgi?action=getCaps
Method GET
Description Get encode capabilities.
Example http://192.168.1.108/cgi-bin/encode.cgi?action=getCaps
Success Return
caps.PlaybackCompressSplitNumList[0]=1
caps.PlaybackCompressSplitNumList[1]=2
caps.PlaybackCompressSplitNumList[2]=4
caps.PreviewMode=SplitSnap
caps.VideoEncodeDevices[0].CoverAreaPercent=100
caps.VideoEncodeDevices[0].CoverCount=4
caps.VideoEncodeDevices[0].LadenBitrate=162201600
caps.VideoEncodeDevices[0].MaxCIFPFrameSize=40
caps.VideoEncodeDevices[0].MaxExtraStream=1
caps.VideoEncodeDevices[0].MinCIFPFrameSize=7
caps.VideoEncodeDevices[0].RecordIndividualResolution=true
caps.VideoEncodeDevices[0].SupportIndividualResolution=true
caps.VideoEncodeDevices[0].TitleCount=4
Comment
30
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/encode.cgi?action=getConfigCaps&channel=<ChannelNo>
Method GET
Description
Get encode config capabilities.
Example http://192.168.1.108/cgi-bin/encode.cgi?action=getConfigCaps&channel=1
Success Return
headMain.Video.BitRateOptions=448,2560
headMain.Video.CompressionTypes=H.264,MJPG
headMain.Video.FPSMax=25
headExtra.Video.BitRateOptions=80,448
headExtra.Video.CompressionTypes=H.264,MJPG
headExtra.Video.FPSMax=25
headExtra.Video.ResolutionTypes=D1,CIF
headSnap.Video.CompressionTypes=H.264,MJPG
Params in Response:
headMain= caps[Channel].MainFormat[RecordType]
headExtra = caps[Channel].ExtraFormat[ExtraStream]
headSnap = caps[Channel].SnapFormat[SnapType]
RecordType:
0 = regular record
2 = alarm record
ExtraStream:
31
Amcrest Technologies LLC | www.amcrest.com
0 = extra stream 1
1 = extra stream 2
2 = extra stream 3
SnapType:
0 = regular snapshot
2 = alarm snapshot
BitRateOptions string Before comma is minimum bit rate. (kbps), after comma is maximum bit
rate.(kbps)
BitRateOptions=80,448
32
Amcrest Technologies LLC | www.amcrest.com
33
Amcrest Technologies LLC | www.amcrest.com
34
Amcrest Technologies LLC | www.amcrest.com
"1920x1440" 1920x1440
"2752x2208" 2752x2208
"3840x2160" 3840x2160
"4096x2160" 4096x2160
"3072x2048" 3072x2048
CompressionTypes It contains all supported audio compression types, separated by comma. Range is
string
{PCM, ADPCM, G.711A, G.711Mu, G.726, G.729, MPEG2, AMR}
Table 4-21
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Encode
Method GET
Description Get video encode config.
Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Encode
Success Return
table.Encode[0].MainFormat[0].Audio.Bitrate=64
table.Encode[0].MainFormat[0].Audio.Channels[0]=0
table.Encode[0].MainFormat[0].Audio.Compression=G.711A
table.Encode[0].MainFormat[0].Audio.Depth=16
table.Encode[0].MainFormat[0].Audio.Frequency=8000
table.Encode[0].MainFormat[0].Audio.Mode=0
35
Amcrest Technologies LLC | www.amcrest.com
table.Encode[0].MainFormat[0].Audio.Pack=DHAV
table.Encode[0].MainFormat[0].AudioEnable=true
table.Encode[0].MainFormat[0].Video.resolution=1920x1080
table.Encode[0].MainFormat[0].Video.BitRate=4096
table.Encode[0].MainFormat[0].Video.BitRateControl=CBR
table.Encode[0].MainFormat[0].Video.Compression=H.264
table.Encode[0].MainFormat[0].Video.CustomResolutionName=1080P
table.Encode[0].MainFormat[0].Video.FPS=18
table.Encode[0].MainFormat[0].Video.GOP=36
table.Encode[0].MainFormat[0].Video.Height=1080
table.Encode[0].MainFormat[0].Video.Pack=DHAV
table.Encode[0].MainFormat[0].Video.Profile=High
table.Encode[0].MainFormat[0].Video.Quality=4
table.Encode[0].MainFormat[0].Video.QualityRange=6
table.Encode[0].MainFormat[0].Video.SVCTLayer=1
table.Encode[0].MainFormat[0].Video.Width=1920
table.Encode[0].MainFormat[0].VideoEnable=true
table.Encode[0].MainFormat[1].Audio.Bitrate=64
table.Encode[0].MainFormat[1].Audio.Channels[0]=0
table.Encode[0].MainFormat[1].Audio.Compression=G.711A
table.Encode[0].MainFormat[1].Audio.Depth=16
table.Encode[0].MainFormat[1].Audio.Frequency=8000
table.Encode[0].MainFormat[1].Audio.Mode=0
table.Encode[0].MainFormat[1].Audio.Pack=DHAV
table.Encode[0].MainFormat[1].AudioEnable=true
table.Encode[0].MainFormat[1].Video.resolution=1920x1080
table.Encode[0].MainFormat[1].Video.BitRate=4096
table.Encode[0].MainFormat[1].Video.BitRateControl=CBR
table.Encode[0].MainFormat[1].Video.Compression=H.264
table.Encode[0].MainFormat[1].Video.CustomResolutionName=1080P
table.Encode[0].MainFormat[1].Video.FPS=18
table.Encode[0].MainFormat[1].Video.GOP=36
table.Encode[0].MainFormat[1].Video.Height=1080
table.Encode[0].MainFormat[1].Video.Pack=DHAV
table.Encode[0].MainFormat[1].Video.Profile=High
table.Encode[0].MainFormat[1].Video.Quality=4
table.Encode[0].MainFormat[1].Video.QualityRange=6
table.Encode[0].MainFormat[1].Video.SVCTLayer=1
table.Encode[0].MainFormat[1].Video.Width=1920
table.Encode[0].MainFormat[1].VideoEnable=true
table.Encode[0].MainFormat[2].Audio.Bitrate=64
table.Encode[0].MainFormat[2].Audio.Channels[0]=0
table.Encode[0].MainFormat[2].Audio.Compression=G.711A
table.Encode[0].MainFormat[2].Audio.Depth=16
36
Amcrest Technologies LLC | www.amcrest.com
table.Encode[0].MainFormat[2].Audio.Frequency=8000
table.Encode[0].MainFormat[2].Audio.Mode=0
table.Encode[0].MainFormat[2].Audio.Pack=DHAV
table.Encode[0].MainFormat[2].AudioEnable=true
table.Encode[0].MainFormat[2].Video.resolution=1920x1080
table.Encode[0].MainFormat[2].Video.BitRate=4096
table.Encode[0].MainFormat[2].Video.BitRateControl=CBR
table.Encode[0].MainFormat[2].Video.Compression=H.264
table.Encode[0].MainFormat[2].Video.CustomResolutionName=1080P
table.Encode[0].MainFormat[2].Video.FPS=18
table.Encode[0].MainFormat[2].Video.GOP=36
table.Encode[0].MainFormat[2].Video.Height=1080
table.Encode[0].MainFormat[2].Video.Pack=DHAV
table.Encode[0].MainFormat[2].Video.Profile=High
table.Encode[0].MainFormat[2].Video.Quality=4
table.Encode[0].MainFormat[2].Video.QualityRange=6
table.Encode[0].MainFormat[2].Video.SVCTLayer=1
table.Encode[0].MainFormat[2].Video.Width=1920
table.Encode[0].MainFormat[2].VideoEnable=true
table.Encode[0].MainFormat[3].Audio.Bitrate=64
table.Encode[0].MainFormat[3].Audio.Channels[0]=0
table.Encode[0].MainFormat[3].Audio.Compression=G.711A
table.Encode[0].MainFormat[3].Audio.Depth=16
table.Encode[0].MainFormat[3].Audio.Frequency=8000
table.Encode[0].MainFormat[3].Audio.Mode=0
table.Encode[0].MainFormat[3].Audio.Pack=DHAV
table.Encode[0].MainFormat[3].AudioEnable=true
table.Encode[0].MainFormat[3].Video.resolution=704x576
table.Encode[0].MainFormat[3].Video.BitRate=2048
table.Encode[0].MainFormat[3].Video.BitRateControl=VBR
table.Encode[0].MainFormat[3].Video.Compression=H.264
table.Encode[0].MainFormat[3].Video.FPS=25
table.Encode[0].MainFormat[3].Video.GOP=50
table.Encode[0].MainFormat[3].Video.Height=576
table.Encode[0].MainFormat[3].Video.Pack=DHAV
table.Encode[0].MainFormat[3].Video.Profile=Main
table.Encode[0].MainFormat[3].Video.Quality=4
table.Encode[0].MainFormat[3].Video.QualityRange=6
table.Encode[0].MainFormat[3].Video.SVCTLayer=1
table.Encode[0].MainFormat[3].Video.Width=704
table.Encode[0].MainFormat[3].VideoEnable=true
table.Encode[0].ExtraFormat[0].Audio.Bitrate=64
37
Amcrest Technologies LLC | www.amcrest.com
table.Encode[0].SnapFormat[0].Audio.Bitrate=64
Comment
Params in Response:
Type:
0 = regular encode
2 = alarm encode
3= emergency encode
ExtraStream:
0 = extra stream 1
1 = extra stream 2
2 = extra stream 3
Table 4-22
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set encode config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Encode[1].MainFormat[0].Video.C
ompression=MPEG4
Success Return OK
38
Amcrest Technologies LLC | www.amcrest.com
Comment
Params in URL:
In below table,
head=Encode[Channel].MainFormat[RecordType] (or)
Encode[Channel].ExtraFormat[ExtraStream]
RecordType:
0 = regular record
2 = alarm record
ExtraStream:
0 = extra stream 1
1 = extra stream 2
2 = extra stream 3
head.Video.Compression String Range is {MPEG4, MPEG2, MPEG1, MJPG, H.263, H.264, H.265}
39
Amcrest Technologies LLC | www.amcrest.com
1: worst quality
6: best quality
40
Amcrest Technologies LLC | www.amcrest.com
0: 4.75kbps,
1: 5.15 kbps,
2: 5.9 kbps,
3: 6.7 kbps,
4: 7.4 kbps,
5: 7.95 kbps,
6: 10.2 kbps,
7: 12.2 kbps,
Table 4-23
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoEncodeROI
Method GET
Description Get video encode config of region interested.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoEncodeROI
Success Return head.DynamicTrack=false
Comment Params in Response :
head=table.VideoEncodeROI[ChannelNo]
ChannelNo = array index starts from 0, which means video channel.
Table 4-24
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set video encode config of region interested.
41
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoEncodeROI[0].DynamicTrack=t
rue
Success Return OK
Comment Params in URL:
paramName and paramValue are as below table.
In below table,
head = VideoEncodeROI[ChannelNo]
ChannelNo = array index starts from 0, which means video channel.
Appendix:
Table 4-25
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ChannelTitle
Method GET
Description Get the title of the video channel.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ChannelTitle
Success Return table.ChannelTitle[Channel].Name=CAM1
Comment
Params in Response:
Table 4-26
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>
Method GET
42
Amcrest Technologies LLC | www.amcrest.com
Description
Set the title of the channel.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ChannelTitle[1].Name=test
Success Return OK
Comment
If VideoWidget[Channel].ChannelTitle.EncodeBlend is true, this title is blended to the video frames.
Params in URL:
ChannelTitle[Channel].Name
Channel : array index which means video channel, equals to video channel index -1 and start from 0.
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=getCollect
Method GET
Description Get the video input channel numbers that supported.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCollect
Success Return result=1
Comment -
Syntax http://<server>/cgi-bin/devVideoOutput.cgi?action=getCollect
Method GET
Description Get the video output channel numbers that supported.
Example http://192.168.1.108/cgi-bin/devVideoOutput.cgi?action=getCollect
Success Return result=2
Comment -
43
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxRemoteInputChannels
Method GET
Description Get max remote input channels
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getProductDefinition&name=MaxRemoteInputCha
nnels
Success Return table.MaxRemoteInputChannels=16
Comment MaxRemoteInputChannels: max remote input channels.
Table 4-30
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoStandard
Method GET
Description Get Video Standard config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoStandard
Success Return table.VideoStandard=PAL
Comment -
Table 4-31
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&VideoStandard=<paramValue>
Method GET
Description
Set Video Standard config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoStandard=PAL
Success Return OK
Comment VideoStandard: string, range is {PAL, NTSC} Video Standard.
44
Amcrest Technologies LLC | www.amcrest.com
Table 4-32
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget
Method GET
Description Video Widget config contains Channel Title, Covers and Time Title parameters, defines the background
color, front color and positions of channel title and time title, and defines the regions which are not
visible (cover).
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidget
Success Return
head.BackColor[0]=0
head.BackColor[1]=0
head.BackColor[2]=0
head.BackColor[3]=128
head.EncodeBlend=true
head.FrontColor[0]=255
head.FrontColor[1]=255
head.FrontColor[2]=255
head.FrontColor[3]=0
head.Rect[0]=0
head.Rect[1]=8191
head.Rect[2]=0
head.Rect[3]=8191
Comment
Params in Response:
head=table.VideoWidget[Channel].ChannelTitle (or)
table.VideoWidget[Channel].Covers[CoReg] (or)
table.VideoWidget[Channel].TimeTitle
CoReg: Cover Region, Covers is an array which sustains multi- Cover regions
45
Amcrest Technologies LLC | www.amcrest.com
0 = region 1
1 = region 2
2 = region 3
3 = region 4
Table 4-33
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Video Widget config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidget[1].Covers[0].BackCol
or[0]=128&VideoWidget[1].Covers[0].BackColor[1]=128&VideoWidget[1].Covers[0].BackColor[2]=128
&VideoWidget[1].Covers[0].BackColor[3]=0
Success Return OK
Comment
Params in URL:
In below table,
headChannelTitle = VideoWidget[Channel].ChannelTitle
headCover = VideoWidget[Channel].Covers[CoReg]
headTimeTitle = VideoWidget[Channel].TimeTitle
CoReg: Cover region index. Covers is an array which contains multiple cover regions
0 = region 1
1 = region 2
2 = region 3
3 = region 4
Appendix:
46
Amcrest Technologies LLC | www.amcrest.com
headChannelTitle.BackColor[1]
headChannelTitle.BackColor[2]
headChannelTitle.BackColor[3]
headChannelTitle.EncodeBlend bool
headChannelTitle.FrontColor[0] integer
headChannelTitle.FrontColor[1]
headChannelTitle.FrontColor[2]
headChannelTitle.FrontColor[3]
headChannelTitle.Rect[0] integer Only use the value of (left, top),the value of (right, bottom) is
47
Amcrest Technologies LLC | www.amcrest.com
headChannelTitle.Rect[2] Rect[0], Rect[1] are used, and Rect[2] must be same with
Rect[0], Rect[3] must be same with Rect[1].
headChannelTitle.Rect[3]
headTimeTitle.BackColor[2]
headTimeTitle.BackColor[3]
headTimeTitle.EncodeBlend bool
headTimeTitle.FrontColor[0] integer
headTimeTitle.FrontColor[1]
headTimeTitle.FrontColor[2]
headTimeTitle.FrontColor[3]
headTimeTitle.Rect[0] integer
headTimeTitle.Rect[1]
headTimeTitle.Rect[2]
headTimeTitle.Rect[3]
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=getCaps&channel=<ChannelNo>
Method GET
Description
Get video input capabilities.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCaps&channel=1
Success Return
caps. AutoSyncPhase=false
caps. Backlight=2
48
Amcrest Technologies LLC | www.amcrest.com
caps. BrightnessCompensation=true
caps. ChipID=0
caps. CoverCount=4
caps. CoverType=1
caps. CustomManualExposure=true
caps. DayNightColor=true
caps. DayNightColorIO=0
caps. DoubleExposure=0
caps. DownScaling=false
caps. EEModeRange=100
caps. ElectricFocus=false
caps. Exposure=16
caps. ExposureMode=31
caps. ExternalSyncInput=0
caps. FishEye=false
caps. FlashAdjust=false
caps. Flip=true
caps. FormatCount=5
caps. Gain=true
caps. GainAuto=true
caps. Gamma=true
caps. GammaModeRange=100
caps. GlareInhibition=1
caps. HorizontalBinning=0
caps. IRCUT=true
caps. ImageEnhancement.LevelRange[0]=0
caps. ImageEnhancement.LevelRange[1]=100
caps. ImageEnhancement.Support=true
caps. InfraRed=true
49
Amcrest Technologies LLC | www.amcrest.com
caps. Iris=true
caps. IrisAuto=true
caps. LadenBitrate=972000
caps. LimitedAutoExposure=true
caps. MaxExposureTime=300
caps. MaxExposureTime1=0
caps. MaxHeight=1080
caps. MaxMultiProfile=3
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
caps. SupportProfile=false
caps. SupportWhiteLevel=true
caps. SupportWriteLevel=false
caps. SyncChipChannels=false
caps. SyncFocus=0
caps. TitleCount=4
caps. TridimDenoise=2
caps. TridimDenoiseDetails=0
50
Amcrest Technologies LLC | www.amcrest.com
caps. UTC=0
caps. UpScaling=false
caps. Version=0
caps. VerticalBinning=0
caps. VideoInDenoise.2D.LevelRange[0]=0
caps. VideoInDenoise.2D.LevelRange[1]=100
caps. VideoInDenoise.2D.Support=true
caps. VideoInDenoise.3D.3DAutoType.ModRange[0]=0
caps. VideoInDenoise.3D.3DAutoType.ModRange[1]=100
caps. VideoInDenoise.3D.Support=true
caps. VideoInDenoise.Support=true
caps. WhiteBalance=3
caps. WideDynamicRange=1
Comment
Params in URL:
Params in Response:
Appendix:
51
Amcrest Technologies LLC | www.amcrest.com
DayNightColor bool true: support color alternate between day and night.
DownScaling bool true: support down scaling, binning mode not included.
52
Amcrest Technologies LLC | www.amcrest.com
SignalFormats string Its a string contains supported video input signal formats for
this channel. Signal formats are separated by comma.
1_3M - 1280*960
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=<focusNo>&zoom=<zoomNo>[&
channel=<ChannelNo>]
53
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description
Ajust magnification and the focus.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocus&focus=0.5&zoom=-0.5
Success Return OK
Comment
Params in URL:
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=<focusNo>&zoom=
<zoomNo>[&channel=<ChannelNo>]
Method GET
Description
Adjust magnification and the focus continuously.
Example
If we want to adjust focus, the API like this:
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0.02&zoom=
-1
and when the motor is moving, we send below command to let it stop:
http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=adjustFocusContinuously&focus=0&zoom=-1
Success Return OK
Comment
Params in URL:
The value means the moving speed of motor lens, positive value means move forwards, 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
54
Amcrest Technologies LLC | www.amcrest.com
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.
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=autoFocus[&channel=<ChannelNo>]
Method GET
Description Auto focus.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=autoFocus
Success Return OK
Comment -
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=getFocusStatus[&channel=<ChannelNo>]
Method GET
Description Get device focus status.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getFocusStatus
Success Return
status.Focus=0.5
status.Zoom=0.5
status.Status=Normal
Comment
Params in Response :
The range of status.Status is Normal and Autofocus. This command must be continual executed
until status.Status is Normal.
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=getCurrentWindow&channel=<ChannelNo>
55
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description Get the coordinates of the current window.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=getCurrentWindow&channel=1
Success Return
rect[0]=500
rect[1]=500
rect[2]=5000
rect[3]=5000
Comment
Params in URL:
Params in Response :
Syntax http://<server>/cgi-bin/devVideoInput.cgi?action=setCurrentWindow&channel=<ChannelNo>&rect[0]
=<rect0>&rect[1]=<rect1>&rect[2]=<rect2>&rect[3]=<rect3>
Method GET
Description Set the coordinates of the current window.
Example http://192.168.1.108/cgi-bin/devVideoInput.cgi?action=setCurrentWindow&channel=1&rect[0]=0&re
ct[1]=0&rect[2]=5000&rect[3]=5000
Success Return OK
Comment
Params in URL:
rect0 & rect1 & rect2 & rect3 : relative coordinates, range is 0-8192.{0,0,0,0} top-left,
56
Amcrest Technologies LLC | www.amcrest.com
Table 4-41
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions
Method GET
Description Get Video In Options config, including Backlight, ExposureSpeed, DayNightColor, DayOptions,
NightOptions, NormalOptions and so on.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInOptions
Success Return
head. Backlight=0
head. DayNightColor=false
head. ExposureSpeed=0
head. ExposureValue1=0.100000
head. ExposureValue2=80.000000
head. ExternalSync=0
head. ExternalSyncPhase=0
head. FlashControl.Mode=0
head. FlashControl.Pole=0
head. FlashControl.Value=0
head. FlashControl.PreValue=0
head. Flip=false
head. Gain=50
head. GainAuto=true
head. IrisAuto=false
head. Mirror=false
head. NightOptions.AntiFlicker=0
head. NightOptions.Backlight=0
head. NightOptions.BacklightRegion[0]=3096
head. NightOptions.BacklightRegion[1]=3096
head. NightOptions.BacklightRegion[2]=5096
head. NightOptions.BacklightRegion[3]=5096
head. NightOptions.BrightnessThreshold=50
head. NightOptions.DayNightColor=2
57
Amcrest Technologies LLC | www.amcrest.com
head. NightOptions.ExposureMode=0
head. NightOptions.ExposureSpeed=0
head. NightOptions.ExposureValue1=0
head. NightOptions.ExposureValue2=40
head. NightOptions.ExternalSyncPhase=125
head. NightOptions.Flip=false
head. NightOptions.Gain=50
head. NightOptions.GainAuto=true
head. NightOptions.GainBlue=50
head. NightOptions.GainGreen=50
head. NightOptions.GainMax=50
head. NightOptions.GainMin=0
head. NightOptions.GainRed=50
head. NightOptions.GlareInhibition=0
head. NightOptions.IrisAuto=true
head. NightOptions.Mirror=false
head. NightOptions.Profile=3
head. NightOptions.ReferenceLevel=50
head. NightOptions.Rotate90=0
head. NightOptions.SunriseHour=0
head. NightOptions.SunriseMinute=0
head. NightOptions.SunriseSecond=0
head. NightOptions.SunsetHour=23
head. NightOptions.SunsetMinute=59
head. NightOptions.SunsetSecond=59
head. NightOptions.SwitchMode=4
head. NightOptions.WhiteBalance=Auto
head. NightOptions.WideDynamicRange=0
head. NightOptions.WideDynamicRangeMode=0
58
Amcrest Technologies LLC | www.amcrest.com
head. NormalOptions.AntiFlicker=0
head. NormalOptions.Backlight=0
head. NormalOptions.BacklightRegion[0]=3096
head. NormalOptions.BacklightRegion[1]=3096
head. NormalOptions.BacklightRegion[2]=5096
head. NormalOptions.BacklightRegion[3]=5096
head. NormalOptions.BrightnessThreshold=50
head. NormalOptions.DayNightColor=1
head. NormalOptions.ExposureMode=0
head. NormalOptions.ExposureSpeed=0
head. NormalOptions.ExposureValue1=0
head. NormalOptions.ExposureValue2=40
head. NormalOptions.ExternalSyncPhase=125
head. NormalOptions.Flip=false
head. NormalOptions.Gain=50
head. NormalOptions.GainAuto=true
head. NormalOptions.GainBlue=50
head. NormalOptions.GainGreen=50
head. NormalOptions.GainMax=50
head. NormalOptions.GainMin=0
head. NormalOptions.GainRed=50
head. NormalOptions.GlareInhibition=0
head. NormalOptions.IrisAuto=true
head. NormalOptions.Mirror=false
head. NormalOptions.Profile=0
head. NormalOptions.ReferenceLevel=50
head. NormalOptions.Rotate90=0
head. NormalOptions.SunriseHour=0
head. NormalOptions.SunriseMinute=0
59
Amcrest Technologies LLC | www.amcrest.com
head. NormalOptions.SunriseSecond=0
head. NormalOptions.SunsetHour=23
head. NormalOptions.SunsetMinute=59
head. NormalOptions.SunsetSecond=59
head. NormalOptions.SwitchMode=0
head. ReferenceLevel=50
head. ReferenceLevelEnable=false
head. Rotate90=0
head. SignalFormat=BT656
head. WhiteBalance=Disable
Comment
Params in Response:
head = table.VideoInOptions[ChannelNo]
Table 4-42
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Video In Options config, including Backlight, ExposureSpeed, DayNightColor, DayOptions,
NightOptions, and NormalOptions and so on.
Example
Set Auto Exposure:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode
=0&VideoInOptions[0].ExposureSpeed=0
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode
=1&VideoInOptions[0].ExposureSpeed=0&VideoInOptions[0].GainMin=0&VideoInOptions[0].GainMax
=60
60
Amcrest Technologies LLC | www.amcrest.com
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode
=2&VideoInOptions[0].ExposureSpeed=0&VideoInOptions[0].GainMin=0&VideoInOptions[0].GainMax
=50&VideoInOptions[0].ExposureValue1=0&VideoInOptions[0].ExposureValue2=20
Set Manual:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].ExposureMode
=4&VideoInOptions[0].ExposureSpeed=32&VideoInOptions[0].GainMin=0&VideoInOptions[0].GainMa
x=50&VideoInOptions[0].ExposureValue1=40&VideoInOptions[0].ExposureValue2=40
Set SmartIRExposure:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInOptions[0].SmartIRExposure
=true
Appendix:
61
Amcrest Technologies LLC | www.amcrest.com
0 backlight closed.
1 backlight grade 1
n backlight grade n
0: always multicolor
2: always monochrome
0: AutoExposure
1: Gain first
2: Exposure first
4: Manual.
0: AutoExposure
62
Amcrest Technologies LLC | www.amcrest.com
External Synchronous
0: Internal Synchronization
1: External Synchronous
0: forbid flash
1: always flash
2: auto flash
Trigger mode:
0: low level
1: high level
2: rising-edge
3: falling-edge
Flashlight time-unit:
0 - 0us,
1 - 64us,
2 - 128us,
3 192us
...
63
Amcrest Technologies LLC | www.amcrest.com
15 - 960us
If GainAuto is true, its upper limit of auto gain, else its the fixed gain
adjust value.
false: No GainAuto
false: No IrisAuto
64
Amcrest Technologies LLC | www.amcrest.com
Video rotation:
0: No rotate
1: clockwise rotate 90
2: anticlockwise rotate 90
head. SignalFormat String Range is {Inside, BT656, 720p, 1080p, 1080i, 1080sF}
AntiFlicker mode:
0: Outdoor
1: 50 Hz AntiFlicker
2: 60 Hz AntiFlicker
GlareInhibition:
0: Close GlareInhibition.
head. integer NightOptions contain a set of parameters used when brightness is not
NightOptions.BrightnessThreshold enough.
Range is [0-100]
false: No IrisAuto
65
Amcrest Technologies LLC | www.amcrest.com
Sunrise hour.
Sunrise minute
Sunrise second
head. NightOptions.SunsetHour integer Sunset time. Its range is same with sunrise time, and it should be
after sunrise time.
head. NightOptions.SunsetMinute integer
NightOptions are used if time is after sunset time and before sunrise
time.
head. NightOptions.SunsetSecond integer
3: depends on head.NightOptions.SwitchMode
head. integer Range is the same as relevant items of day options in this table.
NightOptions.ExposureSpeed
Example:
head. float
66
Amcrest Technologies LLC | www.amcrest.com
NightOptions.ExposureValue2
head. integer
NightOptions.ExternalSyncPhase
67
Amcrest Technologies LLC | www.amcrest.com
head. integer
NormalOptions.SunriseMinute
head. integer
NormalOptions.SunriseSecond
head. integer
NormalOptions.SunsetMinute
head. integer
NormalOptions.SunsetSecond
head. integer
NormalOptions.ExposureSpeed
head. float
NormalOptions.ExposureValue1
head. float
NormalOptions.ExposureValue2
head. String
NormalOptions.WhiteBalance
head. integer
NormalOptions.ReferenceLevel
head. integer
NormalOptions.ExternalSyncPhase
68
Amcrest Technologies LLC | www.amcrest.com
head. integer
NormalOptions.DayNightColor
head. integer
NormalOptions.ExposureMode
head. integer
NormalOptions.GlareInhibition
Table 4-43
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoOut
Method GET
Description Get Video Out config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoOut
Success Return
head.Margin[0]=0
head.Margin[1]=0
head.Margin[2]=0
head.Margin[3]=0
head.Color.Brightness=50
69
Amcrest Technologies LLC | www.amcrest.com
head.Mode. Height=600
Comment
Params in Response:
head = table.VideoOut[channel].
Table 4-44
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Video Out config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&table.VideoOut[1].Color.Brightness
=50
Success Return OK
Comment
Params in URL:
In below table,
head = table.VideoOut[channel].
Appendix:
70
Amcrest Technologies LLC | www.amcrest.com
head. Margin[1]
head. Margin[2]
head. Margin[3]
head. Mode.Height=600
4.6 System
4.6.1 General
Table 4-45
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=General
Method GET
Description Get General config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=General
Success Return
table.General.MachineName=Test001
71
Amcrest Technologies LLC | www.amcrest.com
table.General. LocalNo=8
Table 4-46
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set General config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&General.MachineName=MyIPC
Success Return OK
Comment -
Appendix:
Syntax http://<server>/cgi-bin/global.cgi?action=getCurrentTime
Method GET
Description Get current time.
Example http://192.168.1.108/cgi-bin/global.cgi?action=getCurrentTime
Success Return result = 2011-7-3 21:02:32
Comment The time format is "Y-M-D H-m-S". Its not be effected by Locales. TimeFormat in SetLocalesConfig.
72
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/global.cgi?action=setCurrentTime&time=2011-7-3%2021:02:32
Method GET
Description Set current time.
Example http://192.168.1.108/cgi-bin/global.cgi?action=setCurrentTime&time=2016-01-01%2021:02:32
Success Return OK
Comment The time format is "Y-M-D H-m-S". Its not be effected by Locales. TimeFormat in SetLocalesConfig.
4.6.4 Locales
Table 4-49
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Locales
Method GET
Description Get Locales config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Locales
Success Return
table.Locales.DSTEnable=false
table.Locales.DSTEnd.Day=1
table.Locales.DSTEnd.Hour=0
table.Locales.DSTEnd.Minute=0
table.Locales.DSTEnd.Month=1
table.Locales.DSTEnd.Week=2
table.Locales.DSTEnd.Year=2011
table.Locales.DSTStart.Day=0
table.Locales.DSTStart.Hour=0
table.Locales.DSTStart.Minute=0
table.Locales.DSTStart.Month=1
table.Locales.DSTStart.Week=1
table.Locales.DSTStart.Year=2011
73
Amcrest Technologies LLC | www.amcrest.com
table.Locales.TimeFormat=yyyy-MM-dd HH:mm:ss
Comment -
Table 4-50
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Locales config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Locales.DSTEnable=false
Success Return OK
Comment -
Appendix:
74
Amcrest Technologies LLC | www.amcrest.com
Locales.DSTStart.Minute
Locales.DSTStart.Month
Locales.DSTStart.Week
Locales.DSTStart.Year
Example:
yyyy-MM-dd HH:mm:ss or
MM-dd-yyyy HH:mm:ss or
dd-M-yy hh:mm:ss
75
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getLanguageCaps
Method GET
Description Get the list of supported languages.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getLanguageCaps
Success Return Languages=SimpChinese,English,French
Comment
response is a string contains languages with comma separated.
Languages include
4.6.6 Language
Table 4-52
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Language
Method GET
Description Get system language config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Language
Success Return table.Language=SimpChinese
Comment -
Table 4-53
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set system language config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Language=SimpChinese
Success Return OK
Comment NOTE: After changing language setting, system will automatically reboot!
76
Amcrest Technologies LLC | www.amcrest.com
Appendix:
Table 4-54
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AccessFilter
Method GET
Description Get Access Filter config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AccessFilter
Success Return
table.AccessFilter.BannedList[bannedIndex]=10.6.10.1
table.AccessFilter. TrustList[trustIndex]=1.2.3.4
table.AccessFilter.Enable=false
table.AccessFilter.Type=BannedList
Comment
Params in Response:
Table 4-55
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Access Filter config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AccessFilter.BannedList[0]=192.16
8.1.1&AccessFilter.Type=BannedList
Success Return OK
Comment
Params in Response:
77
Amcrest Technologies LLC | www.amcrest.com
In below table,
Appendix:
Table 4-56
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AutoMaintain
Method GET
Description Get Auto Maintain config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AutoMaintain
Success Return
table.AutoMaintain. AutoRebootDay=3
table.AutoMaintain. AutoRebootHour=0
table.AutoMaintain. AutoRebootMinute=0
table.AutoMaintain. AutoShutdownDay=1
table.AutoMaintain. AutoShutdownHour=0
78
Amcrest Technologies LLC | www.amcrest.com
table.AutoMaintain. AutoShutdownMinute=0
table.AutoMaintain. AutoStartUpDay=1
table.AutoMaintain. AutoStartUpHour=2
table.AutoMaintain. AutoStartUpMinute=0
Comment -
Table 4-57
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Auto Maintain config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AutoMaintain.AutoRebootDay=7
Success Return OK
Comment -
Appendix:
0- 6 = Sunday-Saturday
79
Amcrest Technologies LLC | www.amcrest.com
AutoMaintain.
AutoShutdownMinute
AutoMaintain. AutoStartUpMinute
Table 4-58
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Holiday
Method GET
Description Get holiday config for record or snap.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Holiday
Success Return
table.Holiday.MonthMask[0]=3
table.Holiday.MonthMask[1]=0
table.Holiday.MonthMask[2]=0
table.Holiday.MonthMask[3]=0
table.Holiday.MonthMask[4]=0
table.Holiday.MonthMask[5]=0
table.Holiday.MonthMask[6]=0
table.Holiday.MonthMask[7]=0
table.Holiday.MonthMask[8]=0
table.Holiday.MonthMask[9]=1610612739
table.Holiday.MonthMask[10]=0
table.Holiday.MonthMask[11]=0
Comment -
80
Amcrest Technologies LLC | www.amcrest.com
Table 4-59
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set holiday config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Holiday.MonthMask[0]=3
Success Return OK
Comment
Params in URL:
In below table,
monthIndex presents the index of a month. 0 presents January, 1 presents February, 11 presents
December.
Appendix:
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getDeviceType
Method GET
Description Gets the device type displaying which is not the true type.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getDeviceType
Success Return type=DVR
Comment -
81
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getHardwareVersion
Method GET
Description Get the device hardware version.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getHardwareVersion
Success Return version=1.00
Comment -
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getSerialNo
Method GET
Description Get the device serial number.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getSerialNo
Success Return sn=YZC0GZ05100020
Comment -
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getMachineName
Method GET
Description Get the device machine name.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getMachineName
Success Return name=YZC0GZ05100020
Comment -
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getSystemInfo
82
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description Get the system information.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getSystemInfo
Success Return
serialNumber= PA1FQ15900207
deviceType=27
processor= ST7108
Comment -
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getVendor
Method GET
Description Get the Vendor information.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getVendor
Success Return vendor=TTT
Comment -
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getSoftwareVersion
Method GET
Description Get the software information.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getSoftwareVersion
Success Return version=2.212.0000.0.R,build:2013-11-14
Comment -
Syntax http://<server>/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=Onvif
Method GET
Description Get Onvif version.
83
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=Onvif
Success Return version=2.4.2
Comment -
Syntax http://<server>/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=CGI
Method GET
Description Get CGI version.
Example http://192.168.1.108/cgi-bin/IntervideoManager.cgi?action=getVersion&Name=CGI
Success Return version=2.0.0
Comment -
Syntax http://<server>/cgi-bin/magicBox.cgi?action=getDeviceClass
Method GET
Description Get the Device Class.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=getDeviceClass
Success Return class=HDVR
Comment -
Table 4-70
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=UserGlobal
Method GET
Description Get User Global config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=UserGlobal
Success Return table.UserGlobal.OnvifLoginCheck=false
84
Amcrest Technologies LLC | www.amcrest.com
Comment If OnvifLoginCheck is false, you can get Onvif service directly; if true, you should enter your
ID/username and password.
Table 4-71
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCheck=<flag>
Method GET
Description Enable Onvif login check or not.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&UserGlobal.OnvifLoginCheck=true
Success Return OK
Comment
Params in URL:
Syntax http://<server>/cgi-bin/Config.backup?action=All
Method GET
Description Download all the settings of a device as a file named Config. Backup default.
Example http://192.168.1.108/cgi-bin/Config.backup?action=All
Success Return
HTTP/1.1 200 OK
CONTENT-LENGTH: 743087
CONNECTION: close
"ATM" : {
"DataSource" : "RS232",
"DisplayPostion" : "lefttop",
"EncodeBlend" : true,
"PreviewBlend" : true,
85
Amcrest Technologies LLC | www.amcrest.com
"ProtocolAbility" : [ "POS" ],
"ProtocolName" : "ATM\/POS",
"RecordChannels" : [ 0, 1, 2, 3 ]
}
Comment -
Syntax http://<server>/cgi-bin/configManager.cgi?action=restore&names[0]=<xxx>&names[1]=<yyy>[&...]
Method GET
Description Restore config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=restore&names[0]=UPnP
Success Return OK
Comment
Params in URL:
Syntax http://<server>/cgi-bin/configManager.cgi?action=restoreExcept&names[0]=<xxx>&names[1]=<yyy>[
&...]
Method GET
Description
Restore all config except several.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=restoreExcept&names[0]=UPnP
Success Return OK
Comment
Params in URL:
All the config file but xxx and yyy will be restored.
86
Amcrest Technologies LLC | www.amcrest.com
4.6.24 Reboot
Table 4-75
Syntax
http://<server>/cgi-bin/magicBox.cgi?action=reboot[&delay=<paramValue>]
Method GET
Description Reboot the device
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=reboot
Success Return OK
Comment If successful, response OK. If fail, response Error.
4.6.25 Shutdown
Table 4-76
Syntax http://<server>/cgi-bin/magicBox.cgi?action=shutdown
Method GET
Description Shutdown the device.
Example http://192.168.1.108/cgi-bin/magicBox.cgi?action=shutdown
Success Return OK
Comment If successful, response OK. If fail, response Error.
4.7 Network
Syntax http://<server>/cgi-bin/netApp.cgi?action=getInterfaces
Method GET
Description Get all of the system network interfaces.
Example http://192.168.1.108/cgi-bin/netApp.cgi?action=getInterfaces
Success Return
netInterface[0].Name=eth0
netInterface[0].Type=Normal
87
Amcrest Technologies LLC | www.amcrest.com
netInterface[0].Valid=true
Comment
result item value:
3G - 3G network interface
Table 4-78
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Network
Method GET
Description Get network basic config. Basic config contains basic network parameters (Default interface, domain
name, host name), and configuration of each network interface.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Network
Success Return
table.Network.DefaultInterface=eth0
table.Network.Domain=ttt
table.Network.Hostname=badak
table.Network.interface.DefaultGateway=10.7.0.1
table.Network.interface.DhcpEnable=false
88
Amcrest Technologies LLC | www.amcrest.com
table.Network.interface.DnsServers[0]=221.123.33.228
table.Network.interface.DnsServers[1]=221.12.1.228
table.Network.interface.IPAddress=10.7.2.3
table.Network.interface.MTU=1500
table.Network.interface.PhysicalAddress=00:10:5c:f2:1c:b4
table.Network.interface.SubnetMask=255.255.0.0
Comment interface in response is network interface name, such as eth0, eth2
Table 4-79
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set network basic config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetWork.Domain=ttt&NetWork.et
h0.DhcpEnable=true
Success Return OK
Comment interface in below ParamName is network interface name, such as eth0, eth2
Appendix:
89
Amcrest Technologies LLC | www.amcrest.com
xx:xx:xx:xx:xx:xx.
Example:
00:10:5c:f2:1c:b4
00:10:5C:F2:1C:B5
Example:
255.255.255.0
4.7.3 PPPoE
Table 4-80
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=PPPoE
Method GET
Description Get PPPoE config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=PPPoE
Success Return
table.PPPoE.Enable=false
table.PPPoE.Password=123456
table.PPPoE.UserName=123456
90
Amcrest Technologies LLC | www.amcrest.com
Comment -
Table 4-81
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set PPPoE config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&PPPoE.UserName=user1&PPPoE.P
assword=123456
Success Return OK
Comment -
Appendix:
4.7.4 DDNS
Table 4-82
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=DDNS
Method GET
Description Get DDNS config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=DDNS
Success Return
table.DDNS[index].Address=www.ttt.com
table.DDNS[index].Enable=true
91
Amcrest Technologies LLC | www.amcrest.com
table.DDNS[index].HostName=www.ttt.com
table.DDNS[index].KeepAlive=10
table.DDNS[index].Password=none
table.DDNS[index].Port=5050
table.DDNS[index].UserName=user1
table.DDNS[index].DefaultHostName.Enable=false
table.DDNS[index].DefaultHostName.HostName=9002A9D77133.quickddns.com
Comment
index in response is the DDNS protocol table index, start from 0.
Table 4-83
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set DDNS config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&DDNS[0].Address=www.ttt.com&D
DNS[0].Enable=true
Success Return OK
Comment index in below ParamName is the DDNS protocol table index, start from 0.
Appendix:
92
Amcrest Technologies LLC | www.amcrest.com
Unit is minutes.
4.7.5 Email
Table 4-84
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Email
Method GET
Description Get Email config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Email
Success Return
table.Email.Address=www.ttt.com
table.Email.Anonymous=true
93
Amcrest Technologies LLC | www.amcrest.com
table.Email.AttachEnable=true
table.Email.AttachmentEnable=true
table.Email.Enable=true
table.Email.HealthReport.Enable=false
table.Email.HealthReport.Interval=61
table.Email.Password=123456
table.Email.Port=26
table.Email.Receivers[0][email protected]
table.Email.Receivers[1][email protected]
table.Email.Receivers[2][email protected]
table.Email.SslEnable=false
table.Email.Title=DVRMessage
table.Email.UserName=anonymity
Comment -
Table 4-85
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Email config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Email.Address=mail.ttt.com&Email
.Anonymous=false
Success Return OK
Comment -
Appendix:
94
Amcrest Technologies LLC | www.amcrest.com
Unit is minutes
4.7.6 WLan
Table 4-86
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=WLan
Method GET
95
Amcrest Technologies LLC | www.amcrest.com
table.WLan.eth2.Encryption=off
table.WLan.eth2.KeyFlag=false
table.WLan.eth2.KeyID=0
table.WLan.eth2.KeyType=Hex
table.WLan.eth2.Keys[0]=password1
table.WLan.eth2.Keys[1]=password2
table.WLan.eth2.Keys[2]=password3
table.WLan.eth2.Keys[3]=password4
table.WLan.eth2.LinkMode=Auto
table.WLan.eth2.SSID=ttt
Comment -
Table 4-87
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set WLan config.
Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&WLan.eth2.Enable=true&WLan.eth
2.KeyType=Hex
Success Return OK
Comment In below ParamName, interface is name of wireless interface.
Appendix:
96
Amcrest Technologies LLC | www.amcrest.com
Encryption mode.
0: WLan.interface.Keys[0] is used.
WLan.interface.Keys[2] string
For HEX key type: 64bits encryption key length
WLan.interface.Keys[3] string is 10, 128bits encryption key length is 26,
consists of [0-9, a-z, A-Z]
WLan.interface.SSID string
Syntax http://<server>/cgi-bin/wlan.cgi?action=scanWlanDevices&<paramName>=<paramValue>[&<param
Name>=<paramValue>...]
97
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description
Search Wi-Fi device information
wlanDevice[0].ApConnected=0
wlanDevice[0].ApMaxBitRate=54000000
wlanDevice[0].ApNetWorkType=255
wlanDevice[0].AuthMode=7
wlanDevice[0].BSSID=28:2c:b2:5c:de:36
wlanDevice[0].EncrAlgr=3
wlanDevice[0].LinkMode=0
wlanDevice[0].LinkQuality=31
wlanDevice[0].RSSIQuality=0
Appendix:
SSID string Specified SSID, if not include any SSID, all Wi-Fi
information will be searched and displayed.
4.7.8 UPnP
Table 4-89
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=UPnP
Method GET
Description Get UPnP config.
98
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=UPnP
Success Return
table.UPnP.Enable=true
table.UPnP.MapTable[index].Enable=true
table.UPnP.MapTable[index].InnerPort=80
table.UPnP.MapTable[index].OuterPort=8080
table.UPnP.MapTable[index].Protocol=TCP
table.UPnP.MapTable[index].ServiceName=HTTP
Comment index in response is the UPNP map table index, start from 0.
Table 4-90
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set UPnP config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&UPnP.Enable=true&UPnP.MapTabl
e[0].Protocol=TCP
Success Return OK
Comment index in below ParamName is UPNP map table index, range is [0-255]
Appendix:
99
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/netApp.cgi?action=getUPnPStatus
Method GET
Description Get UPnP Status.
Example http://192.168.1.108/cgi-bin/netApp.cgi?action=getUPnPStatus
Success Return
status.InnerAddress=0.0.0.0
status.OuterAddress=0.0.0.0
status.PortMapStatus[0]=Failed
status.PortMapStatus[1]=Failed
status.PortMapStatus[2]=Failed
status.PortMapStatus[3]=Failed
status.Status=Unknown
status.Working=false
Comment -
4.7.10 NTP
Table 4-92
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=NTP
Method GET
Description Get NTP config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=NTP
Success Return
table.NTP.Address=clock.isc.org
100
Amcrest Technologies LLC | www.amcrest.com
table.NTP.Enable=false
table.NTP.Port=38
table.NTP.TimeZone=9
table.NTP.UpdatePeriod=31
Comment -
Table 4-93
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set NTP config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NTP.Address=time.ttt.com&NTP.E
nable=true
Success Return OK
Comment -
4.7.11 RTSP
Table 4-94
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=RTSP
Method GET
Description Get RTSP config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RTSP
Success Return
table.RTSP.Enable=true
table.RTSP.Port=554
table.RTSP.RTP.EndPort=40000
table.RTSP.RTP.StartPort=20000
Comment -
101
Amcrest Technologies LLC | www.amcrest.com
Table 4-95
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set RTSP config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RTSP.Enable=true&RTSP.Port=554
Success Return OK
Comment -
Appendix:
4.7.12 Telnet
Table 4-96
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Telnet
Method GET
Description Get Telnet config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Telnet
Success Return table.Telnet.Enable=true
Comment -
102
Amcrest Technologies LLC | www.amcrest.com
Table 4-97
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Telnet config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Telnet.Enable=true
Success Return OK
Comment -
Appendix:
Table 4-98
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AlarmServer
Method GET
Description Get AlarmServer config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AlarmServer
Success Return
table.AlarmServer.Address=10.7.8.9
table.AlarmServer.Enable=false
table.AlarmServer.Password=
table.AlarmServer.Port=8888
table.AlarmServer.Protocol=ttt
table.AlarmServer.ReportTime=02:00:00
table.AlarmServer.ReportWeekDay=2
table.AlarmServer.UserName=admin
103
Amcrest Technologies LLC | www.amcrest.com
Comment -
Table 4-99
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Alarm Server config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AlarmServer.Address=as.ttt.com&
AlarmServer.Enable=false
Success Return OK
Comment -
Appendix:
Table 4-100
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect
Method GET
104
Amcrest Technologies LLC | www.amcrest.com
Description Motion Detect config of a video channel contains Enable, MotionDetectWindow and EventHandler.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect
Success Return table.MotionDetect[0].Enable=false
table.MotionDetect[0].EventHandler.AlarmOut=1
table.MotionDetect[0].EventHandler.AlarmOutChannels[0]=0
table.MotionDetect[0].EventHandler.AlarmOutEnable=true
table.MotionDetect[0].EventHandler.AlarmOutLatch=10
table.MotionDetect[0].EventHandler.BeepEnable=false
table.MotionDetect[0].EventHandler.Dejitter=5
table.MotionDetect[0].EventHandler.Delay=0
table.MotionDetect[0].EventHandler.ExAlarmOut=1
table.MotionDetect[0].EventHandler.ExAlarmOutChannels[0]=0
table.MotionDetect[0].EventHandler.ExAlarmOutEnable=false
table.MotionDetect[0].EventHandler.FlashEnable=false
table.MotionDetect[0].EventHandler.FlashLatch=10
table.MotionDetect[0].EventHandler.LogEnable=true
table.MotionDetect[0].EventHandler.MailEnable=false
table.MotionDetect[0].EventHandler.Matrix=1
table.MotionDetect[0].EventHandler.MatrixChannels[0]=0
table.MotionDetect[0].EventHandler.MatrixEnable=false
table.MotionDetect[0].EventHandler.MessageEnable=false
table.MotionDetect[0].EventHandler.PtzLink[0][0]=None
table.MotionDetect[0].EventHandler.PtzLink[0][1]=1
table.MotionDetect[0].EventHandler.PtzLinkEnable=false
table.MotionDetect[0].EventHandler.Record=1
table.MotionDetect[0].EventHandler.RecordChannels[0]=0
table.MotionDetect[0].EventHandler.RecordEnable=true
table.MotionDetect[0].EventHandler.RecordLatch=10
table.MotionDetect[0].EventHandler.Snapshot=1
table.MotionDetect[0].EventHandler.SnapshotChannels[0]=0
table.MotionDetect[0].EventHandler.SnapshotEnable=false
table.MotionDetect[0].EventHandler.TimeSection[0][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[0][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[1][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][0]=1 00:00:00-23:59:59
105
Amcrest Technologies LLC | www.amcrest.com
table.MotionDetect[0].EventHandler.TimeSection[2][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[2][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[3][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[4][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[5][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][0]=1 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][1]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][2]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][3]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][4]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TimeSection[6][5]=0 00:00:00-23:59:59
table.MotionDetect[0].EventHandler.TipEnable=false
table.MotionDetect[0].EventHandler.Tour=1
table.MotionDetect[0].EventHandler.TourChannels[0]=0
table.MotionDetect[0].EventHandler.TourEnable=false
table.MotionDetect[0].EventHandler.Voice.AudioFileName=
table.MotionDetect[0].EventHandler.VoiceEnable=false
table.MotionDetect[0].MotionDetectWindow[0].Id=0
table.MotionDetect[0].MotionDetectWindow[0].Name=Region1
table.MotionDetect[0].MotionDetectWindow[0].Region[0]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[1]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[2]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[3]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[4]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[5]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[6]=4194303
106
Amcrest Technologies LLC | www.amcrest.com
table.MotionDetect[0].MotionDetectWindow[0].Region[7]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[8]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[9]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[10]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[11]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[12]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[13]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[14]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[15]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[16]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Region[17]=4194303
table.MotionDetect[0].MotionDetectWindow[0].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[0].Threshold=5
table.MotionDetect[0].MotionDetectWindow[0].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[0].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[0].Window[2]=8191
table.MotionDetect[0].MotionDetectWindow[0].Window[3]=8191
table.MotionDetect[0].MotionDetectWindow[1].Id=1
table.MotionDetect[0].MotionDetectWindow[1].Name=Region2
table.MotionDetect[0].MotionDetectWindow[1].Region[0]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[1]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[2]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[3]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[4]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[6]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[7]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[9]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[10]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[11]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[12]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[13]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[14]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[15]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[1].Region[17]=0
table.MotionDetect[0].MotionDetectWindow[1].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[1].Threshold=5
table.MotionDetect[0].MotionDetectWindow[1].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[2]=0
table.MotionDetect[0].MotionDetectWindow[1].Window[3]=0
table.MotionDetect[0].MotionDetectWindow[2].Id=2
107
Amcrest Technologies LLC | www.amcrest.com
table.MotionDetect[0].MotionDetectWindow[2].Name=Region3
table.MotionDetect[0].MotionDetectWindow[2].Region[0]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[1]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[2]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[3]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[4]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[6]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[7]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[9]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[10]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[11]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[12]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[13]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[14]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[15]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[16]=0
table.MotionDetect[0].MotionDetectWindow[2].Region[17]=0
table.MotionDetect[0].MotionDetectWindow[2].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[2].Threshold=5
table.MotionDetect[0].MotionDetectWindow[2].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[2].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[2].Window[2]=0
table.MotionDetect[0].MotionDetectWindow[2].Window[3]=0
table.MotionDetect[0].MotionDetectWindow[3].Id=3
table.MotionDetect[0].MotionDetectWindow[3].Name=Region4
table.MotionDetect[0].MotionDetectWindow[3].Region[0]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[1]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[2]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[3]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[4]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[5]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[6]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[7]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[8]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[9]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[10]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[11]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[12]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[13]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[14]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[15]=0
table.MotionDetect[0].MotionDetectWindow[3].Region[16]=0
108
Amcrest Technologies LLC | www.amcrest.com
table.MotionDetect[0].MotionDetectWindow[3].Region[17]=0
table.MotionDetect[0].MotionDetectWindow[3].Sensitive=60
table.MotionDetect[0].MotionDetectWindow[3].Threshold=5
table.MotionDetect[0].MotionDetectWindow[3].Window[0]=0
table.MotionDetect[0].MotionDetectWindow[3].Window[1]=0
table.MotionDetect[0].MotionDetectWindow[3].Window[2]=0
table.MotionDetect[0].MotionDetectWindow[3].Window[3]=0
table.MotionDetect[0].OsdTwinkleEnable=false
table.MotionDetect[0].PirMotionLevel=3
Comment -
Table 4-101
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Motion Detect config.
Example Enable motion detection:
http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MotionDetect[0].Enable=true
Success Return OK
Comment
In below table,
head = MotionDetect[Channel]
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
109
Amcrest Technologies LLC | www.amcrest.com
WinNum
Index of detect window, there are 4 detect windows at present. Each window is divided into 18
lines and 22 blocks per line.
Appendix:
Example:
110
Amcrest Technologies LLC | www.amcrest.com
monitored.
MotionDetect [0].Region [17] = 3: the left two blocks in the last line of
channel 0 is monitored.
4.9 Event
Table 4-102
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=<handlerName>
Method GET
Description
Get EventHandler settings.
Example
http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Alarm[0].EventHandler
Success Return
handlerName.EventHandler.AlarmOutChannels[0]=1
handlerName.EventHandler.AlarmOutChannels[1]=1
handlerName.EventHandler.AlarmOutEnable=false
handlerName.EventHandler.AlarmOutLatch=10
handlerName.EventHandler.BeepEnable=true
handlerName.EventHandler.Dejitter=0
handlerName.EventHandler.Delay=30
handlerName.EventHandler.LogEnable=true
handlerName.EventHandler.MailEnable=true
handlerName.EventHandler.PtzLink[0][0]=None
handlerName.EventHandler.PtzLink[0][1]=0
handlerName.EventHandler.PtzLink[1][0]=None
111
Amcrest Technologies LLC | www.amcrest.com
handlerName.EventHandler.PtzLink[1][1]=0
handlerName.EventHandler.PtzLinkEnable=false
handlerName.EventHandler.RecordChannels[0]=1
handlerName.EventHandler.RecordChannels[1]=1
handlerName.EventHandler.RecordEnable=true
handlerName.EventHandler.RecordLatch=10
handlerName.EventHandler.SnapshotChannels[0]=1
handlerName.EventHandler.SnapshotChannels[1]=1
handlerName.EventHandler.SnapshotEnable=false
handlerName.EventHandler.SnapshotPeriod=3
handlerName.EventHandler.SnapshotTimes=0
handlerName.EventHandler.TimeSection[0][0]=1 01:00:00-24:00:00
handlerName.EventHandler.TimeSection[0][1]=1 01:00:00-24:00:00
handlerName.EventHandler.TimeSection[6][5]=1 01:00:00-24:00:00
handlerName.EventHandler.TipEnable=true
handlerName.EventHandler. ExAlarmOutEnable=true
handlerName.ExAlarmOutChannels[0] =2
handlerName.ExAlarmOutChannels[1]=3
Comment
Params in URL:
Alarm[Channel].EventHandler
112
Amcrest Technologies LLC | www.amcrest.com
Table 4-103
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Modify Event Handler settings.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Alarm[0].EventHandler.AlarmOutC
hannels[0]=1&Alarm[0].EventHandler.AlarmOutEnable=true
Success Return OK
Comment In below paramName, Meaning of handlerName is the same with GetEventHandler.
Appendix:
113
Amcrest Technologies LLC | www.amcrest.com
If PtzLink[ch]][0] is
114
Amcrest Technologies LLC | www.amcrest.com
snapshot.
Example:
TimeSection[1][0]=1 12:00:00-18:00:00
Table 4-104
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Alarm
Method GET
Description Get Alarm Config.
115
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Alarm
Success Return
table.Alarm[0].Enable=false
table.Alarm[0].Name=Door1
table.Alarm[0].SensorType=NC
table.Alarm[1].
Comment -
Table 4-105
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Alarm Config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&Alarm[0].Enable=true
Success Return OK
Comment
In below ParamName, input is external alarm input channel.
EventHandler defines parameter of relevant actions when alarm or event happens. Its also used in
following sections about events.
Appendix:
116
Amcrest Technologies LLC | www.amcrest.com
Table 4-106
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=AlarmOut
Method GET
Description Get Alarm Out config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=AlarmOut
Success Return
table.AlarmOut[alarmOutChannel].Mode=0
table.AlarmOut[alarmOutChannel].Name=Beep
Comment
Params in Response:
Table 4-107
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Alarm Out config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&AlarmOut[0].Mode=0&AlarmOut[0
].Name=port1
Success Return OK
Comment port in below ParamName is alarm out port index, start form 0.
Appendix:
0: automatically alarm
117
Amcrest Technologies LLC | www.amcrest.com
1: force alarm
2: close alarm
Syntax http://<server>/cgi-bin/alarm.cgi?action=getInSlots
Method GET
Description Get alarm input channel number.
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getInSlots
Success Return result=2
Comment -
Syntax http://<server>/cgi-bin/alarm.cgi?action=getOutSlots
Method GET
Description Get alarm output channel number.
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getOutSlots
Success Return result=1
Comment -
Syntax http://<server>/cgi-bin/alarm.cgi?action=getInState
Method GET
Description Get alarm input state for all channels.
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getInState
Success Return result=3
Comment A bit in the response result indicates a channel alarm states, result 3 means alarm channel 1 and
118
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/alarm.cgi?action=getOutState
Method GET
Description Get alarm output state for all channels.
Example http://192.168.1.108/cgi-bin/alarm.cgi?action=getOutState
Success Return result=0
Comment A bit in the response result indicates a channel, result 1 means alarm is present.
Table 4-112
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=BlindDetect
Method GET
Description Get Blind Detect config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=BlindDetect
Success Return
head. Enable=false
head. Level=3
Comment
Params in Response:
head= table.BlindDetect[Channel]
Table 4-113
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
119
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description Set Blind Detect config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&BlindDetect[0].Enable=true
Success Return OK
Comment
Params in URL:
In below table,
head= BlindDetect[Channel]
Appendix:
1: lowest sensitivity.
6: highest sensitivity.
Table 4-114
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=LossDetect
Method GET
Description Get Loss Detect config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=LossDetect
Success Return
head. Enable=false
120
Amcrest Technologies LLC | www.amcrest.com
Comment
Params in Response:
head=table.LossDetect [Channel]
Table 4-115
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Loss Detect config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LossDetect[0].Enable=true
Success Return OK
Comment
Params in URL:
In below table,
Appendix:
Table 4-116
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=LoginFailureAlarm
Method GET
Description Get Login Failure Alarm config
121
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=LoginFailureAlarm
Success Return
head. Enable=false
head= table.LoginFailureAlarm
Table 4-117
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Login Failure Alarm config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&LoginFailureAlarm.Enable=true
Success Return OK
Comment
Params in URL:
In below table,
head= LoginFailureAlarm
Appendix:
head. Enable bool Enable/Disable to notify LoginFailure event. Now this event
can be linked with send email and alarm out. The max try login
times can be configured in chapter SetGeneralConfig.
122
Amcrest Technologies LLC | www.amcrest.com
Table 4-118
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageNotExist
Method GET
Description Get Storage Not Exist event config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=StorageNotExist
Success Return
StorageNotExist.Enable=false
Table 4-119
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Storage Not Exist event config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageNotExist.Enable=true
Success Return OK
Comment -
Appendix:
Table 4-120
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageFailure
Method GET
Description Get Storage Failure event config
123
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=StorageFailure
Success Return
StorageFailure.Enable=false
Comment -
Table 4-121
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Storage Failure event config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageFailure.Enable=true
Success Return OK
Comment -
Appendix:
Table 4-122
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageLowSpace
Method GET
Description Get Storage Low Space event config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=StorageLowSpace
Success Return
StorageLowSpace.Enable=false
124
Amcrest Technologies LLC | www.amcrest.com
Comment -
Table 4-123
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Storage Low Space event config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageLowSpace.Enable=true
Success Return OK
Comment -
Appendix:
Table 4-124
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=NetAbort
Method GET
Description Get Net Abort event config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=NetAbort
Success Return
NetAbort.Enable=false
125
Amcrest Technologies LLC | www.amcrest.com
Table 4-125
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Net Abort event config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NetAbort.Enable=true
Success Return OK
Comment -
Appendix:
Table 4-126
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=IPConflict
Method GET
Description Get IP Conflict event config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=IPConflict
Success Return
IPConflict.Enable=false
Table 4-127
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
126
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description Set IP Conflict event config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&IPConflict.Enable=true
Success Return OK
Comment -
Appendix:
Syntax http://<server>/cgi-bin/eventManager.cgi?action=getEventIndexes&code=<eventCode>
Method GET
Description
Get channels indexes that event of code eventCode happens.
Not all events support this command. Do not recommend to use it, use Attach command instead.
Example http://192.168.1.108/cgi-bin/eventManager.cgi?action=getEventIndexes&code=AlarmLocal
Success Return
channels[0]=0
channels[1]=2
channels[2]=3
(This response means event happened on channel 0, channel 2, and channel 3.)
Comment
Params in URL:
eventCode includes:
127
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/eventManager.cgi?action=attach&codes=[<eventCode>,<eventCode>,][&keep
alive = 20]
Method GET
Description Subscribe to messages that event of code eventCode happens.
Example http://192.168.1.108/cgi-bin/eventManager.cgi?action=attach&codes=[AlarmLocal%2CVideoMotion%2
CVideoLoss%2CVideoBlind]
Success Return
HTTP Code: 200 OK\r\n
Cache-Control: no-cache\r\n
Pragma: no-cache\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
<eventInfo>\r\n\r\n
--<boundary>\r\n
Content-Type: text/plain\r\n
<eventInfo>\r\n\r\n
128
Amcrest Technologies LLC | www.amcrest.com
For example:
Cache-Control: no-cache\r\n
Pragma: no-cache\r\n
Connection: close\r\n
Content-Type: multipart/x-mixed-replace; boundary=myboundary\r\n\r\n
Body:
-- myboundary \r\n
Content-Type: text/plain\r\n
Content-Length: 39\r\n
-- myboundary \r\n
Content-Type: text/plain\r\n
Content-Length: 38\r\n
-- myboundary \r\n
Content-Type: text/plain\r\n
Content-Length: 38\r\n
-- myboundary \r\n
Comment
eventCode can be any one of the standard codes defined in DHIIF, or All. All means all the
eventcodes.
For example:
129
Amcrest Technologies LLC | www.amcrest.com
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 of every row.
keepalive: if this param exist, the client must send any data to device by this connection in cycle. The
keepalive is in range
of [1,60] second.
For example:
Syntax http://<server>/cgi-bin/eventManager.cgi?action=getCaps
Method GET
Description Get event manager capabilities.
Example http://192.168.1.108/cgi-bin/eventManager.cgi?action=getCaps
Success Return
caps.AlarmOutEnable=true
caps.BeepEnable=true
caps.DejitterEnable=true
caps.MMSEnable=true
caps.MailEnable=true
caps.MonitorTourEnable=true
caps.PtzLinkEnable=true
caps.RecordEnable=true
caps.SnapshotEnable=true
caps.TimeSectionEnable=true
caps.TipEnable=true
130
Amcrest Technologies LLC | www.amcrest.com
Comment -
4.10 PTZ
Table 4-131
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Ptz
Method GET
Description Get Ptz config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Ptz
Success Return
table.Ptz[port].Address=8
table.Ptz[port].Attribute[0]=115200
table.Ptz[port].Attribute[1]=8
table.Ptz[port].Attribute[2]=Even
table.Ptz[port].Attribute[3]=1
table.Ptz[port].Homing[0]=0
table.Ptz[port].Homing[1]=30
table.Ptz[port].NumberInMatrixs=0
table.Ptz[port].ProtocolName=NONE
Comment
Params in Response:
Table 4-132
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
131
Amcrest Technologies LLC | www.amcrest.com
Appendix:
Ptz[port].Attribute[0] integer The baud rate. Range is {1200, 2400 ,4800, 9600,
19200, 38400, 57600, 115200}.
Data bit.
Stop bit.
132
Amcrest Technologies LLC | www.amcrest.com
Table 4-133
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=PtzAutoMovement
Method GET
Description Get Ptz Auto Movement config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=PtzAutoMovement
Success Return
table.PtzAutoMovement[port][Task].Enable = true
table.PtzAutoMovement[port][Task].TimeSection[week][section] = 1 10:00:00-11:00:00
table.PtzAutoMovement[port][Task].Fuction = Scan
table.PtzAutoMovement[port][Task].ScanId = 0
table.PtzAutoMovement[port][Task].PresetId = 1
table.PtzAutoMovement[port][Task].PatternId = 0
table.PtzAutoMovement[port][Task].TourId = 0
table.PtzAutoMovement[port][Task].AutoHoming.Enable = true
table.PtzAutoMovement[port][Task].AutoHoming.Time = 300
table.PtzAutoMovement[port][Task].SnapshotEnable = false
table.PtzAutoMovement[port][Task].SnapshotDelayTime = 30
Comment
Params in Response:
week: from 1 to 7.
133
Amcrest Technologies LLC | www.amcrest.com
Table 4-134
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set PtzAutoMovement config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&PtzAutoMovement[0][0].Fuction=To
ur
Success Return OK
Comment
Params in URL:
In below table,
head=PtzAutoMovement[port][task]
week: from 1 to 7.
Appendix:
head. Enable
bool Enable/Disable PtzAutoMovement
134
Amcrest Technologies LLC | www.amcrest.com
movement.
Syntax http://<server>/cgi-bin/ptz.cgi?action=getProtocolList[&channel=<ChannelNo>]
Method GET
Description Get the protocol list that PTZ can support. Unsupported now.
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getProtocolList&channel=0
Success Return info.RS[0]=Pelco
info.RS[1]=DH-SD1
info.Coaxial[0]=HD-CVI
info.Coaxial[1]=HD-CVI2.0
Comment Response contains all support PTZ protocols of the server.
Syntax http://<server>/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps[&channel=<ChannelNo>]
Method GET
Description Get Ptz channel protocol capabilities.
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getCurrentProtocolCaps&channel=1
Success Return
caps.AlarmLen=0
caps.AuxMax=8
caps.AuxMin=1
caps.CamAddrMax=255
caps.CamAddrMin=1
caps.Interval=200
135
Amcrest Technologies LLC | www.amcrest.com
caps.Menu=false
caps.MonAddrMax=255
caps.MonAddrMin=0
caps.Name=DH-SD1
caps.PanSpeedMax=255
caps.PanSpeedMin=1
caps.PatternMax=5
caps.PatternMin=1
caps.PresetMax=80
caps.PresetMin=1
caps.TileSpeedMax=255
caps.TileSpeedMin=1
caps.TourMax=7
caps.TourMin=0
caps.Type=1
Comment
Params in URL:
Appendix:
AuxMin
CamAddrMin
136
Amcrest Technologies LLC | www.amcrest.com
MonAddrMin
PanSpeedMin
PatternMin
PresetMin
TileSpeedMin
TourMin
Syntax http://<server>/cgi-bin/ptz.cgi?action=getPresets[&channel=<ChannelNo>]
Method GET
Description Get Presets of PTZ control.
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getPresets&channel=1
Success Return
presets. presets [0] .Index=1
137
Amcrest Technologies LLC | www.amcrest.com
Comment
Params in URL:
Syntax http://<server>/cgi-bin/ptz.cgi?action=getTours[&channel=<ChannelNo>]
Method GET
Description Get tour routines of PTZ control.
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getTours&channel=1
Success Return
tours. tours [0].Index = 1
Comment
Params in URL:
ChannelNo is PTZ channel index. The size of tours-array is the number of tours.
Syntax http://<server>/cgi-bin/ptz.cgi?action=<action>&channel=<ch>&code=<code>&arg1=<arg1>&arg2=<a
rg2>&arg3=<arg3>
138
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description Control Ptz.
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=start&channel=0&code=Up&arg1=0&arg2=1&arg3=0
Success Return OK
Comment
Params in URL:
ch is PTZ channel range is [1 - n], code is PTZ operation, and arg1, arg2, arg3 is the arguments of
operation.
Appendix:
ZoomTele Zoom in 0 0 0 0
139
Amcrest Technologies LLC | www.amcrest.com
140
Amcrest Technologies LLC | www.amcrest.com
Menu 0 0 0 0
Exit 0 0 0 0
Enter 0 0 0 0
MenuUp 0 0 0 0
141
Amcrest Technologies LLC | www.amcrest.com
MenuDown 0 0 0 0
MenuLeft 0 0 0 0
MenuRight 0 0 0 0
PositionABS Go to ABS position Horizontal Vertical angle: Zoom in mutiple Speed[1-8], not
angle: 0-360 0-90 must
Syntax http://<server>/cgi-bin/ptz.cgi?action=getStatus[&channel=<ChannelNo>]
Method GET
Description Get Ptz status.
Example http://192.168.1.108/cgi-bin/ptz.cgi?action=getStatus&channel=1
Success Return
status.UTC=6538920
status.MoveStatus=Idle
status.ZoomStatus=Idle
status.PresetID=10
status.Position=120,12,2
Comment This URL is used to get PTZStatus.
142
Amcrest Technologies LLC | www.amcrest.com
http://<server>/cgi-bin/ptzBase.cgi?action=moveDirectly&channel=<ChannelNo>&startPoint[0]=<star
Syntax
tX>&startPoint[1]=<startY>&endPoint[0]=<endX>&endPoint[1]=<endY>
Method GET
Description Three-dimensional orientation. Move to the rectangle with screen coordinate [startX, startY], [endX,
endY]
http://192.168.1.108/cgi-bin/ptzBase.cgi?action=moveDierctly&channel=0&startPoint[0]=7253&startP
Example
oint[1]=2275&endPoint[0]=7893&endPoint[1]=3034
Success Return OK
Comment ChannelNo: inte the video channel index which starts from 1.
startX, startY, endX, endY: relative coordinates, range is 0-8192. The two points [startX, startY] and
[endX, endY] makes the destination rectangle.
4.11 Record
Syntax http://<server>/cgi-bin/recordManager.cgi?action=getCaps
Method GET
Description Get record Manager capabilities.
Example http://192.168.1.108/cgi-bin/recordManager.cgi?action=getCaps
Success Return
caps.MaxPreRecordTime=30
caps.PacketLengthRange[0]=1
caps.PacketLengthRange[1]=60
caps.PacketSizeRange[0]=131072
caps.PacketSizeRange[1]=2097152
caps.SupportExtraRecordMode=true
143
Amcrest Technologies LLC | www.amcrest.com
caps.SupportHoliday=true
caps.SupportPacketType[0]=Time
caps.SupportPacketType[1]=Size
caps.SupportResumeTransmit=false
Comment -
Table 4-143
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=Record
Method GET
Description Get Record config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=Record
Success Return
table.Record[channel].PreRecord=6
table.Record[channel].TimeSection[weekday][0]=1 00:00:00-24:00:00
table.Record[channel].TimeSection[weekday][1]=0 02:00:00-24:00:00
table.Record[channel].TimeSection[weekday][2]=0 03:00:00-24:00:00
table.Record[channel].TimeSection[weekday][3]=0 04:00:00-24:00:00
table.Record[channel].TimeSection[weekday][4]=0 05:00:00-24:00:00
table.Record[channel].TimeSection[weekday][5]=0 06:00:00-24:00:00
Comment
Params in Response:
Record config contains pre record time and record time sections of every day.
Table 4-144
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
144
Amcrest Technologies LLC | www.amcrest.com
Set record time to every Sunday all day. Record type is motion detection and alarm.
In this example, 6 00:00:00-23:59:59 means motion detection and alarm record all day (6 = 4 & 2,
alarm is 4, motion detection is 2.).
Success Return OK
Comment
Params in URL:
In below table,
ch = channel index
Appendix:
145
Amcrest Technologies LLC | www.amcrest.com
Table 4-145
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=RecordMode
Method GET
Description Get Record Mode config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RecordMode
Success Return table.RecordMode[channel].Mode=0
Comment
Params in Response:
Table 4-146
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>
Method GET
Description Set Record Mode config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RecordMode[0].Mode=0
Success Return OK
Comment
Params in URL:
In below table,
Appendix:
0: automatically record
1: manually record
2: stop record.
146
Amcrest Technologies LLC | www.amcrest.com
Table 4-147
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MediaGlobal
Method GET
Description Get Media Global config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MediaGlobal
Success Return table.MediaGlobal.SnapFormatAs=MainFormat
Comment -
Table 4-148
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>
Method GET
Description Set MediaGlobal config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MediaGlobal.SnapFormatAs=Main
Format
Success Return OK
Comment -
Appendix:
Table 4-149
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=factory.create
147
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description Create a media file finder.
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=factory.create
Success Return result= 2086170840
Comment -
2. Whether or not found media files satisfied the conditions with the finder
Table 4-150
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=findFile&object=<objectId>&condition.Channel=<Ch
annelNo>&condition.StartTime=<start>&condition.EndTime=<end>[&condition.Dirs[0]=<dir>&conditi
on.Types[0]=<type>&condition.Flag[0]=<flag>&condition.Events[0]=<event>&condition.VideoStream=
<stream>]
Method GET
Description Check if there are files that satisfy all the conditions.
Example
Find file in channel 1, in directory /mnt/dvr/sda0",event type is "AlarmLocal" or "VideoMotion", file
type is dav, and time between 2014-1-1 12:00:00 and 2015-1-10 12:00:00 , URL is:
http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findFile&object=2086170840&condition.Chann
el=1&condition.Dirs[0]
=/mnt/dvr/sda0&condition.Types[0]=dav&condition.Events[0]=AlarmLocal&con
dition.Events[1]=VideoMotion&condition.StartTime=2014-1-1%2012:00:00&condition.EndTime=2015-
1-10%2012:00:00&condition.VideoStream=Main
Success Return OK
Comment
Start to find file with the above condition. If files exist, return OK, else return Error.
Params in URL:
objecteId: The object Id is the finder created before. You must create a finder before finding files.
ChannelNo: in which channel you want to find the file, , start from 1.
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 omitted, find files in all the
directories.
type : which types of the file you want to find. It is an array. The index starts from 0. The range of type
is {dav, jpg, mp4}. If omitted, find files with all the types.
flag : which flags of the file you want to find. It is an array. The index starts from 0. The range of flag is
{Timing, Manual, Marker, Event, Mosaic, Cutout}. If omitted, find files with all the flags.
event : by which event the record file is triggered. It is an array. The index starts from 0. The range of
event is {AlarmLocal, VideoMotion, VideoLoss, VideoBlind, Traffic*}. This condition can be
148
Amcrest Technologies LLC | www.amcrest.com
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.
Table 4-151
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=<objectId>&count=<fileCount>
Method GET
Description Find the next files no more than fileCount.
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=findNextFile&object=08137&count=100
Success Return
found=1
items[0]. Channel =1
items[0]. Events[0]=AlarmLocal
items[0]. VideoStream=Main
Appendix:
149
Amcrest Technologies LLC | www.amcrest.com
Table 4-152
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=close&object=<objectId>
Method GET
Description Stop find.
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=close&object=08137
Success Return OK
Comment -
Table 4-153
Syntax http://<server>/cgi-bin/mediaFileFind.cgi?action=destroy&object=<objectId>
Method GET
Description Destroy the media file finder.
Example http://192.168.1.108/cgi-bin/mediaFileFind.cgi?action=destroy&object=08137
Success Return OK
Comment -
Syntax http://<server>/cgi-bin/RPC_Loadfile/<Filename>
150
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description Download a file by filename. To get filename by chapter FileFinding
Example http://192.168.1.108/cgi-bin/RPC_Loadfile/mnt/sd/2015-01-08/001/dav/19/19.57.12-19.58.25[M][0@0]
[0].dav
Success Return
HTTP Code: 200 OK
Content-Type: Application/octet-stream
Content-Length: <fileLength>
Body:
<data>
<data>
Comment
Params in URL:
Syntax http://<server>/cgi-bin/loadfile.cgi?action=startLoad&channel=<ChannelNo>&startTime=<starttime>
&endTime=<endtime>[&subtype=<typeNo>]
Method GET
Description Download the media data between start time and end time.
Example http://192.168.1.108/cgi-bin/loadfile.cgi?action=startLoad&channel=1&startTime=2012-10-8%2013:00
:01&endTime=2012-10-8%2014:00:01&subtype=0
Success Return
HTTP Code: 200 OK
Content-Type: Application/octet-stream
Content-Length:<fileLength>
Body:
<data>
<data>
Comment
Params in URL:
151
Amcrest Technologies LLC | www.amcrest.com
0-Main Stream
1-Extra Stream 1
2-Extra Stream 2
starttime & endtime: video start time and end time. Time format: yyyy-mm-dd hh:mm:ss
Syntax http://<server>/cgi-bin/userManager.cgi?action=getUserInfo&name=<userName>
Method GET
Description Get user information with name userName.
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=getUserInfo&name=admin
Success Return
user.Name=admin
user.Group=admin
user.Reserved=true
user.Sharable=true
user. AuthList=<authList>
Comment -
Syntax http://<server>/cgi-bin/userManager.cgi?action=getUserInfoAll
Method GET
Description Get information of all users.
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=getUserInfoAll
Success Return
users[0].Group=admin
152
Amcrest Technologies LLC | www.amcrest.com
users[0].Id=1
users[0].Name=admin
users[0].Reserved=true
users[0].Sharable=true
users[0]. AuthList=<authList>
users[1].Group=admin
Comment -
Syntax http://<server>/cgi-bin/userManager.cgi?action=getActiveUserInfoAll
Method GET
Description Get active users.
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=getActiveUserInfoAll
Success Return
users[0].name=admin
users[0].ip=10.43.2.16
users[0].group=admin
users[0].clienttype=web3.0
users[0].logintime=2011-11-08 09:51:03
Comment -
Syntax http://<server>/cgi-bin/userManager.cgi?action=getGroupInfo&name=<groupName>
Method GET
Description Get group setting with name groupName.
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=getGroupInfo&name=admin
153
Amcrest Technologies LLC | www.amcrest.com
Success Return
group.Name=admin
group.Memo=administrator group
group. AuthorityList=<authList>
Comment
Params in URL:
The device has one or two default user groups: admin or admin and user. The admin group has
all the authorities of operating the device. The user group only has monitoring and replaying
authorities.
If the group named groupName does not exist, the device returns Error..
Syntax http://<server>/cgi-bin/userManager.cgi?action=getGroupInfoAll
Method GET
Description Get information of all groups.
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=getGroupInfoAll
Success Return
group[0].Name=admin
group[0].Memo=administrator group
group[0]. AuthorityList=<authList>
group[1].Name=user
group[1].Memo=user group
group[1]. AuthorityList=<authList>
group[2].
Comment -
Syntax http://<server>/cgi-bin/userManager.cgi?action=addUser&user.Name=<userName>&user.Password=<
userPassword>&user.Group=<userGroup>&user.Sharable=<userSharable>[&user.Memo=<userMemo
154
Amcrest Technologies LLC | www.amcrest.com
>&user.Reserved=<userReserved>]
Method GET
Description Add a user.
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=addUser&user.Name=George&user.Password=
123456&user.Group=user&user.Sharable=true&user.Reserved=false
Success Return OK
Comment
Params in URL:
userGroup: string, the range is admin and user. In different group, the user has different
authorities.
Syntax http://<server>/cgi-bin/userManager.cgi?action=deleteUser&name=<userName>
Method GET
Description Delete user with name username.
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=deleteUser&name=George
Success Return OK
Comment -
Syntax http://<server>/cgi-bin/userManager.cgi?action=modifyUser&name=<UserName>&user.Memo=<user
Memo>&user.Group=<userGroup>&user.Reserved=<userReserved>&user.Sharable=<userSharable>
Method GET
Description Modify user info.
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=modifyUser&name=George&user.Group=admin
Success Return OK
Comment User is identified by <UserName>, other params are the same with AddUser.
155
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/userManager.cgi?action=modifyPassword&name=<username>&pwd=<newPw
d>&pwdOld=<oldPwd>
Method GET
Description Modify user password.
Example http://192.168.1.108/cgi-bin/userManager.cgi?action=modifyPassword&name=George&pwd=abcdef
&pwdOld=123456
Success Return OK
Comment Old password oldPwd should be supplied, new password is newPwd.
4.13 Log
Table 4-165
Syntax http://<server>/cgi-bin/log.cgi?action=startFind&condition.StartTime=<start>&condition.EndTime=<e
nd>[&condition.Type=<Type>]
Method GET
Description Start to find log.
Example
Find log between 2011-1-1 12:00:00 and 2011-1-10 12:00:00, URL is:
http://192.168.1.108/cgi-bin/log.cgi?action=startFind&condition.StartTime=2011-1-1%2012:00:00&co
ndition.EndTime=2011-1-10%2012:00:00
Success Return token=1
Comment
Params in URL:
In response, there is a token for further log finding process. If token is greater than 0, logs are found;
otherwise no logs are found.
Type: log type. The range is { "System", "Config", "Event", "Storage", "Account", "Data", "File",
"CourseRecord" }.
156
Amcrest Technologies LLC | www.amcrest.com
Table 4-166
Syntax http://<server>/cgi-bin/log.cgi?action=doFind&token=<TokenValue>&count=<logCount>
Method GET
Description Find log with token TokenValue and count logCount.
Example http://192.168.1.108/cgi-bin/log.cgi?action=doFind&token=1&count=100
Success Return
found=2
items[0].RecNo=789
items[0].Time=2011-05-20 11:59:10
items[0].Type=ClearLog
items[0].User=admin
items[1].Detail.Compression=H.264->MJPG
items[1].Detail.Data=Encode
items[1].RecNo=790
items[1].Time=2011-05-20 11:59:21
items[1].Type=SaveConfig
items[1].User=System
Comment
Params in URL:
The TokenValue is got by startFind in above section, logCount is the count of logs for this query.
Appendix:
157
Amcrest Technologies LLC | www.amcrest.com
Table 4-167
Syntax http://<server>/cgi-bin/log.cgi?action=stopFind&token=<TokenValue>
Method GET
Description Stop query log by token TokenValue.
Example http://192.168.1.108/cgi-bin/log.cgi?action=stopFind&token=1
Success Return OK
Comment
Params in URL:
Syntax http://<server>/cgi-bin/log.cgi?action=clear
Method GET
Description Clear all the logs.
Example http://192.168.1.108/cgi-bin/log.cgi?action=clear
Success Return OK
Comment -
Syntax http://<server>/cgi-bin/Log.backup?action=All&condition.StartTime=<startTime>&condition.EndTime
=<endTime>
Method GET
Description Download the log information between the start time and the end time as a file named Log. Backup
default.
158
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/Log.backup?action=All&condition.StartTime=2014-8-25%2000:02:32&co
ndition.EndTime=2020-8-25%2001:02:32
Success Return
HTTP/1.1 200 OK
CONTENT-LENGTH: 743087
CONNECTION: close
&w_User: default
&Type: VideoLoss
channel:<8>
Comment
Params in URL:
startTime/endTime: the start/end time when log info built. 24 hour Format, as: yyyy-mm-dd
hh:mm:ss.
For example:
2014-8-25 00:02:32
2020-8-25 01:02:32
5 SD camera APIs
159
Amcrest Technologies LLC | www.amcrest.com
Table 5-1
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInFocus
Method GET
Description Get Video Input focus config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInFocus
Success Return
table.VideoInFocus[0][0].FocusLimit=100
table.VideoInFocus[0][0].FocusLimitSelectMode=Manual
table.VideoInFocus[0][0].IRCorrection=0
table.VideoInFocus[0][0].Mode=3
table.VideoInFocus[0][0].Sensitivity=1
table.VideoInFocus[0][1].FocusLimit=100
table.VideoInFocus[0][1].FocusLimitSelectMode=Manual
table.VideoInFocus[0][1].IRCorrection=0
table.VideoInFocus[0][1].Mode=3
table.VideoInFocus[0][1].Sensitivity=1
table.VideoInFocus[0][2].FocusLimit=100
table.VideoInFocus[0][2].FocusLimitSelectMode=Manual
table.VideoInFocus[0][2].IRCorrection=0
table.VideoInFocus[0][2].Mode=3
table.VideoInFocus[0][2].Sensitivity=1
Comment -
Table 5-2
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Video Input focus config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInFocus[0][0].FocusLimit=100
160
Amcrest Technologies LLC | www.amcrest.com
0
Success Return OK
Comment
Params in URL:
In below table,
ChannelNo: array index, equals to video channel index -1, start from 0.
ConfigNo: array index, can be 0,1 or 2, which means normal, day and night.
Appendix:
head. Mode integer 2-Auto focus, 3-Half auto focus, 4-Manual focus
Table 5-3
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInZoom
Method GET
Description Get video input zoom config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInZoom
161
Amcrest Technologies LLC | www.amcrest.com
Success Return
table.VideoInZoom[0][0].DigitalZoom=true
table.VideoInZoom[0][0].Speed=7
table.VideoInZoom[0][0].ZoomLimit=4
table.VideoInZoom[0][1].DigitalZoom=true
table.VideoInZoom[0][1].Speed=0
table.VideoInZoom[0][1].ZoomLimit=4
table.VideoInZoom[0][2].DigitalZoom=false
table.VideoInZoom[0][2].Speed=7
table.VideoInZoom[0][2].ZoomLimit=4
Comment -
Table 5-4
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set video input zoom config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInZoom[0][0].DigitalZoom=fa
lse&VideoInZoom[0][0].Speed=8
Success Return OK
Comment
Params in URL:
ChannelNo: integer, array index which equals to video channel index -1, starts from 0.
ConfigNo: array index, can be 0,1 or 2, which means normal, day and night.
Appendix:
162
Amcrest Technologies LLC | www.amcrest.com
Table 5-5
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInSharpness
Method GET
Description Get Video Input Sharpness settings.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInSharpness
Success Return
table.VideoInSharpness[0][0].Level=4
table.VideoInSharpness[0][0].Mode=1
table.VideoInSharpness[0][0].Sharpness=8
table.VideoInSharpness[0][1].Level=4
table.VideoInSharpness[0][1].Mode=1
table.VideoInSharpness[0][1].Sharpness=8
table.VideoInSharpness[0][2].Level=4
table.VideoInSharpness[0][2].Mode=1
table.VideoInSharpness[0][2].Sharpness=8
Comment -
Table 5-6
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Video Input Sharpness settings.
163
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInSharpness[0][0].Level=10&
VideoInSharpness[0][0].Mode=1&VideoInSharpness[0][0].Sharpness=0
Success Return OK
Comment
Params in URL:
In below table,
ChannelNo: integer, array index which equals to video channel index -1, starts from 0.
ConfigNo: array index, can be 0,1 or 2, which means normal, day and night.
Appendix:
Table 5-7
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoInMode
Method GET
Description Get Video Input Mode settings.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoInMode
Success Return
table.VideoInMode[0].Config[0]=1
table.VideoInMode[0].Mode=0
164
Amcrest Technologies LLC | www.amcrest.com
table.VideoInMode[0].TimeSection[0][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[0][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[1][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[2][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[3][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[4][4]=0 00:00:00-23:59:59
165
Amcrest Technologies LLC | www.amcrest.com
table.VideoInMode[0].TimeSection[4][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[5][5]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][0]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][1]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][2]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][3]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][4]=0 00:00:00-23:59:59
table.VideoInMode[0].TimeSection[6][5]=0 00:00:00-23:59:59
Comment -
Table 5-8
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description
Set Video Input Mode settings.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoInMode[0].Mode=0
Success Return OK
Comment
Params in URL:
In below table,
ChannelNo : integer, the array index which equals to video channel index -1, starts from 0.
Appendix:
166
Amcrest Technologies LLC | www.amcrest.com
0: No Switch
Mode=1 Config[1]={ 1 }
Config[2]={ 2 }
head. TimeSection[0][0] integer The time format is "0 H:m: H:m:S "
5.2 Wiper
Syntax http://<server>/cgi-bin/rainBrush.cgi?action=moveContinuously&interval=<Second>[&channel=<Chan
nelNo>]
Method GET
Description
Control the rain brush to move continuously.
Example http://192.168.1.108/cgi-bin/rainBrush.cgi?action=moveContinuously&interval=5
Success Return OK
Comment
Second: integer, rain brush movement time interval which start from 1.
ChannelNo: integer, the channel index which start from 1, default 1 if not specified.
Syntax http://<server>/cgi-bin/rainBrush.cgi?action=stopMove[&channel=<ChannelNo>]
167
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description
Control the rain brush to stop move.
Example http://192.168.1.108/cgi-bin/rainBrush.cgi?action=stopMove
Success Return OK
Comment ChannelNo: integer, the channel index which start from 1, default 1 if not specified.
Syntax http://<server>/cgi-bin/rainBrush.cgi?action=moveOnce[&channel=<ChannelNo>]
Method GET
Description
Control the rain brush to move once.
Example http://192.168.1.108/cgi-bin/rainBrush.cgi?action=moveOnce
Success Return OK
Comment ChannelNo: integer, the channel index which start from 1, default 1 if not specified.
6 Storage APIs
Syntax http://<server>/cgi-bin/storageDevice.cgi?action=factory.getPortInfo
Method GET
Description Get the storage device port info.
Example http://192.168.1.108/cgi-bin/storageDevice.cgi?action=factory.getPortInfo
Success Return
info.Total=2
info.Plug=1
info.Mask=1
info.Bad=0
168
Amcrest Technologies LLC | www.amcrest.com
info.IDE=1
info.Esata=4
Comment -
Syntax http://<server>/cgi-bin/storageDevice.cgi?action=factory.getCollect
Method GET
Description Get all the storage devices names
Example http://192.168.1.108/cgi-bin/storageDevice.cgi?action=factory.getCollect
Success Return
list[0]=/dev/sda0
list[1]=/dev/sda1
list[2]=/dev/sg1
Comment -
Syntax http://<server>/cgi-bin/storageDevice.cgi?action=getDeviceAllInfo
Method GET
Description Get all the storage device information.
Example http://192.168.1.108/cgi-bin/storageDevice.cgi?action=getDeviceAllInfo
Success Return
list[0].Detail[0].IsError=false
list[0].Detail[0].Pointer=27023434
list[0].Detail[0].TotalBytes=0
list[0].Detail[0].Type=ReadWrite
list[0].Detail[0].UsedBytes=0
list[0].Pointer=22347602
list[0].State=Success
Comment -
169
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/storage.cgi?action=getCaps
Method GET
Description Get storage capabilities.
Example http://192.168.1.108/cgi-bin/storage.cgi?action=getCaps
Success Return
caps.RedundantDisk.Support=false
caps.SupportRemoteLimit=true
Comment -
6.2 NAS
Table 6-5
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=NAS
Method GET
Description Get all the directories on the NAS server.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=NAS
Success Return
table.NAS[0].Name= FTP1
table.NAS[0].Enable = true
table.NAS[0].Protocol =FTP
table.NAS[0].Address =www.ttt.com
table.NAS[0].Port =21
table.NAS[0].UserName =anonymity
table.NAS[0].Password =none
table.NAS[0].Directory =share
Comment -
170
Amcrest Technologies LLC | www.amcrest.com
Table 6-6
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set NAS config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&NAS[0].Name=nas01&NAS[0].Enab
le=true
Success Return OK
Comment
Params in URL:
In below table,
Head =NAS[index]
Appendix:
171
Amcrest Technologies LLC | www.amcrest.com
Table 6-7
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=RecordStoragePoint
Method GET
Description Get Record Storage Point config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=RecordStoragePoint
Success Return
table.RecordStoragePoint [0].TimingRecord.Local =local
Table 6-8
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Record Storage Point config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&RecordStoragePoint[0].TimingReco
rd.Local=local
Success Return OK
Comment
Params in URL:
In below table,
ch = channel index,
172
Amcrest Technologies LLC | www.amcrest.com
Appendix:
RecordStoragePoint [ch].[recType]. AutoSync bool When remote directory recovers, auto synchronize
local directory to remote directory or not.
RecordStoragePoint [ch].[recType]. integer From the remote directory recovering time, how
AutoSyncRange long the data needs to be synchronized. The unit is
hour. If it is 0, all the data needs to be synchronized.
RecordStoragePoint [ch].[recType]. bool When the remote directory is unusable, save the
LocalForEmergency data the local directory or not.
Table 6-9
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup
Method GET
Description Get Storage Group config
Example http://192.168.1.168/cgi-bin/configManager.cgi?action=getConfig&name=StorageGroup
Success Return
table.StorageGroup[0].Channels[0].MaxPictures=0
table.StorageGroup[0].FileHoldTime=0
table.StorageGroup[0].Memo=For Reading & Writing Files
table.StorageGroup[0].Name=ReadWrite
table.StorageGroup[0].OverWrite=true
table.StorageGroup[0].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S][%R].jpg
173
Amcrest Technologies LLC | www.amcrest.com
table.StorageGroup[0].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.%s[%E][%O@%S][
%R].dav
table.StorageGroup[1].Channels[0].MaxPictures=0
table.StorageGroup[1].FileHoldTime=0
table.StorageGroup[1].Memo=For FTP Files
table.StorageGroup[1].Name=Remote
table.StorageGroup[1].OverWrite=true
table.StorageGroup[1].PicturePathRule=%y-%M-%d/%c/jpg/%h/%m/%s[%E][%O@%S][%R].jpg
table.StorageGroup[1].RecordPathRule=%y-%M-%d/%c/dav/%h/%h.%m.%s-%h.%m.%s[%E][%O@%S][
%R].da
Comment -
Table 6-10
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Storage Group config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&StorageGroup[0].Name=main
Success Return OK
Comment
Params in URL:
In below table,
ch = channel index
Appendix:
StorageGroup[Index]. FileHoldTime integer How many days the file will hold.
174
Amcrest Technologies LLC | www.amcrest.com
StorageGroup[Index]. OverWrite bool Over write or not when there is not enough storage.
StorageGroup[Index]. Channels[ch]. MaxPictures Integer The max pictures beyond which the old pictures will
be over written. If it is 0, the old pictures will be not
over written.
7 Display APIs
7.1 GUI
7.1.1 GUISet
Get GUISet config
Table 7-1
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=GUISet
Method GET
Description Get the GUI settings. Every video out screen has a group setting.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=GUISet
Success Return
table.GUISet[index]. WindowAlpha =128
table.GUISet[index]. TimeTitlePos[0]=0
table.GUISet[index]. TimeTitlePos[1]=0
table.GUISet[index]. TimeTitlePos[2]=8191
table.GUISet[index]. TimeTitlePos[3]=8191
table.GUISet[index]. MenuShowOption =0
175
Amcrest Technologies LLC | www.amcrest.com
table.GUISet[index]. ChannelTitlePos[0]=0
table.GUISet[index]. ChannelTitlePos[1]=0
table.GUISet[index]. ChannelTitlePos[2]=8191
table.GUISet[index]. ChannelTitlePos[3]=8191
Comment
Params in Response :
Table 7-2
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set the GUI settings. Every video out screen has a group setting.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&GUISet[0].WindowAlpha=192&GUI
Set[0].TimeTitleEnable=false&GUISet[0].MenuShowOption=1
Success Return OK
Comment
Params in URL:
in below table,
Appendix:
176
Amcrest Technologies LLC | www.amcrest.com
GUISet[index].TimeTitlePos[1] integer
GUISet[index].TimeTitlePos[2] integer
GUISet[index].TimeTitlePos[3] integer
GUISet[index].ChannelTitlePos[1] integer
GUISet[index].ChannelTitlePos[2] integer
GUISet[index].ChannelTitlePos[3] integer
Table 7-3
Syntax http://<server>/cgi-bin/split.cgi?action=getMode&channel=<ChannelNo>
Method GET
Description Get the split screen mode.
177
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/split.cgi?action=getMode&channel=1
Success Return
mode=split1
group=4
Comment
Params in URL:
Table 7-4
Syntax http://<server>/cgi-bin/split.cgi?action=setMode&channel=<ChannelNo>&mode=<mode>&group=<gr
oup>
Method GET
Description Set the split screen mode.
Example http://192.168.1.108/cgi-bin/split.cgi?action=setMode&channel=1&mode=split4&group=1
Success Return OK
Comment
Params in URL:
mode:enum{split1,split2,split4,split6,split8,split9,split12,split16,split20,split25,split36,split64,split144,
pip1,pip3, "Free", "CompositeSplit1" / "FitDisplayUnit1", "CompositeSplit1" / "FitDisplayUnit4"};
group : the No. of a group which contains certain number channels. For example, if 16 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.
Table 7-5
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MonitorTour
Method GET
Description Get Monitor Tour config.
178
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MonitorTour
Success Return
table.MonitorTour[ch].Enable=128
table.MonitorTour[ch].Interval=true
table.MonitorTour[ch].Mask.Split1=0,1,5
table.MonitorTour[ch].Mask.Split8=0,1,5
table.MonitorTour[ch].Collections=Favortite1, Favortite2
Comment -
Table 7-6
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Monitor Tour config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MonitorTour[0].Enable=true
Success Return OK.
Comment
Params in URL:
Appendix:
179
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/split.cgi?action=enableTour&channel=<ChannelNo>&enable=<flag>
Method GET
Description Enable tour in every video channel on a screen or not.
Example http://192.168.1.108/cgi-bin/split.cgi?action=enableTour&channel=1&enable=true
Success Return OK
Comment
ChannelNo: the display screen No. Start from 1 and <= 2.
Table 7-8
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=MonitorCollection
Method GET
Description Get monitor collection config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=MonitorCollection
Success Return
table.MonitorCollection.collectionname. Mode=Split1
table.MonitorCollection.collectionname.Windows[winno].Enable= true
table.MonitorCollection.collectionname.Windows[winno].Device=device1
table.MonitorCollection.collectionname.Windows[winno].VideoChannel=5
table.MonitorCollection.collectionname.Windows[winno].VideoStream=Main
table.MonitorCollection.collectionname.Windows[winno].AudioChannel=5
table.MonitorCollection.collectionname.Windows[winno].AudioStream=Main
Comment
Params in Response :
winno : integer, the array index which equals to the window index in a screen and starts from 0.
180
Amcrest Technologies LLC | www.amcrest.com
Table 7-9
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set monitor collection config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&MonitorCollection.Favorite1.Mode
=split4&MonitorCollection.Favorite1.Windows[1].Enable=true&MonitorCollection.Favorite1.Windows[
1].VideoChannel=2
Success Return OK
Comment
Params in URL:
In below table:
Collect= MonitorCollection.collectionname.
winno: integer, the array index which equals to the window index in a screen and starts from 0.
Appendix:
181
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/devVideoAnalyse.cgi?action=getcaps&channel=<ChannelNo>
Method GET
Description Get dev Video Analyse capabilities.
Example http://192.168.1.108/cgi-bin/devVideoAnalyse.cgi?action=getcaps&channel=1
Success Return caps.CalibrateBoxs[0]=2
caps.CalibrateBoxs[1]=3
caps.ComplexSizeFilter=false
caps.MaxCelibateAreas=10
caps.MaxExcludeRegions=0
caps.MaxInternalOptions=512
caps.MaxModules=1
caps.MaxPointOfLine=20
caps.MaxPointOfRegion=20
caps.MaxRules=10
caps.MaxStaffs=4
caps.SpecifiedObjectFilter=true
caps.SupportedRules[0]=CrossLineDetection
caps.SupportedRules[1]=CrossRegionDetection
caps.SupportedRules[2]=LeftDetection
caps.SupportedRules[3]=TakenAwayDetection
caps.SupportedScene[0]=Normal
caps.SupportedScene[1]=FaceDetection
caps.SupportedScene[2]=VideoDiagnosis
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalStaffs[0]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.HorizontalStaffs[1]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs[0]=0
caps.SupportedScenes.FaceDetection.SupportedCalibrateParams.Groud.VerticalStaffs[1]=0
Comment Params in URL:
ChannelNo: integer, the video channel index which starts from 1.
182
Amcrest Technologies LLC | www.amcrest.com
Table 8-2
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseGlobal
Method GET
Description Get Video Analyse Global config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseGlobal
Success Return head.Scene.Type=Normal
head.Scene.PtzPresetId=1
head.Scene.Depth=Far
head.Scene.Detail.CameraAngle=30
head.Scene.Detail.CameraDistance=10.000000
head.Scene.Detail.CameraHeight=6.200000
head.TimePeriod.Day[0]=8:00:00
head.TimePeriod.Day[1]=20:00:00
head.TimePeriod.Night[0]=20:00:00
head.TimePeriod.Night[1]=8:00:00
Comment Params in Response :
head =table.VideoAnalyseGlobal[ChannelNo]
ChannelNo = video channel index.
Table 8-3
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Video Analyse Global config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoAnalyseGlobal[0].Scene.Type=
Normal&VideoAnalyseGlobal[0].Scene.PtzPresetId=1
Success Return OK
Comment Params in URL:
paramName and paramValue are as below table.
In below table, head =VideoAnalyseGlobal[ChannelNo]
ChannelNo = video channel index.
ParamName start with head.Scene.Detail depends on head.Scene.Type.
183
Amcrest Technologies LLC | www.amcrest.com
Appendix
head.Scene.Type string Scene class, the range is { "Normal", "Indoor", "ATM", "Traffic",
"FaceRecognition", "FaceDetection", "Prison", "NumberStat",
"HeatMap", "VideoDiagnosis", "VehicleAnalyse", "TrafficPatrol",
"CourseRecord", "Vehicle" }
head.Scene.PtzPresetId integer Range is 0-255, 0 means that the scene is unassociated with PTZ.
head.Scene.Depth string Picture distance feature, the range is { "Normal", "Far", "Middle",
"Near" }
head.Scene.Detail. ... Detail config of a scene. For example, when Scene.Type is "Normal",
it's detail includes CameraAngle, CameraDistance, CameraHeight, etc.
Table 8-4
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule
Method GET
Description Get Video Analyse Rules config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoAnalyseRule
Success Return head.Name= line1
head.Type=CrossLineDetection
head.VideoAnalyseRule[0][0].Enable =true
head.VideoAnalyseRule[0][0].EventHandler= (output of EventHandler is described in GetEventHandler)
Comment Params in Response :
head =table.VideoAnalyseRule[ChannelNo] [RuleNo]
184
Amcrest Technologies LLC | www.amcrest.com
Table 8-5
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Video Analyse Rules config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoAnalyseRule[0][0].Name=myA
nalyseRule1&VideoAnalyseRule[0][0].Type=CrossLineDetection
Success Return OK
Comment Params in URL:
paramName and paramValue are as below table.
In below table, head =VideoAnalyseRule[ChannelNo] [RuleNo]
ChannelNo = video channel index.
RuleNo =rule index.
ParamName start with head.Config is only effective with {CrossLineDetection,
CrossRegionDetection, LeftDetection, TakenAwayDetection}
Appendix
185
Amcrest Technologies LLC | www.amcrest.com
head. Config .SizeFilter.MaxSize[0] integer Maximum width. The width of the object must not be beyond
maximum width.
head. Config .SizeFilter.MaxSize[1] integer Maximum height. The height of the object must not be beyond
maximum height.
head. Config .SizeFilter.MinSize[0] integer Minimum width. The width of the object must not be less than
minimum width.
head. Config .SizeFilter.MinSize[1] integer Minimum height. The height of the object must not be beyond
minimum height.
186
Amcrest Technologies LLC | www.amcrest.com
Table 8-6
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidgetNumberStat
Method GET
Description Get OSD config when display human number status information.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=VideoWidgetNumberStat
Success Return head.EncodeBlend=true
head.ShowEnterNum=true
head.ShowExitNum=true
head.TextAlign=0
Comment Params in Response :
head =table.VideoWidgetNumberStat[ChannelNo]
ChannelNo =array index starts from 0, which means video channel.
187
Amcrest Technologies LLC | www.amcrest.com
Table 8-7
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set OSD config when display human number status information.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&VideoWidgetNumberStat[0].Encode
Blend=true&VideoWidgetNumberStat[0].ShowEnterNum=true
Success Return OK
Comment Params in URL:
paramName and paramValue are as below table.
In below table,
head =VideoWidgetNumberStat[ChannelNo]
ChannelNo = array index starts from 0, which means video channel.
Appendix
Syntax http://<server>/cgi-bin/heatMap.cgi?action=getPicByTime&channel=<ChannelNo>&StartTime=<start>
&EndTime=<end>
Method GET
Description Get binary data of heat map.
Example http://192.168.1.108/cgi-bin/heatMap.cgi?action=getPicByTime&channel=1&StartTime=2015-08-20%2
000:00:00&EndTime=2015-08-21%2023:59:59
Success Return Content-Type: application/binarytet-stream
188
Amcrest Technologies LLC | www.amcrest.com
Content-Length:<heatMap size>
<HeatMap data>
Comment Params in URL:
ChannelNo: video channel index, start from 1.
start/end: the start/end time of Heat Map info. 24 hour Format, as: yyyy-mm-dd hh:mm:ss.
Params in Response:
heatMap size: width*height + 16.
HeatMap data: format as below table.
0 1 2 3 4 15 16 17 18
Syntax http://<server>/cgi-bin/videoStatServer.cgi?action=getSummary[&channel=<ChannelNo>]
Method GET
Description Get summary information of video Stat.
Example http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=getSummary&channel=1
Success Return Summary information shown
summary.Channel=0
summary.RuleName=NumberStat
summary.EnteredSubtotal.Today=0
summary.EnteredSubtotal.Total=14
summary.EnteredSubtotal.TotalInTimeSection=0
summary.ExitedSubtotal.Today=0
summary.ExitedSubtotal.Total=32
summary.ExitedSubtotal.TotalInTimeSection=0
Comment Params in URL:
ChannelNo: array index starts from 1, which means video channel.
189
Amcrest Technologies LLC | www.amcrest.com
Table 8-10
Syntax http://<server>/cgi-bin/videoStatServer.cgi?action=startFind[&channel=<ChannelNo>]&condition.Start
Time=<start>&condition.EndTime=<end>&condition.Granularity=<granularity>
Method GET
Description Start to find Video Stat info, in response, there is a token for further info finding process, and there is a
totalCount shows how many data count(s).
Example Find Video Stat info between 2011-1-1 12:00:00 and 2011-1-10 12:00:00, with information granularity
is hour:
http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=startFind&channel=1&condition.StartTime=20
11-1-1%2012:00:00&condition.EndTime=2011-1-10%2012:00:00&condition.Granularity=Hour
Success Return token=1
totalCount=14
Comment Params in URL:
ChannelNo : video channel No. starts from 1
start/end: the start/end time of Video Stat info. 24 hour Format, as: yyyy-mm-dd hh:mm:ss.
granularity: the information granularity returned by the query requirements. the range is {Hour, Day,
Week, Month, Season, Year}
Table 8-11
Syntax http://<server>/cgi-bin/videoStatServer.cgi?action=doFind[&channel=<ChannelNo>]&token=<TokenVa
lue>&beginNumber=<beginNumber>&count=<Count>
Method GET
Description Find Video Stat info with channel, token, begin Number and count.
Example http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=doFind&channel=1&token=1&beginNumber=
0&count=14
Success Return found=14
info[0].Channel=0
info[0].EndTime=2015-07-06 00:59:59
info[0].EnteredSubtotal=0
info[0].ExitedSubtotal=0
info[0].RuleName=
info[0].StartTime=2015-07-06 00:00:00
info[1].Channel=0
190
Amcrest Technologies LLC | www.amcrest.com
info[1].EndTime=2015-07-06 01:59:59
info[1].EnteredSubtotal=0
info[1].ExitedSubtotal=0
info[1].RuleName=
info[1].StartTime=2015-07-06 01:00:00
Comment Params in URL:
ChannelNo : video channel index, start from 1
TokenValue: get by startFind in above section.
beginNumber : the start count, must between 0 and Count -1
Count: the count of info for this query.
Table 8-12
Syntax http://<server>/cgi-bin/videoStatServer.cgi?action=stopFind&token=<TokenValue>[&channel=<Chann
elNo>]
Method GET
Description Stop query Video Stat by channel and token.
Example http://192.168.1.108/cgi-bin/videoStatServer.cgi?action=stopFind&channel=1&token=1
Success Return OK
Comment Params in URL:
ChannelNo: video channel index, start from 1
TokenValue: get by startFind in above section.
Syntax http://<server>/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus&channel=<ChannelNo>&<para
mName>=<paramValue>[&<paramName>=<paramValue>...]
Method GET
Description Get specific parking space(s) status
191
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/trafficSnap.cgi?action=getParkingSpaceStatus&condition.Lane[0]=0&cond
ition.Lane[1]=255
Success Return A list of parking space status
status[0].Lane=0
status[0].PictureId=5
status[0].TrafficCar.CountInGroup=1
status[1].Lane=1
status[1].PictureId=4
status[1].TrafficCar.CountInGroup=1
Comment Params in URL:
ChannelNo : the index of traffic Snap channel
paramName and paramValue: detail in below table.
In below table,
index: The index of type array, start from 0
Params in Response :
TrafficCar: the members refer to TrafficCar
Appendix
Syntax http://<server>/cgi-bin/trafficParking.cgi?action=getAllParkingSpaceStatus
Method GET
Description Get all valid parking spaces status of one device
Example http://192.168.1.108/cgi-bin/trafficParking.cgi?action=getAllParkingSpaceStatus
192
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/ThermographyManager.cgi?action=getCaps&channel=<ChannelNo>
Method GET
Description Get thermography capability.
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getCaps&channel=1
Success Return caps.PresetModes = Indoor
caps.Brightness.Max = 100
caps.Brightness.Min = 0
caps.Brightness.Step = 1
caps.Sharpness.Max= 100
caps.Sharpness.Min = 0
caps.Sharpness.Step = 5
caps.EZoom.Max= 24
caps.EZoom.Min = 0
caps.EZoom.Step = 1
caps. ThermographyGamma.Max= 8
caps. ThermographyGamma.Min = -8
caps. ThermographyGamma.Step = 1
caps. SmartOptimizer.Max= 100
caps. SmartOptimizer.Min = 0
caps. SmartOptimizer.Step = 5
193
Amcrest Technologies LLC | www.amcrest.com
Params in Response:
PresetModes: the preset mode. Range is { "Indoor", "Outdoor", "Default" }
PresetColorization: Preset colorization mode. Range is { "WhiteHot", "BlackHot", "Fusion", "Rainbow",
"Globow", "Ironbow1", "Ironbow2", "Sepia", "Color1", "Color2", "Icefire", "Rain", "RedHot",
"GreenHot"}.
PresetROIModes: Preset ROI mode. Range is {"Full Screen, Sky", "Ground", "Horizontal", "Center
75%", "Center 50%", "Center 25%", "Custom"}
Table 10-2
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ThermographyOptions
Method GET
Description Thermography options contain EZoom, Colorization, SmartOptimizer and so on
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ThermographyOptions
Success Return head.EZoom=0
head.Colorization=White Hot
head.SmartOptimizer=10
head.OptimizedRegion.Type=Custom
head.OptimizedRegion.Enable= true
head.OptimizedRegion.Regions[i][0u]=0
head.OptimizedRegion.Regions[i][1u]=0
head.OptimizedRegion.Regions[i][2u]=0
head.OptimizedRegion.Regions[i][3u]=0
194
Amcrest Technologies LLC | www.amcrest.com
head.Agc=10
head.AgcMaxGain=10
head.AgcPlateau=10
head.Mode=HighTemperature
head.Auto.LowToHigh=13
head.Auto.LHROI=15
head.Auto.HighToLow=12
head.Auto.HLROI=95
Comment Params in Response:
head = table.ThermographyOptions [ChannelNo][0]
ChannelNo = video channel index
Regions: the region is a rectangle
i : the array index starts from 0.
Table 10-3
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set thermography options
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ThermographyOptions[0][0].Optimiz
edRegion.Type=Gound
Success Return OK
Comment Params in URL:
The paramName and paramValue are in the below table.
In below table,
head = ThermographyOptions[ChannelNo][0]
ChannelNo = video channel index
i = the array index starts from 0
Appendix
195
Amcrest Technologies LLC | www.amcrest.com
head. AgcPlateau integer Range and step are got from interface in getCaps.
196
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/ThermographyManager.cgi?action=getExternSystemInfo&channel=<ChannelNo
>
Method GET
Description Get Extern System Info.
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getExternSystemInfo&channel=1
Success Return sysInfo.SerialNumber = 11111111123
sysInfo.SoftwareVersion = 2222222222222
sysInfo.FirmwareVersion= 3333333333333
sysInfo.LibVersion = 4444444444
Comment Params in URL:
ChannelNo: the index of video channel, start from 1
Syntax http://<server>/cgi-bin/ThermographyManager.cgi?action=getPresetParam&channel=<ChannelNo>&m
ode=<modeType>
Method GET
Description Get preset mode info.
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getPresetParam&channel=1&mode=D
efault
Success Return presetInfo.Brightness = 50
presetInfo.Sharpness= 50
presetInfo.EZoom= 12
presetInfo.ThermographyGamma= 0
presetInfo.Colorization= White Hot
presetInfo.SmartOptimizer= 10
presetInfo.OptimizedRegion.Type= Full Screen
presetInfo.OptimizedRegion.Enable= Full Screen
presetInfo.OptimizedRegion.Regions[i][0u]=0
presetInfo.OptimizedRegion.Regions[i][1u]=0
presetInfo.OptimizedRegion.Regions[i][2u]=0
presetInfo.OptimizedRegion.Regions[i][3u]=0
presetInfo.Agc= 10
197
Amcrest Technologies LLC | www.amcrest.com
presetInfo.AgcMaxGain=10
presetInfo.AgcPlateau = 10
Comment Params in URL:
ChannelNo: the index of video channel, start from 1
modeType: depends on capability , get from interface in getCaps
Params in Response :
Regions : the region is a rectangle
i : the array index.
Syntax http://<server>/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion&channel=<ChannelNo
>
Method GET
Description Get optimized region info.
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=getOptimizedRegion&channel=1
Success Return optimizedRegion.Type= Full Screen
optimizedRegion.Enable= true
optimizedRegion.Regions[i][0u]=0
optimizedRegion.Regions[i][1u]=0
optimizedRegion.Regions[i][2u]=0
optimizedRegion.Regions[i][3u]=0
Comment Params in URL:
ChannelNo: the index of video channel, start from 1
Params in Response:
Regions : the region is a rectangle
i: the region index.
Syntax http://<server>/cgi-bin/ThermographyManager.cgi?action=enableShutter&channel=<ChannelNo>&en
able=<Enable>
Method GET
Description Shutter control, whether enable shutter.
198
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=enableShutter&channel=1&enable=tr
ue
Success Return OK
Comment Params in URL:
ChannelNo: the index of video channel, start from 1
Enable: true or false, enable or not.
Syntax http://<server>/cgi-bin/ThermographyManager.cgi?action=fixFocus&linkVideoChannel[0]=<ChannelNo
>&linkVideoChannel[1]=<ChannelNo>[&speed=<SpeedValue>]
Method GET
Description The visual channel change focus to the same as the thermography channel.
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=fixFocus&linkVideoChannel[0]=1&link
VideoChannel[1]=2
Success Return OK
Comment Params in URL:
ChannelNo: the index of video channel, start from 1.
SpeedValue: float, range is 0.0-1.0.
Syntax http://<server>/cgi-bin/ThermographyManager.cgi?action=doFFC&channel=<ChannelNo>
Method GET
Description Do flat field correction.
Example http://192.168.1.108/cgi-bin/ThermographyManager.cgi?action=doFFC&channel=1
Success Return OK
Comment Params in URL:
ChannelNo: the index of video channel, start from 1.
199
Amcrest Technologies LLC | www.amcrest.com
10.2 Radiometry
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=getCaps[&channel=<ChannelNo>]
Method GET
Description Get the Capabilities of Radiometry Manager.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getCaps&channel=1
Success Return caps.TotalNum.MaxNum=8
caps.TotalNum.Spot.MaxSpots=8
caps.TotalNum.Line.MaxLines=1
caps.TotalNum.Area.MaxAreas=8
caps.TemperPresets.MaxPresets=256
caps.MeterInfo.Type[0u]=Spot
caps.MeterInfo.Type[1u]=Area
caps.MeterInfo.ObjectEmissivity.Max=100
caps.MeterInfo.ObjectEmissivity.Min=0
caps.MeterInfo.ObjectEmissivity.Default=0
caps.MeterInfo.ObjectEmissivity.Step=1
caps.MeterInfo.ObjectDistanceMeter.Max=100
caps.MeterInfo.ObjectDistanceMeter.Min=0
caps.MeterInfo.ObjectDistanceMeter.Default=0
caps.MeterInfo.ObjectDistanceMeter.Step=1
caps.MeterInfo.ReflectedTemperature.Max=100
caps.MeterInfo.ReflectedTemperature.Min=0
caps.MeterInfo.ReflectedTemperature.Default=0
caps.MeterInfo.ReflectedTemperature.Step=1
caps.MeterInfo.RelativeHumidity.Max=100
caps.MeterInfo.RelativeHumidity.Min=0
caps.MeterInfo.RelativeHumidity.Default=0
caps.MeterInfo.RelativeHumidity.Step=1
caps.MeterInfo.AtmosphericTemperature.Max=100
caps.MeterInfo.AtmosphericTemperature.Min=0
caps.MeterInfo.AtmosphericTemperature.Default=0
caps.MeterInfo.AtmosphericTemperature.Step=1
caps.Statistics.MinPeriod=60
caps.Isotherm.MaxTemp=327.0
caps.Isotherm.MinTemp=-20.0
Comment Params in URL:
ChannelNo: the channel index; start from 1
200
Amcrest Technologies LLC | www.amcrest.com
Table 10-11
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingThermometry
Method GET
Description Get HeatImagingThermometry Config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingThermometry
Success Return table.RelativeHumidity = 50
table.AtmosphericTemperature =20
table.ObjectEmissivity =1
table.ObjectDistance =100
table.ReflectedTemperature=20
table.TemperatureUnit= Centigrade
table.Isotherm.Enable=true
table.Isotherm.MaxValue=50
table.Isotherm.MinValue=0
table.Isotherm.ColorBarDisplay=true
table.HotSpotFollow=true
table.TemperEnable=true
Comment -
Table 10-12
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set HeatImagingThermometry Config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&HeatImagingThermometry.Relative
Humidity=50&HeatImagingThermometry.ObjectDistance=20.3
Success Return OK
Comment Params in URL:
The paramName and paramValue are in the below table.
201
Amcrest Technologies LLC | www.amcrest.com
Appendix
Unit is meter.
202
Amcrest Technologies LLC | www.amcrest.com
Table 10-13
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=ThermometryRule
Method GET
Description Get Thermometry Rule.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=ThermometryRule
Success Return head.Enable = true
head.PresetId =0
head.RuleId=0
head.Name=SpotName
head.Type=Spot
head.MeterRegion.Coordinates[PointNo][0]= 0
head.MeterRegion.Coordinates[PointNo][1]= 0
.
head.T=3
head.Alarm.Id=0
head.Alarm.Enable=true
head.Alarm.Result =Max
head.Alarm.AlarmCondition=Below
head.Alarm.Threshold=20.0
head.Alarm.Hysteresis=0.1
head.Alarm.Duration=30
head.LocalParameters.Enable=true
head.LocalParameters.ObjectEmissivity=0.95
head.LocalParameters.ObjectDistance=0.95
head.LocalParameters.RefalectedTemp=0
Comment Params in Response :
head =table.ThermometryRule[ChannelNo][RuleNo]
PointNo = point index
ChannelNo = video channel index.
RuleNo =rule index.
Alarm= AlarmSetting[AlarmNo]
AlarmNo = alarm index
203
Amcrest Technologies LLC | www.amcrest.com
Table 10-14
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Thermometry Rule.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&ThermometryRule[0][0].Name=nam
e1
Success Return OK
Comment Params in URL:
The paramName and paramValue are in the below table.
In below table,
head = ThermometryRule[ChannelNo][RuleNo]
PointNo = point index
ChannelNo = video channel index.
RuleNo =rule index.
Alarm= AlarmSetting[AlarmNo]
AlarmNo = alarm index
Appendix
204
Amcrest Technologies LLC | www.amcrest.com
Spot : {Vaule}
Unit is second
Accuracy is 0.01
205
Amcrest Technologies LLC | www.amcrest.com
Table 10-15
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingTemper
Method GET
Description Get Heat Imaging Temper config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=HeatImagingTemper
Success Return head.Enable=false
head.EventHandler. paramName = paramValue
Comment Params in Response:
head= table.HeatImagingTemper[Channel]
Channel= video channel number
Table 10-16
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Heat Imaging Temper config
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&HeatImagingTemper[0].Enable=false
&HeatImagingTemper[0].EventHandler.BeepEnable=false
Success Return OK
Comment Params in URL:
The paramName and paramValue are in the below table.
In below table,
head= HeatImagingTemper[Channel]
Channel=video channel number
Appendix
206
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=getRandomPointTemper&channel=<ChannelN
o>&coordinate[0]=x &coordinate[1]=y
Method GET
Description Get temperature values of random point.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getRandomPointTemper&channel=1&coo
rdinate[0]=1024&coordinate[1]=1024
Success Return TempInfo.Type=Spot
TempInfo.TemperAver=27.5
Comment Params in URL:
ChannelNo: the index of video channel, start from 1
x : The Xscale of the point
y : The Yscale of the point
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=getTemper&<paramName>=<paramValue>[&
<paramName>=<paramValue>...]
Method GET
Description Get temperature values from rules which have been set.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=getTemper&condition.PresetId=0&conditi
on.RuleId=0&condition.Type=Spot&condition.Name=Spot1&condition.channel=1
Success Return TempInfo.Type=Spot
TempInfo.TemperAver=27.5
Comment Params in URL:
The paramName and paramValue are in the below table.
207
Amcrest Technologies LLC | www.amcrest.com
Appendix
Table 10-19
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=startFind&condition.StartTime=<StartTimeVal
ue>&condition.EndTime=<EndTimeValue>&condition.Type=<TypeValue>&condition.channel=<Chann
elValue>&condition.Period=<PeriodValue>
Method GET
Description
Start to query the history data of temperature values.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=startFind&condition.StartTime=2010-04-
01%200:00:00&condition.EndTime=2010-04-08%200:00:00&condition.Type=Spot&condition.channel=
1&condition.Period=5
Success Return
token=46878
totalCount=333
Comment The parameters in bold face are as below table.
208
Amcrest Technologies LLC | www.amcrest.com
Appendix
Table 10-20
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=doFind&token=<tokenvalue>&beginNumber=
<BeginNumber>&count=<findNum>
Method GET
Description Get the history data of temperature.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=doFind&token=46878&beginNumber=16
&count=16
Success Return
found=12
info[i].Time=2010-04-08 16:12:46
info[i].PresetId=0
info[i].RuleId=0
info[i].Type=Spot
info[i].Name=xxxx
info[i].Coordinate[0]=1024
info[i].Coordinate[1]=2048
info[i].Channel=0
info[i].TemperatureUnit=Centigrade
info[i].QueryTemperInfo.TemperAve=50.1
209
Amcrest Technologies LLC | www.amcrest.com
info[i].QueryTemperInfo.TemperMax=50.2
info[i].QueryTemperInfo.TemperMin=50.0
Comment
Params in URL:
token: query token, get from interface of the first step above.
Params in Resp:
Table 10-21
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=stopFind&token=<tokenvalue>
Method GET
Description Stop to find the history data of temperature values.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=stopFind&token=46878
Success Return OK
Comment token: query token, get from interface of the first step.
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=attachTemper&channel=<ChannelNo>
Method GET
Description Subscribe to temperature information of a channel.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=attachTemper&channel=2
Success Return
--<boundary>\r\n
Content-Type: text/plain\r\n
info[i].Time=2010-04-08 16:12:46
info[i].PresetId=0
info[i].RuleId=0
210
Amcrest Technologies LLC | www.amcrest.com
info[i].Type=Spot
info[i].Name=xxxx
info[i].Coordinate[0]=1024
info[i].Coordinate[1]=2048
info[i].Channel=0
info[i].TemperatureUnit=Centigrade
info[i].QueryTemperInfo.TemperAve=50.1
info[i].QueryTemperInfo.TemperMax=50.2
info[i].QueryTemperInfo.TemperMin=50.0
Comment
Params in URL:
Params in Resp :
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=attachProc&channel=<ChannelNo>
Method GET
Description
Subscribe to radiometry data of a channel. It needs to cooperate with interface below.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=attachProc&channel=2
Success Return
--<boundary>\r\n
Content-Type: text/plain\r\n
dataInfo.Height=0
dataInfo.Width=0
dataInfo.Channel=0
dataInfo.Time=2010-05-25 00:00:00
dataInfo.Length=0
211
Amcrest Technologies LLC | www.amcrest.com
dataInfo.sensorType="Tau"
dataInfo.Unzip.ParamR=1
dataInfo.Unzip.ParamB=1
dataInfo.Unzip.ParamF=1
dataInfo.Unzip.ParamO=1
--<boundary>\r\n
Content-Type: application/http\r\n
<Binary data>
Comment ChannelNo: the index of video channel, start from 1
Syntax http://<server>/cgi-bin/RadiometryManager.cgi?action=toFetch&channel=<ChannelNo>
Method GET
Description Start to fetch radiometry data.
Example http://192.168.1.108/cgi-bin/RadiometryManager.cgi?action=toFetch&channel=2
Success Return status=Ready
Comment status: Range is {Ready, Busy}. Ready means service available and Busy means service busy.
11.1 Door
Syntax http://<server>/cgi-bin/accessControl.cgi?action=openDoor&channel=<ChannelNo>[&UserID=<UserID
212
Amcrest Technologies LLC | www.amcrest.com
>&Type=<Type>]
Method GET
Description Open the door.
Example http://192.168.1.108/cgi-bin/accessControl.cgi?action=openDoor&channel=1&UserID=101&Type=Rem
ote
Success Return OK
Comment
Params in URL:
Syntax http://<server>/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=<ChannelNo>
Method GET
Description Get status of the door.
Example http://192.168.1.108/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=1
Success Return Info.status=Open
Comment
Params in URL :
Params in Response :
213
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=attachState
Method GET
Description Subscribe the video talk status. When client disconnect, it will unsubscribe.
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=attachState
Success Return Notify the state:
SID=315
state.State=Answer
state.Talkback.Pack=RTP
state.Talkback.Protocol=UDP
state.Talkback.Type=Talk
state.Talkback.Audio.AudioPort=6000
state.Talkback.Audio.Format[0].Compression=PCM
state.Talkback.Audio.Format[0].Frequency=44000
state.Talkback.Audio.Format[0].Depth=16
state.Talkback.Audio.Format[1].Compression=G.711A
state.Talkback.Audio.Format[1].Frequency=44000
state.Talkback.Audio.Format[1].Depth=16
state.Talkback.Video.VideoPort=7000
state.Talkback.Video.Format[0].Compression=H.264
state.Talkback.Video.Format[0].Frequency=90000
state.Talkback.Video.Format[1].Compression=MJPG
state.Talkback. MediaAddr=224.10.10.10
Comment Params in Response:
State: in range of {Ringing, Inviting, Answer, Refuse, Cancel, Hangup, Busying }
214
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=detachState&SID=<sid>
Method GET
Description Unsubscribe the video talk status.
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=detachState&SID=101
Success Return OK
Comment Params in URL:
sid: the subscribe id, which is the response of attachState
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=invite[&Talkback.Protocol=<protocol>&Talkback.Type
=<type>&Talkback.MediaAddr=<addr>]
Method GET
Description Start the video talk conversation.
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=invite&Talkback.Protocol=UDP&Talkback.Type=T
alk&Talkback.MediaAddr=224.10.10.10
Success Return OK
Comment Params in URL:
protocol: the transmit protocol
type: video talk type.
addr: addr to get stream
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=cancel
Method GET
Description Cancel video talk conversation.
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=cancel
Success Return OK
Comment -
215
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=answer&Talkback.Protocol=<protocol>&Talkback.Typ
e=<type>&Talkback.MediaAddr=<addr>
Method GET
Description Answer the call.
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=answer&Talkback.Protocol=UDP&Talkback.Type
=Talk&Talkback.MediaAddr=224.10.10.10
Success Return OK
Comment Params in URL:
protocol: the transmit protocol
type: video talk type.
addr: addr to get stream
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=refuse
Method GET
Description Refuse answer the call.
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=refuse
Success Return OK
Comment -
12.1.7 Hang up
Table 12-7
Syntax http://<server>/cgi-bin/VideoTalkPeer.cgi?action=hangup
Method GET
Description Close it when the conversation is over.
Example http://192.168.1.108/cgi-bin/VideoTalkPeer.cgi?action=hangup
Success Return OK
Comment -
216
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/recordFinder.cgi?action=find&name=VideoTalkLog[&condition.CallType=<Type
>&condition.EndState=<State>&count=<countNo>]
Method GET
Description Find the VideoTalkLog record.
Example http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=VideoTalkLog&condition.CallType=In
coming&condion.EndState=Missed&count=500
Success Return
totalCount=1000
found=500
records[0].RecNo=789
records[0].CreateTime=123456789
records[0].CallType=Incoming
records[0].EndState=Received
records[0].PeerNumber=501
Comment
Params in URL:
Params in Response :
217
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCard[&<paramName>=<pa
ramValue>...]
Method GET
Description Find the access control card record.
Example http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCard&condition.Card
No=111245&condition.UserID=112&count=500
Success Return
totalCount = 1000
found = 500
records [0].RecNo=789
records [0].CardStatus =0
records [0].CardType =0
Comment
Params in URL:
Params in Response :
Appendix:
218
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/recordUpdater.cgi?action=update&name=AccessControlCard&recno=<recno>&
<paramName>=<paramValue>[&<paramName>=<paramValue>...]
Method GET
Description Update the access control card record.
Example http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=update&name=AccessControlCard&recno=121
&UserID=111&CardStatus=1&CardType=2
Success Return OK
Comment
Params in URL:
Appendix:
219
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControlCard&<paramName>=<
paramValue>[&<paramName>=<paramValue>...]
Method GET
Description Insert the access control card record.
Example http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insert&name=AccessControlCard&CardNo=121
&UserID=111&CardStatus=1&CardType=2
Success Return OK
Comment
Params in URL:
Appendix:
0 Normal Card, 1 VIP Card, 2 Visitor Card , 3 Patrol Card, 4 Blacklist Card, 5
Stress Card, 0xff Mother Card
Syntax http://<server>/cgi-bin/recordUpdater.cgi?action=remove&name=AccessControlCard&recno=<recno>
220
Amcrest Technologies LLC | www.amcrest.com
Method GET
Description Remove the access control card record.
Example http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=update&name=AccessControlCard&recno=121
Success Return OK
Comment
Params in URL:
Syntax http://<server>/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCard
Method GET
Description Get the access control card record number.
Example http://192.168.1.108/cgi-bin/recordFinder.cgi?action=getQuerySize&name=AccessControlCard
Success Return count = 100
Comment -
Syntax http://<server>/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCardRec[&<paramName>=
<paramValue>...]
Method GET
Description Find the records of control door.
Example http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AccessControlCardRec&condition.Ca
rdNo=123456&StartTime=2014-8-25%200:02:32&EndTime=2014-8-25%201:02:32&count=1000
Success Return
totalCount = 1000
found = 500
records[0].RecNo=789
221
Amcrest Technologies LLC | www.amcrest.com
records[0].UserID =101
records [0].CreateTime=1386243731
records [0].Status =0
records [0].Method =1
records [0].Door =1
Params in Response :
Method: the way to open the door. 0 - password, 1 - card, 2 - first card then password, 3 - first
password then card, 4 - remote, 5 - button, 6 - fingerprint, 7 password + card + fingerprint, 8 -
password + fingerprint, 9 - card+ fingerprint, 11 more than one person open the door, 12 - key, 13 - Be
forced to open the door with password.
Appendix:
222
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/recordUpdater.cgi?action=insert&name=Announcement&Content=<Content>&
ExpirTime=<ExpirTime>&IssueTime=<IssueTime>&Title=<Title>&User=<User>&State=<State>&ReadFl
ag=<ReadFlag>
Method GET
Description Insert the Announcement record.
Example http://192.168.1.108/cgi-bin/recordUpdater.cgi?action=insert&name=Announcement&Content=string
Data&ExpirTime=2012-01-01%2012:00:00&IssueTime=2012-01-01%2012:00:00&Title=Anounce1&Use
r=101&State=0&ReadFlag=0
Success Return OK
Comment
Params in URL:
Syntax http://<server>/cgi-bin/recordFinder.cgi?action=find&name=AlarmRecord[&StartTime=<startTime>&E
ndTime=<endTime>&count=<countNo>]
Method GET
Description Find the AlarmRecord record.
223
Amcrest Technologies LLC | www.amcrest.com
Example http://192.168.1.108/cgi-bin/recordFinder.cgi?action=find&name=AlarmRecord&StartTime=2014-8-25
%2000:02:32&EndTime=2014-8-25%2001:02:32&count=500
Success Return
totalCount = 1000
found = 500
records [0].RecNo=789
records [0].CreateTime=123456789
records [0].Channel=0
records [0].SenseMethod=DoorMagnetism
records [0].RoomNumber=501
records [0].ReadFlag=0
records [0].Comment=Friend
Comment
Params in URL:
countNo: the number of records to get, The record count, default 1024
Params in Response :
224
Amcrest Technologies LLC | www.amcrest.com
13 Bosch APIs
13.1 FileFindHelper
http://<server>/cgi-bin/FileFindHelper.cgi?action=startFind&condition.channel=<channelNo>&conditio
Syntax
n.startTime=<start>&condition.endTime=<end>&condition.
streamType=<stream>[&condition.flags[0]=<flag>&condition.events[0]=<event>&combineMode.granul
arity=<granularityValue>&combineMode.types[0]=<combineType>]
Method GET
Example Find file in channel 1, event type is "AlarmLocal" or "VideoMotion", and time between 2014-1-1
12:00:00 and 2015-1-10 12:00:00 and combine "AlarmLocal" or "VideoMotion" files with granularity 16 ,
URL is:
http://172.23.1.66/cgi-bin/fileFindHelper.cgi?action=startFind&condition.channel=1&condition.startTim
e=2014-1-1%2012:00:00&condition.endTime=2015-1-10%2012:00:00&condition.streamType=Main&co
ndition.flags[0]=Event&condition.events[0]=AlarmLocal&condition.events[1]=VideoMotion&combineM
ode.granularity=16&combineMode.types[0]=AlarmLocal&combineMode.types[0]=VideoMotion
Comment Start to find file with the above condition and combine files with certain type. If success, return find id,
else return Error.
Params in URL:
channelNo: in which channel you want to find the file, start from 1.
start / end: the start/end time when recording.
flag: which flags of the file you want to find. It is an array. The index starts from 0. The range of flag is
{Timing, Marked, Event, Restrict}. If omitted, find files with all the flags.
event: by which event the record file is triggered. It is an array. The index starts from 0. The range of
event is {AlarmLocal, VideoMotion }. 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}.
225
Amcrest Technologies LLC | www.amcrest.com
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}. This condition can be omitted. If
omitted, file will not be combined.
granularityValue: by which granularity to combine files
Example:
File 1:
items[0]. Channel =1
items[0]. Events[0]=AlarmLocal
items[0]. VideoStream=Main
File 2:
items[0]. Channel =1
items[0]. Events[0]=AlarmLocal
items[0]. VideoStream=Main
File 3:
items[0]. Channel =1
items[0]. Events[0]=AlarmLocal
items[0]. VideoStream=Main
226
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/FileFindHelper.cgi?action=startMotionFind&condition.channel=<channelNo>&c
ondition.startTime=<start>&condition.endTime=<end>&condition.streamType=<stream>&motionRegio
n.senseLevel=<level>[&motionRegion.rects[rectNo][0]=<rect0>&motionRegion.rects[rectNo][1]=<rect1>
&motionRegion.rects[rectNo][2]=<rect2>&motionRegion.rects[rectNo][3]=<rect3>]
Method GET
Example Find file in channel 1, event type is "AlarmLocal" or "VideoMotion", and time between 2014-1-1
12:00:00 and 2015-1-10 12:00:00, motion region is [0,0,21,17]
URL is:
http://172.23.1.66/cgi-bin/fileFindHelper.cgi?action=startMotionFind&condition.channel=1&condition.st
artTime=2014-1-1%2012:00:00&condition.endTime=2015-1-10%2012:00:00&condition.streamType=Ma
in&condition.flags[0]=Event&condition.events[0]=AlarmLocal&condition.events[1]=VideoMotio&motion
Region.senseLevel=1&motionRegion.rects[1][0]=0&motionRegion.rects[1][1]=0&motionRegion.rects[1][
2]=21&motionRegion.rects[1][3]=17
Comment Start to find file with the above condition and combine files with certain type. If success, return find id,
else return Error.
Params in URL:
channelNo: in which channel you want to find the file, start from 1.
flag: which flags of the file you want to find. It is an array. The index starts from 0. The range of flag is
{Timing, Marked, Event, Restrict}. If omitted, find files with all the flags.
event: by which event the record file is triggered. It is an array. The index starts from 0. The range of
227
Amcrest Technologies LLC | www.amcrest.com
event is {AlarmLocal, VideoMotion }. 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}.
level: the motion sensitive level, range is 06, 0 represent all level
rect0 & rect1 & rect2 & rect3 : relative coordinates, rect0 and rect2 range is 0-21, rect1 and rect3 range is
0-17. {0,0,0,0} top-left, {21,0,0,0} top-right, {0,17,0,0} bottom-left, {21,17,0,0} bottom-right
http://<server>/cgi-bin/FileFindHelper.cgi?action=findNext&findId=<findId>&count=<fileCount>
Syntax
Method GET
Example http://192.168.1.108/cgi-bin/FileFindHelper.cgi?action=findNext&findId=08137&count=100
items[0]. channel =1
items[0]. events[0]=AlarmLocal
items[0]. streamType=Main
228
Amcrest Technologies LLC | www.amcrest.com
findId: The find Id is created by API Create a file finder or API Create a motion file finder. Must create a
Comment
finder before finding files.
Table 13-4
http://<server>/cgi-bin/FileFindHelper.cgi?action=stopFind&findId=<findId>
Syntax
Method GET
Success Return OK
Comment findId: The find Id is created by API Create a file finder or API Create a motion file finder. Must create a
finder before finding files.
http://<server>/cgi-bin/FileFindHelper.cgi?action=getBoundFile&condition.channel=<ChannelNo>&cond
Syntax
ition.startTime=<start>&condition.endTime=<end>&condition.streamType=<stream>[&condition.flags[0
]=<flag>&condition.events[0]=<event>]
Method GET
Example http://<server>/cgi-bin/FileFindHelper.cgi?action=getBoundFile&condition.channel=1&condition.startTi
me=2014-1-1%2012:00:00&condition.endTime=2015-1-10%2012:00:00&condition.streamType=Main&c
ondition.flags[0]=Timing
items[0]. channel =1
229
Amcrest Technologies LLC | www.amcrest.com
items[0]. streamType=Main
items[1]. channel =1
items[1]. streamType=Main
13.2 BandLimit
13.2.1 getLimitState
Table 13-6
Syntax http://<server>/cgi-bin/BandLimit.cgi?action=getLimitState
Method GET
Example http://192.168.1.108/cgi-bin/bandLimit.cgi?action=getLimitState
230
Amcrest Technologies LLC | www.amcrest.com
Comment
Table 13-7
Syntax http://<server>/cgi-bin/FileManager.cgi?action=addConditionList&condition.Types[0]=<paramValue>&
condition.StartTime=<paramValue>&condition.EndTime=<paramValue>&condition.Channel[0]=<para
mValue>
Method GET
http://192.168.1.108/cgi-bin/FileManager.cgi?action=addConditionList&condition.Types[0]=RecordRe
Example
strict&condition.Types[1]=RecordProtect&condition.StartTime=2014-7-3%2021:02:32&condition.EndT
ime=2014-7-3%2023:02:32&condition.Channel[0]=0&condition.Channel[1]=3
Success Return OK
In below table:
Comment
Appendix:
231
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>cgi-bin/FileManager.cgi?action=cancelConditionList&condition.Types[0]=<paramValue>
&condition.StartTime=<paramValue>&condition.EndTime=<paramValue>&condition.Channel[0]=<par
amValue>
Method GET
Example http://192.168.1.108/cgi-bin/FileManager.cgi?action=cancelConditionList&condition.Types[0]=Record
Restrict&condition.Types[1]=RecordProtect&condition.StartTime=2014-7-3%2021:02:32&condition.En
dTime=2014-7-3%2023:02:32&condition.Channel[0]=0&condition.Channel[1]=3
Success Return OK
Syntax http://<server>/cgi-bin/FileManager.cgi?action=removeConditionList&condition.Types[0]=<paramValu
e>&condition.StartTime=<paramValue>&condition.EndTime=<paramValue>&condition.Channel[0]=<
paramValue>
Method GET
Example http://192.168.1.108/cgi-bin/FileManager.cgi?action=removeConditionList&condition.Types[0]=Recor
dRestrict&condition.Types[1]=RecordProtect&condition.StartTime=2014-7-3%2021:02:32&condition.E
ndTime=2014-7-3%2023:02:32&condition.Channel[0]=0&condition.Channel[1]=3
Success Return OK
232
Amcrest Technologies LLC | www.amcrest.com
Syntax http://<server>/cgi-bin/global.cgi?action=getDST
Method GET
Example http://192.168.1.108/cgi-bin/global.cgi?action=getDST
14 Other APIs
Syntax http://<server>/cgi-bin/deviceDiscovery.cgi?action=attach[&DeviceClass=<deviceClass>]
Method GET
Description Discover devices on internet.
Example http://192.168.1.108/cgi-bin/deviceDiscovery.cgi?action=attach&DeviceClass=VTO
233
Amcrest Technologies LLC | www.amcrest.com
Success Return
deviceInfo[index].AlarmInputChannels=8
deviceInfo[index].AlarmOutputChannels=0
deviceInfo[index].DeviceClass=VTO
deviceInfo[index].DeviceType=VTO2000A
deviceInfo[index].HttpPort=80
deviceInfo[index].IPv4Address.DefaultGateway=172.12.0.1
deviceInfo[index].IPv4Address.DhcpEnable=false
deviceInfo[index].IPv4Address.IPAddress=172.12.7.102
deviceInfo[index].IPv4Address.SubnetMask=255.255.0.0
deviceInfo[index].IPv6Address.DefaultGateway=2008::1
deviceInfo[index].IPv6Address.DhcpEnable=false
deviceInfo[index].IPv6Address.IPAddress=2008::6/112
deviceInfo[index].Mac=00:01:5b:01:44:77
deviceInfo[index].MachineName=YZZ4DZ008D00031
deviceInfo[index].Port=37777
deviceInfo[index].RemoteVideoInputChannels=0
deviceInfo[index].SerialNo=YZZ4DZ008D00031
deviceInfo[index].Vendor=Multi
deviceInfo[index].Version=1.200.0.0
deviceInfo[index].VideoInputChannels=1
deviceInfo[index].VideoOutputChannels=16
Comment
Params in URL:
Params in Response :
234
Amcrest Technologies LLC | www.amcrest.com
14.2 Flashlight
Table 14-2
Syntax http://<server>/cgi-bin/configManager.cgi?action=getConfig&name=FlashLight
Method GET
Description Get Flashlight config. It does not recommend using it.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=getConfig&name=FlashLight
Success Return
head.Brightness=50
head.Enable=false
head.TimeSection[0][0]=1 00:00:00-23:59:59
head.TimeSection[0][1]=0 00:00:00-23:59:59
head.TimeSection[6][5]=0 00:00:00-23:59:59
Comment
Params in Response:
head = table.FlashLight
Table 14-3
Syntax http://<server>/cgi-bin/configManager.cgi?action=setConfig&<paramName>=<paramValue>[&<para
mName>=<paramValue>...]
Method GET
Description Set Flashlight config.
Example http://192.168.1.108/cgi-bin/configManager.cgi?action=setConfig&FlashLight.Enable=true&FlashLight.
TimeSection[1][0]=1%2012:00:00-18:00:00
Success Return OK
Comment -
Appendix:
235
Amcrest Technologies LLC | www.amcrest.com
FlashLight. TimeSection[wd][ts] string It is an effective time period for flash light every day.
Example:
TimeSection[1][0]=1 12:00:00-18:00:00
15 Appendix
This section contains stream format. The Stream format is applied to Get real-time stream and Get playback stream.
Byte
0 1 2 3 4 5 6 7
Order
236
Amcrest Technologies LLC | www.amcrest.com
Byte
8 9 10 11 12 13 14 15
Order
Extend header
Key channel Sequence
length
Byte
16 17 18 19 20 21 22 23
Order
Check
Key utc utcms reserved
sum
Flag=DH;
Packet length means the packet total length, contains the packet header, maybe one or more extend header, and the
media data.
Byte
0 1 2 3 4 5 6
Order
237
Amcrest Technologies LLC | www.amcrest.com
Byte
0 1 2 3 4 5 6 7
Order
Audio Sample
Key 0x11 8 reserved Tracks reserved
Type Freq
Byte
8 9 10 11 12 13 14 15
Order
Audio Type: 1 - PCM8; 2 - G729; 3 - IMA_ADPCM; 4 - G711U; 5 - G721; 6 - PCM8_VWIS; 7 - MS_ADPCM; 8 - G711A; 9 -
AMR-NB; 10 - PCM16; 11- G723.1; 12 AAC; 13 - G726_40; 14 - G726_32; 15 - G726_24; 16 - G726_16
Sample Freq: audio sample frequence, 1 - 4000; 2 - 8000; 3 - 11025; 4 - 16000; 5 - 20000; 6 - 22050; 7 - 32000; 8 -
44100; 9 - 48000;
OperateId: it is valid when playback, which means this packet match with the playback control command.
Byte 0 1 2 3 4 5 6 7
238
Amcrest Technologies LLC | www.amcrest.com
Order
Video Frame
Key 0x21 16 reserved Width
Type Type
Byte
8 9 10 11 12 13 14 15
Order
I Frame Frame
Key Height OperateId
Interval Rate
A video packet must contain the video extend header; Video Type means the video codec type, 1-MPEG4; 2-H.264;
Frame Type: 1-I frame; 2-P frame; 3-B frame; Width and Height describe the frame width and height by pixel; OperateId is
valid when playback, which means this video packet match with the playback control command.
Byte
0 1 2 3 4 5 6
Order
When a stream begin, or the device channel title changes, the video packet must contain the channel title extend
header; if the channel title is Chinese, it only support utf8 format.
Byte
0 1 2 3 4 5 6 7
Order
239
Amcrest Technologies LLC | www.amcrest.com
saving
time
When a stream begin, or the Time Zone changes, the video packet must contain the Time Zone extend header; Time
Zone [0]: [-12, 12](west time zone 12 to east time zone 12), Time Zone[1] modify the time by minutes; Daylight saving
time: 1/0, yes or not in daylight saving time;
Byte
0 1 2 3 4 5 6
Order
If the video frame contains one or more event flags, the video packet should contain the Event Flag Extend Header.
The event flag means what event had happened by set the bit as 1;
Byte
0 1 2 3 4 5 6 7
Order
Byte
8 9 10 11 12 13 14 15
Order
240
Amcrest Technologies LLC | www.amcrest.com
Byte
16 17 18 19 20 21 22 24
Order
If there is a gap between the video frames, the auxiliary packet may contain the gap extend header,
the first timestamp means gap start time, the second timestamp means gap end time.
OperateId: it is valid when playback, which means this packet match with the playback control command.
241