Axis HTTP API
Axis HTTP API
php
Support
Network Video
Axis Video API, HTTP - Interface Specification
Developer pages Revision: 1.14
Date: 2004-April-22
®
VAPIX
Partner program (ADP) 3.1.3 General CGI URL syntax and parameters
1 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
5.3 MPEG-2
5.3.1 MPEG-2 video request
5.4 PTZ
5.4.1 PTZ control
5.5 Audio
5.5.1 Multipart audio data request
5.7 Recording
5.7.1 List recordings
2 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
5.8 I/O
5.8.1 I/O control
5.8.1.1 Input
5.8.1.2 Output
5.10 PPP
5.10.1 Close PPP connection
5.11 Event
5.11.1 Event administration
5.11.1.1 Actions
5.12 Firewall
5.12.1 Firewall administration
5.12.1.1 Actions
5.12.1.2 Parameters
5.12.1.3 Options
DOCUMENT HISTORY
Version Date Comment
3 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
1.01 2000-nov-13 Added info about dataout and altered description of wait
and timeout in "serial port control".
1.03 2000-nov-30 Added entries for closing PPP connection and resetting
PPP connection maxtimer.
1.14 2004-apr-22 Added better description and an example for the info
parameter to the ptz.cgi.
Corrected some response descriptions.
1 OVERVIEW
This document specifies the external HTTP based application programming interface of the Axis camera and
video servers.
4 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
The HTTP-based video interface provides the functionality for requesting single and multi-part images, for
controlling camera functions (PTZ, output relay etc.) and for getting and setting internal parameter values. The
image and CGI-requests are handled by the built-in Web server in the camera and video server.
2 REFERENCES
HTTP protocol
3 DEFINITIONS
This section contains information on general usage of this document.
CGI Common Gateway Interface - a standardized method of communication between a client (e.g., a web
browser) and a server (e.g., a web server).
TBD To be done/designed - notifies the reader that the referenced section/subsection/entity is intended to
be specified, but has not reached a level of maturity to be public at this time.
5 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
In URL syntax and in descriptions of CGI 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. An example of this is the description of the name for the server, denoted with <servername> in the
URL syntax description below, which is replaced with the string myserver in the URL syntax example, also
shown below.
URL syntax is written with the word "Syntax:" shown in bold face, followed by a box with the referred syntax, as
shown below. The name of the server is written as <servername>. This is intended to be replaced with the name
of the actual server. This can either be a name, e.g., "thecam" or "thecam.adomain.net" or the associated IP
number for the server, e.g., 10.10.2.139.
Syntax:
http://<servername>/jpg/image.jpg
A description of returned data is written with "Return:" in bold face, followed by the returned data in a box. All
data returned as HTTP formatted, i.e., starting with the string HTTP, is line-separated with a Carriage Return and
Line Feed (CRLF) printed as \r\n.
Return:
URL syntax examples are written with "Example:" in bold face, followed by a short description and a light grey
box with the example.
http://myserver/jpg/image.jpg
Examples of what can be returned by the server from a request is written with "Example:" in bold face, followed
by a short description and a light grey box with an example of the returned data.
6 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Syntax:
http://<servername>/axis-cgi/<subdir>[/<subdir>...]/<cgi>.<ext>
[?<parameter>=<value>[&<parameter>=<value>...]]
http://myserver/axis-cgi/com/ptz.cgi?camera=1&move=home
4 INTERFACE SPECIFICATION
4.1 Naming conventions and URL syntax
7 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Return:
204 No Content The server has fulfilled the request, but there is no
new information to send back.
400 Bad Request The request had bad syntax or was inherently
impossible to be satisfied.
404 Not Found The server has not found anything matching the
request.
503 Service Unavailable The server is unable to handle the request due to
temporary overload.
5 API GROUPS
To make it easier for developers to get an idea of which API requests are supported for different products, the
8 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
requests have been grouped together. Information about which groups are supported can be found in the
product-specific release notes document, available for download from the Axis web site.
5.1 General
The requests specified in the General section are supported by all video products.
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/admin/getparam.cgi?<parameter>[&<parameter>...]
<string>
1 <group>[.<name>] Returns the value of the camera parameter named
<group>.<name> as described in 5.1.2. If <name>
is omitted, all the parameters of the <group> are
returned
The camera parameters must be entered exactly as
named in the camera or the video server.
1
The supported parameters are product/release-dependent.
http://myserver/axis-cgi/admin/getparam.cgi?Network.IPAddress
9 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://myserver/axis-cgi/admin/getparam.cgi?Network
Return:
<parameter>=<value>\n
[ <parameter pair> ]
If the CGI request includes an invalid parameter value, the server returns an error message.
Return:
10 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/admin/setparam.cgi?<parameter>=<value>
[&<parameter>=<value>...]
nosync=<string>
1 yes Specifies that there should be no sync (write) of the
corresponding configuration file to flash. If
parameter is omitted, a sync will occur.
http://myserver/axis-cgi/admin/setparam.cgi?Image.Resolution=320x240
Example: Set the bandwidth limitation to 500, without writing the corresponding configuration file to flash
http://myserver/axis-cgi/admin/setparam.cgi?Network.Bandwidth=500&nosync=yes
11 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/factorydefault.cgi
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/restart.cgi
Method: GET
Syntax:
12 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://<servername>/axis-cgi/admin/serverreport.cgi
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/systemlog.cgi
Return:
5.2 JPEG/MJPG
The requests specified in the JPEG/MJPG section are supported by those video products that use JPEG/MJPG
encoding.
Method: GET
Syntax:
13 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://<servername>/jpg[/<camera>]/<name>.jpg
<camera> 1, ...
1 Select input source. Applies only to servers with
more than one input source.
Default: default camera
1
Product-dependent. Check the product specification.
2
Obsolete.
Example: request JPEG image from default camera with default resolution and compression
http://myserver/jpg/image.jpg
Method: GET
Syntax:
http://<servername>/axis-cgi/jpg/image.cgi
[?<parameter>=<value>[&<parameter>=<value>...]]
14 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
resolution=<int>x<int> 1
<width> ,<height>
1 Specify the resolution as <width> times <height>
number of pixels of the returned image.
camera=<int> 1, ...
1 Applies only to video servers with more than one
video input. Selects the source camera.
compression=<int> 0 - 100
1 Adjusts the compression level of the image. Higher
values correspond to higher compression, i.e. lower
quality and smaller image size.
Note: This value is internally mapped and is
therefore product-dependent.
colorlevel=<int> 0 - 100
1 Sets level of color or grayscale.
0 = grayscale, 100 = full color.
quad=<int> 0, 1
1 Generate a quad image.
0 = normal, 1 = quad
15 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
timeout=<int> >0
1 Set the timeout value (seconds) for the session. If a
connection is blocked for this amount of time, the
session will be closed by the server.
1
Product-dependent. Check the product specification.
Example: request a JPEG image from camera 1 with a resolution of 320x240 and compression of 25
http://myserver/axis-cgi/jpg/image.cgi?resolution=320x240&camera=1&compression=25
An optional field "Content-Length" header entry specifying the image size in bytes <image size> may also be
included if the camera or video server is configured to include it. The other optional field "Content-Auth" is
followed by authorization-specific data <authorization information>, e.g., the encryption method being used.
Return:
16 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Method: GET
Syntax:
http://<servername>/axis-cgi/buffer/command.cgi?<parameter>=<value>
[&<parameter>=<value>...]
17 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
predelay=<int> <milliseconds> The preferred time between the pre alarm images in
milliseconds.
Default is one second, 1000 milliseconds.
postdelay=<int> <milliseconds> The preferred time between the post alarm images
in milliseconds.
Default value is equal to the value of predelay. I.e.
1000 milliseconds if not specified, and for example
3000 milliseconds, if predelay is set to that.
Example 1: Create an image buffer, named DOOR1, with 10 pre alarm images and 15 post alarm images.
http://myserver/axis-cgi/buffer/command.cgi?do=start&buffername=DOOR1
&prealarm=10&postalarm=15&&uri=ftp://jpg/1/image.jpg
http://myserver/axis-cgi/buffer/command.cgi?do=stop&buffername=DOOR1
http://myserver/axis-cgi/buffer/command.cgi?do=get&buffername=DOOR1&index=1
Method: GET
Syntax:
18 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://<servername>/mjpg[/<camera>]/<name>.mjpg
<camera> 1, ...
1 Select input source. Applies only to servers with
more than one input source.
Default: default camera
1
Product-dependent. Check the product specification.
2
Obsolete.
Example: request JPEG image stream from the 2nd camera with default resolution and compression
http://myserver/mjpg/2/video.mjpg
Method: GET
Syntax:
http://<servername>/axis-cgi/mjpg/video.cgi
[?<parameter>=<value>[&<parameter>=<value>...]]
19 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
resolution=<int>x<int> 1
<width> ,<height>
1 Specify the resolution as <width> times <height>
number of pixels of the returned image.
camera=<int> 1, ...
1 Applies only to video servers with more than one
video input. Selects the source camera. If omitted,
the default camera is used.
compression=<int> 0 - 100
1 Adjusts the compression level of the image. Higher
values correspond to higher compression, i.e. lower
quality and smaller image size.
Note: This value is internally mapped and is
therefore product-dependent.
colorlevel=<int> 0 - 100
1 Sets level of color or grayscale.
0 = grayscale, 100 = full color.
quad=<int> 0, 1
1 Generate a quad image.
0 = normal, 1 = quad
20 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
duration=<int> 0, ... Specifies for how many seconds the video will be
generated and pushed to the client.
nbrofframes=<int> 1, ... Specifies how many frames the server will generate
and push.
timeout=<int> >0
1 Set the timeout value (seconds) of the session. If a
connection is blocked for this length of time, the
session will be closed by the server.
1
Product-dependent. Check the product specification.
Example: a Multipart JPEG image stream from camera 1 with a resolution of 320x240 and compression of 25
http://myserver/axis-cgi/mjpg/video.cgi?resolution=320x240&camera=1
21 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
&compression=25
Example: a Multipart JPEG image stream from camera 1 with a required frame rate of 5
http://myserver/axis-cgi/mjpg/video.cgi?req_fps=5
Return:
myboundary
Content-Type: image/jpeg\r\n
[ Content-Length: <image size>\r\n ]
[ Content-Auth: <authorization information>\r\n ]
\r\n
<JPEG image data>\r\n
--<boundary>\r\n
<image>
22 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
--myboundary\r\n
Content-Type: image/jpeg\r\n
Content-Length: 15656\r\n
\r\n
<JPEG image data>\r\n
--myboundary\r\n
Content-Type: image/jpeg\r\n
Content-Length: 14978\r\n
\r\n
<JPEG image data>\r\n
--myboundary\r\n
Content-Type: image/jpeg\r\n
Content-Length: 15136\r\n
\r\n
<JPEG image data>\r\n
--myboundary\r\n
.
.
.
5.3 MPEG-2
The requests specified in the MPEG-2 section are supported by those products that use MPEG-2 encoding.
Syntax:
http://<servername>/axis-cgi/mpeg2/video.cgi[?<parameter>=<value>
[&<parameter>=<value> ...]]
duration=<int> 0, ... Specifies for how many seconds the video shall be
generated and pushed to the client. If the duration
parameter is omitted, an infinite video stream will
be provided to the client.
camera=<int> 1, ...
1 Searched recording should match this camera id.
23 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
1
Product-dependent. Check the product specification.
A field "X-Prebuffer-Length" is included in the HTTP header when responding to an MPEG-2 buffer request. This
entry specifies the length (in seconds) of the pre-buffer video that is included in the video stream response. This
length depends on what is specified in the request, and on a maximum value set by the server. If the requested
length is greater than or equal to the maximum value set by the server, the returned pre-buffer length will be
equal to the maximum value. If the requested length is shorter than the maximum value, the returned length
will be equal to the requested length.
Content-type: video/mpeg\r\n
\r\n
<MPEG stream>\r\n
Example:
Content-Type: video/mpeg\r\n
\r\n
24 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
<MPEG stream>\r\n
Syntax:
http://<servername>/axis-cgi/mpeg2/buffer.cgi?
[?<parameter>=<value>[&<parameter>=<value>...]]
duration=<int> 0, ... Specifies for how many seconds the video will be
generated and pushed to the client. If the duration
parameter is omitted, an infinite video stream will
be provided to the client.
Method: GET
Syntax:
http://<servername>/view/sdp/guide.sdp
http://<servername>/view/sdp/guide.axsdp
25 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://<servername>/view/sdp/guide.sdpx
All requests return the same description file. The responses from guide.sdp and guide.axsdp have
"application/sdp" as content type, but using guide.sdp is preferred practice. The response from guide.sdpx has
"text/plain" as content type.
Example: Requested MPEG-2 media stream session info with guide.sdp from an MPEG-2 video product
HTTP/1.0 200 OK
Date: Thu, 28 Nov 2002 13:16:13 GMT
Server: Boa/0.92o
Content-Length: 777
26 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
v=0
o=root 1038489142 1038489142 IN IP4 10.13.9.123
s=AXIS 250S MPEG-2 Video Server RTP Stream from 10.13.9.123
b=AS:4000
t=0 0
a=type:broadcast
a=tool:AXIS 250S MPEG-2 Video Server 3.10
m=video 5000 RTP/AVP 32
c=IN IP4 239.192.182.161/5
a=x-dimensions:720,576
a=framerate:25
a=x-iptv-svr:video 10.13.9.123 file 1 loop
m=audio 5000 RTP/AVP 14
c=IN IP4 239.192.182.94/5
a=x-bitrate:128
a=x-samplerate:44100
a=x-iptv-svr:audio 10.13.9.123 file 1 loop
v=0
o=root 1038489143 1038489143 IN IP4 10.13.9.123
s=AXIS 250S MPEG-2 Video Server RTP Stream No Audio from 10.13.9.123
b=AS:4000
t=0 0
a=type:broadcast
a=tool:AXIS 250S MPEG-2 Video Server 3.10
m=video 5000 RTP/AVP 32
c=IN IP4 239.192.182.161/5
a=x-dimensions:720,576
a=framerate:25
a=x-iptv-svr:video 10.13.9.123 file 1 loop
5.4 PTZ
The requests specified in the PTZ section are supported by those video products that have support for
Pan/Tilt/Zoom devices.
Important: The PTZ control is device-dependent. Please check the specification of the Axis PTZ driver you
intend using, for information about supported parameters and actual parameter values. The following table is
only an overview.
Method: GET/POST
Syntax:
27 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://<servername>/axis-cgi/com/ptz.cgi?<parameter>=<value>[&
<parameter>=<value>... ]
camera=<int> 1, ...
1 Applies only to video servers with more than one
video input. Selects the source camera. If
omitted, the default camera is used.
imagewidth=<int> 1, ...
1 Required in conjunction with center if the image
width is displayed different from the default size
of the image, which is product-specific.
imageheight=<int> 1, ...
1 Needed in conjunction with center if the image
height is different from the default size, which is
product-specific.
28 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
pan=<float> -180.0 - 180.0 Absolute: Pans the device relative to the (0,0)
position.
Relative: N/A
tilt=<float> -180.0 - 180.0 Absolute: Tilts the device relative to the (0,0)
position.
Relative: n/a
Relative: n/a
Relative: n/a
Relative: n/a
29 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
3
zoomrel =<string> tele, Adjusts the zoom gradually.
wide,
telemax,
telemin
3
focusrel =<string> far, Adjusts the focus gradually.
farmore,
near,
nearmore
3
irisrel =<string> open, Adjusts the iris gradually.
close,
openmore,
closemore
30 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
continuousirismove= -100 - 100 Continuous iris motion. Positive values mean iris
<int> open and negative values mean iris close. "0"
means stop.
setdevicepreset= <preset pos> Bypasses the presetpos interface and tells the
<int> device to save its current position as preset
position <preset pos> directly in the device,
where <preset pos> is a device-specific preset
position number.
gotodevicepreset= <preset pos> Bypasses the presetpos interface and tells the
<int> device to go directly to the preset position
number <preset pos> stored in the device, where
the <preset pos> is a device-specific preset
position number.
31 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
32 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
"vertical" as alignment.
1
Product-dependent. Check the product specification.
2
Actual values are device driver-specific.
3
Obsolete.
4
<preset name> is a string with a maximum of 31 characters, ~ is not allowed.
Example: Request information about which PTZ commands are available for camera 3.
http://myserver/axis-cgi/com/ptz.cgi?info=1&camera=3
5.5 Audio
The requests specified in the Audio section are supported by those video products that have audio capability.
33 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Method: GET
Syntax:
http://<servername>/axis-cgi/audio/receive.cgi
http://myserver/axis-cgi/audio/receive.cgi
Return:
34 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Method: POST
Syntax:
http://<servername>/axis-cgi/audio/transmit.cgi
http://myserver/axis-cgi/audio/transmit.cgi
Method: GET
Syntax:
http://<servername>/axis-cgi/audio/getparam.cgi
Return:
35 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
root.Audiod.duplexMode=<duplexMode>\n
root.Audiod.maxNumberOfClients=<maxNumberOfClients>\n
root.Audiod.forwardOnPost=<forwardOnPost>\n
root.Audiod.buttonMode=<buttonMode>\n
root.Audiod.acousticEcho=<acousticEcho>\n
root.Audiod.lineEcho=<lineEcho>\n
root.Audiod.slopeFilter=<slopeFilter>\n
root.Audiod.noisecancelIOgain=<noicecancelIOgain>\n
root.Audiod.noisecancelAttenuation=<noisecancelAttenuation>\n
root.Audiod.audioEncoding=<audioEncoding>\n
root.Audiod.httpMessageType=<httpMessageType>\n
root.Audiod.microphoneMode=<microphoneMode>\n
root.Audiod.speakerMode=<speakerMode>\n
root.Audiod.forceMicrophoneMode=<forceMicrophoneMode>\n
root.Audiod.forceSpeakerMode=<forceSpeakerMode>\n
root.Audiod.bufferLevel=<bufferLevel>\n
root.Audiod.forceBufferLevel=<forceBufferLevel>\n
\n
Example:
36 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
The "key" entry is a unique window identity communicated in all actions concerning the window, i.e., when
adding, updating or removing it, or when reading information about it. The "name" entry is a window
identification useful when e.g. communicating with a user in an application or an alarm. The three parameters
"size", "sensitivity" and "history" are as generic as possible, i.e. they do not depend on the actual motion
detection algorithm.
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/admin/mdsetparam.cgi?<parameter>=<value>[&
<parameter>=<value>...]
key=<int> 0, ...
1 A unique identity to the motion detection window.
Default: no default value provided.
37 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
left=<int> 0 ... 9999 The coordinate for the left boundary of the
rectangular motion detection window.
The full value range is related to the full image
width and 0 is counted from the left hand side of the
image.
Default: 0
right=<int> 0 ... 9999 The coordinate for the right boundary of the
rectangular motion detection window.
The full value range is related to the full image
width and 0 is counted from the left hand side of the
image.
Default: 9999
top=<int> 0 ... 9999 The coordinate for the upper boundary of the
rectangular motion detection window.
The full value range is related to the full image
height and 0 is counted from the upper side of the
image.
Default: 0
bottom=<int> 0 ... 9999 The coordinate for the bottom boundary of the
rectangular motion detection window.
The full value range is related to the full image
height and 0 is counted from the upper side of the
image.
Default: 9999
sensitivity=<int> 0 ... 100 This tunes the "object difference from the
background"-sensitivity, i.e. difference in terms of
38 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
history=<int> 0 ... 100 This adjusts the motion detection to be more or less
sensitive for very fast motion. At very low values
motion is detected only when a scene has changed,
but rapidly adopts to this changed scene as the new
normal scene. Higher values are more conservative
and will detect motion in a greater number of
pictures before considering this as being a normal
object in the scene.
Default: method specific
size=<int> 0 ... 100 Defines as a percentage the size of the object that
will result in motion detection. At a low value, even
very small changes will trigger detection, whilst a
very large value requires a very large object to
trigger detection.
Default: method specific
39 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://myserver/axis-cgi/admin/mdsetparam.cgi?action=add&key=2
&name=Entrance&top=500&bottom=7000&left=5000&right=8500
http://myserver/axis-cgi/admin/mdsetparam.cgi?action=update&key=2
&top=1500&bottom=8000
http://myserver/axis-cgi/admin/mdsetparam.cgi?action=remove&key=2
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/motion/mdgetparam.cgi
Return:
key=<key>\r\n
name=<name>\r\n
method=<method>\r\n
left=<left>\r\n
top=<top>\r\n
40 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
right=<right>\r\n
bottom=<bottom>\r\n
sensitivity=<sensitivity>\r\n
history=<history>\r\n
size=<size>\r\n
\r\n
[ <window data> ]
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/motion/motiondetect.cgi
Return:
41 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
axismdb
Content-Type: text/plain\r\n
\r\n
<motion level for window n>
--<boundary>\r\n
Example: two motion detection windows with key "0" and key "1"
42 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
camera=<int> 1, ...
1 List only recordings that match this camera id.
event=<int> >0 List only recordings that match this event id.
Id of an event can be found in the event
parameters.
time=<int> Seconds since 1970: List only recordings made during this time.
1/100 seconds
timespan=<int> >0 List only recordings made during the time span from
"time" until "time" + "timespan".
Requires: parameter "time"
1
Product-dependent. Check the product specification.
Return:
1
Only if parameter "info=count" is used.
HTTP/1.0 200 OK\r\n
Content-Type: text/plain\r\n
with the following parameters and values
\r\n
<info data>1
<recording data>
44 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
priority=<int> 0 - 100
1 Priority of the event.
100 = highest priority.
Note: This value is internally mapped and is
therefore product-dependent.
startquality=<int> 0 - 100
1 Quality of the beginning of the recording, due to
reduction.
100 = highest quality.
Note: This value is internally mapped and is
therefore product-dependent.
stopquality=<int> 0 - 100
1 Quality of the beginning of the recording, due to
reduction.
100 = highest quality.
Note: This value is internally mapped and is
therefore product-dependent.
1
Product-dependent. Check the product specification.
Request:
http://myserver/axis-cgi/view/reclist.cgi?recordingid=12
Response:
45 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Example 2: List recordings made during timespan Jul 4 2002 12:00:00 - 13:00:00 CET with count info:
Request:
http://myserver/axis-cgi/view/reclist.cgi?time
=1025776800×pan=3600&info=count
Response: (edited)
46 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
\r\n
recordingid=357\r\n
...
eventstarttime=1025778305:00\r\n
...
eventstoptime=1025778401:34\r\n
...
\r\n
http://myserver/axis-cgi/view/reclist.cgi?camera=1&event=6
http://myserver/axis-cgi/view/reclist.cgi?info=count
Syntax:
http://<servername>/axis-cgi/view/player.cgi[?<parameter>=<value>
[&<parameter>=<value> ...]]
Example:
47 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://myserver/axis-cgi/view/reclist.cgi
Play recording 24
http://myserver/axis-cgi/view/player.cgi?recordingid=24
Play backward
http://myserver/axis-cgi/view/player.cgi?sessionid=3&
direction=backward
recordingid=<int> >0
1 The id of the recording to play.
camera 1, ...
2 Play from this camera.
starttime=<int>:<int> Seconds since 1970: 1/100 Play only a part of the recording. Start at this
seconds
3 time.
Example: 983453412:10
stoptime=<int>:<int> Seconds since 1970: 1/100 Play only a part of the recording. Stop at this
seconds
3 time.
Example: 983453412:10
startframe=<int>:<int> frame id
3 Play only a part of the recording. Start at this
frame.
48 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Example: 785421:57
stopframe=<int>:<int> frame id
3 Play only a part of the recording. Stop at this
frame.
Example: 785421:57
time=<int>:<int> Seconds since 1970: 1/100 Get a single image closest to this time.
seconds
4 Example: 983453412:10
frame=<int>:<int> frame id
4 Get a single image closest to this frame id.
Example: 785421:57
49 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Default: no
1
Request must contain one of these. See example below.
2
Product-dependent. Check the product specification.
3
Use either starttime/stoptime or startframe/stopframe. Do not combine time and frame formats in same
request.
4
Use either time or frame to get a JPG single image.
If time is specified, the first subsection found that matches the time (within the specified recording, if such is
specified) will be played. Since there can be several subsections that matches the same time (due to changes in
server time) there is no way of knowing which was requested, hence the first match is always played.
Frame ID is used to directly identify a unique video frame from a specific camera. This is independent of
different recordings and changes in server time. The scale of the Frame ID is linear to real time.
http://myserver/axis-cgi/view/player.cgi?recordingid=5
Example 2: Play part of recording backward - (sessionid=3 was returned in previous server response)
50 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://myserver/axis-cgi/view/player.cgi?sessionid=3&startframe=45347:00
&stopframe=47023:00&direction=backward&keepalive=yes
Example 3: Fast forward part of recording - (sessionid=3 was returned in previous server response)
http://myserver/axis-cgi/view/player.cgi?sessionid=3&startframe=45347:00
&stopframe=47023:00&step=4&keepalive=yes
Example 4: Get single JPG image of specific time - (sessionid=3 was returned in previous server response)
http://myserver/axis-cgi/view/player.cgi?sessionid=3&time=983433518:00&keepalive=yes
Example 5: Get next single JPG image from specified frame - (sessionid=3 was returned in previous server
response)
http://myserver/axis-cgi/view/player.cgi?sessionid=3&frame=45692:14
&direction=forward&step=1&keepalive=yes
http://myserver/axis-cgi/view/player.cgi?sessionid=3&session=close
Example 7: Play time interval - (The first found matching interval for the camera is played)
http://myserver/axis-cgi/view/player.cgi?camera=4&starttime=982813227:00
&stoptime=982813720:00&keepalive=yes
51 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
myboundary
x-axis-dvr-search-progress-percent: <percent>\r\n
Content-Type: text/plain\r\n
\r\n
searchsourceframe=<frame id>\r\n
searchcurrentframe=<frame id>\r\n
searchdestinationframe=<frame id>\r\n
--<boundary>\r\n
<progress>
x-axis-dvr-session-id: <sessionid>\r\n
x-axis-dvr-frame-time: <time>\r\n
x-axis-dvr-frame-id: <frameid>\r\n
x-axis-dvr-frame-state: <state>\r\n
Content-Type: image/jpeg\r\n
Content-Length: <image size>\r\n
\r\n
<JPEG image data>\r\n
--<boundary>\r\n
<image>
1
Only if parameter "keepalive=yes" is used and the search for the start frame takes more than a few seconds.
Progress fields are pushed with a few seconds interval.
52 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
x-axis-dvr-frame-time:
Timestamp in string format epoch:hh.
<int>:<int>
x-axis-dvr-frame-state: <int> Active alarm inputs when this picture was taken, numeric representation
of 4-bit field.
Alarm inputs 1 - 4 are represented by values 1 (0001), 2 (0010), 4
(0100), 8 (1000).
Example: State 5 represents inputs 1 and 3 active (1+4). State 15
represents all inputs active (1+2+4+8).
<parameter>=
Values Description
<value>
53 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Example: Response to request for part of recording starting at frame 563234:23 with keepalive set.
54 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
This request changes the status on a recording from released to preserved or vice versa.
A preserved recording is not affected by quality reduction, but maintains the quality it had when preserved, until
released.
Syntax:
http://<servername>/axis-cgi/operator/recadmin.cgi?
camera=<camera id>&[preserve|release]=<recid>
http://myserver/axis-cgi/operator/recadmin.cgi?camera=2&preserve=4234
http://myserver/axis-cgi/operator/recadmin.cgi?camera=1&release=243592
Method: GET
Syntax:
http://<servername>/axis-cgi/view/record.cgi[?<parameter>=<value>
[&<parameter>=<value> ...]]
55 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
do=<string>
1 start, Start or stop recording.
stop
camera=<int>
1
1, ...
2 Selects a camera.
1
Request must contain these. See example below.
2
Product-dependent. Check the product specification.
http://myserver/axis-cgi/view/record.cgi?do=start&camera=1
http://myserver/axis-cgi/view/record.cgi?do=stop&camera=2
5.8 I/O
The requests specified in the I/O section are supported by those products that have Input/Output connectors.
5.8.1.1 Input
Input
Method: GET
Syntax:
http://<servername>/axis-cgi/io/input.cgi?<parameter>=<value>
[&<parameter>=<value>...]
56 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
<value>
1
Number of inputs may differ for different camera and video servers. See product specification.
2
Support for this parameter is product/release-dependent.
ioboundary
Content-Type: text/plain\r\n
\r\n
<check data>
--<boundary>\r\n
IO<n>:<action char>\r\n
and <n> is the I/O port number and <action char> is the action character described in the table above.
Note: The output can contain extra blank lines, i.e., extra \r\n within the sections.
57 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://myserver/axis-cgi/io/input.cgi?monitor=1,2,3,4
5.8.1.2 Output
Output
Method: GET
Syntax:
58 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://<servername>/axis-cgi/io/output.cgi?<parameter>=<value>
[&<parameter>=<value>...]
action=<string> 1
[<id> ]:<a>[<wait> Sets the output relay <id> on or off and waits
<a> ...] <wait> milliseconds.
<id> = Output number. If omitted, output 1 is
selected.
1
Number of outputs may differ for different camera and video servers. See product specification.
2
Support for this parameter is product/release-dependent.
http://myserver/axis-cgi/io/output.cgi?action=1:/
Example: Set two 300 ms pulses with 500 ms delay between the pulses on output 1
59 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://myserver/axis-cgi/io/output.cgi?action=1:/300\500/300\
http://myserver/axis-cgi/io/output.cgi?action=1:1000/
5.8.2.1 Input
Input
Method: GET
Syntax:
http://<servername>/axis-cgi/io/virtualinput.cgi?<parameter>=<value>
http://myserver/axis-cgi/io/virtualinput.cgi?action=1:/
60 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/com/serial.cgi?<parameter>=<value>
[&<parameter>=<value>... ]
port=<int> 1, ...
1 The COM port is selected with this parameter.
writestring=<string> <url encoded string> Writes the URL-encoded string to the selected serial
port.
1
Max string length: 128 bytes .
61 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
1
Product-dependent. Check the product specification.
2
Obsolete.
After an initial connect command from the client, the connection is kept alive until the client closes
it.
After the connection has been set up, data sent from the client to the Web server is forwarded to
the serial port, and incoming serial data is returned to all currently connected clients.
Syntax:
http://<servername>/axis-cgi/com/serial.cgi?<parameter>=<value>
[&<parameter>=<value>...]
port=<int> 1, ...
1 Select COM port.
camera=<int> 1, ...
1 Selects the source camera or
unit=<int> external unit. If omitted, and
"port=" command is also omitted,
the default camera/unit is used to
62 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
1
Product-dependent. Check the product specification.
5.10 PPP
The requests specified in the PPP section are supported by those products that have support for the PPP
protocol.
Accessing this URL will force the Axis device to immediately close and disconnect any current PPP connection.
When closing a PPP connection, all connections will be closed (dial-in, dial-out, callback).
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/closeppp.cgi[?<wait>]
63 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Accessing this URL will reset the timer counting down the maximum time a device is allowed to be connected
over a PPP connection.
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/resetppptimer.cgi
5.11 Event
The requests specified in the Event section are supported by those products that have support for event
handling.
Method: GET
Syntax:
http://<servername>/axis-cgi/operator/ev_admin.cgi?add
64 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://<servername>/axis-cgi/operator/ev_admin.cgi?delete=<entry>
5.11.1.1 Actions
These are the actions used to administer the events. Each event is given an entry identifier (E0, E1 E2, etc)
which is later used to delete the entry. The identifier of a deleted entry may be reused by a new entry.
delete=<entry> E0, E1, E2, ... Delete an entry from list of events.
65 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
\r\n
Request failed: <error message>\r\n
http://myserver/axis-cgi/operator/ev_admin.cgi?add
Response:
http://myserver/axis-cgi/operator/ev_admin.cgi?delete=E7
Response:
5.12 Firewall
The requests specified in the Firewall section are supported by those products that have built-in firewall
functionality.
For each added entry, the services that are to be accessible must be specified. This is done by parameters, from
where a specific service or a range of port numbers for custom services can be specified.
Method: GET
66 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Syntax:
http://<servername>/axis-cgi/admin/fwall_admin.cgi?list
http://<servername>/axis-cgi/admin/fwall_admin.cgi?enable[&<option> ...]
http://<servername>/axis-cgi/admin/fwall_admin.cgi?disable[&<option> ...]
http://<servername>/axis-cgi/admin/fwall_admin.cgi?add[&<parameter>[=<value>] ...]]
[&<option> ...]
http://<servername>/axis-cgi/admin/fwall_admin.cgi?update=<entry>[&<parameter>
[=<value>] ...]][&<option> ...]
http://<servername>/axis-cgi/admin/fwall_admin.cgi?delete=<entry>[&<option> ...]
5.12.1.1 Actions
These are the actions used to administer the firewall. Each added host is given an entry identifier (F0, F1 F2,
etc) which is later used to modify or delete the entry. The identifier of a deleted entry may be reused by a new
entry.
delete=<entry> F0, F1, F2, ... Delete an entry from list of accepted hosts.
update=<entry> F0, F1, F2, ... Update an entry in list of accepted hosts.
5.12.1.2 Parameters
67 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
host=<address>
1 2
host name or numerical Host to add or modify.
Internet address
1
Required by action add.
2
Address specified by host name requires that the server has access to a Domain Name Server.
5.12.1.3 Options
Before modifying the settings of an enabled firewall, the script will verify that the host that requested the action
will still have access to the server once the action is performed. If the client uses a proxy, proxy access will be
verified instead.
If verification fails, i.e. the host would have been blocked from the server, the action is not carried out and an
error is returned. This prevents accidental lock out by the administrator, etc.
By setting the force option this verification is skipped and all actions are carried out, regardless of their
consequences.
Option/Syntax Description
68 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
Return: A failed verification by an enable, add, delete or update request. No settings have been changed. Use
the force option to override the verification.
69 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
[<entry>]\r\n
host=<value>\r\n
http=<value>\r\n
https=<value>\r\n
ftp=<value>\r\n
telnet=<value>\r\n
tcp=<value>\r\n
udp=<value>\r\n
\r\n
host 1
host name or numeric The host for this entry.
Internet address
1
Address specified by host name requires that the server has access to a Domain Name Server.
Example: Adding new host with HTTP and FTP access, with verification
http://myserver/axis-cgi/admin/fwall_admin.cgi?add&host=10.13.18.20&http&ftp
Response:
70 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://myserver/axis-cgi/admin/fwall_admin.cgi?list
Response:
http://myserver/axis-cgi/admin/fwall_admin.cgi?delete=F1
Response:
71 of 72 5/21/10 15:42
Axis Communications - Network Camera Developer pages http://www.axis.com/techsup/cam_servers/dev/cam_http_api.php
http://myserver/axis-cgi/admin/fwall_admin.cgi?delete=F1&force
Response:
Axis is the world’s leading expert in network video Glossary | Contact | Sites | Privacy Statement
72 of 72 5/21/10 15:42