Vapix, HTTP API Specification: o o o o
Vapix, HTTP API Specification: o o o o
Vapix, HTTP API Specification: o o o o
Revision: 2.14
Date: 2007-October-17
TABLE OF CONTENTS
DOCUMENT HISTORY
1 OVERVIEW
2 REFERENCES
3 DEFINITIONS
4 INTERFACE SPECIFICATION
5 API GROUPS
5.1 General
o 5.1.1 Add, update, remove and list parameters and their values
5.1.1.1 List parameters
5.1.1.2 List output format
5.1.1.3 Update parameters
5.1.1.4 Add parameters
5.1.1.5 Remove parameters
5.1.1.6 Add/Remove server responses
o 5.1.2 Add, modify and delete users
o 5.1.3 Factory default
o 5.1.4 Hard factory default
o 5.1.5 Backup
o 5.1.6 Restore
o 5.1.7 Firmware upgrade
o 5.1.8 Restart server
o 5.1.9 Server report
o 5.1.10 System logs
o 5.1.11 Access logs
o 5.1.12 System date and time
5.1.12.1 Get system date and time
5.1.12.2 Set system date and time
5.3 PTZ
o 5.3.1 PTZ driver update
o 5.3.2 PTZ administration
o 5.3.3 PTZ control
o 5.3.4 PTZ configuration
o 5.3.5 Set PTZ parameters
o 5.3.6 PTZ control queue
o 5.3.7 PTZ control queue response
5.5 I/O
o 5.5.1 I/O control
5.5.1.1 Input
5.5.1.2 Output
o 5.5.2 Virtual I/O control
5.5.2.1 Input
5.7 IP filter
o 5.7.1 IP filter administration
o 5.7.2 Server responses
5.8 Audio
o 5.8.1 Audio MIME types
o 5.8.2 Audio data request
o 5.8.3 Singlepart audio data response
o 5.8.4 Multipart audio data response
o 5.8.5 Audio data transmit
DOCUMENT HISTORY
2.01 2004-Feb-03 Added requests for Video status, Bitmap, JPEG buffer, PTZ, Motion Detection,
I/O and Serial port.
Added new parameters to JPEG image CGI request and MJPG video CGI
request.
2.03 2004-May-27 Added more valid values for the parameter resolution, to the Bitmap image,
JPEG image and MJPG video CGI requests.
Added requests for Backup, Restore, Firmware upgrade and IP address
filtering.
2.04 2004-July-09 Added more valid values for the parameter resolution, to the JPEG image and
MJPG video CGI requests.
2.08 2005-May-26 Added a policy parameter for the ipfilter.cgi and examples.
Added new HTTP APIs for the AXIS 292 Network Video Decoder.
1 OVERVIEW
This document specifies the external HTTP-based application programming interface of the Axis camera and video servers
with firmware version 4.00 and above.
The HTTP-based video interface provides the functionality for requesting single and multi-part images 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 servers.
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 - signifies 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.
N/A Not applicable - a feature/parameter/value is of no use in a specific task
URL RFC 1738 describes the syntax and semantics for a compact string representation for a resource available via the
Internet. These strings are called "Uniform Resource Locators" (URLs).
URI A Uniform Resource Identifier (URI) is a compact string of characters for identifying an abstract or physical resource.
RFC 2396 describes the generic syntax of URI.
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:
http://myserver/jpg/image.jpg
Examples of what can be returned by the server from a request are written with "Example:" in bold face, followed by a
short description and a light grey box with an example of the returned data.
Syntax:
http://<servername>/axis-cgi/<subdir>[/<subdir>...]/<cgi>.<ext>
[?<parameter>=<value>[&<parameter>=<value>...]]
Example: List the Network parameters.
http://<servername>/axis-cgi/operator/param.cgi?action=list&group=Network
4 INTERFACE SPECIFICATION
4.1 Naming conventions and URL syntax
Some CGI requests described in the Axis Video HTTP API version 1.xx are still supported by Axis products with firmware
version 4.00 and above, and are provided for backward compatibility. They are, however, obsolete and should not be used.
For more information, please read the document describing the differences between HTTP API version 1 and version 2.
Return:
204 No Content The server has fulfilled the request, but there is no new
information to send back.
302 Moved Temporarily The server redirects the request to the URI given in the
Location header.
400 Bad Request The request had bad syntax or was impossible to fulfill.
404 Not Found The server has not found anything matching the request.
409 Conflict The request could not be completed due to a conflict with
the current state of the resource.
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 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 with firmware version 4.00 and above.
5.1.1 Add, update, remove and list parameters and their values
Note:
These requests have different security levels. The security level for each parameter is specified in the
parameter document.
The URL must follow the standard way of writing a URL, (RFC 2396: Uniform Resource Identifiers (URI)
Generic Syntax); that is, spaces and other reserved characters (";", "/", "?", ":", "@", "&", "=", "+", "," and
"$") within a <parameter> or a <value> must be replaced with %<ASCII hex>. For example, in the string
My camera, the space will have to be replaced with %20, My%20camera.
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/view/param.cgi?
<parameter>=<value>[&<parameter>=<value>...]
http://<servername>/axis-cgi/operator/param.cgi?
<parameter>=<value>[&<parameter>=<value>...]
http://<servername>/axis-cgi/admin/param.cgi?
<parameter>=<value>[&<parameter>=<value>...]
with the following parameter and values
action=<string> add, remove, update or list Specifies the action to take. Depending on this parameter,
various parameters may be set, as described in the
following sections.
Syntax:
http://<servername>/axis-cgi/view/param.cgi?action=list
[&<parameter>=<value>...]
http://<servername>/axis-cgi/operator/param.cgi?action=list
[&<parameter>=<value>...]
http://<servername>/axis-cgi/admin/param.cgi?action=list
[&<parameter>=<value>...]
with the following parameter and values
http://myserver/axis-cgi/admin/param.cgi?action=list&group=Event.*.Name
<parameter>=<value>\n
[ <parameter pair> ]
If the CGI request includes an invalid parameter value, the server returns an error message.
Return:
Syntax:
http://<servername>/axis-cgi/operator/param.cgi?action=update
[&<parameter>=<value>...]
http://<servername>/axis-cgi/admin/param.cgi?action=update
[&<parameter>=<value>...]
with the following parameters and values
http://myserver/axis-cgi/operator/param.cgi?
action=update&Image.I0.Resolution=320x240
Example: Set the maximum number of viewers to 5.
http://myserver/axis-cgi/operator/param.cgi?
action=update&Image.MaxViewers=5
Note: Only applicable for dynamic parameter groups such as the event parameters.
Syntax:
http://<servername>/axis-
cgi/operator/param.cgi?action=add[&<parameter>=<value>...]
http://<servername>/axis-
cgi/admin/param.cgi?action=add[&<parameter>=<value>...]
with the following parameters and values
template=<string> <template> Use the specified <template> when creating the new group. The
template is a file, which describes all parameters for this group.
Depending on the product, different templates are available,
please check the Release notes of the firmware version.
See examples below.
group=<string> <group> Specifies the parent group. The parent group defines where in
the parameter structure the new group will be created. For
example, if adding an event (template=event) and specify
group=Event the new group will be available as
Event.E<number>. Where <number> is the unique number for
the group (see return values below). The character before
<number> is generated from the last section of the group name.
E.g. Event will generate the character E and Event.Notification
will generate the character N.
<string>=<string> <group.name>=<value> Set a parameter in the newly created group. As the group
number is not known before the group is created, the id-number
is simply left out, see the examples below. The new group
number is created dynamically and can be any number. This is
why all parameters are specified to set without any group
number. The base path to the parameter is specified as
<group>.<uppercase first letter of group>.<parameter name>.
force yes The force parameter can be used to exceed limits set for adding
dynamic parameter groups.
Axis products can for example be configured for up to 10 event
types. The force parameter can be used to exceed this maximum
of events.
Example: Create a new event under the group Event and set the name to MyEvent and the Enabled parameter to yes.
http://myserver/axis-cgi/operator/param.cgi?action=add&group=Event
&template=event&Event.E.Name=MyEvent&Event.E.Enabled=yes
Example: A listing of the new group will output the following.
root.Event.E0.Name=MyEvent
root.Event.E0.Type=T
root.Event.E0.Enabled=yes
root.Event.E0.Active=no
root.Event.E0.Priority=1
root.Event.E0.Image=1
root.Event.E0.HWInputs=xxxx
root.Event.E0.SWInput=
root.Event.E0.Weekdays=1111111
root.Event.E0.Starttime=00:00
root.Event.E0.Duration=0
root.Event.E0.ImageURLSettingsEnabled=no
root.Event.E0.ImageURLSettings=
root.Event.E0.IncludePreTrigger=no
root.Event.E0.PreTriggerSize=0
root.Event.E0.PreTriggerInterval=1000
root.Event.E0.PreTriggerIntervalUnit=s
root.Event.E0.PreTriggerUnit=s
root.Event.E0.IncludePostTrigger=no
root.Event.E0.PostTriggerSize=0
root.Event.E0.PostTriggerInterval=1000
root.Event.E0.PostTriggerIntervalUnit=s
root.Event.E0.PostTriggerUnit=s
root.Event.E0.IncludeBestEffort=no
root.Event.E0.BestEffortInterval=1000
root.Event.E0.BestEffortDuration=0
root.Event.E0.BestEffortIntervalUnit=s
root.Event.E0.BestEffortDurationUnit=s
root.Event.E0.FileName=image.jpg
root.Event.E0.Suffix=%y-%m-%d_%H-%M-%S-%f
root.Event.E0.MaxSequenceNumber=-100
Note that in this example the id is E0. This can be any number, depending on if other events were added before.
Parameters that are not specified in the request will have their default values, as specified in the configuration file.
Note: Only applicable for dynamic parameter groups such as the event parameters.
Syntax:
http://<servername>/axis-cgi/operator/param.cgi?
action=remove[&<parameter>=<value>...]
http://<servername>/axis-cgi/admin/param.cgi?
action=remove[&<parameter>=<value>...]
with the following parameters and values
http://myserver/axis-
cgi/operator/param.cgi?action=remove&group=Event.E2,Event.E4
http://myserver/axis-
cgi/operator/param.cgi?action=add&group=Event&template=event
&Event.E.Name=MyEvent
Response:
http://myserver/axis-cgi/operator/param.cgi?action=remove&group=Event.E7
Response:
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/admin/pwdgrp.cgi?
<parameter>=<value>[&<parameter>=<value>...]
with the following parameters and values
user=<string> <string> The user account name, a non-existing user name. Valid
characters are a thru z, A thru Z and 0 thru 9.
pwd=<string> <string> The unencrypted password of the account. Valid characters are
a thru z, A thru Z and 0 thru 9.
http://myserver/axis-
cgi/admin/pwdgrp.cgi?action=add&user=joe&pwd=foo&grp=axuser
&sgrp=axadmin:axoper:axview&comment=Joe
Example: Change the password of an existing account.
http://myserver/axis-cgi/admin/pwdgrp.cgi?action=update&user=joe&pwd=bar
Example: Remove an account.
http://myserver/axis-cgi/admin/pwdgrp.cgi?action=remove&user=joe
Example: List groups and users.
http://myserver/axis-cgi/admin/pwdgrp.cgi?action=get
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/factorydefault.cgi
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/hardfactorydefault.cgi
5.1.5 Backup
Download a unit specific backup of all files in the folder /etc in tar format.
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/backup.cgi
Return:
5.1.6 Restore
Upload a unit specific backup previously created by the backup.cgi.
Method: POST
Syntax:
http://<servername>/axis-cgi/admin/restore.cgi
The file content is provided in the HTTP body according to the format given in RFC 1867. The body is created automatically
by the browser if using HTML form with input type "file".
Example: Upload of backup, where "\r\n" has been omitted in the HTTP body.
Method: POST
Syntax:
http://<servername>/axis-cgi/admin/firmwareupgrade.cgi[?<parameter>=<value>]
The file content is provided in the HTTP body according to the format given in RFC 1867. The body is created automatically
by the browser if using HTML form with input type "file".
Example:
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/restart.cgi
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/serverreport.cgi
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/systemlog.cgi
Return:
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/accesslog.cgi
Return:
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/admin/date.cgi?<parameter>=<value>
with the following parameter and values
Syntax:
http://<servername>/axis-cgi/admin/date.cgi?action=get
Return:
http://<servername>/axis-
cgi/admin/date.cgi?action=set[&<parameter>=<value>...]
with the following parameters and values
timezone=<string> GMT Specifies the time zone that the new date and/or time is
given in. The camera translates the time into local time
using whichever time zone has been specified through the
web configuration. If omitted the new date and/or time is
assumed to be in local time.
http://myserver/axis-cgi/admin/date.cgi?action=set&year=2005&month=4&day=3
Response:
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/view/imagesize.cgi?
<parameter>=<value>[&<parameter>=<value>...]
with the following parameters and values
Any parameter from jpeg- See 5.2.4.2 for more information about image parameters.
interface affecting image
size.
1
The number of video inputs may differ between different cameras and video servers. See the product's specification.
http://myserver/axis-cgi/view/imagesize.cgi?camera=1
Example: Returned data after a successful request.
http://myserver/axis-
cgi/view/imagesize.cgi?camera=1&resolution=QCIF&compression=60
Example: Returned data after a successful request.
Method: GET
Syntax:
http://<servername>/axis-cgi/view/videostatus.cgi?<parameter>=<value>
with the following parameter and values
<parameter>=<value> Values Description
http://myserver/axis-cgi/view/videostatus.cgi?status=1,2,3,4
Example: Returned data after a successful request.
5.2.3 Bitmap
The requests specified in the bitmap section are supported by those video products that have bitmap support. Supported
image formats can be checked by reading the parameter Properties.Image.Format. The parameter can be listed using
param.cgi.
Method: GET
http://<servername>/bitmap[/<camera>]/image.bmp
with the following parameter and values
<camera> 1 ... 41 Select the input source. Applies only to servers with more
quad1 than one input source.
1
Product-dependent. See the product's specification.
Example: Request a bitmap image from the default camera with the default resolution.
http://myserver/bitmap/image.bmp
Example: Request a bitmap image from camera 2 with the default resolution.
http://myserver/bitmap/2/image.bmp
Example: Request a bitmap image containing four video sources.
http://myserver/bitmap/quad/image.bmp
5.2.3.2 Bitmap image (snapshot) CGI request
Request a bitmap image with the specified properties.
Method: GET
Syntax:
http://<servername>/axis-cgi/bitmap/image.bmp
[?<parameter>=<value>[&<parameter>=<value>...]]
with the following parameters and values
resolution=<string> 768x576, 4CIF, 704x576, Specifies the resolution as <width> times <height>
704x480, VGA, 640x480, number of pixels of the returned image.
2CIFEXP, 2CIF, 704x288,
704x240, 480x360, CIF,
384x288, 352x288,
352x240, 320x240,
240x180, QCIF, 192x144,
176x144, 176x120,
160x120 1
1
Product-dependent. See the product's specification.
http://myserver/axis-cgi/bitmap/image.bmp?resolution=320x240&camera=1
Return:
5.2.4 JPEG/MJPG
The requests specified in the JPEG/MJPG section are supported by those video products that use JPEG and MJPG encoding.
Method: GET
Syntax:
http://<servername>/jpg[/<camera>]/image.jpg
with the following parameter
<camera> 1, 2, 3, 4 or quad1 Select input source. Applies only to servers with more than
one input source.
Default: default camera.
1
Product-dependent. Check the product's specification.
Example: Request JPEG image from default camera with default resolution and compression.
http://myserver/jpg/image.jpg
Example: Request JPEG image from camera number 2 with default resolution and compression.
http://myserver/jpg/2/image.jpg
Example: Request JPEG image containing four video sources.
http://myserver/jpg/quad/image.jpg
Method: GET
Syntax:
http://<servername>/axis-cgi/jpg/image.cgi
[?<parameter>=<value>[&<parameter>=<value>...]]
with the following parameters and values
1
camera=<string> 1, 2, 3, 4 or quad Applies only to video servers with more than one video
input. Selects the source camera.
1
compression=<int> 0 - 100 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>2 0 - 100 1
Sets level of color or grey-scale.
0 = grey-scale, 100 = full color.
textstring=<string>2 A string The text shown in the image, the string must be URL
encoded.
textbackgroundcolor=<string>2 black, The color of the text background shown in the image.
white,
transparent,
semitransparent
1
rotation=<int> 0, 90, 180, 270 Rotates the image clockwise.
textpos=<string> top, bottom The position of the string shown in the image.
overlayimage=<int>2 0, 1 Enable/disable overlay image.
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
Example: Request a JPEG image from camera 2 with the text My Camera displayed.
http://myserver/axis-cgi/jpg/image.cgi?camera=2&text=1&textstring=My%20Camera
Return:
Method: GET
Syntax:
http://<servername>/axis-cgi/buffer/command.cgi?
<parameter>=<value>[&<parameter>=<value>...]
with the following parameters and values
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
Example 2: Stop a buffer.
http://myserver/axis-cgi/buffer/command.cgi?do=stop&buffername=DOOR1
Example 3: Get images from the buffer.
http://myserver/axis-cgi/buffer/command.cgi?do=get&buffername=DOOR1&index=1
Example 4: Create an image buffer, named DOOR2. The images should be taken from camera 1 and have a resolution of
320x240 pixels. Five post-alarm images should be stored.
http://myserver/axis-cgi/buffer/command.cgi?do=start&buffername=DOOR2
&postalarm=5&uri=ftp://jpg/image.jpg?resolution=320x240&camera=1
5.2.4.5 MJPG video request
Returns a multipart image stream with the default resolution and compression as defined in the system configuration.
Method: GET
http://<servername>/mjpg[/<camera>]/video.mjpg
with the following parameter
<camera> 1, 2, 3, 4 or quad1 Select input source. Applies only to servers with more than
one input source.
Default: default camera.
1
Product-dependent. Check the product's specification.
Example: Request JPEG image stream from the 2nd camera with default resolution and compression.
http://myserver/mjpg/2/video.mjpg
Example: Request quad composed JPEG image stream with default resolution and compression.
http://myserver/mjpg/quad/video.mjpg
Method: GET
Syntax:
http://<servername>/axis-cgi/mjpg/video.cgi
[?<parameter>=<value>[&<parameter>=<value>...]]
with the following parameters and values
1
camera=<string> 1, 2, 3, 4 or quad Applies only to video servers with more than one video
input. Selects the source camera.
1
compression=<int> 0 - 100 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>2 0 - 100 1
Sets level of color or grey-scale.
0 = grey-scale, 100 = full color.
textstring=<string>2 A string The text shown in the image, the string must be URL
encoded.
textbackgroundcolor=<string>2 black, The color of the text background shown in the image.
white,
transparent,
semitransparent
1
rotation=<int> 0, 90, 180, 270 Rotates the image clockwise.
duration=<int> 0, ... Specifies for how many seconds the video will be
generated and pushed to the client. 0 = unlimited.
nbrofframes=<int> 0, ... Specifies how many frames the server will generate and
push. 0 = unlimited.
fps=<int> 0, ... Using fps it is possible to specify the frame rate from the
server. 0 = unlimited.
1
Product-dependent. Check the product's specification.
2
Support for this parameter is product/release-dependent.
Example: Request 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&compression=25
Example: Request a Multipart JPEG image stream from camera 1 with a frame rate of 5.
http://myserver/axis-cgi/mjpg/video.cgi?fps=5
Return:
myboundary
Content-Type: image/jpeg\r\n
Content-Length: <image size>\r\n
\r\n
<JPEG image data>\r\n
--<boundary>\r\n
<image>
Example: Requested Multipart JPEG image.
5.2.5 MPEG-4
Due to the streaming properties of the MPEG-4 media format, the control of the MPEG-4 streams is handled via RTSP,
which is an HTTP-like protocol designed for controlling real-time multi-media streams. Please check the RTSP API.
Method: GET
Syntax:
http://<servername>/mpeg4[/<camera>]/video.sdp 1
http://<servername>/mpeg4[/<camera>]/media.sdp 1
1
Firmware dependent. media.sdp should be used for firmware 4.20 and above.
1
<camera> 1, 2, 3, 4 or quad Select input source. Applies only to servers with more than
one input source.
Default: default camera.
1
Product dependent. Check the product specification.
Example: Request the MPEG-4 SDP description for the first camera.
http://myserver/mpeg4/1/media.sdp
Restarts the MPEG-4 stream. This will force the server to break the current GOV and insert configuration headers followed
by a new GOV. This can be used by a new client to make sure that it can start to show the stream as fast as possible.
Syntax:
http://<servername>/axis-
cgi/mpeg4/restart_stream.cgi[?<parameter>=<value>&...]
with the following parameters and values
1
camera=<string> 1, 2, 3, 4 or quad Select input source. Applies only to servers with more than
one input source.
Default: default camera.
1
Product dependent. Check the product specification.
http://myserver/axis-cgi/mpeg4/restart_stream.cgi?camera=1
It is possible to retrieve some statistics about the generated MPEG-4 streams. These statistics reflects the servers point-of-
view of the stream, i.e., a slow network or client may result in a difference in appearance compared to these values.
Syntax:
http://<servername>/axis-
cgi/operator/mpeg4_statistics.cgi[?<parameter>=<value>&...]
with the following parameters and values
1
camera=<string> 1, 2, 3, 4 or quad Select input source. Applies only to video servers with more
than one input source.
Default: default camera.
reset=<int> 1 Reset the min and max values to the current values.
1
Product dependent. Check the product specification.
http://myserver/axis-cgi/operator/mpeg4_statistics.cgi?camera=1
Example: Retrieve the current bit rate and frame rate for the default camera.
http://myserver/axis-
cgi/operator/mpeg4_statistics.cgi?stats=bitrate,framerate
Example: Reset the min and max values for the first camera.
http://myserver/axis-cgi/operator/mpeg4_statistics.cgi?camera=1&reset=1
Method: GET
Syntax:
http://<servername>/axis-cgi/operator/dynamicoverlay.cgi?<parameter>=<value>
[&<parameter>=<value>...]
with the following parameters and values
1
camera=<string> 1, 2, 3, 4 or quad Select input source. Applies only to video servers with more
than one input source.
Default: default camera.
1
Product dependent. Check the product specification.
Example: Set the dynamic text overlay to "Test text" for cameras 1, 3 and 4.
http://myserver/axis-
cgi/operator/dynamicoverlay.cgi?action=settext&camera=1,3,4
&text=Test%20text
Example: Get the dynamic text overlay for camera 2 and quad view.
http://myserver/axis-
cgi/operator/dynamicoverlay.cgi?action=gettext&camera=2,quad
5.3 PTZ
This section describes request for Pan/Tilt/Zoom capable products. Supported requests are however product dependent.
Method: POST
Syntax:
http://<servername>/axis-cgi/ptz/ptzupdate.cgi?
[<parameter>=<value>[&<parameter>=<value>...]]
with the following parameters and values
replacedriver=<string> Names from the parameter Uninstall currently installed driver <string>. See below for
values in group rules concerning driver replacement.
root.PTZ.PTZDrivers.Driver#
where '#' denotes the index
for the installed driver.
1
port=<int> 1, ... Associate the driver with this serial port. See below for
rules concerning driver replacement.
The file content, if any, is provided in the HTTP body according to the format given in RFC1867. The body is created
automatically by the browser if using HTML form with input type "file". Empty file content will result in the removal of the
driver only.
The following rules apply for driver replacement, in descending order of priority:
Example: The driver "Videmech" is currently associated with serial port 1. A client sends this request, where "\r\n" has
been omitted in the HTTP body.
1
--AaBo3x
Content-Disposition: form-data; name="Upload Driver"; filename="Philips-
1.0.ptz"
Content-Type: text/plain
--AaBo3x--
I.e. providing the parameter port=1 together with the file content of the installation file Philips-1.0.ptz for the new driver
in the HTTP body.
This will uninstall the driver "Videmech" and install the "Philips" driver provided in the HTTP body. The new driver is then
associated with serial port 1.
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/com/ptzadmin.cgi?
<parameter>[=<value>][&<parameter>=<value>...]
with the following parameters and values
1
port=<int> 1, ... Selects the serial port.
ptzdrivername=<string> Name of a driver from Associates a driver name with a serial port. If "none" the
values in parameter group current driver (if any) is disassociated from the serial port.
root.PTZ.PTZDrivers
1
Product-dependent. Check the product's specification.
http://myserver/axis-cgi/com/ptzadmin.cgi?port=2&ptzdrivername=Videmech
Important:
Some PTZ units automatically reduce pan and tilt movements as the zoom factor increases. Therefore, the actual
movement may be less than what is requested of these units.
The PTZ control is device-dependent. For information about supported parameters and actual parameter values, please
check the specification of the Axis PTZ driver you intend to use. The following table is only an overview.
Note:
The URL must follow the standard way of writing a URL, (RFC 2396: Uniform Resource Identifiers (URI) Generic Syntax);
that is, spaces and other reserved characters (";", "/", "?", ":", "@", "&", "=", "+", "," and "$") within a <parameter> or a
<value> must be replaced with %<ASCII hex>. For example, in the string My camera, the space will have to be replaced
with %20, My%20camera.
Method: GET/POST
Syntax:
http://<servername>/axis-
cgi/com/ptz.cgi?<parameter>=<value>[&<parameter>=<value>...]
with the following parameters and values
1
camera=<int> 1, ... Applies only to video servers with more than one
video input. Selects the source camera. If omitted,
the default camera is used.
center=<int>,<int> <x>,<y> Absolute: Used to send the coordinates for the point
extrem3=<int>,<int> in the image where the user clicked. This information
is then used by the server to calculate the pan/tilt
move required to (approximately) center the clicked
point.
Relative: n/a
1
imagewidth=<int> 1, ... Required in conjunction with center and areazoom if
the image width displayed is different from the default
size of the image, which is product-specific.
1
imageheight=<int> 1, ... Needed in conjunction with center and areazoom if
the image height is different from the default size,
which is product-specific.
pan=<float> -180.0 - 180.0 Absolute: Pans the device relative to the (0,0)
position.
Relative: n/a
tilt -180.0 - 180.0 Absolute: Tilts the device relative to the (0,0)
position.
Relative: n/a
Relative: n/a
Relative: n/a
Digital: n/a
Relative: n/a
Digital: n/a
Relative: n/a
Digital: n/a
rpan=<float> -360.0 - 360.0 Absolute: Pans the device n degrees relative to the
current position.
rtilt=<float> -360.0 - 360.0 Absolute: Tilts the device n degrees relative to the
current position.
rzoom=<int> -9999 - 9999 Absolute: Zooms the device n steps relative to the
current position. Positive values mean zoom in,
negative values mean zoom out.
rfocus=<int> -9999 - 9999 Absolute: Move Focus n steps relative to the current
position. Positive values mean focus far, negative
values mean focus near.
Digital: n/a
riris=<int> -9999 - 9999 Absolute: Move iris n steps relative to the current
position. Positive values mean open iris, negative
values mean close iris.
Digital: n/a
Digital: n/a
Digital: n/a
Digital: n/a
continuouszoommove=<int> -100 - 100 Continuous zoom motion. Positive values mean zoom
in and negative values mean zoom out. "0" means
stop.
continuousfocusmove=<int> -100 - 100 Continuous focus motion. Positive values mean focus
near and negative values mean focus far. "0" means
stop.
Digital: n/a
continuousirismove=<int> -100 - 100 Continuous iris motion. Positive values mean iris open
and negative values mean iris close. "0" means stop.
Digital: n/a
Digital: n/a
Digital: n/a
home=<string> yes Makes the current position the home position for the
camera. Used with setserverpresetname or
setserverpresetno.
Note: This request is moved to ptzconfig.cgi
removeserverpresetname=<string> <preset name>4 Removes the specified preset position associated with
<preset name>.
Note: This request is moved to ptzconfig.cgi
gotoserverpresetname=<string> <preset name>4 Move to the position associated with the <preset
name>.
setdevicepreset=<int> <preset pos> Bypasses the presetpos interface and tells the 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.
Note: This request is moved to ptzconfig.cgi
gotodevicepreset=<int> <preset pos> Bypasses the presetpos interface and tells the 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.
Digital: n/a
bartype=<string> absolute, relative Used together with barcoord and determines how the
bar shall be interpreted. If "absolute", the endpoints
of the bar correspond to the current limits. If
"relative", the behavior is device-dependent. The
default interpretation is "absolute" for panbar, tiltbar
and zoombar and "relative" for focusbar and irisbar.
Digital: n/a
Digital: n/a
Digital: n/a
speed=<int> 1 - 100 Sets the head speed of the device that is connected to
the specified camera.
Digital: n/a
imagerotation=<int> 0, 90, 180, 270 If PTZ command refers to an image stream that is
rotated differently than the current image setup, then
the image stream rotation must be added to each
command with this parameter to allow the server to
compensate.
Example: Request information about which PTZ commands are available for camera 3.
http://myserver/axis-cgi/com/ptz.cgi?info=1&camera=3
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/com/ptzconfig.cgi?
<parameter>=<value>[&<parameter>=<value>...]
with the following parameters and values
<parameter>=<value> Values Description
1
camera=<int> 1, ... Applies only to video servers with more than one video
input. Selects the source camera. If omitted, the default
camera is used.
home=<string> yes Makes the current position the home position for the
camera. Used with setserverpresetname or
setserverpresetno.
removeserverpresetname=<string> <preset name>1 Removes the specified preset position associated with
<preset name>.
setdevicepreset=<int> <preset pos> Bypasses the presetpos interface and tells the 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.
Digital: n/a
1
<preset name> is a string with a maximum of 31 characters, ~ is not allowed.
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/com/ptzparam.cgi?
<parameter>=<value>[&<parameter>=<value>...]
with the following parameters and values
1
port=<int> 1, ... Selects the serial port. Used together with grpdefault
below, for group "Serial".
1
camera=<int> 1, ... Selects the camera. If omitted, the default camera is used.
Used together with grpdefault below, for all groups but
"Serial".
<PTZ Any parameter in the Sets a PTZ limit parameter. Max values are adjusted so that
parameter>2=<value> groups PTZ.Limit.L#, where they are greater than or equal to min values, e.g.
# denotes the camera PTZ.Limit.L2.MaxPan >= PTZ.Limit.L2.MinPan.
number, e.g.
PTZ_Limit_L2_MaxPan
pardefault=<string>2 Any parameter in the Sets the default value for a parameter. Note: No max value
group: validation is performed as with previous CGI parameter.
Serial.Ser#
where # denotes the serial
port number, and the
groups:
PTZ.Support.S#
PTZ.Limit.L#
PTZ.Various.V#
PTZ.UserBasic.U#
PTZ.UserAdv.U#
where # denotes the
camera number.
grpdefault=<string> Serial, Sets the default value for a parameter group. The default
Support, values are taken from the driver currently associated with
Limit, the port or camera.
Various,
UserBasic,
UserAdv
1
Product-dependent. Check the product's specification.
2
The path shall have the format root_PTZ..., e.g. root_PTZ_Limit_L1_MaxPan for parameter PTZ.Limit.L1.MaxPan. The
reason for this format is related to internal ssi implementation.
In the examples below, assume the driver installed on index 1 is associated with serial port 2 (ttyS1) and camera 3 is
mapped to serial port 2.
http://myserver/axis-cgi/com/ptzparam.cgi?root_PTZ_Limit_L3_MaxPan=110
Example: Set PTZ.Limit.L3.MaxPan to the value of PTZ.Driver1.Limit.L0.MaxPan.
http://myserver/axis-cgi/com/ptzparam.cgi?pardefault=root_PTZ_Limit_L3_MaxPan
Example: Copy the parameter values from group PTZ.Driver1.Limit.L0 to group PTZ.Limit.L3.
http://myserver/axis-cgi/com/ptzparam.cgi?camera=3&grpdefault=Limit
Example: Copy the parameter values from group PTZ.Driver1.Serial.S0 to group Serial.Ser1.
http://myserver/axis-cgi/com/ptzparam.cgi?port=2&grpdefault=Serial
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/com/ptzqueue.cgi?
<parameter>=<value>[&<parameter>=<value>...]
with the following parameters and values
1
camera=<int> 1, ... The camera number. If omitted, the default camera is used.
1
Product-dependent. Check the product's specification.
http://myserver/axis-cgi/com/ptzqueue.cgi?control=request&camera=2
On failure no anchor elements are provided but simply the error message in plain text.
http://myserver/axis-
cgi/operator/param.cgi?action=add&group=Motion&template=motion
http://myserver/axis-
cgi/operator/param.cgi?action=add&group=Motion&template=motion
&Motion.M.Name=Entrance&Motion.M.Top=500&Motion.M.Bottom=7000&Motion.M.Left=5
000
&Motion.M.Right=8500
Return:
http://myserver/axis-cgi/operator/param.cgi?
action=remove&group=Motion.M3,group=Motion.M5
http://myserver/axis-cgi/operator/param.cgi?action=update&Motion.M1.Top=1500
&Motion.M1.Bottom=8000
http://myserver/axis-cgi/operator/param.cgi?
action=list&group=Motion.M1,group=Motion.M2
http://myserver/axis-cgi/operator/param.cgi?action=list&group=Motion
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/motion/motiondata.cgi[?<parameter>=<value>...]
group=<int>[,<int>, ...] <group number>[,<group Specify the Motion Detection windows that are of interest.
number>, ...] Excluding the group parameter will return all Motion
Detection level information from all Motion Detection
windows. Exclude windows are ignored.
<string>=<string> <parameter Get the Motion Detection levels related to a specific window
name>=<value> configuration. The last part of the parameters in the
parameter group Motion.M#.<name> (where # is a
number) can be used, e.g. Sensitivity and History.
Return:
axismdb
Content-Type: text/plain\r\n
\r\n
<motion level for window with lowest group number>
--<boundary>\r\n
and <motion level for window with group number n>" is
http://myserver/axis-cgi/motion/motiondata.cgi?group=0,1
Return: The example above returns the following.
http://myserver/axis-cgi/motion/motiondata.cgi?
Name=Temp&ImageSource=2&WindowType=include
&Left=300&Right=500&Top=300&Bottom=500&Sensitivity=65&History=50&Size=35
Return: The example above returns the following:
If any errors are found in the CGI request, HTTP/1.0 400 Bad Request is returned.
If too many clients try to get motion data, HTTP/1.0 503 Service Unavailable is returned.
5.5 I/O
The requests specified in the I/O section are supported by those products that have Input/Output connectors.
5.5.1.1 Input
Input
Method: GET
Syntax:
http://<servername>/axis-
cgi/io/input.cgi?<parameter>=<value>[&<parameter>=<value>...]
with the following parameters and values
1
check=<int>[,<int>, ...] <id1>[,<id2>, ...] Returns the status (1 or 0) of one or more inputs
numbered id1 ,id2, ....
1
checkactive=<int>[,<int>, ...] <id1>[,<id2>, ...] Returns the status (active or inactive) of one or more
inputs numbered id1,id2, ....
ioboundary
Content-Type: text/plain\r\n
\r\n
<check data>
--<boundary>\r\n
and <check data> is
IO<n>:<char>\r\n
and <n> is the I/O port number and <char> is / or H when the port is active and \ or L when the port is inactive.
Note: The output can contain extra blank lines, i.e., extra \r\n within the sections.
http://myserver/axis-cgi/io/input.cgi?monitor=1,2,3,4
Example: Monitor data on input port 1.
5.5.1.2 Output
Output
Method: GET
Syntax:
http://<servername>/axis-cgi/io/output.cgi?
<parameter>=<value>[&<parameter>=<value>...]
with the following parameters and values
action=<string> [<id>1]:<a>[<wait> Sets the output relay <id> active or inactive and waits
<a> ...] <wait> milliseconds. Note that only one output relay can
be activated/deactivated per request.
<id> = Output number. If omitted, output 1 is selected.
1
Number of outputs may differ for different cameras and video servers. See the product's 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.
http://myserver/axis-cgi/io/output.cgi?action=1:/300\500/300\
Example: Wait 1 second before setting output 1 active.
http://myserver/axis-cgi/io/output.cgi?action=1:1000/
5.5.2.1 Input
Input
Method: GET
Syntax:
http://<servername>/axis-cgi/io/virtualinput.cgi?<parameter>=<value>
with the following parameter and values
http://myserver/axis-cgi/io/virtualinput.cgi?action=1:/
Example: Pulse the Input. First set it active, wait 2 seconds, then set it inactive again.
http://myserver/axis-cgi/io/virtualinput.cgi?action=1:/2000\
Method: GET/POST
Syntax:
http://<servername>/axis-cgi/com/serial.cgi?
<parameter>=<value>[&<parameter>=<value>... ]
with the following parameters and values
1
port=<int> 1, ... Select COM port. -1 means disconnect the camera from the
serial port.
writestring=<string> <url encoded string> Writes the URL-encoded string to the selected serial port.
Max string length: 128 bytes 1.
read=<int> 1, ... Reads n bytes from the selected serial port.
The returned data will be hexadecimal coded and placed
between #s (e.g. #3A#)
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>...]
with the following parameters and values
1
port=<int> 1, ... Select COM port.
-1 = disconnect the camera from any
serial port.
1
camera=<int> 1, ... Selects the source camera or external
unit=<int> unit. If omitted, and "port=" command
is also omitted, the default
camera/unit is used to determine the
serial port to use.
Example: Open serial port 1 if not already opened and connect camera 2 to it.
http://myserver/axis-cgi/com/serial.cgi?port=1&camera=2
Example: Disconnect camera 2 from any serial port (but keep that port open).
http://myserver/axis-cgi/com/serial.cgi?port=-1&camera=2
5.7 IP filter
The requests specified in the IP filter section are supported by products that support IP address filtering.
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/ipfilter.cgi?
<parameter>=<value>[&<parameter>=<value>... ]
with the following parameters and values
ipaddress=<string>[%20<string>...] <IP addresses> The addresses allowed passing through the filter. A
space separated list of IP addresses and network
addresses in the CIDR notation (IP address/netmask
bits).
Note: If accessing the Axis device via a proxy server,
the proxy server's IP address must be added to the list
of allowed addresses.
policy=<string> allow, Allow or deny access for the addresses in the list. If
deny omitting this parameter the policy will be allow by
default.
Note: The policy used will apply for all the addresses
in the list!
verify=<string> yes, Verify that you are able to access the Axis device with
no the new settings. A failed verification will make the
settings to remain as before.
verify is automatically set to yes when using requests
that risk to make the device inaccessible, i.e. setting
enable to yes, or adding, updating and removing IP
addresses when the filter function is enabled. In the
same way verify is by default set to no when using
requests that do not risk to make the device
inaccessible, i.e. listing filter settings or adding,
updating and removing IP addresses when the filter
function is disabled. This behaviour can be changed by
setting this parameter in the request.
Example: Add a list of IP addresses and enable the IP address filtering function. Verification that the device is still
accessible will automatically be done.
http://myserver/axis-cgi/admin/ipfilter.cgi?action=add
&ipaddress=10.13.10.12%2010.13.17.0/24&enable=yes
http://myserver/axis-cgi/admin/ipfilter.cgi?action=list
Example: Remove an entry in the list of addresses. Verification will automatically be done if the IP filter function is
enabled.
http://myserver/axis-
cgi/admin/ipfilter.cgi?action=remove&ipaddress=10.13.10.12
Example: Add 10.13.10.12 to the list of addresses which will be allowed access to the device.
http://myserver/axis-cgi/admin/ipfilter.cgi?action=add&ipaddress=10.13.10.12
&policy=allow&enable=yes
Example: Add 10.13.10.12 to the list of addresses which will be denied access to the device.
http://myserver/axis-cgi/admin/ipfilter.cgi?action=add&ipaddress=10.13.10.12
&policy=deny&enable=yes
Example: Remove all IP addresses and automatically disable the IP address filtering function
http://myserver/axis-cgi/admin/ipfilter.cgi?action=removeall
Return: A list.
Example: List settings for the IP address filtering function, set verify to yes to check that my computers IP address is
accepted.
http://myserver/axis-cgi/admin/ipfilter.cgi?action=list&verify=yes
Response: Only the IP address 10.13.10.12 is an accepted address. The computer 10.13.17.245 will not be able to access
the device if enabling the IP address filtering function.
5.8 Audio
The requests specified in the Audio section are supported by products that have audio capability.
Method: GET
Syntax:
http://<servername>/axis-cgi/audio/receive.cgi[?<parameter>=<value>]
with the following parameters and values
<parameter>=<value> Values Description
http://myserver/axis-cgi/audio/receive.cgi?httptype=singlepart
Return:
Return:
Method: POST
Syntax:
http://<servername>/axis-cgi/audio/transmit.cgi
There are no valid parameters and values.
Example 1: Singlepart audio data transmit with G.711 µ-law (authorization omitted)
5.9.1 Alarm
When the decoder operates in manual mode it can receive alarms from an encoder. This can be a motion detected or input
triggered event on the encoder. The decoder will automatically switch to the encoder <sourcename> when receiving an
alarm, where <sourcename> is the name of the given encoder in the video source list. The On Screen Display (OSD) will
display "ALARM: <sourcename>" and an optional line with a text message of maximum 40 characters.
Note: The alarm function can only be used in manual mode and requires administrator access.
Method: GET
Syntax:
http://<servername>/axis-
cgi/admin/alarm.cgi?sourcename=<camera>&textmessage=<text>
with the following parameters and values
http://myserver/axis-cgi/admin/alarm.cgi?sourcename=camera1
Example: Send an alarm from camera3 with the message "Door is open"
http://myserver/axis-cgi/admin/alarm.cgi?sourcename=camera3
&textmessage=Door%20is%20open
Response: Response from a successful alarm
Method: GET
Syntax:
http://<servername>/axis-cgi/admin/videocontrol.cgi?action=<string>
Response: Response from a videocontrol request with no action specified
5.9.2.1 Connect
The video decoder will connect to the first source in the video source list.
Syntax:
http://<servername>/axis-cgi/admin/videocontrol.cgi?action=connect
Example: Connect the Network Video Decoder
http://myserver/axis-cgi/admin/videocontrol.cgi?action=connect
Response:
5.9.2.2 Disconnect
Disconnect the Network Video Decoder.
Syntax:
http://<servername>/axis-cgi/admin/videocontrol.cgi?action=disconnect
Example: Disconnect the Network Video Decoder
http://myserver/axis-cgi/admin/videocontrol.cgi?action=disconnect
Response:
Syntax:
http://<servername>/axis-cgi/admin/videocontrol.cgi?action=invalidatecache
Example: Remove cached information
http://myserver/axis-cgi/admin/videocontrol.cgi?action=invalidatecache
Response:
Syntax:
http://<servername>/axis-
cgi/admin/videocontrol.cgi?action=goto&sourcename=<name>
Example: Go to the video source named "camera1"
http://myserver/axis-
cgi/admin/videocontrol.cgi?action=goto&sourcename=camera1
Response: A successful goto.