Clear Http API
Clear Http API
Version 1.5
2016-05
Document History
1 Overview.............................................................................................................................. 1
1.1 Preface ...................................................................................................................................................... 1
1.2 Transaction ............................................................................................................................................... 1
1.3 Protocol Description ................................................................................................................................. 1
1.3.1 URL ................................................................................................................................................ 1
1.3.2 Connection Header Filed................................................................................................................. 2
1.3.3 Authorization Header Field ............................................................................................................. 3
1.3.4 Entity Body Field ............................................................................................................................ 3
1.3.5 Response Message .......................................................................................................................... 4
1.3.6 Error Code....................................................................................................................................... 6
1.4 Protocol Conventions ............................................................................................................................... 6
1.4.1 XML Element Name ....................................................................................................................... 6
1.4.2 XML Element Type ......................................................................................................................... 6
1.4.3 The “types”Element ........................................................................................................................ 8
1.4.4 Command catagory ......................................................................................................................... 9
1.5 Device discovery ...................................................................................................................................... 9
6 Playback ............................................................................................................................. 56
6.1 Record Search ........................................................................................................................................ 56
6.1.1 SearchRecordDate......................................................................................................................... 56
6.1.2 SearchByTime ............................................................................................................................... 57
1.1 Preface
This document details the API of IP media devices. Programmers can access and configure IP
media devices following the API.
1.2 Transaction
The HTTP API transaction starts from a request from a client application, usually a web
browser. Theweb server on the IP media devices processes the request and sends the response back
to the client application. The HTTP requestis taken in POST form as described in the following
paragraphs. If the request is successful, the IP media video device will return a HTTP header
contains 200 OK. The HTTP Body will contain actual result or error message if an error occurs.
1.3.1 URL
The URL scheme is used to specify a request to the device locate device resources via a
specific protocol in the network.This section defines the syntax and semantics for HTTP URLs.
host: The host field refer to the hostname, IP address, or the FQDN(Fully Qualified Domain
Name) of an IP device.
port: The port field refer to the port number of that host on which the identified resource
islocated at the IP device listening for TCP connections. If the port is empty or not given, thedefault
port is assumed. For HTTP, the default port 80.
channelId: The channel identification for an IP device. For the IP camera, this field can be
omitted, the default channelId is “1”.
action name: This field is optional. It acts as a sub operation for complex commands.
HTTP/1.1 is implemented and utilized according to RFC 2616 inthe IP devices. For a video
management system or client application that uses persistentconnection for multiple transactions, it
is required to implement “Connection: Keep-Alive”HTTP header field as follows.
POST http://192.168.6.37/PtzAddPreset
HTTP/1.1
Content-Length: 135
Connection: Keep-Alive
…
1.3.3 Authorization Header Field
When a video management system or client application sends any request to the IP device,it
must be authenticated by means of Basic Accessaccording to RFC 2617.
Authorization header field needs to besentalong with each request, and if a user is
authenticated, the request will follow the normalexecution flow. For the request with no
authentication credentials, unauthorizedHTTP response (401) will be returned with
WWW-Authenticate header field.
For example:
1. An HTTP request from the client application should include the “Authorization” information
as follows, the “YWRtaW46MTIzNDU2” is the encoded result of “admin:123456” by base64:
POST http://192.168.6.37/PtzAddPreset
HTTP/1.1
401 Unauthorized
Then the client application encodes the username and password with base64, and sends the
following request:
HTTP/1.1
...
...
<presetInfo>
<name>preset1</name>
</presetInfo>
HTTP/1.1 200 OK
Content-Length: 66
Connection: close
<config status="success"/>
HTTP/1.1 200 OK
…
Content-Length: 66
Connection: close
<deviceInfo>
<supportTalk type="boolean">true</supportTalk>
</deviceInfo>
</config>
When a request cannot be executed correctly, an application fail response that includes an error
result in the entity body will be sent from the IP device. Meantime, the HTTP answer is 400 to
indicate the client application. For example:
...
Content-Type: application/xml
Content-Length: 66
Connection: close
Type Description
For the element with type “string” attribute, two more attributes “minLen” and “maxLen” are
optional, which mean the minimum and maximum length of the character string. When the type
“string”attribute is used, the string itself should be packed in the CDATA segment. For example:
<ntpServer type="string" minLen="0" maxLen="127"
default="time.windows.com"><![CDATA[time.windows.com]]></ntpServer>
For the element with type “list” attribute, the attribute “maxCount” should be used for the
variable list, which means the maximum item counts for this list, and the attribute “count” should be
used for the list with constant items. There should be an “itemType” sub element after the element
with type “list” attribute. Some “item” sub element should be included after the “itemType” sub
element to indicate the value for the list. For example:
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[222222222222222222222]]></item>
<item><![CDATA[333333333333333333333]]></item>
<item><![CDATA[444444444444444444444]]></item>
<item><![CDATA[555555555555555555555]]></item>
<item><![CDATA[666666666666666666666]]></item>
</content>
In the “types” element, only the “enum” type can be defined. For example, an “enum” type is
defined as follows:
<types>
<userType>
<enum>administrator</enum>
<enum>advance</enum>
<enum>normal</enum>
</userType>
</types>
It is not allowed for the client application to define advanced data types with the “types”
element in request messages. The client application should study advanced data types from the
response messages. Advanced data types defined in the corresponding response message can be
used directly in a request message by the client application. The Client application can also study
advanced data types from other elements except for “types” in the message entity from the device.
System commands.
Image commands.
PTZ commands.
Alarm commands.
Network commands.
Security commands.
Maintain commands.
The UPnP architecture supports zero-configuration networking, and the device candynamically
join a network, obtain IP address, announce its name, convey its capabilitiesupon request, and gets
the on-line status and capabilities of other devices. DHCP andDNS servers are optional and are only
used if they are available on the network. Devicescan leave the network automatically without
leaving any unwanted status informationbehind. UPnP was published as a 73-part International
Standard, ISO/IEC 29341, inDecember, 2008 [6][7][8].
After a control point has discovered a device, the control point still needs more operationsto
request more information about the device or to interact with it.
2 System commands
Channel ID None
Successful Response The device information will be included in the entity of the successful
response. For example:
GetDeviceInfo
[Tips]:
This command is designed for the client application to obtain the basic information from the specific
media device.
z For the fixed-channel devices such as IPC or DVR, the items “audioInCount”, “audioOutCount”,
“alarmInCount” and “alarmOutCount” will be included in the successful response.
z For the variable-channel devices such as NVR, these items are optional. The client application can
use “GetChannelList”, “GetAlarmInList”, “GetAlarmOutList”, “GetStreamCpas” commands to
obtain the information.
2.1.2 GetChannelList
GetChannelList
Channel ID None
Successful Response The channel list will be included in the entity of the successful response. For
example:
[Tips]:
This command is designed for multi-channel device and not mandatory for IP cameras. If the
“deviceDescription” item is equal to “IPCamera” in the response message for “GetDeviceInfo” command,
this command should not be sent to the device.
2.1.3 GetAlarmInList
GetAlarmInList
Channel ID None
Successful Response The alarmin list will be included in the entity of the successful response. For
example:
[Tips]:
This command is designed for multi-channel device and not mandatory for IP cameras. If the
“deviceDescription” item is equal to “IPCamera” in the response message for “GetDeviceInfo” command,
this command should not be sent to the device.
2.1.4 GetAlarmOutList
GetAlarmOutList
Channel ID None
Successful Response The alarmout list will be included in the entity of the successful response. For
example:
[Tips]:
This command is designed for multi-channel device and not mandatory for IP cameras. If the
“deviceDescription” item is equal to “IPCamera” in the response message for “GetDeviceInfo” command,
this command should not be sent to the device.
Channel ID None
Successful Response The device time and date will be included in the entity of the Successful
response. For example:
[Tips]:
The element “timeZone” announces the time zone information. “GMT0BST,M3.5.0/1,M10.5.0”, this time
zone, standard time named GMT and daylight saving time named BST, has daylight saving time. The
standard local time is GMT. Daylight saving time, 1 hour ahead of GMT, starts the last Sunday in March at
GetDateAndTime
2.2.2 SetDateAndTime
SetDateAndTime
Channel ID None
Entity Data The device time and date will be included in the entity of request message.
The whole “time” element in the “GetDataAndTime” should be included in
entity of this message. Any attributes for the “time” element or sub elements
should not be included.
Successful Response The standard successful result response that described in 1.3.5.
3 Image commands
Description To get the IP media device’s streams’ capabilities for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The stream capabilities will be included in the entity of the Successful
response. For example:
<rtspPort type="uint16">554</rtspPort>
<streamList type="list" count="4">
<item id="1">
<streamName type="string"><![CDATA[profile1]]></streamName>
<resolutionCaps type="list" count="1">
<itemType type="resolution"/>
<item maxFrameRate="25">1920x1080</item>
</resolutionCaps>
<encodeTypeCaps type="list" count="1">
<itemType type="encodeType"/>
<item>h264</item>
</encodeTypeCaps>
<encodeLevelCaps type="list" count="3">
<itemType type="encodeLevel"/>
<item>baseLine</item>
<item>mainProfile</item>
<item>highProfile</item>
</encodeLevelCaps>
</item>
<item id="2">
<streamName type="string"><![CDATA[profile2]]></streamName>
<resolutionCaps type="list" count="3">
<itemType type="resolution"/>
<item maxFrameRate="10">1920x1080</item>
<item maxFrameRate="25">1280x720</item>
<item maxFrameRate="25">704x480</item>
</resolutionCaps>
<encodeTypeCaps type="list" count="1">
<itemType type="encodeType"/>
<item>h264</item>
</encodeTypeCaps>
GetStreamCaps
[Tips]:
The “count=4” means the channel supports 4 streams at the same time. Each stream’s capability is
announced in the “item” sub element. The “streamName” announces the name of each stream. The client
application can obtain the specific stream by the following URL.
rtsp://<host><:port>?chID=[channelId]&streamType=[streamType]&linkType=tcp
//streamtype =main|sub
e.g.rtsp://192.168.1.100:554?chID=0&streamType=main&linkType=tcp
The “resolutionCaps” announces optional combinations for frame rate and resolution. The
“encodeTypeCaps” announces optional compression types. The “encodeLevelCaps” optional compression
levels.
For the reason that the capabilities for each stream are not the same, we omit the “itemType” element after
the “streamList” element.
The “id” attribute for each item starts from “1”.
Description To get the IP media device’s image configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The image configuration will be included in the entity of the Successful
response. For example:
3.2.2 SetImageConfig
SetImageConfig
Description To set the IP media device’s image configuration for specific channel.
SetImageConfig
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The image configuration for specific channel should be included in the entity
of request message. The whole “image” element in the “GetImagConfig” or
some parameters that need to be changed can be included in entity of this
message. Any attributes for the “image” element or sub elements should not
be included. The following example changes the “saturation” parameter.
<?xml version="1.0"?>
<config version="1.0" xmlns="http://www.ipc.com/ver10">
<image>
<saturation>65</saturation>
</image>
</config>
Successful Response The standard successful result response that described in 1.3.5.
3.2.3 GetSnapshot
GetSnapshot
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Description To get the IP media device’s audio stream configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The audio stream configuration will be included in the entity of the Successful
response. For example:
3.3.2 SetAudioStreamConfig
SetAudioStreamConfig
Description To set the IP media device’s audio stream configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
SetAudioStreamConfig
Entity Data The audio stream configuration for specific channel should be included in the
entity of request message. The whole “audioEncode” element in the
“GetAudioStreamConfig” can be included in entity of this message. Any
attributes for the “audioEncode” element or sub elements should not be
included.
Successful Response The standard successful result response that described in 1.3.5.
3.3.3 GetVideoStreamConfig
GetVideoStreamConfig
Description To get the IP media device’s video stream configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The video stream configuration will be included in the entity of the successful
response. For example:
<enum>higher</enum>
<enum>highest</enum>
</quality>
</types>
<streams type="list" count="4">
<item id="1">
<name type="string" maxLen="32"><![CDATA[profile1]]></name>
<resolution>1920x1080</resolution>
<frameRate type="uint32">25</frameRate>
<bitRateType type="bitRateType">CBR</bitRateType>
<encodeType>h264</encodeType>
<encodeLevel>baseLine</encodeLevel>
<quality type="quality">highest</quality>
<GOP type="uint32" min="30" max="200">100</GOP>
</item>
<item id="2">
<name type="string" maxLen="32"><![CDATA[profile2]]></name>
<resolution>1280x720</resolution>
<frameRate type="uint32">25</frameRate>
<bitRateType type="bitRateType">CBR</bitRateType>
<maxBitRate type="uint32" min="64" max="10240">2048</maxBitRate>
<encodeType>h264</encodeType>
<encodeLevel>baseLine</encodeLevel>
<quality type="quality">highest</quality>
<GOP type="uint32" min="30" max="200">100</GOP>
</item>
...
</streams>
</config>
GetVideoStreamConfig
[Tips]:
The “count=4” means the channel supports 4 streams at the same time. Each stream’s current video
configuration is announced in the “item” sub element. The value of each stream’s “resolution”,
“framRate”, “encodeType”, and “encodeLevel” should be in the scope of the corresponding capability
announced in the “GeteStreamCaps” successful respond message. The “maxBitRate” element means the
bitrate in kbps.
The “id” attribute for each item starts from “1”.
3.3.4 SetVideoStreamConfig
SetVideoStreamConfig
Description To set the IP media device’s video stream configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The video stream configuration for specific channel should be included in the
entity of request message. The whole “streams” element in the
“GetVideoStreamConfig” can be included in entity of this message. Any
attributes for the “streams” element or sub elements should not be included.
The value of each stream’s “resolution”, “framRate”, “encodeType”, and
“encodeLevel” should be in the scope of the corresponding capability
announced in the “GeteStreamCaps” successful respond message.
Successful Response The standard successful result response that described in 1.3.5.
3.3.5 RequestKeyFrame
RequestKeyFrame
Description It is used to request the device to encode a key frame for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The standard successful result response that described in 1.3.5.
3.4 OSD
3.4.1 GetImageOsdConfig
GetImageOsdConfig
Description To get the IP media device’s image OSD configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The image OSD configuration will be included in the entity of the Successful
response. For example:
GetImageOsdConfig
[Tips]:
The “X” and “Y” element announce the horizontal and vertical position based in the 10000*10000
resolution.
3.4.2 SetImageOsdConfig
SetImageOsdConfig
Description To set the IP media device’s image OSD configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The image OSD configuration for specific channel should be included in the
entity of request message. The whole “imageOsd” element in the
“GetImagOsdConfig” or some parameters that need to be changed can be
included in entity of this message. Any attributes for the “imageOsd”
element or sub elements should not be included. The following example
changes the “channelName” element:
Successful Response The standard successful result response that described in 1.3.5.
Description To get the IP media device’s privacy mask configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The privacy mask configuration will be included in the entity of the
Successful response. For example:
<switch>false</switch>
<rectangle>
<X>0</X>
<Y>0</Y>
<width>0</width>
<height>0</height>
</rectangle>
<color>black</color>
</item>
...
</privacyMask>
</config>
[Tips]:
The “X” and “Y” element announce the horizontal and vertical position based in the 640*480 resolution.
3.5.2 SetPrivacyMaskConfig
SetPrivacyMaskConfig
Description To set the IP media device’s privacy mask configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The privacy mask configuration for specific channel should be included in the
entity of request message. The whole “privacyMask” element in the
“GetPrivacyMaskConfig” should be included in entity of this message. Any
attributes for the “privacyMask” element or sub elements should not be
included.
Successful Response The standard successful result response that described in 1.3.5.
4 PTZ commands
4.1 Protocol
4.1.1 PtzGetCaps
PtzGetCaps
Description To get the IP media device’s PTZ capabilities mask information for specific
channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The PTZ capabilities will be included in the entity of the Successful response.
For example:
PtzGetCaps
[Tips]:
The sub elements in the “caps” element announce the scope of each parameter. For example, the
“ptzControlMinSpeed” announce the minimum speed for the PTZ control command, the
“ptzControlMaxSpeed” announce the maximum speed for the PTZ control command.
4.1.2 PtzGetProtocolConfig
PtzGetProtocolConfig
Description To get the IP media device’s PTZ protocol configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The PTZ protocol configuration will be included in the entity of the
Successful response. For example:
PtzGetProtocolConfig
</types>
<ptzInfo>
<baudRate type="baudRate">4800</baudRate>
<protocol type="ptzProtocol">PELCOP</protocol>
<address type="uint8">2</address>
</ptzInfo>
</config>
4.1.3 PtzSetProtocolConfig
PtzSetProtocolConfig
Description To set the IP media device’s PTZ protocol configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ protocol configuration for specific channel should be included in the
entity of request message. The whole “ptzInfo” element in the
“PtzGetProtocolConfig” should be included in entity of this message. Any
attributes for the “ptzInfo” element or sub elements should not be included.
Successful Response The standard successful result response that described in 1.3.5.
Description To start control PTZ for a specific channel of the IP media device.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
PtzControl
Entity Data The PTZ’s action information that needs to be executed will be included in the
entity of the request message. For example:
[Tips]:
The value of “speed” should be in the scope of the corresponding capability announced in the
“PtzGetCaps” successful respond message.
Successful Response The standard successful result response that described in 1.3.5.
4.2.2 PtzGotoPreset
PtzGotoPreset
PtzGotoPreset
Description To run the PTZ to one preset for a specific channel of the IP media device.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The destination PTZ preset’s ID will be included in the entity of the request
message. For example:
Successful Response The standard successful result response that described in 1.3.5.
4.2.3 PtzRunCruise
PtzRunCruise
Description To run one PTZ’s cruise for a specific channel of the IP media device.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ cruise’s ID that needs to be run will be included in the entity of the
request message. For example:
Successful Response The standard successful result response that described in 1.3.5.
4.2.4 PtzStopCruise
PtzStopCruise
Description To stop the PTZ cruise for a specific channel of the IP media device.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The standard successful result response that described in 1.3.5.
4.3 Preset
4.3.1 PtzGetPresets
PtzGetPresets
Description To get the IP media device’s PTZ presets list for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The PTZ presets list will be included in the entity of the Successful response.
For example:
PtzGetPresets
[Tips]:
The “id” attribute for each item starts from “1”.
4.3.2 PtzAddPreset
PtzAddPreset
Description To add one preset for a specific channel of the IP media device.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ preset name for current position will be included in the entity of the
request message. The “name” should accord with the “name” type in the
“itemType” that announced in “PtzGetPresets” message. For example:
Successful Response The standard successful result response that described in 1.3.5.
4.3.3 PtzModifyPresetName
PtzModifyPresetName
Description To modify one preset’s name for a specific channel of the IP media device.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ preset’s ID and new name will be included in the entity of the
request message. For example:
Successful Response The standard successful result response that described in 1.3.5.
4.3.4 PtzDeletePreset
PtzDeletePreset
Description To delete one preset for a specific channel of the IP media device.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ preset’s ID that needs to be deleted will be included in the entity of
the request message. For example:
PtzDeletePreset
Successful Response The standard successful result response that described in 1.3.5.
4.3.5 PtzModifyPresetPosition
PtzModifyPresePosition
Description To modify one preset’s position to current position for a specific channel of
the IP media device.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ preset’s ID that needs to be modified to current position will be
included in the entity of the request message. For example:
Successful Response The standard successful result response that described in 1.3.5.
4.4 Cruise
4.4.1 PtzGetCruises
PtzGetCruises
Description To get the IP media device’s PTZ cruises list for specific channel.
PtzGetCruises
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The PTZ cruises list will be included in the entity of the Successful response.
For example:
[Tips]:
The “id” attribute for each item starts from “1”.
4.4.2 PtzGetCruise
PtzGetCruise
Description To get one cruise configuration of the IP media device’s specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ cruise’s ID that needs to be queried will be included in the entity of
the request message. For example:
PtzGetCruise
Successful Response The PTZ cruise’s information will be included in the entity of the Successful
response. For example:
[Tips]:
The “id” attribute for each item starts from “1”.
4.4.3 PtzAddCruise
PtzAddCruise
PtzAddCruise
Description To add one cruise for a specific channel of the IP media device.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ cruise configuration for specific channel should be included in the
entity of request message. The whole “cruiseInfo” element in the
“GetPtzCruise” should be included in entity of this message. Any attributes
for the “cruiseInfo” element or sub elements should not be included. For
example:
<?xml version="1.0"?>
<cruiseInfo version="1.0" xmlns="http://www.ipc.com/ver10">
<name type="string"><![CDATA[c2]]></name>
<presetInfo>
<item id="2">
<speed>5</speed>
<holdTime>5</holdTime>
</item>
...
</presetInfo>
</cruiseInfo>
[Tips]:
The “id” attribute for each item starts from “1”.
Successful Response The standard successful result response that described in 1.3.5.
4.4.4 PtzModifyCruise
PtzModifyCruise
Description To modify one cruise information of the IP media device’s specific channel.
PtzModifyCruise
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ cruise configuration for specific channel should be included in the
entity of request message. The whole “cruiseInfo” element in the
“GetPtzCruise” should be included in entity of this message. Any attributes
for the “cruiseInfo” element or sub elements should not be included.
Successful Response The standard successful result response that described in 1.3.5.
4.4.5 PtzDeleteCruise
PtzDeleteCruise
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The PTZ cruise’s ID that needs to be deleted will be included in the entity of
the request message. For example:
Successful Response The standard successful result response that described in 1.3.5.
5 Alarm commands
Description To get the IP media device’s motion configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The motion configuration information will be included in the entity of the
Successful response. For example:
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
<item><![CDATA[1111111111111111111111]]></item>
</area>
<triggerAlarmOut type="list"count="1">
<itemTypetype="boolean"/>
<item id="1">false</item>
</triggerAlarmOut>
</motion>
</config>
[Tips]:
There are 18 sub items in the “area”element, each item is a string with fixed length 22. This means a
22x18 motion detection areas, if corresponding character is “1”, the switch for this detection area is on.
The “id” attribute for each item starts from “1”.
5.1.2 SetMotionConfig
SetMotionConfig
Description To set the IP media device’s motion configuration for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The motion detection configuration for specific channel should be included in
the entity of request message. The whole “motion” element in the
“GetMotionConfig” should be included in entity of this message. Any
attributes for the “motion” element or sub elements should not be included.
Successful Response The standard successful result response that described in 1.3.5.
5.2 Alarm
5.2.1 GetAlarmInConfig
GetAlarmInConfig
Description To get the IP media device’s alarm input configuration for specific alarm input
channel.
Channel ID Optional. If none channel ID included in the URL, the default alarm input
channel ID is 1.
Successful Response The alarm inputs configuration will be included in the entity of the Successful
response. For example:
</types>
<sensor>
<id type="uint32">1</id>
<sensorName type="string" maxLen="11"><![CDATA[Sensor1]]></sensorName>
<switch type="boolean">true</switch>
<voltage type="alarmInVoltage">NO</voltage>
<alarmHoldTime type="uint32">10</alarmHoldTime>
<triggerAlarmOut type="list"count="1">
<itemTypetype="boolean"/>
<item id="1">true</item>
</triggerAlarmOut>
</sensor>
</config>
[Tips]:
The “id” attribute for each item starts from “1”.
5.2.2 SetAlarmInConfig
SetAlarmInConfig
Description To set the IP media device’s alarm inputs configuration for specific alarm
input channel.
Channel ID Optional. If none channel ID included in the URL, the default alarm input
channel ID is 1.
Entity Data The alarm input configuration for specific channel should be included in the
entity of request message. The whole “sensor” element in the
“GetAlarmInConfig” should be included in entity of this message. Any
attributes for the “sensor” element or sub elements should not be included.
SetAlarmInConfig
Successful Response The standard successful result response that described in 1.3.5.
5.2.3 ManualAlarmOut
ManualAlarmOut
Description To manually set the IP media device’s alarm output status for specific alarm
output channel.
Channel ID Optional. If none channel ID included in the URL, the default alarm output
channel ID is 1.
Entity Data The new status for the specific alarm output will be included in the entity of
request message. For example:
[Tips]:
The “status” element is Boolean type.
Successful Response The standard successful result response that described in 1.3.5.
5.2.4 GetAlarmOutConfig
GetAlarmOutConfig
Description To get the IP media device’s alarm output configuration for specific alarm
output channel.
GetAlarmOutConfig
Channel ID Optional. If none channel ID included in the URL, the default alarm output
channel ID is 1.
Successful Response The specific alarm output configuration will be included in the entity of the
Successful response. For example:
5.2.5 SetAlarmOutConfig
SetAlarmOutConfig
Description To set the IP media device’s alarm output configuration for specific alarm
output channel.
Channel ID Optional. If none channel ID included in the URL, the default alarm output
channel ID is 1.
Entity Data The alarm output configuration for specific channel should be included in the
entity of request message. The whole “alarmOut” element in the
“GetAlarmOutConfig” should be included in entity of this message. Any
attributes for the “alarmOut” element or sub elements should not be included.
Successful Response The standard successful result response that described in 1.3.5.
5.3 AlarmStatus
5.3.1 GetAlarmStatus
GetAlarmStatus
Channel ID None
Successful Response The alarm trigger status information will be included in the entity of the
Successful response. For example:
GetAlarmStatus
[Tips]:
The “id” attribute for each item starts from “1”.
5.3.2 GetAlarmServerConfig
GetAlarmServerConfig
Channel ID None
Successful Response The alarm server configuration will be included in the entity of the Successful
response. For example:
5.3.3 SetAlarmServerConfig
SetAlarmServerConfig
Channel ID None
Entity Data The alarm server configuration should be included in the entity of request
message. The whole “alarmServer” element in the “GetAlarmServerConfig”
should be included in entity of this message. Any attributes for the
“alarmServer” element or sub elements should not be included.
Successful Response The standard successful result response that described in 1.3.5.
5.3.4 SendAlarmStatus
SendAlarmStatus
SendAlarmStatus
Description To send the alarm status to the alarm server when an alarm happens. This
command will be used by the device. The alarm server should provide HTTP
service to receive this command.
Channel ID None
Entity Data The alarm status should be included in the entity of request message. The
whole “alarmStatusInfo” element in the response for “GetAlarmStatus”
should be included in entity of this message.
6 Playback
Description To search the date list with record data for specific channel.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Successful Response The date list with record data will be included in the entity of the successful
response. For example:
6.1.2 SearchByTime
SearchByTime
Description To search record data segments for the specific channel by time.
Channel ID Optional. If none channel ID included in the URL, the default channel ID is 1.
Entity Data The start time and end time should be included in the entity of the request
message as search condition. For example:
SearchByTime
Successful Response The searched record data segments will be included in the entity of the
successful response. For example:
[Tips]:
The client application can playback one specific record data segment through RTSP protocol. For
example:
rtsp://<host><:rtspPort>?chID=0&date=2014-01-09&time=15:07:28&timelen=200
When this URL is invoked by the client application, the first record data segment searched by the device
will be playback through RTSP.
7 Network commands
7.1 TCP/Ipv4
7.1.1 GetNetBasicConfig
GetNetBasicConfig
Channel ID None
Successful Response The basic network configuration will be included in the entity of the
Successful response. For example:
GetNetBasicConfig
7.1.2 SetNetBasicConfig
SetNetBasicConfig
Channel ID None
Entity Data The basic network configuration should be included in the entity of request
message. The whole “tcpIp” element in the “GetNetBasicConfig” should be
included in entity of this message. Any attributes for the “tcpIp” element or
sub elements should not be included.
SetNetBasicConfig
Successful Response The standard successful result response that described in 1.3.5.
7.2 PPPoE
7.2.1 GetNetPppoeConfig
GetNetPppoeConfig
Channel ID None
Successful Response The network PPPOE configuration will be included in the entity of the
Successful response. For example:
[Tips]:
The value of the “password” element will be none, for the reason that the “password” element is
write-only.
7.2.2 SetNetPppoeConfig
SetNetPppoeConfig
Channel ID None
Entity Data The network PPPOE configuration should be included in the entity of request
message. The whole “pppoe” element in the “GetNetPppoeConfig” should be
included in entity of this message. Any attributes for the “pppoe” element or
sub elements should not be included. If the user doesn’t need to change
password, please omit the “password” element.
Successful Response The standard successful result response that described in 1.3.5.
7.3 Port
7.3.1 GetPortConfig
GetPortConfig
Channel ID None
Successful Response The network service ports configuration will be included in the entity of the
Successful response. For example:
GetPortConfig
[Tips]:
The “httpPort” element announces the port for HTTP service. The “netPort” element announces the port
for protocol service. The “rtspPort” element announces the port for RTSP service.
7.3.2 SetPortConfig
SetPortConfig
Channel ID None
Entity Data The network service ports configuration should be included in the entity of
request message. The whole “port” element in the “GetPortConfig” should be
included in entity of this message. Any attributes for the “port” element or
sub elements should not be included.
Successful Response The standard successful result response that described in 1.3.5.
7.4 DDNS
7.4.1 GetDdnsConfig
GetDdnsConfig
Channel ID None
Successful Response The network DDNS configuration will be included in the entity of the
Successful response. For example:
GetDdnsConfig
[Tips]:
The value of the “password” element will be none, for the reason that the “password” element is
write-only.
7.4.2 SetDdnsConfig
SetDdnsConfig
SetDdnsConfig
Channel ID None
Entity Data The network DDNS configuration should be included in the entity of request
message. The whole “ddns” element in the “GetDdnsConfig” should be
included in entity of this message. Any attributes for the “ddns” element or
sub elements should not be included.If the user doesn’t need to change
password, please omit the “password” element.
Successful Response The standard successful result response that described in 1.3.5.
8 Security commands
Description To modify the current login user’s password for the IP media device.
Channel ID None
Entity Data The new password will be included in the entity of request message. Any
attributes for the “userPassword” element or sub elements should not be
included. For example:
<?xml version="1.0"?>
<config version="1.0" xmlns="http://www.ipc.com/ver10">
<userPassword>
<oldPassword><![CDATA[YWFh]]></oldPassword>
<password><![CDATA[YmJi]]></password>
</userPassword>
</config>
[Tips]:
The “oldPassword” and “password” elements are all “string” type with maxLen“19”. They should be
encoded by base64, the “YWFh” and “YmJi” are the encoded result for “aaa” and “bbb”.
Successful Response The standard successful result response that described in 1.3.5.
9 Maintain commands
9.1 Reboot
9.1.1 Reboot
Reboot
Channel ID None
Successful Response The standard successful result response that described in 1.3.5.
10 Talkback commands
10.1 Talkback
10.1.1 Talkback
Reboot
Channel ID None
Tips When this URL is invoked by the client application, the talkback data stream
pass through RTSP.