Introduction

AXIS CameraStation SDK
Introduction
Topics

General introduction to the AXIS CameraStation SDK for AXIS Camera Station 3.32.

Topics
Name | Description
Introduction Start | This documentation lists the functionality included in the AXIS Camera Station SDK and explains how the components can be integrated and used in customer applications.
SDK Files | A list of all the files included in this SDK.
Activating Web Services | A pre-condition to using the SDK together with AXIS Camera Station server is that Web Services should be activated on the server and then restart the server. This is done through AXIS Camera Station Service Control.
License Agreement | The license agreement when using the SDK and API's
Glossary | Some of the concepts and vocabulary for Web Services and web applications can be new for developers. This page will contain some explanations that might enhance the understanding of new concepts.
Axis Communications AB


Introduction Start

Introduction Start
Introduction

This documentation lists the functionality included in the AXIS Camera Station SDK and explains how the components can be integrated and used in customer applications.

Licence and copyright

Please read the License Agreement carefully before proceeding.

Microsoft, Windows, Internet Explorer, Visual C#, Visual C++, VisualBasic, .NET, VisualStudio are either registered trademarks or trademarks of the Microsoft Corporation in the United States and/or other countries.

Overview

AXIS Camera Station contains two Web Service APIs that are available to customers using AXIS Camera Station 3.22 or later releases, Storage API and CameraStation API. Axis Communications offers the AXIS Camera Station SDK, which consists of API documents, tutorials and API source code. By using the SDK, the table below lists what is possible for a third-party application to do on an AXIS Camera Station server:

Features
Start and stop recordings.
Change recording settings for a camera including buffer time, video format and resolution.
Lock recordings so that they are not removed by the automatic cleanup.
List cameras available in a AXIS Camera Station.
Get a Live View stream via RTSP using HTTP tunneling from the server.
Get a playback stream via RTSP using HTTP tunneling from the server.
List available recordings on the server.
Export a recording to a server directory.
Get information about current video storage.
List live-view settings for external live-view video streaming.
Set live-view configuration for video specific for API.
List alarms as well as acknowledge alarms.
Stream Multipart JPEG from AXIS Camera Station.
List IO ports and change state on output ports.

To build a system with video viewing/recording there must be an AXIS Camera Station server running with a valid license. At this server all camera communication is handled and all recorded video is stored. An AXIS Camera Station client must be installed and used to configure cameras and other station settings. Only limited configuration can be done using the web service API's.

An application using the APIs can access the server both inside and outside a firewall as long as the firewall is configured to let the web service calls and video stream requests in, but cannot access cameras directly. The video streams delivered using the API's are RTSP streams over HTTP tunneling and can be received using AXIS Media Control.

.NET interface

The SDK has some .NET API source code, which is intended to be used from .NET, C# for example, and if compiled separately in Visual Basic .NET applications. The source files remove the necessity to either code generate assemblies using WSDL or use the metadata exchange functionality on the server.

Notes

The AXIS Camera Station SDK works with an AXIS Camera Station server with valid license. The server may run on the same machine as the API client or on another machine.


SDK Files

SDK Files
Introduction

A list of all the files included in this SDK.

Files

{SDK Directory} indicates the directory chosen during the SDK installation.

{SDK Install Directory}\AXIS Camera Station SDK\2.0
File | Description
Wsdl\Storage.wsdl | Storage API WSDL file describing services based on the generic AXIS Storage API.
Wsdl\Storage.xsd | Storage API schema file describing type definitions in the generic AXIS Storage API.
Wsdl\CameraStation.wsdl | CameraStation API WSDL file describing services based on the specific AXIS Camera Station API.
Wsdl\CameraStation.xsd | CameraStation API schema file describing type definitions in the AXIS Camera Station API.
AMC_ADP_msi.msi | Installation file for AXIS Media Control used to view playback and live-view streams.
AXIS CameraStation SDK.chm | This help file.
releasenotes.txt | Release notes.
Axis.CameraStation.cs | Client source code for CameraStation API in C#.
Axis.Storage.cs | Client source code for Storage API in C#.

{SDK Install Directory}\AXIS Camera Station SDK\2.0\Samples

Contains sample application demonstrating how to use the AXIS Camera Station SDK. The sample solution requires Visual Studio.NET 2008 SP1. For more information, see Starting with Sample.


Activating Web Services

Activating Web Services
Introduction

A pre-condition to using the SDK together with AXIS Camera Station server is that Web Services should be activated on the server and then restart the server. This is done through AXIS Camera Station Service Control.

Instructions
  1. Open the Service Control by selecting the Camera Station icon in the tray bar.
  2. Select the Developer API page.

  3. Enable web services by first enabling the "Modify server settings" check-box and then enable the "Enable developer API" check-box.
  4. If other than the default ports should be used for web services and RTSP streaming change them here.
  5. If encrypted communication has been configured, enable SSL on this page.
  6. It is also possible to enable metadata exchange here. See MetadataExchange Information for more.
  7. Select the "Save" button to set the values.


License Agreement

License Agreement
Introduction

The license agreement when using the SDK and API's

Licence text

The license agreement for the AXIS CameraStation SDK Description

AXIS STANDARD SOFTWARE LICENSE AGREEMENT

This is a legal agreement between you (either individual or an entity) and Axis Communications AB (hereinafter referred to as “Axis”). By installing, copying or otherwise using the SOFTWARE, you are agreeing to be bound by the terms of this agreement.

AXIS SOFTWARE LICENSE

1. GRANT OF LICENSE.

1.1 Axis grants to you the right to use the SOFTWARE. The SOFTWARE is in "use" on a computer when it is loaded into temporary memory (i.e. RAM) or installed into permanent memory (e.g. hard disk, CD-ROM or other storage device) of that computer.

2. COPYRIGHT.

2.1 The SOFTWARE is owned by Axis and/or its licensor(s), if any, and is protected by copyright laws and international treaty provisions. Therefore you must treat the SOFTWARE like any other copyrighted material (e.g. a book or a musical recording) except that you may either (a) make a copy of the SOFTWARE solely for backup or archival purposes or (b) transfer the SOFTWARE to a single hard disk provided you keep the original solely for backup purposes.

3. OTHER RESTRICTIONS.

3.1 You may not rent, lease or sublicense the SOFTWARE but you may transfer SOFTWARE and accompanying written materials on a permanent basis provided that you retain no copies and the recipient agrees to the terms of this agreement. You may not reverse engineer, decompile, or disassemble the SOFTWARE. If the SOFTWARE is an update or has been updated, any transfer must include the most recent update and all previous versions.

4. THIRD PARTY SOFTWARE.

4.1 The SOFTWARE may contain third party software, which requires notices and/or additional terms and conditions. Such required third party software notices and/or additional terms and conditions are located in the readme file or other product documentation. By accepting this license agreement, you are also accepting the additional terms and conditions, if any, set forth therein.

5. ADDITIONAL LICENSE RIGHTS – REDISTRIBUTABLE CODE AND SAMPLE CODE.

5.1 In addition to the rights granted in Section 1, certain parts of the SOFTWARE, i.e. SAMPLE CODE AND REDISTRIBUTABLE CODE (collectively the REDISTRIBUTABLES) as described in this Section 5, are provided to you with additional license rights. These additional license rights are conditioned upon your compliance with the distribution requirements and license restrictions described in Sections 5 and 6.

5.2 SAMPLE CODE is identified as <Installed SDK Location>\Samples. Axis grants to you (i) the right to use and modify the source code version of the SAMPLE CODE for the purpose of designing, developing and testing your software product and (ii) a non-exclusive, non-assignable right to reproduce and distribute the SAMPLE CODE, along with modifications thereof, in object and/or source code form. For further applicable redistribution requirements, see Section 6 below.

5.3 REDISTRIBUTABLE CODE is identified as <Installed SDK Location>\ and <Installed SDK Location>\wsdl. Axis grants you a non-exclusive, non-assignable right to reproduce or distribute the REDISTRIBUTABLE CODE in object code form. For further applicable redistribution requirements, see Section 6 below.

6. REDISTRIBUTION REQUIREMENTS AND LICENSE RESTRICTIONS

REGARDING REDISTRIBUTABLE CODE AND SAMPLE CODE.

6.1 If you redistribute the REDISTRIBUTABLES, you agree to (i) only distribute the REDISTRIBUTABLES, or portions thereof, as part of the product or application you develop by using the REDISTRIBUTABLES under the condition that the product or application adds significant and primary functionality to the REDISTRIBUTABLES, (ii) not to use Axis’ name or trademark to market your product or application without written permission, (iii) not to remove or obscure any copyright, trademark or patent notices that appear on the SOFTWARE as delivered to you, (iv) assume the sole responsibility to your customers for any update or support obligations or other liability which may arise from the distribution of the REDISTRIBUTABLES, (v) not make any statement that your product is “certified” or that its performance is guaranteed by Axis, (vi) only distribute the REDISTRIBUTABLES subject to a license agreement that protects Axis’ interests consistent with the terms contained in this Agreement, (vii) indemnify, hold harmless and defend Axis from and against any claims or lawsuits, including attorney’s fees that arise or result from your distribution of the product or application, and (viii) otherwise comply with the terms of this Agreement

7. TERMINATION

7.1 This License is effective until terminated. Your rights under this License will terminate automatically without notice from Axis if you fail to comply with any term(s) of this License. Upon the termination of this License, you shall cease all use of the SOFTWARE and destroy all copies, full or partial, of the SOFTWARE.

8. GOVERNING LAW

8.1 This agreement shall be deemed performed in and shall be construed by the laws of Sweden.

9. DISCLAIMER

9.1 THE SOFTWARE IS DELIVERED AS IS WITHOUT WARRANTY OF ANY KIND. THE ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY THE PURCHASER/THE USER/YOU. AXIS COMMUNICATIONS AB DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT, OR ANY WARRANTY ARISING OUT OF ANY PROPOSAL, SPECIFICATION OR SAMPLE WITH RESPECT TO THE SOFTWARE.

9.2 AXIS AND/OR ITS LICENSOR(S) SHALL NOT BE LIABLE FOR LOSS OF DATA, LOSS OF PRODUCTION, LOSS OF PROFIT, LOSS OF USE, LOSS OF CONTRACTS OR FOR ANY OTHER CONSEQUENTIAL, ECONOMIC OR INDIRECT LOSS WHATSOEVER IN RESPECT OF SALE, PURCHASE, DELIVERY, USE OR DISPOSITION OF THE SOFTWARE.

9.3 AXIS TOTAL LIABILITY FOR ALL CLAIMS IN ACCORDANCE WITH THE SALE, PURCHASE, DELIVERY AND USE OF THE SOFTWARE SHALL NOT EXCEED THE PRICE PAID FOR THE SOFTWARE.


Glossary

Glossary
Introduction

Some of the concepts and vocabulary for Web Services and web applications can be new for developers. This page will contain some explanations that might enhance the understanding of new concepts.

Multi Item Glossary
Multi Item Glossary
Description
Certificate Authority
In cryptography, a certificate authority or certification authority (CA) is an entity that issues digital certificates for use by other parties. It is an example of a trusted third party. CAs are characteristic of many public key infrastructure (PKI) schemes.
A CA issues digital certificates that contain a public key and the identity of the owner. The matching private key is not similarly made available publicly, but kept secret by the end user who generated the key pair. The certificate is also an attestation by the CA that the public key contained in the certificate belongs to the person, organization, server or other entity noted in the certificate. A CA's obligation in such schemes is to verify an applicant's credentials, so that users and relying parties can trust the information in the CA's certificates. CAs use a variety of standards and tests to do so.
If the user trusts the CA and can verify the CA's signature, then he can also verify that a certain public key does indeed belong to whomever is identified in the certificate.
Metadata Exchange
WS-MetaDataExchange is a Web Services protocol specification, published by BEA Systems, IBM, Microsoft, and SAP. WS-MetaDataExchange is part of the WS-Federation roadmap; and is designed to work in conjunction with WS-Addressing, WSDL and WS-Policy to allow retrieval of metadata about a Web Services endpoint.
MTOM
MTOM is the W3C Message Transmission Optimization Mechanism, a method of efficiently sending binary data to and from web services. Binary content often has to be reencoded to be sent as text data with SOAP messages. MTOM allows more efficient sending of binary data in a SOAP request or response. (Wikipedia)
Source
A source is a device or application supplying media in some format such as a camera or a video encoder for example.
Web service
A Web service (also Web Service) is defined by the W3C as "a software system designed to support interoperable machine-to-machine interaction over a network". Web services are frequently just Web application programming interfaces (API) that can be accessed over a network such as the Internet, and executed on a remote system hosting the requested services.
WSDL
The Web Services Description Language is an XML-based language that provides a model for describing Web services. WSDL is often used in combination with SOAP and XML Schema to provide web services over the Internet. A client program connecting to a web service can read the WSDL to determine what functions are available on the server. Any special datatypes used are embedded in the WSDL file in the form of XML Schema. The client can then use SOAP to actually call one of the functions listed in the WSDL.


Tutorial

Tutorial
Topics

The tutorial contains information about how to start using the Sample that is installed with the SDK. Some general information about how to configure AXIS Camera Station and how objects are handled on the server are also described.

Topics
Name | Description
Client development | By using a web service based API many types of client development environments are possible. A WSDL document describes how the API should be called and what the format of the messages looks like. There are different tools that can use the WSDL document to access AXIS Camera Station server. Since the server is .NET based the easiest client integration is done using .NET.
SSL Solution | Transport level security protects the data transfer between the client and the server. Transport Layer Security (TLS) is regarded as a mature standard for encrypted transport connections to provide a basic level of communication security. The TLS protocol allows the configuration of a mutually authenticated transport session as well as preserving the confidentiality and the integrity-protected transport. This standard is also called SSL (Secure Socket Layer) from an earlier version of the standard.
Faults | Most service requests return some kind of fault if something goes wrong. Observe that the innermost exception or fault to handle should be a timeout exception, followed by the request specific faults and finally a communication exception. In this way it is possible to handle most types of errors.


Client development

Client development
Tutorial Topics

By using a web service based API many types of client development environments are possible. A WSDL document describes how the API should be called and what the format of the messages looks like. There are different tools that can use the WSDL document to access AXIS Camera Station server. Since the server is .NET based the easiest client integration is done using .NET.

Topics
Name | Description
.NET | Most development on both AXIS Camera Station client and server is done using .NET 3.5 SP1. As such the most extensive part of the tutorial will be using .NET and C# in Visual Studio.NET 2008 SP1.
Java | Generating java client code either from WSDL or directly from the server using the metadata exchange address is also possible.
gSOAP | By using gSOAP to generate C/C++ code, unmanaged code can be generated and used to make web service calls to AXIS Camera Station.
Common message types | One difficulty is how the code-generating tool works with WSDL documents or metadata exchange. The tool cannot find common types between WSDL documents; instead the common types will get separate type namespaces. If the types should be used in both API's this can lead to type conversions for types that are basically the same.
MetadataExchange Information | The AXIS Camera Station APIs, as described in WSDL, are available directly from the server. By default this functionality is not available, and it is necessary to change the web service settings to allow metadata exchange to be permitted.
Server binding | The binding describes the communication protocol with the server. Here is a brief description of what binding is used on the AXIS Camera Server when accessing it using Web Services.
Viewing streamed media | To view streamed video, a component that accepts a URL and can receive streamed RTSP packages via HTTP tunneling as well as send RTCP commands is needed. AXIS Camera Station SDK contains such component, AXIS Media Control (AMC), that can be used for this purpose. AMC is a COM component based on DirectShow that should be installed on any client PC that requires viewing recordings and live-view from cameras.
RecordingInformation and RecordingBlock | When searching for recordings the search returns zero or more RecordingInformation objects with a unique id. Recordings contain RecordingBlocks. The RecordingBlocks does not exist independently of a recording and shows actual files behind the recording.
AcsAdminConsole | Using AcsAdminConsole.exe it is possible to activate AXIS Camera Station API and the settings available on the AXIS Camera Station Service Control using command-line parameters. This can be useful if you would like to install a client application using AXIS Camera Station API and would like to configure the server in the installation program.


.NET

.NET
Client development Topics

Most development on both AXIS Camera Station client and server is done using .NET 3.5 SP1. As such the most extensive part of the tutorial will be using .NET and C# in Visual Studio.NET 2008 SP1.

Topics
Name | Description
Starting with Sample | Included in the SDK is the Sample application using some of the Camera Station API and Storage API web services. The Sample is a C# application developed in Visual Studio.NET 2008. Included in the Sample project is generated code using Visual Studio.NET 2008 SP1, Samples.Storage.cs and Samples.CameraStation.cs. If AXIS Camera Station Server is installed locally and the default port 50333 is used, the sample application can be compiled and used immediately.
Handling faults in .NET | By using the serialized fault message class FaultException and its functionality in .NET, it is possible to catch faults thrown in the server. The following link shows how to handle such faults. The following example shows a synchronous call with error handling.
Client modifications when using SSL | If the server certificate is a valid root certificate with a proper Certificate Authority, the client will accept the server communication with no warnings. If, however, the server certificate is self-signed, a warning will be generated by WCF and an exception thrown.
Adding and using AXIS Media Control | Importing AXIS Media Control (AMC) into Visual Studio.Net so that it can be used in application development is, for most, a basic requirement. AMC then has a number of interesting properties and events that can be used to control the stream and visual appearance. The Sample application uses a few of these properties and events.


Starting with Sample

Starting with Sample
.NET Topics

Included in the SDK is the Sample application using some of the Camera Station API and Storage API web services. The Sample is a C# application developed in Visual Studio.NET 2008. Included in the Sample project is generated code using Visual Studio.NET 2008 SP1, Samples.Storage.cs and Samples.CameraStation.cs. If AXIS Camera Station Server is installed locally and the default port 50333 is used, the sample application can be compiled and used immediately.

Adding web service and type classes

This can be done in two different ways.

  • Connect Visual Studio to the service using the Add Service Reference Dialog.
  • Use SvcUtil.exe to generate service code.
Notes

Observe that compiling the Sample application using Windows 7 (64-bit) can cause problem with the AMC component. Make sure to compile the project using "x86" as Platform target parameter under the Build page in the project properties.

Topics
Name | Description
Using Visual Studio | This is a description of how to get the Sample code to work by generating code from AXIS Camera Station on the client PC using metadata exchange. Before using the Add Service Reference, make sure that the server that should be accessed allows metadata exchange. Remove Samples.Storage.cs and Samples.CameraStation.cs in the project before following the instructions below.
Using SvcUtil | By using SvcUtil.exe, code can be generated directly from WSDL and XML schema files. SvcUtil.exe is part of Microsoft Development SDK 6.x and can be downloaded from Microsoft.


Using Visual Studio

Using Visual Studio
Starting with Sample

This is a description of how to get the Sample code to work by generating code from AXIS Camera Station on the client PC using metadata exchange. Before using the Add Service Reference, make sure that the server that should be accessed allows metadata exchange. Remove Samples.Storage.cs and Samples.CameraStation.cs in the project before following the instructions below.

Instructions

Open the Sample solution in Visual Studio.NET 2008. In the Solution Explorer there is a folder called "Service Reference".

In the pop-up menu for the Service References there is a menu item "Add Service Reference...". Select it and the Add Service Reference Dialog will be shown. In the Address field, write the path to the CameraStation API. If the CameraStation server is on the local machine and default web service port is configured, the address will be "http://localhost:50333/webservice/CameraStation/mex" and for the Storage API "http://localhost:50333/webservice/Storage/mex". Click Go and the CameraStation API Service points should appear in the Services box.

Before clicking OK there are two more things that have to be done. Change the Namespace from ServiceReference1 to CameraStation for the CameraStation API and Storage for the Storage API.

Then click the Advanced button in the lower left corner. In the Dialog that appear select the check-box that will generate asynchronous operations.

Click OK in both Dialogs.

This will generate WSDL files, schema files, and code for the services. Do this for both CameraStation API and Storage API.

Compile the Sample application.


Using SvcUtil

Using SvcUtil
Starting with Sample

By using SvcUtil.exe, code can be generated directly from WSDL and XML schema files. SvcUtil.exe is part of Microsoft Development SDK 6.x and can be downloaded from Microsoft.

Instructions

Depending on version of the SDK, the paths below should be adjusted with correct version. In a command window go to the directory with the WSDL and XML Schema files. Enter the following at the command line:

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\svcutil.exe" /a /language:cs /tcv:Version35
/out:./StorageService.cs Storage.wsdl Storage.xsd /noConfig /namespace:*,Samples.Storage

Resulting code is in C# and generated for .NET 3.5. Asynchronous methods are also generated and no configuration file is created.

Do the same for the CameraStation WSDL and XML Schema with namespace "Samples.CameraStation".

To generate the serialized fault classes enter the following at the commandline:

"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\xsd.exe" /c /order Error.xsd /namespace:Samples.CameraStation

Add the source files to the project.

Instantiate the client with binding type and endpoint explicitly. If SSL is not configured then use BasicHttpBinding with BasicHttpSecurityMode.TransportCredentialOnly:

client = new StorageBasicClient(new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly),
   new EndpointAddress(endpointAddressBasic));

If SSL is configured then BasicHttpBinding with BasicHttpSecurityMode.TransportWithMessageCredential should be used:

client = new StorageBasicClient(new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential),
   new EndpointAddress(endpointAddressBasic));
Important

Observe that the generated code might not look exactly the same as code generated using Visual Studio. This means that adjustments must be done to the code in the Sample project if SvcUtil.exe is used.

The reason why SvcUtil is sometimes better to use is that it is possible to have better control over how the code is generated.


Handling faults in .NET

Handling faults in .NET
.NET Example

By using the serialized fault message class FaultException and its functionality in .NET, it is possible to catch faults thrown in the server. The following link shows how to handle such faults. The following example shows a synchronous call with error handling.

Example
try
{
  mediaConfigurationClient.ListProfiles(null, 0, 10);
}
catch (TimeoutException timeProblem)
{
  MessageBox.Show(this, "The service operation timed out. " + timeProblem.Message);
}
catch (FaultException unknownFault)
{
  MessageBox.Show(this, "An unknown exception was received. " + unknownFault.Reason);
}
Explanation

There is a fault sequence that should be followed. First, possible timeout exception should be caught as this will be thrown when there is no network contact or the contact was refused by the server. Next, the general FaultException can be caught, and in the fault reason, different fault codes can be found. If it is a synchronous call a finally statement can be used.


Client modifications when using SSL

Client modifications when using SSL
.NET

If the server certificate is a valid root certificate with a proper Certificate Authority, the client will accept the server communication with no warnings. If, however, the server certificate is self-signed, a warning will be generated by WCF and an exception thrown.

Self-certified certificates

A self-signed certificate is unreliable so an exception is thrown. To allow this exception the following code has been added:

ServicePointManager.ServerCertificateValidationCallback += (ValidateServerCertificate);

public static bool ValidateServerCertificate(Object sender, X509Certificate certificate,
  X509Chain chain, SslPolicyErrors sslPolicyErrors)
{
  return true;
}


Adding and using AXIS Media Control

Adding and using AXIS Media Control
.NET

Importing AXIS Media Control (AMC) into Visual Studio.Net so that it can be used in application development is, for most, a basic requirement. AMC then has a number of interesting properties and events that can be used to control the stream and visual appearance. The Sample application uses a few of these properties and events.

Adding AXIS Media Contol to Visual Studio

Add AMC to Visual Studio Toolbox by right-clicking in the Toolbox and select "Choose Items...". In the Choose Toolbox Items dialog select the "COM Components" tab and select, i.e. add the check mark in the AxisMediaControl class item check-box. AMC is now ready to be used in any project needing the control.

Login and password

To avoid having to repeatedly fill in the login and password, it is necessary to add this information manually in a setup part of the dialog. AXIS Media Control does no validation so any login/password is possible.

axAxisMediaControl1.MediaUsername = "nouser";
axAxisMediaControl1.MediaPassword = "nopass";
Long recordings and position sequence

In case the recordings get very long, there are properties using integers and long. CurrentPosition64, StartPosition64 and StopPosition64 should be used for long recordings since the position could exceed the size of a 32-bit number. Below CurrentStart, CurrentStop and CurrentPosition are in seconds. Moving the streams current position using the above properties requires that the start position be done first, then current position and lastly the stop position. If current position is set past stop position, an end of stream event is created.

axAxisMediaControl1.StartPosition64 = (ulong)CurrentStart * 1000;
axAxisMediaControl1.CurrentPosition64 = (ulong)CurrentStart * 1000;
axAxisMediaControl1.StopPosition64 = (ulong)CurrentStop * 1000;


Java

Java
Client development

Generating java client code either from WSDL or directly from the server using the metadata exchange address is also possible.


gSOAP

gSOAP
Client development

By using gSOAP to generate C/C++ code, unmanaged code can be generated and used to make web service calls to AXIS Camera Station.


Common message types

Common message types
Client development

One difficulty is how the code-generating tool works with WSDL documents or metadata exchange. The tool cannot find common types between WSDL documents; instead the common types will get separate type namespaces. If the types should be used in both API's this can lead to type conversions for types that are basically the same.

Solution

The best way to solve this is to generate the data types separately and merge them in a common namespace. Then generate the API's and replace the data types with the ones from the common namespace. This will require some manual development effort, but will result in a code library with less type conversion problems and simplify future development.


MetadataExchange Information

MetadataExchange Information
Client development

The AXIS Camera Station APIs, as described in WSDL, are available directly from the server. By default this functionality is not available, and it is necessary to change the web service settings to allow metadata exchange to be permitted.

Camera Station Control Panel

Open AXIS Camera Station Service Control. If the Camera Station has the web service APIs available, the Control will have an added tab "Developer API". Select this tab and select "Enable developer API" and "Enable metadata exchange" check box. Click the Save button.


Server binding

Server binding
Client development

The binding describes the communication protocol with the server. Here is a brief description of what binding is used on the AXIS Camera Server when accessing it using Web Services.

Bindings with and without transport security (SSL)

The basic binding is according to Web Service standards BasicHttpBinding with the following configuration:

Binding | Without transport security | Using SSL
Security protocol | TransportCredentialOnly | TransportWithMessageCredential
Transport client credential | Basic, i.e. RFC 2617 – HTTP Authentication: Basic and Digest Authentication standard | None
Message client credential | Username | Username
MetadataExchange configuration

MetadataExchange is configured for both bindings, but most tools will not support MetadataExchange when SSL is activated and username credentials are required.


Viewing streamed media

Viewing streamed media
Client development

To view streamed video, a component that accepts a URL and can receive streamed RTSP packages via HTTP tunneling as well as send RTCP commands is needed. AXIS Camera Station SDK contains such component, AXIS Media Control (AMC), that can be used for this purpose. AMC is a COM component based on DirectShow that should be installed on any client PC that requires viewing recordings and live-view from cameras.

Installation

In the SDK folder there is the "AMC_ADP_msi.msi" file. Install this control on all client PCs (Windows only).

Add the component to the development environment when the component should be used in application development, e.g Visual Studio.NET 2008 SP1.


RecordingInformation and RecordingBlock

RecordingInformation and RecordingBlock
Client development

When searching for recordings the search returns zero or more RecordingInformation objects with a unique id. Recordings contain RecordingBlocks. The RecordingBlocks does not exist independently of a recording and shows actual files behind the recording.

Background

A recording consists of zero or more recording blocks. Each recording block is an actual recording from the camera. If a request to do a recording fails to return a recording stream the recording will contain zero recording blocks and thus the recording will be empty. The start and end time for the recording will still be visible since there was a recording request. If a recording request has been successful and a recording stream is being stored, but the camera goes off-line for some reason, the resulting recording block will finish and as soon as the camera is on-line again a new recording block will be created. This means that a recording can contain more than one recording block.

Application design implications

Since parts of recording blocks can be deleted chronologically during clean-up, the start of recording blocks can shift forward in time.

There is a difference between start time for a recording, i.e. the request to start the recording and the start time for an actual recording, i.e. the time when a camera starts to stream a recording to the camera station for storage. This "start-up time" is the difference between recording start time and first recording block start time. This difference can grow large when a clean-up has been done which removed parts of recordings. If an export of a recording is done and this recording consists of more than one recording block, each recording block will be exported as a separate file.

Observe that the Start- and StopTime in the RecordingInformation object are start and stop time for the recording request. ListRecording lists all recordings that have parts within the time interval specified in the search.

Locking a recording will lock the entire recording and not individual recording blocks. Unlocking a recording will unlock all recording blocks within the recording.

Visual difference with AXIS CameraStation Client

Be aware that the AXIS Camera Station Client shows recording blocks and not recordings by itself. This difference can be seen using the AXIS Camera Station SDK. It is up to the application using the SDK what is suitable to use, RecordingInformation or RecordingBlock. The times shown in the recordings are server time, by default UTC (Coordinated Universal Time).


AcsAdminConsole

AcsAdminConsole
Client development Example

Using AcsAdminConsole.exe it is possible to activate AXIS Camera Station API and the settings available on the AXIS Camera Station Service Control using command-line parameters. This can be useful if you would like to install a client application using AXIS Camera Station API and would like to configure the server in the installation program.

Remarks

Observe that the switches, e.g. usessl, need "--" as pre-characters and then a space followed by the parameter.

Parameters
Parameters | Description
usewebservices | Use Developer API [true|false].
usessl | Use SSL for Developer API [true|false].
usemetadataexchange | Use metadata exchange for Developer API [true|false].
webserviceport | Set Developer API service port.
Example
>AcsAdminConsole.exe --usewebservices true --webserviceport 50444


SSL Solution

SSL Solution
Tutorial Topics

Transport level security protects the data transfer between the client and the server. Transport Layer Security (TLS) is regarded as a mature standard for encrypted transport connections to provide a basic level of communication security. The TLS protocol allows the configuration of a mutually authenticated transport session as well as preserving the confidentiality and the integrity-protected transport. This standard is also called SSL (Secure Socket Layer) from an earlier version of the standard.

Server configuration

On the Web services tab in the AXIS Camera Station Service Control there is a check box, "Enable SSL" that has to be selected for SSL to be active. The server then assumes that a valid certificate is installed and the web service port that is used has been set up for SSL communication.

Note that the certificate has to have the server IP number as Common Name in the certificate or a host name that can be resolved to the IP address using DNS.

Client configuration

On the client machine a valid root certificate should be installed that is in the same validation chain as the server certificate.

If a self-signed certificate on the server is used, the client will need to allow the warning that the server certificate is not secure. An example of how this is done in .NET is available.

Links

Public Key Infrastructure using SSL: http://msdn.microsoft.com/en-us/library/aa480565.aspx

Topics
Name | Description
Server Certificate | A server certificate is required to get the SSL solution to work. But first, a security policy should be formed, i.e finding the right compromise between security and ease-of-use that fits the developed product. See http://msdn.microsoft.com/en-us/library/ms978516.aspx for advice.
Client certificate | The client should have the public root certificate installed on the client machine. When the client calls the server, the root certificate will be used to validate server authenticity. The client application must add user name and password for each request.
Generate and use a self-signed certificate | Generating and using a self-signed certificate is fairly easy, but it is not secure enough in a running system. To develop and test a system it is a simple way of making sure that the application works as intended, and that both client and server has been configured correctly. See more in http://msdn.microsoft.com/en-us/library/aa364691(VS.85).aspx and http://msdn.microsoft.com/en-us/library/ms731899.aspx.


Server Certificate

Server Certificate
SSL Solution

A server certificate is required to get the SSL solution to work. But first, a security policy should be formed, i.e finding the right compromise between security and ease-of-use that fits the developed product. See http://msdn.microsoft.com/en-us/library/ms978516.aspx for advice.

Note

Since this is not a tutorial in SSL, the description of how to generate, install and configure a server certificate will be brief and other sources should be consulted.

Where to get a server certificate

In general, there are three types of server certificates that should be considered.

  • Certificate signed by external Certification Authorities such as Verisign, Comodo or others. This adds a yearly cost, but ensures that clients outside the company owning the server can trust the certificates.
  • Internal certification authority server, e.g Windows Certificate Server or OpenSSL. If the client applications are within an intranet this can be a solution that satisfy most security requirements.
  • Self-signed certificates are mostly used during development. Using Microsoft's Certificate Creation Tool, Makecert.exe, or OpenSSL it is fairly easy to create a certificate that can be used both on the server and to test the client application. The difference between Makecert.exe and Openssl is that it is possible to use Openssl to administrate a real CA and create real root certificates. In general Openssl is somewhat more difficult to use. but creates safer self-signed certificates.
Common Name or CN

It is important to observe that the Common Name must be resolved to the IP address of the server the clients use to contact the host. If this does not match, the server certificate is not considered valid, which may prevent further communication. This will be dependent on how strict the client is set to handle server certificate validity.

For AXIS Camera Station server the certificate must use the server IP address or a host name that can be resolved by DNS to the IP address.

Configuring the port

The port used by the web services should be configured via the HTTP.SYS file. On Windows XP the HttpCfg.exe program is used to add SSL to a port, in this case port 50531.

httpcfg set ssl -i 0.0.0.0:50531 -h abababababababababababababab

where "abababababababababababababab" is the certificate thumbprint accessible via Microsoft Management Console.

On other operating systems Windows HTTP Services Certificate Configuration Tool, WinHttpCertCfg.exe, can be used or netch.exe on Vista.


Client certificate

Client certificate
SSL Solution

The client should have the public root certificate installed on the client machine. When the client calls the server, the root certificate will be used to validate server authenticity. The client application must add user name and password for each request.

Self-signed certificate warning

If a self-signed certificate on the server is used, the client will need to allow the warning that the server certificate is not secure. An example of how this is done in .NET is available.


Generate and use a self-signed certificate

Generate and use a self-signed certificate
SSL Solution

Generating and using a self-signed certificate is fairly easy, but it is not secure enough in a running system. To develop and test a system it is a simple way of making sure that the application works as intended, and that both client and server has been configured correctly. See more in http://msdn.microsoft.com/en-us/library/aa364691(VS.85).aspx and http://msdn.microsoft.com/en-us/library/ms731899.aspx.

Steps to generate self-signed certificates

1. Download OpenSSL from http://www.openssl.org/ or a Windows specific executable (.exe).

2. Generate a private key using openssl with a key length of 1024 bits and RSA key algorithm:

openssl genrsa 1024 > "server ip address".key

3. Generate a Certificate signing request (CSR) using previously generated key as input:

openssl req -new -key "server ip address".key > "server ip address".csr

4. Create a self signed server X.509 certificate using the CSR as input. The certificate will be valid for 365 days and is signed using the private key:

openssl req -x509 -days 365 -key "server ip address".key -in "server ip address".csr >"server ip address".crt

5. Export the certificate into a PKCS#12 file, which can be imported to a certificate store:

openssl pkcs12 -export -in "server ip address".crt -out "server ip address".p12 -name "server ip address"
-inkey "server ip address".key

Import server certificate to certificate store

The PKCS#12 file should be imported to a certificate store. For test purpose, the Personal store is sufficient. With a real server certificate, it should be installed in Trusted Root certificate store if it is a root certificate, or Trusted People if it is a server certificate signed by a root certificate. To start Microsoft Management Console, where the import of certificates is done, follow the steps to install the test certificate into the Personal store on the Local Computer:

1. Click "Start" | "Run..." in the Program manager.

2. Write "mmc" and then click "OK"

3. Click "File" | "Add/Remove Snap In..."

4. Click "Add..."

5. Select "Certificates" and click "Add"

6. Select "Computer account" and click "Next"

7. Select "Local computer" and click "Finish"

8. Close "Add Standalone Snap-in" dialog

9. Click "OK" in "Add/Remove Snap-in" dialog

10. Expand "Certificates (Local Computer)"

11. Right-click "Personal" folder and click "All Tasks" | "Import..."

12. Follow wizard and browse to certificate (with extension .p12) when asked to.

13. Save the Microsoft Management Console after import is finished.

Configure the SSL port on the server

The last step on the server is to configure the web service port to use the certificate. On Windows XP and Server 2003 use HttpCfg.exe to configure the port and on Vista use netsh.exe. Here only Httpcfg.exe is demonstrated:

1. If Httpcfg.exe is not installed on the PC dowload and install from http://www.microsoft.com/downloads/details.aspx?familyid=49AE8576-9BB9-4126-9761-BA8011FABF38&displaylang=en

2. In the Command window write the following to make sure that the port is not already configured with another certificate:

httpcfg query ssl

3. Open the certificate store that was saved using MMC and browse to the imported certificate.

4. Double-click the certificate and select the Details tab.

5. Go down to the Thumbprint property and copy the Value to Notepad or similar text editor.

6. Remove all spaces in the thumbprint. Save the file and copy the thumbprint.

7. In the command window write the port number where it stands xxxxx, and abababababababababababababab is the thumbprint without spaces:

httpcfg set ssl -i 0.0.0.0:xxxxx -h abababababababababababababab

8. The port is now configured and by repeating the command from step 2, it should be possible to see the result.

C:\>httpcfg query ssl
    IP                      : 0.0.0.0:xxxxx
    Hash                    : a151dc4b506621ab16d3ef04f91f012602e80
    Guid                    : {00000000-0000-0000-0000-000000000000}
    CertStoreName           : (null)
    CertCheckMode           : 0
    RevocationFreshnessTime : 0
    UrlRetrievalTimeout     : 0
    SslCtlIdentifier        : (null)
    SslCtlStoreName         : Personal
    Flags                   : 0
------------------------------------------------------------------------------


Faults

Faults
Tutorial Topics

Most service requests return some kind of fault if something goes wrong. Observe that the innermost exception or fault to handle should be a timeout exception, followed by the request specific faults and finally a communication exception. In this way it is possible to handle most types of errors.

Topics
Name | Description
SOAP Faults | BasicHttpBinding uses SOAP 1.1 protocol. As such the general fault cause is described in the fault code tag and the underlying reason in the sub-code. Due to incomplete implementation of SOAP 1.1 protocol in .NET, it is not possible to use this sub-code, so in Axis CameraStation API the real fault codes will be visible in the error text with a more specific explanation concatenated to the error code.
Fault codes | There are several CameraStation and Storage API specific fault codes. These are shown here, but each call using the API has different possible fault conditions, and they are shown in the request specific page. Some of these fault codes are used in functionality not yet implemented in the Axis Camera Station server.


SOAP Faults

SOAP Faults
Faults Example

BasicHttpBinding uses SOAP 1.1 protocol. As such the general fault cause is described in the fault code tag and the underlying reason in the sub-code. Due to incomplete implementation of SOAP 1.1 protocol in .NET, it is not possible to use this sub-code, so in Axis CameraStation API the real fault codes will be visible in the error text with a more specific explanation concatenated to the error code.

Example
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <s:Fault>
      <faultcode>s:Client</faultcode>
      <faultstring xml:lang="sv-SE">http://www.axis.com/webservice/storage/error/InvalidCameraToken:
        No camera found with id: 1111</faultstring>
    </s:Fault>
  </s:Body>
</s:Envelope>

Service specific error code is shown in bold above. Concatenated is an error text with some added information about the reason for the exception.


Fault codes

Fault codes
Faults

There are several CameraStation and Storage API specific fault codes. These are shown here, but each call using the API has different possible fault conditions, and they are shown in the request specific page. Some of these fault codes are used in functionality not yet implemented in the Axis Camera Station server.

Codes
Code with namespace
http://www.axis.com/webservice/storage/error/InvalidCameraToken
http://www.axis.com/webservice/storage/error/InvalidRecordingToken
http://www.axis.com/webservice/storage/error/RecordingLocked
http://www.axis.com/webservice/storage/error/RecordingInProgress
http://www.axis.com/webservice/storage/error/InvalidFilterOperand
http://www.axis.com/webservice/storage/error/InvalidFilterOperation
http://www.axis.com/webservice/storage/error/InvalidSourceConfiguration
http://www.axis.com/webservice/storage/error/UnableToCreateSourceConfiguration
http://www.axis.com/webservice/storage/error/UnableToDeleteSourceConfiguration
http://www.axis.com/webservice/storage/error/OperationNotImplemented
http://www.axis.com/webservice/storage/error/InternalDeviceError
http://www.axis.com/webservice/storage/error/ProtocolNotSupported
http://www.axis.com/webservice/camerastation/error/InvalidEventToken
http://www.axis.com/webservice/camerastation/error/InvalidIOToken
http://www.axis.com/webservice/camerastation/error/InvalidIOConfiguration


Storage API

Storage API
Topics
Storage API overview

The Storage API contains requests that have to do with recording storage and sources, i.e. cameras in the AXIS Camera Station. These operations or requests are complemented with the CameraStation API specific to AXIS Camera Station.

Background

This API is a group of web service request intended to simplify using SDK's from Axis Communications. The Storage API will be used by more than one product type from Axis. This also mean that sometimes the requests are not implemented by some products as this functionality is not implemented on the server side.

Service end-points

The service operations are available at "http://Camera Station server address:web service port" + endpoint.

Endpoint | Service purpose
/webservice/Storage/StorageBasic | Basic functionality.
/webservice/Storage/StoragePlayback | Handling playback of recordings.
/webservice/Storage/StorageScheduler | Starting and stopping recordings.
Topics
Name | Description
Basic | The basic interface contains the common functionality that shall always be implemented for any device supporting Storage API. All the methods are implemented on AXIS Camera Station server.
FileServer | NOT SUPPORTED BY AXIS CameraStation Server. This part of the Storage API concerns handling recordings. It includes deletion, download and upload of recordings using MTOM or HTTP, and setting recording attributes.
Playback | Here requests for recording playback can be found. A recording can be streamed to a client application using AXIS Media Control as receiving component.
Scheduler | This part of the Storage API handles RecordingSourceConfigurations and start/stop recordings. As RecordingSourceConfigurations are not yet implemented on AXIS Camera Station, only RecordingProfiles are used in AXIS Camera Station API. These are accessible using CameraStation API.


Basic

Basic
Storage API Topics

The basic interface contains the common functionality that shall always be implemented for any device supporting Storage API. All the methods are implemented on AXIS Camera Station server.

Topics
Name | Description
GetCapabilities | Returns the storage capabilities of a device. This includes the endpoint reference of supported web service interfaces, and whether optional operations are supported or not. SupportedVersions must include 1.0.
GetRecordingAttributes | Returns a RecordingAttribute structure with information about the recording.
ListRecordings | Returns a list of RecordingInformation structures that contains information about the recordings specified by the Filter. The array returned must contain all matching structures defined by the IncludeFunctions of the filter.
ListRecordingBlocks | Returns a list of RecordingBlockInformation structures that contains information about the recording blocks specified by the Filter. The array returned must contain all matching structures defined by the IncludeFunctions of the filter.
ListSources | Returns a list of RecordingSources that contains basic information about the sources specified by the Filter. The array returned must contain all matching structures defined by the IncludeFunctions of the filter.
SetUserData | Returns the user data associated with a recording.
GetUserData | Returns the user data associated with a recording.
AddLock | Adds a lock to the recording to prevent automatic removal and changing of attributes.
RemoveLock | Removes an existing lock to allow automatic removal and changing of attributes.
GetLocks | Lists all locks affecting a specified recording. Currently only one lock is possible. This locks the whole recording.


GetCapabilities

GetCapabilities
Basic

Returns the storage capabilities of a device. This includes the endpoint reference of supported web service interfaces, and whether optional operations are supported or not. SupportedVersions must include 1.0.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/GetCapabilities

Request returns

Capabilities

Exceptions
Exceptions | Description
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.


GetRecordingAttributes

GetRecordingAttributes
Basic Example

Returns a RecordingAttribute structure with information about the recording.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/GetRecordingAttributes

Parameters
Parameters | Description
RecordingToken | RecordingReference - Unique identifier of the recording.
Request returns

RecordingAttributes - The attributes of a recording.

Exceptions
Exceptions | Description
InvalidRecordingToken | This request returns an InvalidRecordingToken if the recording cannot be found on the server.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.GetRecordingAttributesCompleted += storageBasic_GetRecordingAttributesCompleted;
storageBasic.GetRecordingAttributesAsync(recordingToken);

......

void storageBasic_GetRecordingAttributesCompleted(object sender, GetRecordingAttributesCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  statusStripLabel.Text = "Recording used camera " + e.Result.SourceToken +
    " Video format "+e.Result.VideoAttributes.Encoding;
}


ListRecordings

ListRecordings
Basic Example

Returns a list of RecordingInformation structures that contains information about the recordings specified by the Filter. The array returned must contain all matching structures defined by the IncludeFunctions of the filter.

Notes

Long lists can be handled by taking smaller subsets in each request using Skip and Take. ExcludeFunctions functionality is not implemented in AXIS Camera Station. Observe that if the requested recording collection is too large this can lead to timeout error if the serialized messages is not transferred to the client in time. In this case consider reducing taken recording number, reducing the search scope or increase the timeout value.

Since there is some possibility that recording files have been removed by the periodic clean-up routine while recordings data still remains in the database, this call does not include those recordings that do not contain recording blocks. It could then make the return result collection smaller than expected.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/ListRecordings

Parameters
Parameters | Description
Filter | Filter - Defines the subset of recordings to list. It is only possible to use SourceToken, StartTime and StopTime.
Skip | int - Skip the first Skip results in the response.
Take | int - Return at most Take results in the response.
Request returns

RecordingInformationList - An object with a list of RecordingInformation and search information.

Exceptions
Exceptions | Description
InvalidFilterOperand | InvalidFilterOperand is thrown if the operand is not applicable in this context.
InvalidFilterOperation | InvalidFilterOperation is thrown if the operation is not applicable for the specified operand.
Example
storageBasicClient = new StorageBasicClient();
storageBasicClient.ClientCredentials.UserName.UserName = client.LoginName;
storageBasicClient.ClientCredentials.UserName.Password = client.Password;
storageBasicClient.ListRecordingsCompleted += client_ListRecordingsCompleted;
storageBasicClient.ListRecordingsAsync(filter, 0, 20);

....

void client_ListRecordingsCompleted(object sender, ListRecordingsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.StackTrace, "Error");
    return;
  }
  recordingList.Clear();
  foreach (RecordingInformation info in e.Result.RecordingInformation)
  {
    recordingList.Add(info);
  }
}


ListRecordingBlocks

ListRecordingBlocks
Basic Example

Returns a list of RecordingBlockInformation structures that contains information about the recording blocks specified by the Filter. The array returned must contain all matching structures defined by the IncludeFunctions of the filter.

Notes

Long lists can be handled by taking smaller subsets in each request using Skip and Take. ExcludeFunctions functionality is not implemented in AXIS Camera Station.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/ListRecordingBlocks

Parameters
Parameters | Description
Filter | Filter - Defines the subset of recording blocks to list. It is only possible to use RecordingToken.
Skip | int - Skip the first Skip results in the response.
Take | int - Return at most Take results in the response.
Request returns

RecordingBlockInformationList - An object with a list of RecordingBlockInformation and search information.

Exceptions
Exceptions | Description
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.ListRecordingBlocksCompleted += storageBasic_ListRecordingBlocksCompleted;
Filter filter = new Filter();
filter.IncludeFunctionsField = new FilterFunction[1];
filter.IncludeFunctionsField[0].Operand = FilterOperand.RecordingToken;
filter.IncludeFunctionsField[0].Operator = FilterOperator.Equals;
filter.IncludeFunctionsField[0].Value = recordingToken;
storageBasic.ListRecordingBlocksAsync(filter, 0, 5);

.....

void storageBasic_ListRecordingBlocksCompleted(object sender, ListRecordingBlocksCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  statusStripLabel.Text = "Number of recording blocks is " + e.Result.Total;
}


ListSources

ListSources
Basic Example

Returns a list of RecordingSources that contains basic information about the sources specified by the Filter. The array returned must contain all matching structures defined by the IncludeFunctions of the filter.

Notes

Long lists can be handled by taking smaller subsets in each request using Skip and Take. ExcludeFunctions functionality is not implemented in AXIS Camera Station.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/ListSources

Parameters
Parameters | Description
Filter | Filter - Defines the subset of sources to list. A "null" value returns all sources otherwise SourceToken can be used to define the requested sources.
Skip | int - Skip the first Skip results in the response.
Take | int - Return at most Take results in the response.
Request returns

RecordingSourceList - An object with a list of RecordingSource and search information.

Exceptions
Exceptions | Description
InvalidFilterOperand | The operand is not applicable in this context.
InvalidFilterOperation | The operation is not applicable for the specified operand.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.ListSourcesCompleted += storageBasic_ListSourcesCompleted;
storageBasic.ListSourcesAsync(null, 0, 50);

.......

void storageBasic_ListSourcesCompleted(object sender, ListSourcesCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }

  RecordingSourceList list = e.Result;
  foreach (RecordingSource camera in list.RecordingSources)
  {
    cameraList.Add(camera);
  }
}


SetUserData

SetUserData
Basic Example

Returns the user data associated with a recording.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/SetUserData

Parameters
Parameters | Description
RecordingToken | RecordingReference - Unique identifier of the recording.
UserData | string - Custom data in the form of a string.
Request returns

None

Exceptions
Exceptions | Description
InvalidRecordingToken | This request returns an InvalidRecordingToken if the recording cannot be found on the server.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.SetUserDataCompleted += storageBasic_SetUserDataCompleted;
storageBasic.SetUserDataAsync(recordingToken, employeeNo);

.......

void storageBasic_SetUserDataCompleted(object sender, AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }

  stausStripLabel.Text = "UserData set";
}


GetUserData

GetUserData
Basic Example

Returns the user data associated with a recording.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/GetUserData

Parameters
Parameters | Description
RecordingToken | RecordingReference - Unique identifier of the recording.
Request returns

string - Custom data in the form of a string.

Exceptions
Exceptions | Description
InvalidRecordingToken | This request returns an InvalidRecordingToken if the recording cannot be found on the server.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.GetUserDataCompleted += storageBasic_GetUserDataCompleted;
storageBasic.GetUserDataAsync(recordingToken);

.....

void storageBasic_GetUserDataCompleted(object sender, GetUserDataCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  statusStripLabel.Text = "Recording shows employee" + e.Result;
}


AddLock

AddLock
Basic Example

Adds a lock to the recording to prevent automatic removal and changing of attributes.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/AddLock

Parameters
Parameters | Description
RecordingToken | RecordingReference - Unique identifier of the recording.
StartTime | dateTime - From which time the lock is valid. (Not used)
StopTime | dateTime - Until which time the lock is valid. (Not used)
Request returns

LockReference - The token of the new lock created.

Exceptions
Exceptions | Description
InvalidRecordingToken | This request returns an InvalidRecordingToken if the recording cannot be found on the server.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storageBasicClient = new StorageBasicClient();
storageBasicClient.ClientCredentials.UserName.UserName = client.LoginName;
storageBasicClient.ClientCredentials.UserName.Password = client.Password;
storageBasicClient.AddLockCompleted += recClient_LockRecordingCompleted;
storageBasicClient.AddLockAsync(recordingToken, new DateTime(), new DateTime());

.......

void recClient_LockRecordingCompleted(object sender, AsyncCompletedEventArgs e)
{
  toolStripStatusLabel.Text = "Locked recording";
}


RemoveLock

RemoveLock
Basic Example

Removes an existing lock to allow automatic removal and changing of attributes.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/RemoveLock

Parameters
Parameters | Description
LockToken | LockReference - Unique identifier of the lock to remove.
Request returns

None

Exceptions
Exceptions | Description
InvalidRecordingToken | This request returns an InvalidRecordingToken if the recording cannot be found on the server.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storageBasicClient = new StorageBasicClient();
storageBasicClient.ClientCredentials.UserName.UserName = client.LoginName;
storageBasicClient.ClientCredentials.UserName.Password = client.Password;
storageBasicClient.RemoveLockCompleted += recClient_UnlockRecordingCompleted;
storageBasicClient.RemoveLockAsync(info.recordingTokenField);

......

void recClient_UnlockRecordingCompleted(object sender, AsyncCompletedEventArgs e)
{
  toolStripStatusLabel.Text = "Unlocked recording";
}


GetLocks

GetLocks
Basic

Lists all locks affecting a specified recording. Currently only one lock is possible. This locks the whole recording.

Remarks

Service: StorageBasic

Action: http://www.axis.com/webservice/storage/GetLocks

Parameters
Parameters | Description
RecordingToken | RecordingReference - Unique identifier of the recording.
Request returns

Lock[] - The locks affecting the specified recording.

Exceptions
Exceptions | Description
InvalidRecordingToken | This request returns an InvalidRecordingToken if the recording cannot be found on the server.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request. Example


FileServer

FileServer
Storage API

NOT SUPPORTED BY AXIS CameraStation Server. This part of the Storage API concerns handling recordings. It includes deletion, download and upload of recordings using MTOM or HTTP, and setting recording attributes.


Playback

Playback
Storage API Topics

Here requests for recording playback can be found. A recording can be streamed to a client application using AXIS Media Control as receiving component.

Topics
Name | Description
GetPlaybackUri | Returns an URI with a relative address that can be used for initiating playback of a specified recording from the storage device. The playback is according to the Transport specified in the request. The URI shall contain any parameters necessary for a successful initiation of the stream.
GetPlaybackTransports | Returns a list of transport protocols supported by this storage device for a specific recording. These transports must be valid input for the GetPlaybackUri operation.


GetPlaybackUri

GetPlaybackUri
Playback Example

Returns an URI with a relative address that can be used for initiating playback of a specified recording from the storage device. The playback is according to the Transport specified in the request. The URI shall contain any parameters necessary for a successful initiation of the stream.

Remarks

Service: StoragePlayback

Action: http://www.axis.com/webservice/storage/GetPlaybackUri

Parameters
Parameters | Description
RecordingToken | RecordingReference - Unique identifier of the recording to playback.
Transport | Transport - The desired transport protocol including tunnelling options.
Request returns

MediaUri - Contains the relative URI used for initiating playback of a specified recording as well as information about how long the URI will remain valid. The stream address is the same as for the web service call and the port is one number higher than the web service port. In this way the stream address can be constructed with "scheme"://"web service address":"web service port +1"/"MediaUri.Uri".

Scheme is most often "rtsp", but can sometimes be specific for the player. For example, AMC uses "axrtsphttp" to force the player to accept RTSP/HTTP streams.

Exceptions
Exceptions | Description
InvalidRecordingToken | The recording does not exist.
ProtocolNotSupported | Requested transport is not supported by this device.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storagePlaybackClient = new StoragePlaybackClient();
storagePlaybackClient.ClientCredentials.UserName.UserName = client.LoginName;
storagePlaybackClient.ClientCredentials.UserName.Password = client.Password;
storagePlaybackClient.GetPlaybackUriCompleted += storagePlaybackClient_GetPlaybackUriCompleted;
Transport transport = new Transport()
{
  protocolField = TransportProtocol.RTSP,
  tunnelField = new Transport()
  {
    protocolField = TransportProtocol.HTTP,
    tunnelField = new Transport()
    {
      protocolField = TransportProtocol.TCP
    }
  }
};
storagePlaybackClient.GetPlaybackUriAsync(recordingToken, transport);

......

void storagePlaybackClient_GetPlaybackUriCompleted(object sender, GetPlaybackUriCompletedEventArgs e)
{
  if (e.Error == null)
  {
....// Using AXIS Media Control to start playing a stream
....ServiceEndpoint point = storagePlaybackClient.Endpoint;
    int port = point.Address.Uri.Port + 1;
    string address = point.Address.Uri.DnsSafeHost;
    axAxisMediaControl1.MediaURL = string.Format("{0}://{1}:{2}/{3}",
......"axrtsphttp", address, port, e.Result.Uri);
    axAxisMediaControl1.MediaURL = e.Result.Uri;
....axAxisMediaControl1.Play();
  }
}


GetPlaybackTransports

GetPlaybackTransports
Playback Example

Returns a list of transport protocols supported by this storage device for a specific recording. These transports must be valid input for the GetPlaybackUri operation.

Remarks

Service: StoragePlayback

Action: http://www.axis.com/webservice/storage/GetPlaybackTransports

Parameters
Parameters | Description
RecordingToken | RecordingReference - Unique identifier of the recording.
Request returns

Transport[] - List of transports available for streaming the indicated recording.

Exceptions
Exceptions | Description
InvalidRecordingToken | The recording does not exist.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storagePlaybackClient = new StoragePlaybackClient();
storagePlaybackClient.ClientCredentials.UserName.UserName = client.LoginName;
storagePlaybackClient.ClientCredentials.UserName.Password = client.Password;
storagePlaybackClient.GetPlaybackTransportsCompleted += storagePlaybackClient_GetPlaybackTransportsCompleted;
storagePlaybackClient.GetPlaybackTransportsAsync(recordingToken);

.....

void storagePlaybackClient_GetPlaybackTransportsCompleted(object sender,
  GetPlaybackTransportsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.StackTrace, "Error");
    return;
  }
  foreach (Transport transport in e.Result)
  {
    list.Add(transport);
  }
}


Scheduler

Scheduler
Storage API Topics

This part of the Storage API handles RecordingSourceConfigurations and start/stop recordings. As RecordingSourceConfigurations are not yet implemented on AXIS Camera Station, only RecordingProfiles are used in AXIS Camera Station API. These are accessible using CameraStation API.

Notes

StartRecording and StopRecording are implemented on the server. A camera id, i.e. a source token, is used for starting the recording. And a recording id, i.e. a recording token, is used to stop the recording.

Topics
Name | Description
CreateSourceConfiguration | NOT SUPPORTED BY AXIS CameraStation Server. Creates a new RecordingSourceConfiguration.
SetSourceConfiguration | NOT SUPPORTED BY AXIS CameraStation Server. Sets the configuration of a source. The token element supplied in SourceConfiguration shall reference an already existing RecordingSourceConfiguration.
GetSourceConfiguration | NOT SUPPORTED BY AXIS CameraStation Server. Retrieves a specified RecordingSourceConfiguration.
ListSourceConfigurations | NOT SUPPORTED BY AXIS CameraStation Server. Returns all RecordingSourceConfigurations matching the filter functions.
DeleteSourceConfiguration | NOT SUPPORTED BY AXIS CameraStation Server. Deletes a SourceConfiguration specified by SourceConfigurationToken from the storage device.
SetRecordingSchedule | NOT SUPPORTED BY AXIS CameraStation Server. Sets the recording schedule of a RecordingSourceConfiguration, defining when recording should start and stop using that configuration. A duration of 0 means infinite.
GetRecordingSchedule | NOT SUPPORTED BY AXIS CameraStation Server. Requests a RecordingSchedule for a specific RecordingSourceConfiguration.
StartRecording | Starts a recording and returns the actual RecordingToken for the started recording. Observe that the recording id should be stored in some way so that in case the application goes down it can be retrieved and used for StopRecording.
StopRecording | Stops an ongoing recording specified with the RecordingToken.


CreateSourceConfiguration

CreateSourceConfiguration
Scheduler

NOT SUPPORTED BY AXIS CameraStation Server. Creates a new RecordingSourceConfiguration.

Remarks

Service: StorageScheduler

Action: http://www.axis.com/webservice/storage/CreateSourceConfiguration

Parameters
Parameters | Description
SourceToken | RecordingSourceReference - Optional reference to a RecordingSource that this configuration shall apply to.
RecordingSource | Reference to RecordingSource - Definition of an existing or new RecordingSource.
Request returns

RecordingSource : Reference to RecordingSource - The created RecordingSourceConfiguration.

Exceptions
Exceptions | Description
UnableToCreateSourceConfiguration | The device cannot create any more source configurations.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.


SetSourceConfiguration

SetSourceConfiguration
Scheduler

NOT SUPPORTED BY AXIS CameraStation Server. Sets the configuration of a source. The token element supplied in SourceConfiguration shall reference an already existing RecordingSourceConfiguration.

Remarks

Service: StorageScheduler

Action: http://www.axis.com/webservice/storage/SetSourceConfiguration

Parameters
Parameters | Description
SourceConfiguration | RecordingSourceConfiguration - The configuration to set.
Request returns

None

Exceptions
Exceptions | Description
InvalidSourceConfiguration | Specified RecordingSourceConfiguration does not exist.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.


GetSourceConfiguration

GetSourceConfiguration
Scheduler

NOT SUPPORTED BY AXIS CameraStation Server. Retrieves a specified RecordingSourceConfiguration.

Remarks

Service: StorageScheduler

Action: http://www.axis.com/webservice/storage/GetSourceConfiguration

Parameters
Parameters | Description
SourceConfigurationToken | RecordingSourceConfigurationReference - Reference to the RecordingSourceConfiguration to retrieve.
Request returns

RecordingSourceConfiguration - The requested RecordingSourceConfiguration.

Exceptions
Exceptions | Description
InvalidSourceConfiguration | Specified RecordingSourceConfiguration does not exist.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.


ListSourceConfigurations

ListSourceConfigurations
Scheduler

NOT SUPPORTED BY AXIS CameraStation Server. Returns all RecordingSourceConfigurations matching the filter functions.

Remarks

Service: StorageScheduler

Action: http://www.axis.com/webservice/storage/ListSourceConfigurations

Parameters
Parameters | Description
Filter | Filter - Defines the subset of VideoSourceConfigurations to list.
Skip | int - Skip the first Skip results in the response.
Take | int - Return at most Take results in the response.
Request returns

RecordingSourceConfigurationList - The RecordingSourceConfigurations matches.

Exceptions
Exceptions | Description
InvalidFilterOperand | The operand is not applicable in this context.
InvalidFilterOperation | The operation is not applicable for the specified operand.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.


DeleteSourceConfiguration

DeleteSourceConfiguration
Scheduler

NOT SUPPORTED BY AXIS CameraStation Server. Deletes a SourceConfiguration specified by SourceConfigurationToken from the storage device.

Remarks

Service: StorageScheduler

Action: http://www.axis.com/webservice/storage/DeleteSourceConfiguration

Parameters
Parameters | Description
SourceConfigurationToken | RecordingSourceConfigurationReference - Reference to the RecordingSourceConfiguration to delete.
Request returns

None

Exceptions
Exceptions | Description
InvalidSourceConfiguration | Specified RecordingSourceConfiguration does not exist.
UnableToDeleteSourceConfiguration | Cannot delete specified RecordingSourceConfiguration.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.


SetRecordingSchedule

SetRecordingSchedule
Scheduler

NOT SUPPORTED BY AXIS CameraStation Server. Sets the recording schedule of a RecordingSourceConfiguration, defining when recording should start and stop using that configuration. A duration of 0 means infinite.

Remarks

Service: StorageScheduler

Action: http://www.axis.com/webservice/storage/SetRecordingSchedule

Parameters
Parameters | Description
RecordingSchedule | RecordingSchedule - The schedule.
Request returns

None

Exceptions
Exceptions | Description
InvalidSourceConfiguration | RecordingSourceConfiguration referenced in RecordingSchedule does not exist.
OperationNotSupported | SetRecordingSchedule is not supported by the device.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.


GetRecordingSchedule

GetRecordingSchedule
Scheduler

NOT SUPPORTED BY AXIS CameraStation Server. Requests a RecordingSchedule for a specific RecordingSourceConfiguration.

Remarks

Service: StorageScheduler

Action: http://www.axis.com/webservice/storage/GetRecordingSchedule

Parameters
Parameters | Description
SourceConfigurationToken | RecordingSourceConfigurationReference - Reference to the RecordingSourceConfiguration for which the schedule is requested.
Request returns

RecordingSchedule - The specified RecordingSchedule.

Exceptions
Exceptions | Description
InvalidSourceConfiguration | Specified RecordingSourceConfiguration does not exist.
OperationNotSupported | SetRecordingSchedule is not supported by the device.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.


StartRecording

StartRecording
Scheduler Example

Starts a recording and returns the actual RecordingToken for the started recording. Observe that the recording id should be stored in some way so that in case the application goes down it can be retrieved and used for StopRecording.

Remarks

Service: StorageScheduler

Action: http://www.axis.com/webservice/storage/StartRecording

Parameters
Parameters | Description
RecordingToken | Reference to RecordingReference - Can be empty to automatically assign a token. Always contains the actual RecordingToken when returned.
SourceConfigurationToken | RecordingSourceConfigurationReference - Reference to the RecordingSourceConfiguration, which defines what the recording will consist of and how to initiate it.
Duration | Duration - The recording shall automatically stop after the duration. A duration of 0 means infinite. If Prebuffer and/or Postbuffer is used, those time intervals are added to Duration.
Request returns

RecordingToken - Reference to RecordingReference

Exceptions
Exceptions | Description
InvalidSourceConfiguration | Specified RecordingSourceConfiguration does not exist.
RecordingInProgress | This request returns an RecordingInProgress if the server already is recording with the camera.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storageSchedulerClient = new StorageSchedulerClient();
storageSchedulerClient.ClientCredentials.UserName.UserName = client.LoginName;
storageSchedulerClient.ClientCredentials.UserName.Password = client.Password;
storageSchedulerClient.StartRecordingCompleted += schClient_StartRecordingCompleted;
storageSchedulerClient.StartRecordingAsync(null, currentCamera.ToString(),
  XmlConvert.ToString(TimeSpan.Zero));

......

void schClient_StartRecordingCompleted(object sender, StartRecordingCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  UpdateStatusBar("Recording started, Id: " + e.RecordingToken);
}


StopRecording

StopRecording
Scheduler Example

Stops an ongoing recording specified with the RecordingToken.

Remarks

Service: StorageScheduler

Action: http://www.axis.com/webservice/storage/StopRecording

Parameters
Parameters | Description
RecordingToken | RecordingReference - Reference to the Recording that should stop.
Request returns

None

Exceptions
Exceptions | Description
InvalidRecordingToken | The recording does not exist.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
storageSchedulerClient = new StorageSchedulerClient();
storageSchedulerClient.ClientCredentials.UserName.UserName = client.LoginName;
storageSchedulerClient.ClientCredentials.UserName.Password = client.Password;
storageSchedulerClient.StopRecordingCompleted += (schClient_StopRecordingCompleted);
foreach (RecordingStatusInfo statusInfo in recordingStatusList)
storageSchedulerClient.StopRecordingAsync(statusInfo.RecordingId);

......

void schClient_StopRecordingCompleted(object sender, AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  UpdateStatusBar("Recording stopped, Id: " + statusInfo.RecordingId);
}


CameraStation API

CameraStation API
Topics

The CameraStation API makes web service requests that are specific to the Camera Station and whose functionality are not included in Storage API. Recording settings, Camera Station storage, exporting recordings to the server and requesting live-view using RTSP protocol or Multipart JPEG are some of the possibilities using this API.

Background

To cover the same functionality as previous SDK it was necessary to implement web service operations not covered in Storage API.

Service end-points

The service operations are available at "http://Camera Station server address:web service port" + endpoint.

Endpoints | Service purpose
/webservice/CameraStation/MediaConfiguration | Handling recording settings and live-view streaming.
/webservice/CameraStation/MediaStorage | Recording storage and recording export.
/webservice/CameraStation/DeviceManagement | Camera i.e. source capability and status. Also IO port handling.
/webservice/CameraStation/EventManagement | Handling alarm and event functionality.
Topics
Name | Description
Media Configuration | Here is a list of RecordingProfiles, each representing a camera with it’s current resolution, encoding type, pre- and postbuffer size, etc. SetProfile is used when the recording profile should be change to use different resolutions, encoding types, etc. Also, here are requests to get live-view uri's, GetStreamUri. To list live view streaming profiles use ListStreamProfiles and if the default live-view profiles is not acceptable SetStreamProfile should be used to change configuration for API specific live-view streaming.
Media Storage | Media storage is for recording storage on the Camera Station. Export of recordings to a requested directory on the server and what the storage configuration currently looks like. No changes can be done using web service requests.
Device Management | Use device management to find out what a camera’s capabilities are such as what resolutions and what kind of encodings are possible to set on a RecordingProfile. Use GetSourceCapability to get this information, and before starting a recording it is possible to check the camera status by using GetSourceStatus. It is also possible to get IO port information for cameras or other devices configured by AXIS Camera Station, ListPorts, as well as setting output ports to Active or Inactive state using SetPort.
Event Management | Here are the methods to find the latest alarm on the server, GetLatestAlarm, as well as getting all alarms later than a particular alarm, GetCurrentAlarms. The method, ListAlarms, can using filter to get alarms between a start and stop time. There is also a call to acknowledge alarms on the server, AcknowledgeAlarm.


Media Configuration

Media Configuration
CameraStation API Topics

Here is a list of RecordingProfiles, each representing a camera with it’s current resolution, encoding type, pre- and postbuffer size, etc. SetProfile is used when the recording profile should be change to use different resolutions, encoding types, etc. Also, here are requests to get live-view uri's, GetStreamUri. To list live view streaming profiles use ListStreamProfiles and if the default live-view profiles is not acceptable SetStreamProfile should be used to change configuration for API specific live-view streaming.

Topics
Name | Description
ListProfiles | Gets the recording settings via sources. The recording settings are the configurations for video recording using Storage API StartRecording request.
SetProfile | Sets the recording settings for a source such as a camera. Only one setting is active for AXIS Camera Station API users per camera.
GetStreamUri | Gets the relative live-view stream URI.
GetStreamTransports | Returns a list of transport protocols supported by AXIS Camera Station for a specific source. These transports must be valid input for the GetStreamUri operation.
SetPtzControlOperation | Sends one or more PTZ control commands to a camera. The commands follow VAPIX HTTP notation and each parameter/value pair should be separated with the "&" character.
ListStreamProfiles | This call returns live-view profiles for either sources (cameras) specified in the filter or all cameras added to AXIS Camera Station server. The live-view profile is unique for the API and will not be affected by configurations done using AXIS Camera Station Client.
SetStreamProfile | This call should be used to change configuration for API specific live-view streaming.


ListProfiles

ListProfiles
Media Configuration Example

Gets the recording settings via sources. The recording settings are the configurations for video recording using Storage API StartRecording request.

Remarks

Service: MediaConfiguration

Action: http://www.axis.com/webservice/camerastation/ListProfiles

Parameters
Parameters | Description
Filter | Filter - The recording profiles search filter. Add source tokens if a limited number of sources containing recording profiles should be listed.
Skip | int - Skipping this number of recording profiles.
Take | int - Taking this number of recording profiles.
Request returns

RecordingProfile[] - A collection of RecordingProfiles objects.

Exceptions
Exceptions | Description
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
mediaConfigurationClient.ListProfilesCompleted += cameraClient_ListProfilesCompleted;
try
{
  mediaConfigurationClient.ListProfilesAsync(null, 0, 10);
}
catch (FaultException unknownFault)
{
  MessageBox.Show(this, "An unknown exception was received. " + unknownFault.Reason);
}

.........

void cameraClient_ListProfilesCompleted(object sender, ListProfilesCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  recordingSettings = e.Result;
  StartRecordingSettingDialog(sender, e);  //New event to update UI to avoid threading issues
}


SetProfile

SetProfile
Media Configuration Example

Sets the recording settings for a source such as a camera. Only one setting is active for AXIS Camera Station API users per camera.

Notes

Observe that the MPEG-4 profile is unique for a camera. If a new MPEG-4 profile is created it will replace the previous MPEG-4 profile, independent of source for that profile, e.g. configured live-view in AXIS Camera Station Client.

Remarks

Service: MediaConfiguration

Action: http://www.axis.com/webservice/camerastation/SetProfile

Parameters
Parameters | Description
info | RecordingProfile - The recording settings information.
Request returns

None

Exceptions
Exceptions | Description
InvalidCameraToken | The source does not exist.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
RecordingProfile profile = new RecordingProfile();
profile.compressionField = 20; // Observe suffix added by codegeneration
.....
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
mediaConfigurationClient.SetProfileCompleted += mediaConfigurationClient_SetProfileCompleted;
mediaConfigurationClient.SetProfileAsync(profile);

......

void mediaConfigurationClient_SetProfileCompleted(object sender, AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    toolStripStatusLabel.Text = "Could not change recording settings";
    return;
  }

  toolStripStatusLabel.Text = "Recording settings changed";
}


GetStreamUri

GetStreamUri
Media Configuration Example

Gets the relative live-view stream URI.

Remarks

Service: MediaConfiguration

Action: http://www.axis.com/webservice/camerastation/GetStreamUri

Parameters
Parameters | Description
SourceToken | ReferenceToken - The source or camera token.
Transport | Transport - The stream transport requested.
Request returns

MediaUri - Contains the URI for the RTSP stream. The stream address is the same as for the web service call and the port is one number higher than the web service port. In this way the stream address can be constructed with "scheme"://"web service address":"web service port +1"/"MediaUri.Uri".

Scheme is most often "rtsp", but can sometimes be specific for the player. For example, AMC uses "axrtsphttp" to force the player to accept RTSP/HTTP streams.

Exceptions
Exceptions | Description
InvalidCameraToken | The source does not exist.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
Transport transport = new Transport()
{
  protocolField = TransportProtocol.RTSP,
  tunnelField = new Transport()
  {
    protocolField = TransportProtocol.HTTP,
    tunnelField = new Transport()
    {
      protocolField = TransportProtocol.TCP
    }
  }
};
mediaConfigurationClient.GetStreamUriCompleted += mediaConfigurationClient_GetStreamUriCompleted;
mediaConfigurationClient.GetStreamUriAsync(cameraId.ToString(), transport);

.......

void mediaConfigurationClient_GetStreamUriCompleted(object sender, GetStreamUriCompletedEventArgs e)
{
  if (e.Error == null)
  {
    // Using AXIS Media Control to start playing a stream
....ServiceEndpoint point = mediaConfigurationClient.Endpoint;
    int port = point.Address.Uri.Port + 1;
    string address = point.Address.Uri.DnsSafeHost;
    axAxisMediaControl1.MediaURL = string.Format("{0}://{1}:{2}/{3}",
......"axrtsphttp", address, port, e.Result.Uri);
....axAxisMediaControl1.Play();
  }
}


GetStreamTransports

GetStreamTransports
Media Configuration Example

Returns a list of transport protocols supported by AXIS Camera Station for a specific source. These transports must be valid input for the GetStreamUri operation.

Remarks

Service: MediaConfiguration

Action: http://www.axis.com/webservice/camerastation/GetStreamTransports

Parameters
Parameters | Description
SourceToken | ReferenceToken - The source or camera token for which the transports are valid.
Request returns

Transport[] - A collection of possible transport configurations.

Exceptions
Exceptions | Description
InvalidCameraToken | The source does not exist.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example

See GetPlaybackTransports


SetPtzControlOperation

SetPtzControlOperation
Media Configuration Example

Sends one or more PTZ control commands to a camera. The commands follow VAPIX HTTP notation and each parameter/value pair should be separated with the "&" character.

Notes

Further information can be found for ptz.cgi in the VAPIX documentation how the combined string should look like. Observe that it is the camera's PTZ capability that is the final arbiter of which commands will be executed and in what order.

Remarks

Service: MediaConfiguration

Action: http://www.axis.com/webservice/camerastation/SetPtzControlOperation

Parameters
Parameters | Description
SourceToken | ReferenceToken - The source or camera token.
PtzCommand | string - The PTZ command requested.
Request returns

string - Contains the ok response from the camera or other text if command requested such.

Exceptions
Exceptions | Description
InvalidCameraToken | The source does not exist, source is not PTZ enabled or user not authorized for this source.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
mediaConfigurationclient.SetPtzControlOperationCompleted +=
  (mediaConfigurationclient_SetPtzControlOperationCompleted);

.................

mediaConfigurationclient.SetPtzControlOperationAsync(cameraId, "move=down&zoom=3500");

.................

void mediaConfigurationclient_SetPtzControlOperationCompleted(object sender,
  SetPtzControlOperationCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
}


ListStreamProfiles

ListStreamProfiles
Media Configuration Example

This call returns live-view profiles for either sources (cameras) specified in the filter or all cameras added to AXIS Camera Station server. The live-view profile is unique for the API and will not be affected by configurations done using AXIS Camera Station Client.

Remarks

Service: MediaConfiguration

Action: http://www.axis.com/webservice/camerastation/ListStreamProfiles

Parameters
Parameters | Description
Filter | Filter - The live-view profiles search filter. Add source tokens if a limited number of sources containing live-view profiles should be listed.
Skip | int - Skipping this number of live-view profiles.
Take | int - Taking this number of live-view profiles.
Request returns

StreamProfile[] : - A collection of StreamProfile objects.

Exceptions
Exceptions | Description
InvalidFilterOperand | Wrongly formed filter in search.
InvalidCameraToken | No access or wrong id for the camera.
Example
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
mediaConfigurationClient.ListStreamProfilesCompleted +=
  (mediaConfigurationClient_ListStreamProfilesCompleted);
mediaConfigurationClient.ListStreamProfilesAsync(CreateCameraIdFilter(cameraId), 0, 1);
......
void mediaConfigurationClient_ListStreamProfilesCompleted(object sender,
  ListStreamProfilesCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  StreamProfile profile = e.Result.FirstOrDefault(); // Requires System.Linq
}
.....
private static Filter CreateCameraIdFilter(string id)
{
  Filter filter = new Filter();
  filter.IncludeFunctions = new FilterFunction[1];
  filter.IncludeFunctions[0] = new FilterFunction();
  filter.IncludeFunctions[0].Operator = FilterOperator.Equals;
  filter.IncludeFunctions[0].Operand = FilterOperand.SourceToken;
  filter.IncludeFunctions[0].Value = id;
  return filter;
}


SetStreamProfile

SetStreamProfile
Media Configuration Example

This call should be used to change configuration for API specific live-view streaming.

Notes

Observe that the MPEG-4 profile is unique for a camera. If a new MPEG-4 profile is created it will replace the previous MPEG-4 profile, independent of source for that profile, e.g. configured manual recording profile in AXIS Camera Station Client.

Remarks

Service: MediaConfiguration

Action: http://www.axis.com/webservice/camerastation/SetStreamProfile

Parameters
Parameters | Description
info | StreamProfile - The live-view settings information.
Request returns

None

Exceptions
Exceptions | Description
InvalidCameraToken | No access or wrong id for the camera.
Example
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
StreamProfile stream = new StreamProfile()
{
  AudioEncoding = AudioEncoding.None,
  Compression = 30,
  Framerate = 15.0,
  Resolution = "640x480",
  SourceToken = "110",
  VideoEncoding = VideoEncoding.JPEG
};
mediaConfigurationClient.SetStreamProfileCompleted +=
  (mediaConfigurationClient_SetStreamProfileCompleted);
mediaConfigurationClient.SetStreamProfileAsync(stream);
......
void mediaConfigurationClient_SetProfileCompleted(object sender,
  System.ComponentModel.AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
}


Media Storage

Media Storage
CameraStation API Topics

Media storage is for recording storage on the Camera Station. Export of recordings to a requested directory on the server and what the storage configuration currently looks like. No changes can be done using web service requests.

Topics
Name | Description
ExportRecording | Exports the recording to a directory on the server. The request do not return anything. When the export has finished there will be a playlist with extension "asx" in the export directory with the name suggested and a date added. The ASF recordings will be exported to a sub-directory. If a recording consists of several recording blocks, each recording block is exported separately so this directory can contain several files and possibly also a "thumbs.db" file.
ListStorageSpace | Gets media storage information, e.g. total and free memory as well as storage location.


ExportRecording

ExportRecording
Media Storage Example

Exports the recording to a directory on the server. The request do not return anything. When the export has finished there will be a playlist with extension "asx" in the export directory with the name suggested and a date added. The ASF recordings will be exported to a sub-directory. If a recording consists of several recording blocks, each recording block is exported separately so this directory can contain several files and possibly also a "thumbs.db" file.

Notes

Observe that the directory path on the server should be absolute. If a relative path is used, the path will be created in the Program Files folder. Depending on permissions this will not be allowed and the export request will fail.

Remarks

Service: MediaStorage

Action: http://www.axis.com/webservice/camerastation/ExportRecording

Parameters
Parameters | Description
RecordingToken | ReferenceToken - The recording token.
StartTime | dateTime - Requested export start time.
StopTime | dateTime - Requested export stop time.
ExportPath | string - The export path on the server. Should be absolute with a designated disk as part of the path.
SuggestedFileName | string - Suggested file name for exported recording playlist.
DigitalSignaturePassword | string - The digital signature password string.
Request returns

None.

Exceptions
Exceptions | Description
InvalidRecordingToken | The recording does not exist on the server.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
mediaStorageClient = new MediaStorageClient();
mediaStorageClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaStorageClient.ClientCredentials.UserName.Password = client.Password;
mediaStorageClient.ExportRecordingCompleted += mediaStorageClient_ExportRecordingCompleted;
mediaStorageClient.ExportRecordingAsync(recordingToken, startTime, stopTime, ServerDirectoryTextbox.Text,
  FilenameTextbox.Text, string.Empty);

.......

void mediaStorageClient_ExportRecordingCompleted(object sender, AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
}


ListStorageSpace

ListStorageSpace
Media Storage Example

Gets media storage information, e.g. total and free memory as well as storage location.

Remarks

Service: MediaStorage

Action: http://www.axis.com/webservice/camerastation/ListStorageSpace

Request returns

StorageSpace[] - A collection of StorageSpace objects.

Exceptions
Exceptions | Description
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
// Class variables
private StorageSpace[] storageSpaceArray;
.......
mediaStorageClient = new MediaStorageClient();
mediaStorageClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaStorageClient.ClientCredentials.UserName.Password = client.Password;
mediaStorageClient.ListStorageSpaceCompleted += recClient_ListStorageSpaceCompleted;
mediaStorageClient.ListStorageSpaceAsync();

..............

void recClient_ListStorageSpaceCompleted(object sender, ListStorageSpaceCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  storageSpaceArray = e.Result;
}


Device Management

Device Management
CameraStation API Topics

Use device management to find out what a camera’s capabilities are such as what resolutions and what kind of encodings are possible to set on a RecordingProfile. Use GetSourceCapability to get this information, and before starting a recording it is possible to check the camera status by using GetSourceStatus. It is also possible to get IO port information for cameras or other devices configured by AXIS Camera Station, ListPorts, as well as setting output ports to Active or Inactive state using SetPort.

Topics
Name | Description
GetVersion | GetVersion returns a Version indicating combined Storage and CameraStation API versions. If the API in either Storage or CameraStation changes, the version number will be changed. If only the minor number changes, it means either that the API have been extended, but also that the the old API still works. If the major number changes, then past versions of generated code will no longer work.
GetSourceCapability | Gets the source capability for a camera. Shows what possible configuration values are possible when setting recording profiles through the CameraStation API.
GetSourceStatus | Gets the source status, e.g. if the source or camera is online, is recording, etc.
ListPorts | List IO ports configured in AXIS Camera Station server with port type and status. If a search filter is used not configured ports can also be found. The port type will indicate if the port is configured or not by having type Unknown. The ports must be configure in AXIS Camera Station if alarms or changing of states should be done using the API.
SetPort | This call can be used to set configured output ports to Active or Inactive state. It should be observed that the call puts the signal change in a queue and thus the call in itself is not a guarantee that the state has changed. To verify the change a call to check current port status must be made after a reasonable time.


GetVersion

GetVersion
Device Management

GetVersion returns a Version indicating combined Storage and CameraStation API versions. If the API in either Storage or CameraStation changes, the version number will be changed. If only the minor number changes, it means either that the API have been extended, but also that the the old API still works. If the major number changes, then past versions of generated code will no longer work.

Remarks

Service: DeviceManagement

Action: http://www.axis.com/webservice/CameraStation/GetVersion

Request returns

Version


GetSourceCapability

GetSourceCapability
Device Management Example

Gets the source capability for a camera. Shows what possible configuration values are possible when setting recording profiles through the CameraStation API.

Remarks

Service: DeviceManagement

Action: http://www.axis.com/webservice/camerastation/GetSourceCapability

Parameters
Parameters | Description
SourceToken | ReferenceToken - The source token.
Request returns

SourceCapability - The camera capability.

Exceptions
Exceptions | Description
InvalidCameraToken | The source does not exist.
InternalDeviceError | This request returns an internal device error if the server cannot respond to the client request.
Example
deviceManagementClient = new DeviceManagementClient();
deviceManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
deviceManagementClient.ClientCredentials.UserName.Password = client.Password;
deviceManagementClient.GetSourceCapabilityCompleted += cameraClient_GetCameraCapabilityCompleted;
deviceManagementClient.GetSourceCapabilityAsync(SettingInfo.sourceTokenField);

........

void cameraClient_GetCameraCapabilityCompleted(object sender, GetSourceCapabilityCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }

  CameraCapability capability = e.Result;
  .....
}


GetSourceStatus

GetSourceStatus
Device Management Example

Gets the source status, e.g. if the source or camera is online, is recording, etc.

Remarks

Service: DeviceManagement

Action: http://www.axis.com/webservice/camerastation/GetSourceStatus

Parameters
Parameters | Description
SourceToken | ReferenceToken - The source or camera token.
Request returns

SourceStatus - An object containing the source status.

Exceptions
Exceptions | Description
InvalidCameraToken | The source does not exist.
InternalDeviceError | This request returns an InternalDeviceError if the server cannot respond to the client request.
Example
deviceManagementClient = new DeviceManagementClient();
deviceManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
deviceManagementClient.ClientCredentials.UserName.Password = client.Password;
deviceManagementClient.GetSourceStatusCompleted += deviceManagementClient_GetSourceStatusCompleted;
deviceManagementClient.GetSourceStatusAsync(cameraToken);

......

void deviceManagementClient_GetSourceStatusCompleted(object sender, GetSourceStatusCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  onlineLabel.Text = "Camera online: "+e.Result.IsOnline;
  recordingLabel.Text = "Camera recording: " + e.Result.IsRecording;
}


ListPorts

ListPorts
Device Management Example

List IO ports configured in AXIS Camera Station server with port type and status. If a search filter is used not configured ports can also be found. The port type will indicate if the port is configured or not by having type Unknown. The ports must be configure in AXIS Camera Station if alarms or changing of states should be done using the API.

Remarks

Service: DeviceManagement

Action: http://www.axis.com/webservice/camerastation/ListPorts

Parameters
Parameters | Description
Filter | Filter - The IO port search filter. Add source tokens if all ports belonging to specified cameras should be listed, even if they are not configured in AXIS Camera Station server.
Skip | int - Skipping this number of IO ports.
Take | int - Taking this number of IO ports.
Request returns

PortInformationList : - A collection of PortInformation objects.

Exceptions
Exceptions | Description
InvalidIOConfiguration | An IO port has an invalid configuration.
InternalDeviceError | Conversion errors, probably due to internal database errors.
InvalidFilterOperand | Filter was wrongly configured.
InvalidCameraToken | SourceToken error in search parameters.
Example
deviceManagementClient = new DeviceManagementClient();
deviceManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
deviceManagementClient.ClientCredentials.UserName.Password = client.Password;
deviceManagementClient.ListPortsCompleted += (deviceManagementClient_ListPortsCompleted);
deviceManagementClient.ListPortsAsync(new Filter(), 0, 10);
.........
void deviceManagementClient_ListPortsCompleted(object sender, ListPortsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  PortInformationList list = e.Result;
  foreach (PortInformation port in list.PortInformation)
  {
    portList.Add(port);
  }
}


SetPort

SetPort
Device Management Example

This call can be used to set configured output ports to Active or Inactive state. It should be observed that the call puts the signal change in a queue and thus the call in itself is not a guarantee that the state has changed. To verify the change a call to check current port status must be made after a reasonable time.

Remarks

Service: DeviceManagement

Action: http://www.axis.com/webservice/camerastation/SetPort

Parameters
Parameters | Description
info | PortInformation - the port setting with the state requested.
Request returns

None

Exceptions
Exceptions | Description
InvalidIOToken | IO token is invalid, either not found in database or in wrong format.
InvalidIOConfiguration | The configuration for the IO port is invalid.
Example
deviceManagementClient = new DeviceManagementClient();
deviceManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
deviceManagementClient.ClientCredentials.UserName.Password = client.Password;
deviceManagementClient.SetPortCompleted += (deviceManagementClient_SetPortCompleted);
deviceManagementClient.SetPortAsync(port);
.......
void deviceManagementClient_SetPortCompleted(object sender,
  System.ComponentModel.AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
}


Event Management

Event Management
CameraStation API Topics

Here are the methods to find the latest alarm on the server, GetLatestAlarm, as well as getting all alarms later than a particular alarm, GetCurrentAlarms. The method, ListAlarms, can using filter to get alarms between a start and stop time. There is also a call to acknowledge alarms on the server, AcknowledgeAlarm.

Topics
Name | Description
AcknowledgeAlarm | Through this call the client can acknowledge alarms on the server.
GetCurrentAlarms | This Call will return a collection of alarms created after the alarm identified by the input parameter.
GetLatestAlarm | Get the latest alarm that has been stored in the alarm database table. This can be used as first call to the server and after that GetCurrentAlarms will return a collection of alarms created afterwards.
ListAlarms | The method can using a filter to get alarms between a start and stop time. If no filter or an empty filter is used as input parameter alarms are picked from the alarm table from the latest and backwards.


AcknowledgeAlarm

AcknowledgeAlarm
Event Management Example

Through this call the client can acknowledge alarms on the server.

Remarks

Service: EventManagement

Action: http://www.axis.com/webservice/camerastation/AcknowledgeAlarm

Parameters
Parameters | Description
EventTokens | ReferenceToken - a collection of alarm id.
Request returns

None

Exceptions
Exceptions | Description
InvalidEventToken | The alarm id was wrong or alarm is no longer available.
InternalDeviceError | Internal error when acknowledging alarm.
Example
string[] ids = GetAlarmIds();
eventManagementClient = new EventManagementClient();
eventManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
eventManagementClient.ClientCredentials.UserName.Password = client.Password;
eventManagementClient.AcknowledgeAlarmCompleted +=
  (eventManagementClient_AcknowledgeAlarmCompleted);
eventManagementClient.AcknowledgeAlarmAsync(ids);


GetCurrentAlarms

GetCurrentAlarms
Event Management Example

This Call will return a collection of alarms created after the alarm identified by the input parameter.

Remarks

Service: EventManagement

Action: http://www.axis.com/webservice/camerastation/GetCurrentAlarms

Parameters
Parameters | Description
EventToken | ReferenceToken - an alarm id
Request returns

AlarmInformation : a collection of AlarmInformation objects.

Exceptions
Exceptions | Description
InvalidEventToken | The alarm id was wrong or alarm is no longer available.
InternalDeviceError | Internal error when getting current alarms.
Example
eventManagementClient = new EventManagementClient();
eventManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
eventManagementClient.ClientCredentials.UserName.Password = client.Password;
eventManagementClient.GetCurrentAlarmsCompleted +=
  (eventManagementClient_GetCurrentAlarmsCompleted);
eventManagementClient.GetCurrentAlarmsAsync(alarmToken);
........
void eventManagementClient_GetCurrentAlarmsCompleted(object sender, GetCurrentAlarmsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  alarmList.Clear();
  foreach (AlarmInformation alarm in e.Result)
  {
    alarmList.Add(alarm);
  }
}


GetLatestAlarm

GetLatestAlarm
Event Management Example

Get the latest alarm that has been stored in the alarm database table. This can be used as first call to the server and after that GetCurrentAlarms will return a collection of alarms created afterwards.

Remarks

Service: EventManagement

Action: http://www.axis.com/webservice/camerastation/GetLatestAlarm

Request returns

AlarmInformation : the latest alarm on the server.

Exceptions
Exceptions | Description
InternalDeviceError | If the alarm had an internal error or something went wrong in the server.
Example
eventManagementClient = new EventManagementClient();
eventManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
eventManagementClient.ClientCredentials.UserName.Password = client.Password;
eventManagementClient.GetLatestAlarmCompleted +=
  (eventManagementClient_GetLatestAlarmCompleted);
eventManagementClient.GetLatestAlarmAsync();

void eventManagementClient_GetLatestAlarmCompleted(object sender, GetLatestAlarmCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  AlarmInformation information = e.Result;
}


ListAlarms

ListAlarms
Event Management Example

The method can using a filter to get alarms between a start and stop time. If no filter or an empty filter is used as input parameter alarms are picked from the alarm table from the latest and backwards.

Remarks

Service: EventManagement

Action: http://www.axis.com/webservice/camerastation/ListAlarms

Parameters
Parameters | Description
Filter | Filter - Can contain a start and stop time to limit the search interval. Use IncludeFunction for this.
Skip | int - Skipping this number of alarms from start of search interval.
Take | int - Taking this number of alarms in search interval.
Request returns

AlarmInformationList : An object with a list of AlarmInformation and search information.

Exceptions
Exceptions | Description
InvalidFilterOperand | Filter was wrongly configured.
InternalDeviceError | If the alarm had an internal error or something went wrong in the server.
Example
eventManagementClient = new EventManagementClient();
eventManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
eventManagementClient.ClientCredentials.UserName.Password = client.Password;
eventManagementClient.ListAlarmsCompleted += (eventManagementClient_ListAlarmsCompleted);
Filter filter = ConfigureFilter(stopTime, DateTime.Now);
eventManagementClient.ListAlarmsAsync(filter, 0, batchSize);

private Filter ConfigureFilter(DateTime start, DateTime stop)
{
  Filter filter = new Filter();
  filter.IncludeFunctions = new FilterFunction[2];
  filter.IncludeFunctions[0] = new FilterFunction();
  filter.IncludeFunctions[0].Operator = FilterOperator.Equals;
  filter.IncludeFunctions[0].Operand = FilterOperand.StartTime;
  filter.IncludeFunctions[0].Value = start.ToString();
  filter.IncludeFunctions[1] = new FilterFunction();
  filter.IncludeFunctions[1].Operator = FilterOperator.Equals;
  filter.IncludeFunctions[1].Operand = FilterOperand.StopTime;
  filter.IncludeFunctions[1].Value = stop.ToString();
  return filter;
}

void eventManagementClient_ListAlarmsCompleted(object sender, ListAlarmsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  alarmList.Clear();
  foreach (AlarmInformation alarm in e.Result.AlarmInformation)
  {
    alarmList.Add(alarm);
  }
}


Classes and Enumerations

Classes and Enumerations
Topics

The CameraStation and Storage APIs contains a lot of enumerations and message classes. These are briefly described here. There are also some datatypes with either suffix Token or Reference. These are in practice strings with 64 character limit used to identify different data objects on the server. Carefully consider these while creating applications and keep within the bounds defined by the type.

Topics
Name | Description
Enumerations | There are several types of enumerations specifying encoding types, status and protocols.
Classes | These classes contain information from the server about different aspects of the Camera Station. Most of these classes are read only. Only few of them can be modified or created, and then sent back to the server to update server objects or used to configure requests. These are e.g. RecordingProfile, Filter and Transport.


Enumerations

Enumerations
Classes and Enumerations Topics

There are several types of enumerations specifying encoding types, status and protocols.

Topics
Name | Description
AudioEncoding | Enumeration for audio encoding type.
FilterOperator | Enumeration for search filter operator type.
VideoEncoding | Enumeration for video encoding type.
FilterOperand | Enumeration for search filter operand type.
TransportProtocol | Enumeration for the transport protocol type.
DayOfWeek | Enumeration for day of week used by recording scheduling.
RecordingSourceStatus | This enumeration informs about recording source status.
RecordingStatus | Enumeration for recording status type.
AlarmKey | Different types of included alarm information.
AlarmType | The different types of alarms.
PortState | The different states an IO port can have.
PortType | The different types of IO ports where Unknown ports are not configured.


AudioEncoding

AudioEncoding
Enumerations

Enumeration for audio encoding type.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
Undefined | Undefined audio encoding.
G711 | G711 audio encoding.
G726 | G726 audio encoding.
AAC | AAC audio encoding.


FilterOperator

FilterOperator
Enumerations

Enumeration for search filter operator type.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
Equals | Equals filter operand type.
NotEqual | NotEqual filter operand type. Not used currently.
LessThan | LessThan filter operand type. Not used currently.
GreaterThan | GreaterThan filter operand type. Not used currently.
Contains | Contains filter operand type. Not used currently.


VideoEncoding

VideoEncoding
Enumerations

Enumeration for video encoding type.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
Undefined | Undefined video encoding.
JPEG | JPEG video encoding.
MPEG4 | MPEG4 video encoding.
H264 | H264 video encoding.


FilterOperand

FilterOperand
Enumerations

Enumeration for search filter operand type.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
RecordingToken | Recording id for search operation.
RecordingBlockToken | Not used currently.
SourceToken | Source id for for search operation.
SourceName | Not used currently.
SourceAddress | Not used currently.
Content | Not used currently.
UserData | Not used currently.
StartTime | Start time for recording.
StopTime | Stop time for recording.
VideoWidth | Not used currently.
VideoHeight | Not used currently.
VideoQuality | Not used currently.
VideoFramerate | Not used currently.
VideoBitrate | Not used currently.
VideoEncoding | Not used currently.
AudioSampleRate | Not used currently..
AudioBitrate | Not used currently.
AudioEncoding | Not used currently.
NumberRecordingBlocks | Not used currently.
NumberLocks | Not used currently.
RecordingStatus | Not used currently.
RecordingSize | Not used currently.


TransportProtocol

TransportProtocol
Enumerations

Enumeration for the transport protocol type.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
UDP | UDP encoding type.
TCP | TCP encoding type.
RTSP | RTSP encoding type.
RTSPS | RTSPS encoding type.
HTTP | HTTP encoding type.
HTTPS | HTTPS encoding type.


DayOfWeek

DayOfWeek
Enumerations

Enumeration for day of week used by recording scheduling.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
Monday | Monday
Tuesday | Tuesday
Wednesday | Wednesday
Thursdays | Thursdays
Friday | Friday
Saturday | Saturday
Sunday | Sunday


RecordingSourceStatus

RecordingSourceStatus
Enumerations

This enumeration informs about recording source status.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
Undefined | Undefined source status.
Disconnected | Disconnected source status.
Connected | Connected source status.
Streaming | Streaming source status.


RecordingStatus

RecordingStatus
Enumerations

Enumeration for recording status type.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
Undefined | Undefined recording status.
Initiated | Initiated recording status.
Recording | Recording recording status.
Complete | Complete recording status.
Streaming | Streaming recording status.
Removing | Removing recording status.
Removed | Removed recording status.


AlarmKey

AlarmKey
Enumerations

Different types of included alarm information.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
None | No added alarm information.
CameraName | Camera name has been added to the alarm.
IOPortName | IO port name have been added to the alarm.
DiskPath | A disk path have been added to the alarm.
MailRecipient | The mail recipient address have been added to the alarm.
RuleName | A rule name have been added to the alarm.
Action | An action name have been added to the alarm.
Trigger | A trigger name have been added to the alarm.
RecordingExportDirectory | The recording export directory have been added to the alarm.
DeviceAddress | A device address have been added to the alarm.


AlarmType

AlarmType
Enumerations

The different types of alarms.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
Undefined | Undefined alarm, should not occur.
RuleAlarm | Rule alarm, can contain different AlarmKeys.
PredefinedMD | Predefined motion detection alarm.
CameraStatusDown | Lost connection to camera.
DiskAccessDenied | Disk access has been denied.
WindowsFirewallOn | Windows Firewall is enabled.
DiskFull | Disk is full.
MailNotSent | Mail has not been sent.
ActionFailingRule | Action rule failed.
TriggerFailingRule | Trigger rule failed.
RuleNotExecutable | Rule cannot be executed.
IntrudingDiskData | Intruding disk data alarm.
RecordingExportFailed | Export of recording has failed.
RecordingExportDiskSpaceShortage | No enough disk space for recording export.
FailoverDiskFull | Disk full for Failover recording.
FailoverDiskAccessError | Disk access denied for Failover recording.
AuxDeviceStatusDown | Lost connection to auxiliary device.


PortState

PortState
Enumerations

The different states an IO port can have.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
Unknown | Unknown state.
Active | Active state.
Inactive | Inactive state.
Changing | In between state that occasionally occur.


PortType

PortType
Enumerations

The different types of IO ports where Unknown ports are not configured.

Remarks

Type: Enumeration

Enumeration Members
Enumeration Members | Description
Unknown | Port type is unknown, i.e. not yet configured on AXIS Camera Station server.
Input | Input port type.
Output | Output port type, user can change state.


Classes

Classes
Classes and Enumerations Topics

These classes contain information from the server about different aspects of the Camera Station. Most of these classes are read only. Only few of them can be modified or created, and then sent back to the server to update server objects or used to configure requests. These are e.g. RecordingProfile, Filter and Transport.

Topics
Name | Description
RecordingAttributes | Contains the attributes of a recording, These values cannot be changed once set. Timezone should always be included in the dateTime elements to ensure global compatibility.
RecordingBlock | Contains information and recording data of the block.
RecordingBlockInformation | Contains information about a recording block.
RecordingBlockInformationList | Contains information from a ListRecordingBlocks search.
RecordingInformation | Contains the attributes as well as the current status of a recording.
RecordingInformationList | Contains information from a ListRecordings search.
AudioAttributes | Contains a description of an audio source’s attributes.
VideoAttributes | Contains a description of a video source's attributes.
RecordingSource | Contains the most basic information about a source.
RecordingSourceList | Contains information from a ListSources search.
Filter | Used to select specific listings of existing recordings etc on the server. Filters are highly situational, and it is necessary to read the manual for what kind of FilterOperand can be used for each API call using a Filter.
FilterFunction | Basic filter containing information about whether to include or exclude certain recordings, sources, times etc.
Version | Contains information about supported versions.
Transport | Contains transport configuration for streamed data.
StorageSpace | Contains disk information for media data in the camera server.
SourceStatus | Contains vital information about the source's status.
SourceCapability | Contains information about what capability this particular source or camera has.
RecordingProfile | Describes a recording profile that is used for recording done via the Storage API.
MediaUri | Uri returned after a request to get a live-view stream or playback stream.
Capabilities | Describes current supported Storage API capabilities, i.e. which service points have all or some supported operations.
Lock | Class describing a recording lock.
Recording | Contains the attributes as well as the current status of a recording.
PlaybackCapabilities | Only included if the Playback interface is supported
FileServerCapabilities | Only included if the FileServer interface is supported.
SchedulerCapabilities | Only included if the Scheduler interface is supported.
RecordingSourceConfiguration | A recording configuration for sources. Currently not used.
RecordingSourceConfigurationList | Contains information from a ListSourceConfigurations search. Not currently used.
RecordingSchedule | Consists of two lists of separate scheduling entries. One is a list of recurring (weekly, monthly) entries, and one that is a list of independent instance entries. Also contains a reference to the RecordingSourceConfiguration on which to apply the schedule. There can exist only one RecordingSchedule for each RecordingSourceConfiguration. Timezone should always be included in the dateTime elements to ensure global compatibility.
RecurringScheduleEntry | Recurring scheduled recording entries.
InstanceScheduleEntry | Independent instance entry for non-recurring scheduled recordings.
AlarmInformation | Contains some fundamental alarm information.
AlarmInformationList | Contains information from a ListAlarms search.
PortInformation | Contains IO port information.
PortInformationList | Contains information about a ListPorts search.
StreamProfile | Describes a live-vie profile that is used for live-view streaming done via the CameraStation API.


RecordingAttributes

RecordingAttributes
Classes

Contains the attributes of a recording, These values cannot be changed once set. Timezone should always be included in the dateTime elements to ensure global compatibility.

Class Members
Class Members | Description
SourceToken | RecordingSourceReference - A reference to the source of this recording.
StartTime | dateTime - The start date and time of the recording.
StopTime | dateTime - The stop date and time of the recording.
Content | Description - A string describing the data that this source supplies.
VideoAttributes | VideoAttributes - Optional
AudioAttributes | AudioAttributes - Optional


RecordingBlock

RecordingBlock
Classes

Contains information and recording data of the block.

Class Members
Class Members | Description
Information | RecordingBlockInformation
Data | base64Binary - RecordingBlock data.


RecordingBlockInformation

RecordingBlockInformation
Classes

Contains information about a recording block.

Class Members
Class Members | Description
BlockToken | RecordingBlockReference - Reference to the block this structure describes.
RecordingToken | RecordingReference - Reference to the recording containing the block.
StartTime | dateTime - Start time of the block.
StopTime | dateTime - Stop time of the block.
Size | StorageSize - Size in bytes of the block data. -1 if unknown.


RecordingBlockInformationList

RecordingBlockInformationList
Classes

Contains information from a ListRecordingBlocks search.

Class Members
Class Members | Description
Total | int - Total number of matches for the filter.
Skipped | int - Number of skipped matches.
Taken | int - Number of included matches in this response.
RecordingBlockInformation | RecordingBlockInformation - Array of matching RecordingBlockInformation structures.


RecordingInformation

RecordingInformation
Classes

Contains the attributes as well as the current status of a recording.

Class Members
Class Members | Description
RecordingToken | RecordingReference - Reference to the Recording that this information concerns.
RecordingStatus | RecordingStatus - The current status of the recording, if it is currently recording etc.
Size | StorageSize - Size in bytes of the recording data. Equals the sum of the sizes of the blocks. Returns -1 in CameraStation API.
NumberRecordingBlocks | int - The number of blocks making up the recording.
NumberLocks | int - The number of locks affecting the recording.
Attributes | RecordingAttributes


RecordingInformationList

RecordingInformationList
Classes

Contains information from a ListRecordings search.

Class Members
Class Members | Description
Total | int - Total number of matches for the filter.
Skipped | int - Number of skipped matches.
Taken | int - Number of included matches in this response.
RecordingInformation | RecordingInformation - Array of matching RecordingInformation structures.


AudioAttributes

AudioAttributes
Classes

Contains a description of an audio source’s attributes.

Class Members
Class Members | Description
Samplerate | int - Samples per second. 0 if unknown/unspecified.
Bitrate | int - Bits per second. 0 if unknown/unspecified.
Encoding | AudioEncoding - The encoding used for the audio data.


VideoAttributes

VideoAttributes
Classes

Contains a description of a video source's attributes.

Class Members
Class Members | Description
Width | int - Video width in pixels. 0 if unknown/unspecified.
Height | int - Video height in pixels. 0 if unknown/unspecified.
Quality | float - Quality value from 1 to 100, where 100 is highest possible quality, at the cost of bandwidth. 0 if unknown/unspecified.
Framerate | Framerate - Framerate described as a number of frames per second. 0 if unknown/unspecified.
Bitrate | int - Highest number of bits per second. 0 if unknown/unspecified.
Encoding | VideoEncoding - The encoding used for the video data.


RecordingSource

RecordingSource
Classes

Contains the most basic information about a source.

Class Members
Class Members | Description
token | Unique identifier of this source.
Name | Name - User friendly name of the source.
SourceAddress | anyURI - URI of the source. Could be the origin of an upload, RTSP URL used for recording from this source, or a designated URI to associate with this source.
External | boolean - True if the source is external (not from the same storage device).
Description | Description - Informative description of the source. Could be camera model and/or location for instance.
MaximumRecordingAge | duration - The maximum time a recording from this source is allowed to be stored. Optional.
Status | RecordingSourceStatus - Optional.


RecordingSourceList

RecordingSourceList
Classes

Contains information from a ListSources search.

Class Members
Class Members | Description
Total | int - Total number of matches for the filter.
Skipped | int - Number of skipped matches.
Taken | int - Number of included matches in this response.
RecordingSources | RecordingSource - Array of matching RecordingSource structures.


Filter

Filter
Classes Example

Used to select specific listings of existing recordings etc on the server. Filters are highly situational, and it is necessary to read the manual for what kind of FilterOperand can be used for each API call using a Filter.

Example
Filter filter = new Filter():
filter.includeFunctionsField = new FilterFunction[3];
filter.includeFunctionsField[0] = new FilterFunction();
filter.includeFunctionsField[0].Operator = FilterOperator.Equals;
filter.includeFunctionsField[0].Operand = FilterOperand.StartTime;
filter.includeFunctionsField[0].Value = startSearchTime.Value.ToString();

filter.includeFunctionsField[1] = new FilterFunction();
filter.includeFunctionsField[1].Operator = FilterOperator.Equals;
filter.includeFunctionsField[1].Operand = FilterOperand.StopTime;
filter.includeFunctionsField[1].Value = endSearchTime.Value.ToString();

filter.includeFunctionsField[2] = new FilterFunction();
filter.includeFunctionsField[2].Operator = FilterOperator.Equals;
filter.includeFunctionsField[2].Operand = FilterOperand.SourceToken;
filter.includeFunctionsField[2].Value = cameraId.ToString();
Class Members
Class Members | Description
IncludeFunctions | FilterFunction - A filter that defines what matches to include in an operation. Consists of any number of FilterFunctions.
ExcludeFunctions | FilterFunction - A filter that defines what matches to exclude from an operation, overrides IncludeFunctions. Consists of any number of FilterFunctions. Not used in CameraStation API.


FilterFunction

FilterFunction
Classes

Basic filter containing information about whether to include or exclude certain recordings, sources, times etc.

Class Members
Class Members | Description
Operand | FilterOperand - An attribute or parameter to filter on
Operator | FilterOperator - Equals, not equal, contains, less than or greater than.
Value | FilterValue - The value to compare with the operand.


Version

Version
Classes

Contains information about supported versions.

Class Members
Class Members | Description
Major | int - Major release number.
Minor | int - Minor release number.


Transport

Transport
Classes

Contains transport configuration for streamed data.

Class Members
Class Members | Description
Protocol | TransportProtocol - Defining how the data packets shall be transported.
Tunnel | Transport - Allowing tunneling to be recursively defined.


StorageSpace

StorageSpace
Classes

Contains disk information for media data in the camera server.

Class Members
Class Members | Description
Free | long - Free disk memory in bytes.
Total | long - Disk capacity in bytes.
Location | string - The media storage location on server.


SourceStatus

SourceStatus
Classes

Contains vital information about the source's status.

Class Members
Class Members | Description
IsRecording | boolean - True indicating that the source is recording.
IsInMaintenance | boolean - True indicating that the source is in maintenance.
IsEnabled | boolean - True indicating that the source is enabled.
IsOnline | boolean - True indicating that the source is online.
SourceToken | string - The source token.


SourceCapability

SourceCapability
Classes

Contains information about what capability this particular source or camera has.

Class Members
Class Members | Description
SourceToken | string - The source or camera token
HasAudioIn | boolean - True indicating that the source has audio in.
VideoResolutions | string[] - Contains the supported video resolutions.
VideoFormats | VideoEncoding[] - Contains the supported video formats.


RecordingProfile

RecordingProfile
Classes

Describes a recording profile that is used for recording done via the Storage API.

Class Members
Class Members | Description
SourceToken | string - The source or camera token.
VideoEncoding | VideoEncoding - The video encoding that should be used.
Framerate | float - Requested framerate for a recording.
Compression | int - Requested compression or quality attribute.
Resolution | string - Requested video resolution.
Prebuffer | string - Requested time of buffered video from recording start signal. Format HH:MM:SS.
Postbuffer | string - Requested time of buffered video after recording end signal. Format HH:MM:SS.
AudioEncoding | AudioEncoding - The audio encoding that should be used.


MediaUri

MediaUri
Classes

Uri returned after a request to get a live-view stream or playback stream.

Class Members
Class Members | Description
Uri | anyURI- The URI to use for retrieving media.
InvalidAfterConnect | boolean- If true, Uri is only be valid for one connection.
InvalidAfterReboot | boolean - If true, Uri is no longer valid after the storage device is rebooted.
Timeout | duration - If positive, Uri is only valid for this long.


Capabilities

Capabilities
Classes

Describes current supported Storage API capabilities, i.e. which service points have all or some supported operations.

Class Members
Class Members | Description
VersionsSupported | Version - The supported versions of the storage interface.
FileServer | FileServerCapabilities - Only included if the FileServer interface is supported
Playback | PlaybackCapabilities - Only included if the Playback interface is supported
Scheduler | SchedulerCapabilities - Only included if the Scheduler interface is supported.


Lock

Lock
Classes

Class describing a recording lock.

Class Members
Class Members | Description
token | LockReference - Unique identifier of this lock.
StartTime | dateTime - The affected recording is locked starting from this time.
StopTime | dateTime - The affected recording is locked until this time.


Recording

Recording
Classes

Contains the attributes as well as the current status of a recording.

Class Members
Class Members | Description
token | RecordingReference - The recording token.
Information | RecordingInformation - Information about the recording.
Blocks | RecordingBlock - A set of recording blocks containing the data.


PlaybackCapabilities

PlaybackCapabilities
Classes

Only included if the Playback interface is supported

Class Members
Class Members | Description
XAddr | anyURI - The endpoint reference of the Playback WebService.


FileServerCapabilities

FileServerCapabilities
Classes

Only included if the FileServer interface is supported.

Class Members
Class Members | Description
XAddr | anyURI - The endpoint reference of the FileServer WebService.
Deletion | boolean - True if DeleteRecording and DeleteRecordingBlock operations are supported.
HttpDownload | boolean - True if HTTP downloading and operation GetHttpDownloadUri is supported.
HttpUpload | boolean - True if HTTP upload and operation GetHttpUploadUri is supported.


SchedulerCapabilities

SchedulerCapabilities
Classes

Only included if the Scheduler interface is supported.

Class Members
Class Members | Description
XAddr | anyURI - The endpoint reference of the Scheduler WebService.
Scheduling | boolean - True if operations GetRecordingShcedule and SetRecordingSchedule are supported.


RecordingSourceConfiguration

RecordingSourceConfiguration
Classes

A recording configuration for sources. Currently not used.

Class Members
Class Members | Description
Name | Name - A friendly name used to identify this configuration for a user.
RecordingSourceToken | RecordingSourceReference - Reference to the RecordingSource that this configuration applies to.
RetrievalUri | anyURI - The uri used for accessing a media stream from the source. Can be an rtsp url to a camera for example.
ProfileToken | ReferenceToken - Optional token identifying a specific profile to use for the media stream. The profile is configured using the CameraStation API.
Transport | Transport - Defines what transport (RTP over RTSP over HTTP for example) to use when recording from this source.
Content | Description - A string describing the data that this source supplies.


RecordingSourceConfigurationList

RecordingSourceConfigurationList
Classes

Contains information from a ListSourceConfigurations search. Not currently used.

Class Members
Class Members | Description
Total | int -Total number of matches for the filter.
Skipped | int - Number of skipped matches.
Taken | int - Number of included matches in this response.
SourceConfigurations | RecordingSourceConfiguration - Array of matching RecordingSourceConfiguration structures.


RecordingSchedule

RecordingSchedule
Classes

Consists of two lists of separate scheduling entries. One is a list of recurring (weekly, monthly) entries, and one that is a list of independent instance entries. Also contains a reference to the RecordingSourceConfiguration on which to apply the schedule. There can exist only one RecordingSchedule for each RecordingSourceConfiguration. Timezone should always be included in the dateTime elements to ensure global compatibility.

Class Members
Class Members | Description
SourceConfigurationToken | ReferenceToken - The token for the RecordingSourceConfiguration.
RecurringEntries | RecurringScheduleEntry - All recurring scheduled recording entries.
InstanceEntries | InstanceScheduleEntry - All non-recurring scheduled recording entries.


RecurringScheduleEntry

RecurringScheduleEntry
Classes

Recurring scheduled recording entries.

Class Members
Class Members | Description
TimeOfDay | time - Time of day when the recording will start.
Duration | duration - After which the recording will stop.
AppliedDaysOfWeek | DayOfWeek[] - A list of weekdays to apply this schedule.
AppliedDaysOfMonth | DaysOfMonth[] - A list of days of month to apply this schedule.
ValidFrom | dateTime - After this date and time, the entry is valid.
ValidUntil | dateTime - After this date and time, the entry is no longer valid and may be automatically removed.


InstanceScheduleEntry

InstanceScheduleEntry
Classes

Independent instance entry for non-recurring scheduled recordings.

Class Members
Class Members | Description
StartTime | dateTime - Date and time at which the recording will start.
StopTime | dateTime - Date and time at which the recording will stop.


AlarmInformation

AlarmInformation
Classes

Contains some fundamental alarm information.

Class Members
Class Members | Description
EventToken | ReferenceToken - event or alarm id.
Time | dateTime - time when alarm was created. This time is in UTC format so localization should be done.
Type | AlarmType - type of alarm.
Key | AlarmKey - alarm key to indicate what type of key value the alarm has.
Value | string - alarm value.
Title | string - some alarms has a title.
Acknowledged | boolean - if a user has acknowledged the alarm. By default false.


AlarmInformationList

AlarmInformationList
Classes

Contains information from a ListAlarms search.

Class Members
Class Members | Description
Total | int - Total number of matches for the filter.
Skipped | int - Number of skipped matches.
Taken | int - Number of included matches in this response.
AlarmInformation | AlarmInformation - Array of matching AlarmInformation structures.


PortInformation

PortInformation
Classes

Contains IO port information.

Class Members
Class Members | Description
PortToken | ReferenceToken - IO port id.
Name | string - name of configured IO port
Type | PortType - type of port.
State | PortState - port state.


PortInformationList

PortInformationList
Classes

Contains information about a ListPorts search.

Class Members
Class Members | Description
Total | int - Total number of matches for the filter.
Skipped | int - Number of skipped matches.
Taken | int - Number of included matches in this response.
PortInformation | PortInformation - Array of matching PortInformation structures.


StreamProfile

StreamProfile
Classes

Describes a live-vie profile that is used for live-view streaming done via the CameraStation API.

Class Members
Class Members | Description
SourceToken | string - The source or camera token.
VideoEncoding | VideoEncoding - The video encoding that should be used.
Framerate | float - Requested framerate for a recording.
Compression | int - Requested compression or quality attribute.
Resolution | string - Requested video resolution.
AudioEncoding | AudioEncoding - The audio encoding that should be used.


Topics

Topics
.NET
Topics
Name | Description
Starting with Sample | Included in the SDK is the Sample application using some of the Camera Station API and Storage API web services. The Sample is a C# application developed in Visual Studio.NET 2008. Included in the Sample project is generated code using Visual Studio.NET 2008 SP1, Samples.Storage.cs and Samples.CameraStation.cs. If AXIS Camera Station Server is installed locally and the default port 50333 is used, the sample application can be compiled and used immediately.
Handling faults in .NET | By using the serialized fault message class FaultException and its functionality in .NET, it is possible to catch faults thrown in the server. The following link shows how to handle such faults. The following example shows a synchronous call with error handling.
Client modifications when using SSL | If the server certificate is a valid root certificate with a proper Certificate Authority, the client will accept the server communication with no warnings. If, however, the server certificate is self-signed, a warning will be generated by WCF and an exception thrown.
Adding and using AXIS Media Control | Importing AXIS Media Control (AMC) into Visual Studio.Net so that it can be used in application development is, for most, a basic requirement. AMC then has a number of interesting properties and events that can be used to control the stream and visual appearance. The Sample application uses a few of these properties and events.


Example

Example
AcknowledgeAlarm
string[] ids = GetAlarmIds();
eventManagementClient = new EventManagementClient();
eventManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
eventManagementClient.ClientCredentials.UserName.Password = client.Password;
eventManagementClient.AcknowledgeAlarmCompleted +=
  (eventManagementClient_AcknowledgeAlarmCompleted);
eventManagementClient.AcknowledgeAlarmAsync(ids);


Example

Example
AcsAdminConsole
>AcsAdminConsole.exe --usewebservices true --webserviceport 50444


Example

Example
AddLock
storageBasicClient = new StorageBasicClient();
storageBasicClient.ClientCredentials.UserName.UserName = client.LoginName;
storageBasicClient.ClientCredentials.UserName.Password = client.Password;
storageBasicClient.AddLockCompleted += recClient_LockRecordingCompleted;
storageBasicClient.AddLockAsync(recordingToken, new DateTime(), new DateTime());

.......

void recClient_LockRecordingCompleted(object sender, AsyncCompletedEventArgs e)
{
  toolStripStatusLabel.Text = "Locked recording";
}


Topics

Topics
Basic
Topics
Name | Description
GetCapabilities | Returns the storage capabilities of a device. This includes the endpoint reference of supported web service interfaces, and whether optional operations are supported or not. SupportedVersions must include 1.0.
GetRecordingAttributes | Returns a RecordingAttribute structure with information about the recording.
ListRecordings | Returns a list of RecordingInformation structures that contains information about the recordings specified by the Filter. The array returned must contain all matching structures defined by the IncludeFunctions of the filter.
ListRecordingBlocks | Returns a list of RecordingBlockInformation structures that contains information about the recording blocks specified by the Filter. The array returned must contain all matching structures defined by the IncludeFunctions of the filter.
ListSources | Returns a list of RecordingSources that contains basic information about the sources specified by the Filter. The array returned must contain all matching structures defined by the IncludeFunctions of the filter.
SetUserData | Returns the user data associated with a recording.
GetUserData | Returns the user data associated with a recording.
AddLock | Adds a lock to the recording to prevent automatic removal and changing of attributes.
RemoveLock | Removes an existing lock to allow automatic removal and changing of attributes.
GetLocks | Lists all locks affecting a specified recording. Currently only one lock is possible. This locks the whole recording.


Topics

Topics
CameraStation API
Topics
Name | Description
Media Configuration | Here is a list of RecordingProfiles, each representing a camera with it’s current resolution, encoding type, pre- and postbuffer size, etc. SetProfile is used when the recording profile should be change to use different resolutions, encoding types, etc. Also, here are requests to get live-view uri's, GetStreamUri. To list live view streaming profiles use ListStreamProfiles and if the default live-view profiles is not acceptable SetStreamProfile should be used to change configuration for API specific live-view streaming.
Media Storage | Media storage is for recording storage on the Camera Station. Export of recordings to a requested directory on the server and what the storage configuration currently looks like. No changes can be done using web service requests.
Device Management | Use device management to find out what a camera’s capabilities are such as what resolutions and what kind of encodings are possible to set on a RecordingProfile. Use GetSourceCapability to get this information, and before starting a recording it is possible to check the camera status by using GetSourceStatus. It is also possible to get IO port information for cameras or other devices configured by AXIS Camera Station, ListPorts, as well as setting output ports to Active or Inactive state using SetPort.
Event Management | Here are the methods to find the latest alarm on the server, GetLatestAlarm, as well as getting all alarms later than a particular alarm, GetCurrentAlarms. The method, ListAlarms, can using filter to get alarms between a start and stop time. There is also a call to acknowledge alarms on the server, AcknowledgeAlarm.


Topics

Topics
Classes
Topics
Name | Description
RecordingAttributes | Contains the attributes of a recording, These values cannot be changed once set. Timezone should always be included in the dateTime elements to ensure global compatibility.
RecordingBlock | Contains information and recording data of the block.
RecordingBlockInformation | Contains information about a recording block.
RecordingBlockInformationList | Contains information from a ListRecordingBlocks search.
RecordingInformation | Contains the attributes as well as the current status of a recording.
RecordingInformationList | Contains information from a ListRecordings search.
AudioAttributes | Contains a description of an audio source’s attributes.
VideoAttributes | Contains a description of a video source's attributes.
RecordingSource | Contains the most basic information about a source.
RecordingSourceList | Contains information from a ListSources search.
Filter | Used to select specific listings of existing recordings etc on the server. Filters are highly situational, and it is necessary to read the manual for what kind of FilterOperand can be used for each API call using a Filter.
FilterFunction | Basic filter containing information about whether to include or exclude certain recordings, sources, times etc.
Version | Contains information about supported versions.
Transport | Contains transport configuration for streamed data.
StorageSpace | Contains disk information for media data in the camera server.
SourceStatus | Contains vital information about the source's status.
SourceCapability | Contains information about what capability this particular source or camera has.
RecordingProfile | Describes a recording profile that is used for recording done via the Storage API.
MediaUri | Uri returned after a request to get a live-view stream or playback stream.
Capabilities | Describes current supported Storage API capabilities, i.e. which service points have all or some supported operations.
Lock | Class describing a recording lock.
Recording | Contains the attributes as well as the current status of a recording.
PlaybackCapabilities | Only included if the Playback interface is supported
FileServerCapabilities | Only included if the FileServer interface is supported.
SchedulerCapabilities | Only included if the Scheduler interface is supported.
RecordingSourceConfiguration | A recording configuration for sources. Currently not used.
RecordingSourceConfigurationList | Contains information from a ListSourceConfigurations search. Not currently used.
RecordingSchedule | Consists of two lists of separate scheduling entries. One is a list of recurring (weekly, monthly) entries, and one that is a list of independent instance entries. Also contains a reference to the RecordingSourceConfiguration on which to apply the schedule. There can exist only one RecordingSchedule for each RecordingSourceConfiguration. Timezone should always be included in the dateTime elements to ensure global compatibility.
RecurringScheduleEntry | Recurring scheduled recording entries.
InstanceScheduleEntry | Independent instance entry for non-recurring scheduled recordings.
AlarmInformation | Contains some fundamental alarm information.
AlarmInformationList | Contains information from a ListAlarms search.
PortInformation | Contains IO port information.
PortInformationList | Contains information about a ListPorts search.
StreamProfile | Describes a live-vie profile that is used for live-view streaming done via the CameraStation API.


Topics

Topics
Classes and Enumerations
Topics
Name | Description
Enumerations | There are several types of enumerations specifying encoding types, status and protocols.
Classes | These classes contain information from the server about different aspects of the Camera Station. Most of these classes are read only. Only few of them can be modified or created, and then sent back to the server to update server objects or used to configure requests. These are e.g. RecordingProfile, Filter and Transport.


Topics

Topics
Client development
Topics
Name | Description
.NET | Most development on both AXIS Camera Station client and server is done using .NET 3.5 SP1. As such the most extensive part of the tutorial will be using .NET and C# in Visual Studio.NET 2008 SP1.
Java | Generating java client code either from WSDL or directly from the server using the metadata exchange address is also possible.
gSOAP | By using gSOAP to generate C/C++ code, unmanaged code can be generated and used to make web service calls to AXIS Camera Station.
Common message types | One difficulty is how the code-generating tool works with WSDL documents or metadata exchange. The tool cannot find common types between WSDL documents; instead the common types will get separate type namespaces. If the types should be used in both API's this can lead to type conversions for types that are basically the same.
MetadataExchange Information | The AXIS Camera Station APIs, as described in WSDL, are available directly from the server. By default this functionality is not available, and it is necessary to change the web service settings to allow metadata exchange to be permitted.
Server binding | The binding describes the communication protocol with the server. Here is a brief description of what binding is used on the AXIS Camera Server when accessing it using Web Services.
Viewing streamed media | To view streamed video, a component that accepts a URL and can receive streamed RTSP packages via HTTP tunneling as well as send RTCP commands is needed. AXIS Camera Station SDK contains such component, AXIS Media Control (AMC), that can be used for this purpose. AMC is a COM component based on DirectShow that should be installed on any client PC that requires viewing recordings and live-view from cameras.
RecordingInformation and RecordingBlock | When searching for recordings the search returns zero or more RecordingInformation objects with a unique id. Recordings contain RecordingBlocks. The RecordingBlocks does not exist independently of a recording and shows actual files behind the recording.
AcsAdminConsole | Using AcsAdminConsole.exe it is possible to activate AXIS Camera Station API and the settings available on the AXIS Camera Station Service Control using command-line parameters. This can be useful if you would like to install a client application using AXIS Camera Station API and would like to configure the server in the installation program.


Topics

Topics
Device Management
Topics
Name | Description
GetVersion | GetVersion returns a Version indicating combined Storage and CameraStation API versions. If the API in either Storage or CameraStation changes, the version number will be changed. If only the minor number changes, it means either that the API have been extended, but also that the the old API still works. If the major number changes, then past versions of generated code will no longer work.
GetSourceCapability | Gets the source capability for a camera. Shows what possible configuration values are possible when setting recording profiles through the CameraStation API.
GetSourceStatus | Gets the source status, e.g. if the source or camera is online, is recording, etc.
ListPorts | List IO ports configured in AXIS Camera Station server with port type and status. If a search filter is used not configured ports can also be found. The port type will indicate if the port is configured or not by having type Unknown. The ports must be configure in AXIS Camera Station if alarms or changing of states should be done using the API.
SetPort | This call can be used to set configured output ports to Active or Inactive state. It should be observed that the call puts the signal change in a queue and thus the call in itself is not a guarantee that the state has changed. To verify the change a call to check current port status must be made after a reasonable time.


Topics

Topics
Enumerations
Topics
Name | Description
AudioEncoding | Enumeration for audio encoding type.
FilterOperator | Enumeration for search filter operator type.
VideoEncoding | Enumeration for video encoding type.
FilterOperand | Enumeration for search filter operand type.
TransportProtocol | Enumeration for the transport protocol type.
DayOfWeek | Enumeration for day of week used by recording scheduling.
RecordingSourceStatus | This enumeration informs about recording source status.
RecordingStatus | Enumeration for recording status type.
AlarmKey | Different types of included alarm information.
AlarmType | The different types of alarms.
PortState | The different states an IO port can have.
PortType | The different types of IO ports where Unknown ports are not configured.


Topics

Topics
Event Management
Topics
Name | Description
AcknowledgeAlarm | Through this call the client can acknowledge alarms on the server.
GetCurrentAlarms | This Call will return a collection of alarms created after the alarm identified by the input parameter.
GetLatestAlarm | Get the latest alarm that has been stored in the alarm database table. This can be used as first call to the server and after that GetCurrentAlarms will return a collection of alarms created afterwards.
ListAlarms | The method can using a filter to get alarms between a start and stop time. If no filter or an empty filter is used as input parameter alarms are picked from the alarm table from the latest and backwards.


Example

Example
ExportRecording
mediaStorageClient = new MediaStorageClient();
mediaStorageClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaStorageClient.ClientCredentials.UserName.Password = client.Password;
mediaStorageClient.ExportRecordingCompleted += mediaStorageClient_ExportRecordingCompleted;
mediaStorageClient.ExportRecordingAsync(recordingToken, startTime, stopTime, ServerDirectoryTextbox.Text,
  FilenameTextbox.Text, string.Empty);

.......

void mediaStorageClient_ExportRecordingCompleted(object sender, AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
}


Topics

Topics
Faults
Topics
Name | Description
SOAP Faults | BasicHttpBinding uses SOAP 1.1 protocol. As such the general fault cause is described in the fault code tag and the underlying reason in the sub-code. Due to incomplete implementation of SOAP 1.1 protocol in .NET, it is not possible to use this sub-code, so in Axis CameraStation API the real fault codes will be visible in the error text with a more specific explanation concatenated to the error code.
Fault codes | There are several CameraStation and Storage API specific fault codes. These are shown here, but each call using the API has different possible fault conditions, and they are shown in the request specific page. Some of these fault codes are used in functionality not yet implemented in the Axis Camera Station server.


Example

Example
Filter
Filter filter = new Filter():
filter.includeFunctionsField = new FilterFunction[3];
filter.includeFunctionsField[0] = new FilterFunction();
filter.includeFunctionsField[0].Operator = FilterOperator.Equals;
filter.includeFunctionsField[0].Operand = FilterOperand.StartTime;
filter.includeFunctionsField[0].Value = startSearchTime.Value.ToString();

filter.includeFunctionsField[1] = new FilterFunction();
filter.includeFunctionsField[1].Operator = FilterOperator.Equals;
filter.includeFunctionsField[1].Operand = FilterOperand.StopTime;
filter.includeFunctionsField[1].Value = endSearchTime.Value.ToString();

filter.includeFunctionsField[2] = new FilterFunction();
filter.includeFunctionsField[2].Operator = FilterOperator.Equals;
filter.includeFunctionsField[2].Operand = FilterOperand.SourceToken;
filter.includeFunctionsField[2].Value = cameraId.ToString();


Example

Example
GetCurrentAlarms
eventManagementClient = new EventManagementClient();
eventManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
eventManagementClient.ClientCredentials.UserName.Password = client.Password;
eventManagementClient.GetCurrentAlarmsCompleted +=
  (eventManagementClient_GetCurrentAlarmsCompleted);
eventManagementClient.GetCurrentAlarmsAsync(alarmToken);
........
void eventManagementClient_GetCurrentAlarmsCompleted(object sender, GetCurrentAlarmsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  alarmList.Clear();
  foreach (AlarmInformation alarm in e.Result)
  {
    alarmList.Add(alarm);
  }
}


Example

Example
GetLatestAlarm
eventManagementClient = new EventManagementClient();
eventManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
eventManagementClient.ClientCredentials.UserName.Password = client.Password;
eventManagementClient.GetLatestAlarmCompleted +=
  (eventManagementClient_GetLatestAlarmCompleted);
eventManagementClient.GetLatestAlarmAsync();

void eventManagementClient_GetLatestAlarmCompleted(object sender, GetLatestAlarmCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  AlarmInformation information = e.Result;
}


Example

Example
GetPlaybackTransports
storagePlaybackClient = new StoragePlaybackClient();
storagePlaybackClient.ClientCredentials.UserName.UserName = client.LoginName;
storagePlaybackClient.ClientCredentials.UserName.Password = client.Password;
storagePlaybackClient.GetPlaybackTransportsCompleted += storagePlaybackClient_GetPlaybackTransportsCompleted;
storagePlaybackClient.GetPlaybackTransportsAsync(recordingToken);

.....

void storagePlaybackClient_GetPlaybackTransportsCompleted(object sender,
  GetPlaybackTransportsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.StackTrace, "Error");
    return;
  }
  foreach (Transport transport in e.Result)
  {
    list.Add(transport);
  }
}


Example

Example
GetPlaybackUri
storagePlaybackClient = new StoragePlaybackClient();
storagePlaybackClient.ClientCredentials.UserName.UserName = client.LoginName;
storagePlaybackClient.ClientCredentials.UserName.Password = client.Password;
storagePlaybackClient.GetPlaybackUriCompleted += storagePlaybackClient_GetPlaybackUriCompleted;
Transport transport = new Transport()
{
  protocolField = TransportProtocol.RTSP,
  tunnelField = new Transport()
  {
    protocolField = TransportProtocol.HTTP,
    tunnelField = new Transport()
    {
      protocolField = TransportProtocol.TCP
    }
  }
};
storagePlaybackClient.GetPlaybackUriAsync(recordingToken, transport);

......

void storagePlaybackClient_GetPlaybackUriCompleted(object sender, GetPlaybackUriCompletedEventArgs e)
{
  if (e.Error == null)
  {
....// Using AXIS Media Control to start playing a stream
....ServiceEndpoint point = storagePlaybackClient.Endpoint;
    int port = point.Address.Uri.Port + 1;
    string address = point.Address.Uri.DnsSafeHost;
    axAxisMediaControl1.MediaURL = string.Format("{0}://{1}:{2}/{3}",
......"axrtsphttp", address, port, e.Result.Uri);
    axAxisMediaControl1.MediaURL = e.Result.Uri;
....axAxisMediaControl1.Play();
  }
}


Example

Example
GetRecordingAttributes
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.GetRecordingAttributesCompleted += storageBasic_GetRecordingAttributesCompleted;
storageBasic.GetRecordingAttributesAsync(recordingToken);

......

void storageBasic_GetRecordingAttributesCompleted(object sender, GetRecordingAttributesCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  statusStripLabel.Text = "Recording used camera " + e.Result.SourceToken +
    " Video format "+e.Result.VideoAttributes.Encoding;
}


Example

Example
GetSourceCapability
deviceManagementClient = new DeviceManagementClient();
deviceManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
deviceManagementClient.ClientCredentials.UserName.Password = client.Password;
deviceManagementClient.GetSourceCapabilityCompleted += cameraClient_GetCameraCapabilityCompleted;
deviceManagementClient.GetSourceCapabilityAsync(SettingInfo.sourceTokenField);

........

void cameraClient_GetCameraCapabilityCompleted(object sender, GetSourceCapabilityCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }

  CameraCapability capability = e.Result;
  .....
}


Example

Example
GetSourceStatus
deviceManagementClient = new DeviceManagementClient();
deviceManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
deviceManagementClient.ClientCredentials.UserName.Password = client.Password;
deviceManagementClient.GetSourceStatusCompleted += deviceManagementClient_GetSourceStatusCompleted;
deviceManagementClient.GetSourceStatusAsync(cameraToken);

......

void deviceManagementClient_GetSourceStatusCompleted(object sender, GetSourceStatusCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  onlineLabel.Text = "Camera online: "+e.Result.IsOnline;
  recordingLabel.Text = "Camera recording: " + e.Result.IsRecording;
}


Example

Example
GetStreamTransports

See GetPlaybackTransports


Example

Example
GetStreamUri
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
Transport transport = new Transport()
{
  protocolField = TransportProtocol.RTSP,
  tunnelField = new Transport()
  {
    protocolField = TransportProtocol.HTTP,
    tunnelField = new Transport()
    {
      protocolField = TransportProtocol.TCP
    }
  }
};
mediaConfigurationClient.GetStreamUriCompleted += mediaConfigurationClient_GetStreamUriCompleted;
mediaConfigurationClient.GetStreamUriAsync(cameraId.ToString(), transport);

.......

void mediaConfigurationClient_GetStreamUriCompleted(object sender, GetStreamUriCompletedEventArgs e)
{
  if (e.Error == null)
  {
    // Using AXIS Media Control to start playing a stream
....ServiceEndpoint point = mediaConfigurationClient.Endpoint;
    int port = point.Address.Uri.Port + 1;
    string address = point.Address.Uri.DnsSafeHost;
    axAxisMediaControl1.MediaURL = string.Format("{0}://{1}:{2}/{3}",
......"axrtsphttp", address, port, e.Result.Uri);
....axAxisMediaControl1.Play();
  }
}


Example

Example
GetUserData
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.GetUserDataCompleted += storageBasic_GetUserDataCompleted;
storageBasic.GetUserDataAsync(recordingToken);

.....

void storageBasic_GetUserDataCompleted(object sender, GetUserDataCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  statusStripLabel.Text = "Recording shows employee" + e.Result;
}


Example

Example
Handling faults in .NET
try
{
  mediaConfigurationClient.ListProfiles(null, 0, 10);
}
catch (TimeoutException timeProblem)
{
  MessageBox.Show(this, "The service operation timed out. " + timeProblem.Message);
}
catch (FaultException unknownFault)
{
  MessageBox.Show(this, "An unknown exception was received. " + unknownFault.Reason);
}
Explanation

There is a fault sequence that should be followed. First, possible timeout exception should be caught as this will be thrown when there is no network contact or the contact was refused by the server. Next, the general FaultException can be caught, and in the fault reason, different fault codes can be found. If it is a synchronous call a finally statement can be used.


Topics

Topics
Introduction
Topics
Name | Description
Introduction Start | This documentation lists the functionality included in the AXIS Camera Station SDK and explains how the components can be integrated and used in customer applications.
SDK Files | A list of all the files included in this SDK.
Activating Web Services | A pre-condition to using the SDK together with AXIS Camera Station server is that Web Services should be activated on the server and then restart the server. This is done through AXIS Camera Station Service Control.
License Agreement | The license agreement when using the SDK and API's
Glossary | Some of the concepts and vocabulary for Web Services and web applications can be new for developers. This page will contain some explanations that might enhance the understanding of new concepts.


Example

Example
ListAlarms
eventManagementClient = new EventManagementClient();
eventManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
eventManagementClient.ClientCredentials.UserName.Password = client.Password;
eventManagementClient.ListAlarmsCompleted += (eventManagementClient_ListAlarmsCompleted);
Filter filter = ConfigureFilter(stopTime, DateTime.Now);
eventManagementClient.ListAlarmsAsync(filter, 0, batchSize);

private Filter ConfigureFilter(DateTime start, DateTime stop)
{
  Filter filter = new Filter();
  filter.IncludeFunctions = new FilterFunction[2];
  filter.IncludeFunctions[0] = new FilterFunction();
  filter.IncludeFunctions[0].Operator = FilterOperator.Equals;
  filter.IncludeFunctions[0].Operand = FilterOperand.StartTime;
  filter.IncludeFunctions[0].Value = start.ToString();
  filter.IncludeFunctions[1] = new FilterFunction();
  filter.IncludeFunctions[1].Operator = FilterOperator.Equals;
  filter.IncludeFunctions[1].Operand = FilterOperand.StopTime;
  filter.IncludeFunctions[1].Value = stop.ToString();
  return filter;
}

void eventManagementClient_ListAlarmsCompleted(object sender, ListAlarmsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  alarmList.Clear();
  foreach (AlarmInformation alarm in e.Result.AlarmInformation)
  {
    alarmList.Add(alarm);
  }
}


Example

Example
ListPorts
deviceManagementClient = new DeviceManagementClient();
deviceManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
deviceManagementClient.ClientCredentials.UserName.Password = client.Password;
deviceManagementClient.ListPortsCompleted += (deviceManagementClient_ListPortsCompleted);
deviceManagementClient.ListPortsAsync(new Filter(), 0, 10);
.........
void deviceManagementClient_ListPortsCompleted(object sender, ListPortsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  PortInformationList list = e.Result;
  foreach (PortInformation port in list.PortInformation)
  {
    portList.Add(port);
  }
}


Example

Example
ListProfiles
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
mediaConfigurationClient.ListProfilesCompleted += cameraClient_ListProfilesCompleted;
try
{
  mediaConfigurationClient.ListProfilesAsync(null, 0, 10);
}
catch (FaultException unknownFault)
{
  MessageBox.Show(this, "An unknown exception was received. " + unknownFault.Reason);
}

.........

void cameraClient_ListProfilesCompleted(object sender, ListProfilesCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  recordingSettings = e.Result;
  StartRecordingSettingDialog(sender, e);  //New event to update UI to avoid threading issues
}


Example

Example
ListRecordingBlocks
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.ListRecordingBlocksCompleted += storageBasic_ListRecordingBlocksCompleted;
Filter filter = new Filter();
filter.IncludeFunctionsField = new FilterFunction[1];
filter.IncludeFunctionsField[0].Operand = FilterOperand.RecordingToken;
filter.IncludeFunctionsField[0].Operator = FilterOperator.Equals;
filter.IncludeFunctionsField[0].Value = recordingToken;
storageBasic.ListRecordingBlocksAsync(filter, 0, 5);

.....

void storageBasic_ListRecordingBlocksCompleted(object sender, ListRecordingBlocksCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
  statusStripLabel.Text = "Number of recording blocks is " + e.Result.Total;
}


Example

Example
ListRecordings
storageBasicClient = new StorageBasicClient();
storageBasicClient.ClientCredentials.UserName.UserName = client.LoginName;
storageBasicClient.ClientCredentials.UserName.Password = client.Password;
storageBasicClient.ListRecordingsCompleted += client_ListRecordingsCompleted;
storageBasicClient.ListRecordingsAsync(filter, 0, 20);

....

void client_ListRecordingsCompleted(object sender, ListRecordingsCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.StackTrace, "Error");
    return;
  }
  recordingList.Clear();
  foreach (RecordingInformation info in e.Result.RecordingInformation)
  {
    recordingList.Add(info);
  }
}


Example

Example
ListSources
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.ListSourcesCompleted += storageBasic_ListSourcesCompleted;
storageBasic.ListSourcesAsync(null, 0, 50);

.......

void storageBasic_ListSourcesCompleted(object sender, ListSourcesCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }

  RecordingSourceList list = e.Result;
  foreach (RecordingSource camera in list.RecordingSources)
  {
    cameraList.Add(camera);
  }
}


Example

Example
ListStorageSpace
// Class variables
private StorageSpace[] storageSpaceArray;
.......
mediaStorageClient = new MediaStorageClient();
mediaStorageClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaStorageClient.ClientCredentials.UserName.Password = client.Password;
mediaStorageClient.ListStorageSpaceCompleted += recClient_ListStorageSpaceCompleted;
mediaStorageClient.ListStorageSpaceAsync();

..............

void recClient_ListStorageSpaceCompleted(object sender, ListStorageSpaceCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  storageSpaceArray = e.Result;
}


Example

Example
ListStreamProfiles
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
mediaConfigurationClient.ListStreamProfilesCompleted +=
  (mediaConfigurationClient_ListStreamProfilesCompleted);
mediaConfigurationClient.ListStreamProfilesAsync(CreateCameraIdFilter(cameraId), 0, 1);
......
void mediaConfigurationClient_ListStreamProfilesCompleted(object sender,
  ListStreamProfilesCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  StreamProfile profile = e.Result.FirstOrDefault(); // Requires System.Linq
}
.....
private static Filter CreateCameraIdFilter(string id)
{
  Filter filter = new Filter();
  filter.IncludeFunctions = new FilterFunction[1];
  filter.IncludeFunctions[0] = new FilterFunction();
  filter.IncludeFunctions[0].Operator = FilterOperator.Equals;
  filter.IncludeFunctions[0].Operand = FilterOperand.SourceToken;
  filter.IncludeFunctions[0].Value = id;
  return filter;
}


Topics

Topics
Media Configuration
Topics
Name | Description
ListProfiles | Gets the recording settings via sources. The recording settings are the configurations for video recording using Storage API StartRecording request.
SetProfile | Sets the recording settings for a source such as a camera. Only one setting is active for AXIS Camera Station API users per camera.
GetStreamUri | Gets the relative live-view stream URI.
GetStreamTransports | Returns a list of transport protocols supported by AXIS Camera Station for a specific source. These transports must be valid input for the GetStreamUri operation.
SetPtzControlOperation | Sends one or more PTZ control commands to a camera. The commands follow VAPIX HTTP notation and each parameter/value pair should be separated with the "&" character.
ListStreamProfiles | This call returns live-view profiles for either sources (cameras) specified in the filter or all cameras added to AXIS Camera Station server. The live-view profile is unique for the API and will not be affected by configurations done using AXIS Camera Station Client.
SetStreamProfile | This call should be used to change configuration for API specific live-view streaming.


Topics

Topics
Media Storage
Topics
Name | Description
ExportRecording | Exports the recording to a directory on the server. The request do not return anything. When the export has finished there will be a playlist with extension "asx" in the export directory with the name suggested and a date added. The ASF recordings will be exported to a sub-directory. If a recording consists of several recording blocks, each recording block is exported separately so this directory can contain several files and possibly also a "thumbs.db" file.
ListStorageSpace | Gets media storage information, e.g. total and free memory as well as storage location.


Topics

Topics
Playback
Topics
Name | Description
GetPlaybackUri | Returns an URI with a relative address that can be used for initiating playback of a specified recording from the storage device. The playback is according to the Transport specified in the request. The URI shall contain any parameters necessary for a successful initiation of the stream.
GetPlaybackTransports | Returns a list of transport protocols supported by this storage device for a specific recording. These transports must be valid input for the GetPlaybackUri operation.


Example

Example
RemoveLock
storageBasicClient = new StorageBasicClient();
storageBasicClient.ClientCredentials.UserName.UserName = client.LoginName;
storageBasicClient.ClientCredentials.UserName.Password = client.Password;
storageBasicClient.RemoveLockCompleted += recClient_UnlockRecordingCompleted;
storageBasicClient.RemoveLockAsync(info.recordingTokenField);

......

void recClient_UnlockRecordingCompleted(object sender, AsyncCompletedEventArgs e)
{
  toolStripStatusLabel.Text = "Unlocked recording";
}


Topics

Topics
Scheduler
Topics
Name | Description
CreateSourceConfiguration | NOT SUPPORTED BY AXIS CameraStation Server. Creates a new RecordingSourceConfiguration.
SetSourceConfiguration | NOT SUPPORTED BY AXIS CameraStation Server. Sets the configuration of a source. The token element supplied in SourceConfiguration shall reference an already existing RecordingSourceConfiguration.
GetSourceConfiguration | NOT SUPPORTED BY AXIS CameraStation Server. Retrieves a specified RecordingSourceConfiguration.
ListSourceConfigurations | NOT SUPPORTED BY AXIS CameraStation Server. Returns all RecordingSourceConfigurations matching the filter functions.
DeleteSourceConfiguration | NOT SUPPORTED BY AXIS CameraStation Server. Deletes a SourceConfiguration specified by SourceConfigurationToken from the storage device.
SetRecordingSchedule | NOT SUPPORTED BY AXIS CameraStation Server. Sets the recording schedule of a RecordingSourceConfiguration, defining when recording should start and stop using that configuration. A duration of 0 means infinite.
GetRecordingSchedule | NOT SUPPORTED BY AXIS CameraStation Server. Requests a RecordingSchedule for a specific RecordingSourceConfiguration.
StartRecording | Starts a recording and returns the actual RecordingToken for the started recording. Observe that the recording id should be stored in some way so that in case the application goes down it can be retrieved and used for StopRecording.
StopRecording | Stops an ongoing recording specified with the RecordingToken.


Example

Example
SetPort
deviceManagementClient = new DeviceManagementClient();
deviceManagementClient.ClientCredentials.UserName.UserName = client.LoginName;
deviceManagementClient.ClientCredentials.UserName.Password = client.Password;
deviceManagementClient.SetPortCompleted += (deviceManagementClient_SetPortCompleted);
deviceManagementClient.SetPortAsync(port);
.......
void deviceManagementClient_SetPortCompleted(object sender,
  System.ComponentModel.AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }
}


Example

Example
SetProfile
RecordingProfile profile = new RecordingProfile();
profile.compressionField = 20; // Observe suffix added by codegeneration
.....
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
mediaConfigurationClient.SetProfileCompleted += mediaConfigurationClient_SetProfileCompleted;
mediaConfigurationClient.SetProfileAsync(profile);

......

void mediaConfigurationClient_SetProfileCompleted(object sender, AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    toolStripStatusLabel.Text = "Could not change recording settings";
    return;
  }

  toolStripStatusLabel.Text = "Recording settings changed";
}


Example

Example
SetPtzControlOperation
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
mediaConfigurationclient.SetPtzControlOperationCompleted +=
  (mediaConfigurationclient_SetPtzControlOperationCompleted);

.................

mediaConfigurationclient.SetPtzControlOperationAsync(cameraId, "move=down&zoom=3500");

.................

void mediaConfigurationclient_SetPtzControlOperationCompleted(object sender,
  SetPtzControlOperationCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
}


Example

Example
SetStreamProfile
mediaConfigurationClient = new MediaConfigurationClient();
mediaConfigurationClient.ClientCredentials.UserName.UserName = client.LoginName;
mediaConfigurationClient.ClientCredentials.UserName.Password = client.Password;
StreamProfile stream = new StreamProfile()
{
  AudioEncoding = AudioEncoding.None,
  Compression = 30,
  Framerate = 15.0,
  Resolution = "640x480",
  SourceToken = "110",
  VideoEncoding = VideoEncoding.JPEG
};
mediaConfigurationClient.SetStreamProfileCompleted +=
  (mediaConfigurationClient_SetStreamProfileCompleted);
mediaConfigurationClient.SetStreamProfileAsync(stream);
......
void mediaConfigurationClient_SetProfileCompleted(object sender,
  System.ComponentModel.AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
}


Example

Example
SetUserData
storageBasic = new StorageBasicClient();
storageBasic.ClientCredentials.UserName.UserName = client.LoginName;
storageBasic.ClientCredentials.UserName.Password = client.Password;
storageBasic.SetUserDataCompleted += storageBasic_SetUserDataCompleted;
storageBasic.SetUserDataAsync(recordingToken, employeeNo);

.......

void storageBasic_SetUserDataCompleted(object sender, AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message);
    return;
  }

  stausStripLabel.Text = "UserData set";
}


Example

Example
SOAP Faults
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body>
    <s:Fault>
      <faultcode>s:Client</faultcode>
      <faultstring xml:lang="sv-SE">http://www.axis.com/webservice/storage/error/InvalidCameraToken:
        No camera found with id: 1111</faultstring>
    </s:Fault>
  </s:Body>
</s:Envelope>

Service specific error code is shown in bold above. Concatenated is an error text with some added information about the reason for the exception.


Topics

Topics
SSL Solution
Topics
Name | Description
Server Certificate | A server certificate is required to get the SSL solution to work. But first, a security policy should be formed, i.e finding the right compromise between security and ease-of-use that fits the developed product. See http://msdn.microsoft.com/en-us/library/ms978516.aspx for advice.
Client certificate | The client should have the public root certificate installed on the client machine. When the client calls the server, the root certificate will be used to validate server authenticity. The client application must add user name and password for each request.
Generate and use a self-signed certificate | Generating and using a self-signed certificate is fairly easy, but it is not secure enough in a running system. To develop and test a system it is a simple way of making sure that the application works as intended, and that both client and server has been configured correctly. See more in http://msdn.microsoft.com/en-us/library/aa364691(VS.85).aspx and http://msdn.microsoft.com/en-us/library/ms731899.aspx.


Topics

Topics
Starting with Sample
Topics
Name | Description
Using Visual Studio | This is a description of how to get the Sample code to work by generating code from AXIS Camera Station on the client PC using metadata exchange. Before using the Add Service Reference, make sure that the server that should be accessed allows metadata exchange. Remove Samples.Storage.cs and Samples.CameraStation.cs in the project before following the instructions below.
Using SvcUtil | By using SvcUtil.exe, code can be generated directly from WSDL and XML schema files. SvcUtil.exe is part of Microsoft Development SDK 6.x and can be downloaded from Microsoft.


Example

Example
StartRecording
storageSchedulerClient = new StorageSchedulerClient();
storageSchedulerClient.ClientCredentials.UserName.UserName = client.LoginName;
storageSchedulerClient.ClientCredentials.UserName.Password = client.Password;
storageSchedulerClient.StartRecordingCompleted += schClient_StartRecordingCompleted;
storageSchedulerClient.StartRecordingAsync(null, currentCamera.ToString(),
  XmlConvert.ToString(TimeSpan.Zero));

......

void schClient_StartRecordingCompleted(object sender, StartRecordingCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  UpdateStatusBar("Recording started, Id: " + e.RecordingToken);
}


Example

Example
StopRecording
storageSchedulerClient = new StorageSchedulerClient();
storageSchedulerClient.ClientCredentials.UserName.UserName = client.LoginName;
storageSchedulerClient.ClientCredentials.UserName.Password = client.Password;
storageSchedulerClient.StopRecordingCompleted += (schClient_StopRecordingCompleted);
foreach (RecordingStatusInfo statusInfo in recordingStatusList)
storageSchedulerClient.StopRecordingAsync(statusInfo.RecordingId);

......

void schClient_StopRecordingCompleted(object sender, AsyncCompletedEventArgs e)
{
  if (e.Error != null)
  {
    MessageBox.Show(this, e.Error.Message, "Error");
    return;
  }
  UpdateStatusBar("Recording stopped, Id: " + statusInfo.RecordingId);
}


Topics

Topics
Storage API
Topics
Name | Description
Basic | The basic interface contains the common functionality that shall always be implemented for any device supporting Storage API. All the methods are implemented on AXIS Camera Station server.
FileServer | NOT SUPPORTED BY AXIS CameraStation Server. This part of the Storage API concerns handling recordings. It includes deletion, download and upload of recordings using MTOM or HTTP, and setting recording attributes.
Playback | Here requests for recording playback can be found. A recording can be streamed to a client application using AXIS Media Control as receiving component.
Scheduler | This part of the Storage API handles RecordingSourceConfigurations and start/stop recordings. As RecordingSourceConfigurations are not yet implemented on AXIS Camera Station, only RecordingProfiles are used in AXIS Camera Station API. These are accessible using CameraStation API.


Topics

Topics
Tutorial
Topics
Name | Description
Client development | By using a web service based API many types of client development environments are possible. A WSDL document describes how the API should be called and what the format of the messages looks like. There are different tools that can use the WSDL document to access AXIS Camera Station server. Since the server is .NET based the easiest client integration is done using .NET.
SSL Solution | Transport level security protects the data transfer between the client and the server. Transport Layer Security (TLS) is regarded as a mature standard for encrypted transport connections to provide a basic level of communication security. The TLS protocol allows the configuration of a mutually authenticated transport session as well as preserving the confidentiality and the integrity-protected transport. This standard is also called SSL (Secure Socket Layer) from an earlier version of the standard.
Faults | Most service requests return some kind of fault if something goes wrong. Observe that the innermost exception or fault to handle should be a timeout exception, followed by the request specific faults and finally a communication exception. In this way it is possible to handle most types of errors.


Contents

Contents
Introduction
Introduction Start
SDK Files
Activating Web Services
License Agreement
Glossary
Tutorial
Client development
.NET
Starting with Sample
Using Visual Studio
Using SvcUtil
Handling faults in .NET
Client modifications when using SSL
Adding and using AXIS Media Control
Java
gSOAP
Common message types
MetadataExchange Information
Server binding
Viewing streamed media
RecordingInformation and RecordingBlock
AcsAdminConsole
SSL Solution
Server Certificate
Client certificate
Generate and use a self-signed certificate
Faults
SOAP Faults
Fault codes
Storage API
Basic
GetCapabilities
GetRecordingAttributes
ListRecordings
ListRecordingBlocks
ListSources
SetUserData
GetUserData
AddLock
RemoveLock
GetLocks
FileServer
Playback
GetPlaybackUri
GetPlaybackTransports
Scheduler
CreateSourceConfiguration
SetSourceConfiguration
GetSourceConfiguration
ListSourceConfigurations
DeleteSourceConfiguration
SetRecordingSchedule
GetRecordingSchedule
StartRecording
StopRecording
CameraStation API
Media Configuration
ListProfiles
SetProfile
GetStreamUri
GetStreamTransports
SetPtzControlOperation
ListStreamProfiles
SetStreamProfile
Media Storage
ExportRecording
ListStorageSpace
Device Management
GetVersion
GetSourceCapability
GetSourceStatus
ListPorts
SetPort
Event Management
AcknowledgeAlarm
GetCurrentAlarms
GetLatestAlarm
ListAlarms
Classes and Enumerations
Enumerations
AudioEncoding
FilterOperator
VideoEncoding
FilterOperand
TransportProtocol
DayOfWeek
RecordingSourceStatus
RecordingStatus
AlarmKey
AlarmType
PortState
PortType
Classes
RecordingAttributes
RecordingBlock
RecordingBlockInformation
RecordingBlockInformationList
RecordingInformation
RecordingInformationList
AudioAttributes
VideoAttributes
RecordingSource
RecordingSourceList
Filter
FilterFunction
Version
Transport
StorageSpace
SourceStatus
SourceCapability
RecordingProfile
MediaUri
Capabilities
Lock
Recording
PlaybackCapabilities
FileServerCapabilities
SchedulerCapabilities
RecordingSourceConfiguration
RecordingSourceConfigurationList
RecordingSchedule
RecurringScheduleEntry
InstanceScheduleEntry
AlarmInformation
AlarmInformationList
PortInformation
PortInformationList
StreamProfile


Index

Index
. | A | B | C | D | E | F | G | H | I | J | L | M | P | R | S | T | U | V
.
.NET
A
AcknowledgeAlarm
AcsAdminConsole
Activating Web Services
Adding and using AXIS Media Control
AddLock
AlarmInformation
AlarmInformationList
AlarmKey
AlarmType
AudioAttributes
AudioEncoding
B
Basic
C
CameraStation API
Capabilities
Classes
Classes and Enumerations
Client certificate
Client development
Client modifications when using SSL
Common message types
CreateSourceConfiguration
D
DayOfWeek
DeleteSourceConfiguration
Device Management
E
Enumerations
Event Management
ExportRecording
F
Fault codes
Faults
FileServer
FileServerCapabilities
Filter
FilterFunction
FilterOperand
FilterOperator
G
Generate and use a self-signed certificate
GetCapabilities
GetCurrentAlarms
GetLatestAlarm
GetLocks
GetPlaybackTransports
GetPlaybackUri
GetRecordingAttributes
GetRecordingSchedule
GetSourceCapability
GetSourceConfiguration
GetSourceStatus
GetStreamTransports
GetStreamUri
GetUserData
GetVersion
Glossary
gSOAP
H
Handling faults in .NET
I
InstanceScheduleEntry
Introduction
Introduction Start
J
Java
L
License Agreement
ListAlarms
ListPorts
ListProfiles
ListRecordingBlocks
ListRecordings
ListSourceConfigurations
ListSources
ListStorageSpace
ListStreamProfiles
Lock
M
Media Configuration
Media Storage
MediaUri
MetadataExchange Information
P
Playback
PlaybackCapabilities
PortInformation
PortInformationList
PortState
PortType
R
Recording
RecordingAttributes
RecordingBlock
RecordingBlockInformation
RecordingBlockInformationList
RecordingInformation
RecordingInformation and RecordingBlock
RecordingInformationList
RecordingProfile
RecordingSchedule
RecordingSource
RecordingSourceConfiguration
RecordingSourceConfigurationList
RecordingSourceList
RecordingSourceStatus
RecordingStatus
RecurringScheduleEntry
RemoveLock
S
Scheduler
SchedulerCapabilities
SDK Files
Server binding
Server Certificate
SetPort
SetProfile
SetPtzControlOperation
SetRecordingSchedule
SetSourceConfiguration
SetStreamProfile
SetUserData
SOAP Faults
SourceCapability
SourceStatus
SSL Solution
Starting with Sample
StartRecording
StopRecording
Storage API
StorageSpace
StreamProfile
T
Transport
TransportProtocol
Tutorial
U
Using SvcUtil
Using Visual Studio
V
Version
VideoAttributes
VideoEncoding
Viewing streamed media


Introduction

Introduction
Topics

General introduction to the AXIS CameraStation SDK for AXIS Camera Station 3.32.

Topics
Name | Description
Introduction Start | This documentation lists the functionality included in the AXIS Camera Station SDK and explains how the components can be integrated and used in customer applications.
SDK Files | A list of all the files included in this SDK.
Activating Web Services | A pre-condition to using the SDK together with AXIS Camera Station server is that Web Services should be activated on the server and then restart the server. This is done through AXIS Camera Station Service Control.
License Agreement | The license agreement when using the SDK and API's
Glossary | Some of the concepts and vocabulary for Web Services and web applications can be new for developers. This page will contain some explanations that might enhance the understanding of new concepts.