Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Getting events from the cameras that changed their state during the request execution (~30-60 seconds).

General request format:

http://IP-address:port/web2/secure/feed/

Request example

Connection is not lost and events are always received.

action – type of event. Possible values: create, delete, update.

The fields below are optional:

objectId  - id of object that is the source of event (always with update, delete, create).

state – id of a new object state (always with create. If the state has not changed, then there is no update state).

x, y  – new coordinates (if changed).

...

:

http://example.com:[port]127.0.0.1:8085/web2/secure/feed/Samples of response

Response example:

<message>
Code Block
languagexml
<message>
    <action>update</action>

...


    <objectId>CAM:1</objectId>

...


    <state>disconnected</state>

...


</message>

...


 

...


<message>

...


    <action>state</action>

...


    <objectId>CAM:1</objectId>

...


    <x>10.0</x>

...


    <y>123.9</y>

...


</message>

...


 

...


<message>

...


    <action>state</action>

...


    <objectId>CAM:1</objectId>

...


    <state>connected</state>

...


    <x>300.8</x>

...


    <y>670</y>

...


</message>

...


 

...


<message>

...


    <action>state</action>

...


    <objectId>CAM:1</objectId>

...


    <x>100</x>

...


    <y>100</y>

...


</message>

...


 

...


<message>

...


    <action>ping</action>

...


</message>

Response parameters:

ParameterDescription
actionType of event. Possible values: create, delete, update
objectIdid of the object that is the source of event (always with update, delete, create)
stateid of a new object state (always with create. If the state has not changed, then there is no update state).
x, yNew coordinates, if changed
tsThe time and date of the object state change