Request for archive events

Important

The request o the archive event is possible only after receiving the archive stream on the following algorithm:

  1. Make the Token request with the stream=archive_main or stream=archive_sub parameter.
  2. Make the stream request by the Token.
  3. Make archive events request command.

Example of a request for archive events:

  https://192.168.1.200:8080/archive_events?token=isaoPJAb&sid=e03qD0eg  

Key elements of the request:

Example of a server response:

[
    {
        "event_name" : "CalendarEvent",
        "calendar" : [
            "2014-02-20",
            "2014-02-21",
            "2014-02-24"
        ]
    },
    {
        "event_name" : "SpeedEvent",
        "speed" : "0.000000"
    },
    {
        "event_name" : "SpeedLimitEvent",
        "speed_limit" : "0"
    },
    {
        "event_name" : "StateTransitionEvent",
        "state" : "1",
        "state_desc" : "",
        "state_time" : "2014-02-24 14:24:54"
    },
    {
        "event_name" : "TimeChangedEvent",
        "time" : "2014-02-24 14:24:53"
    },
    {
        "event_name" : "TimelineEvent",
        "day_start" : "2014-02-24",
        "timeline" : "00000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
        0E0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
        FFFFFFFFFF1F0000000000000000000000000000000000000000000000000000000000000000000000000000000
        000000000FEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
        FFF3F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
    },
    {
        "event_name" : "ActivityLevelEvent",
        "day_start" : "2014-02-24",
        "activities" : "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
        FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
        FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
        FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0"
    }
]  

Important

The response contains events corresponding to a particular Token, but not

In this example the response contains the following archive events:

  • "event_name" : "CalendarEvent"

    "calendar" : [] - list of dates, containing the archive.

    Tip

    The "calendar" : [] contains the list of dates, corresponding to the given Token, not all server channels.

  • "event_name" : "SpeedEvent"

    "speed" : "0.000000" - current speed of the archive replay.

  • "event_name" : "SpeedLimitEvent"

    "speed_limit" : "0" -greatest possible speed of the archive replay.

  • "event_name" : "StateTransitionEvent"

    "state" : "1" - current archive state:

    • 1 - archive playback stopped;
    • 2 - archive is being replayed;
    • 4 - archive search;
    • 8 - an error occurred;
    • 10 - the drives are occupied.

    "state_desc" : "" - description of state.

    "state_time" : "2014-02-24 14:24:54" - time of the state change.

  • "event_name" : "TimeChangedEvent"

    "time" : "2014-02-24 14:24:53" - time of the state change.

  • "event_name" : "TimelineEvent"

    "day_start" : "2014-02-24" - date of the replayed archive.

    "timeline" : "" - sequence of numbers in hexadecimal system where each bit corresponds to one second of recording on that day:

    • 0 - no record;
    • 1 - there is a record.
  • "event_name" : "ActivityLevelEvent"

    "day_start" : "2014-02-24" - date of the replayed archive.

    "activities" : "" - a sequence of numbers in a hexadecimal system, where each bit contains information about the presence or absence of motion on the channel:

    • 0 - no motion;
    • 1 - there is motion.

    Tip

    Unlike "event_name" : "TimelineEvent" event, the "event_name" : "ActivityLevelEvent" event contains info only on the seconds of the archive recordings.