Follow

WAVE API: HTTP Generic Event

The WAVE Server API provides a standard set of API calls for 3rd party systems. With the WAVE Server API 3rd party systems, they can send WAVE events using a standard API call in the form of an HTTP requests - also known as the CreateEvent API call.

  • The full Server API can be accessed on any installed WAVE Server at http://serveripaddress:7001/static/API.xml.

 

The CreateEvent API is an API call from the WAVE Server API that allows 3rd party systems and devices to send Generic Events to WAVE for the use in the Rules Engine.

The CreateEvent API calls are generated outside of WAVE but must follow proper format in order to be read and acted upon by the WAVE Server.

Every CreateEvent API call begins with: http://address:port/api/createEvent?

address:port stands for the WAVE Server address(ip or domain) and port you are planning on sending your request to.

 

Create Event Modifiers

To complete a CreateEvent API call, developers can add any of the following modifiers. The Modifiers allow developers to provide additional information for when searching for Events & Rules or triggering actions (e.g. start recording) in WAVE.

 

Timestamp

A text field that contains the date and time of an event was generated accurately in millisecond.

  • Required:No
  • Format:YYYY-MM-DDTHH:MM:SS
  • Use: The Timestamp is used to synchronize events between 3rd party systems, devices and WAVE. If no timestamp is used, the event will be captured and timestamped according to the time of when the event was received by the Server. The Timestamp is useful because it removes any potential problems surrounding latency.

Example:

http://address:port/api/createEvent?timestamp=YYYY-MM-HHTHH:MM:SS

---------------------------

Source

A text field that contains the name of the device or system creating an event.

  • Required: No
  • Format: Text
  • Use: The Source name is used for creating rules. A System, with a default Generic Event rules, will also be displayed as the name of the Event in the Notifications Panel.

Example:

http://address:port/api/createEvent?timestamp=YYYY-MM-HHTHH:MM:SS&source=sourcename

---------------------------

Caption

A text field that contains a short description of an event.

  • Required: No
  • Format: Text
  • Use: The Caption is used for creating rules. If, for example, you wanted to integrate a 3rd party system, like the Point-of-Sale, the Caption would be an ideal place to put the transaction data from the POS system.

Example:

http://address:port/api/createEvent?timestamp=YYYY-MM-HHTHH:MM:SS&source=sourcename&caption=shorttextcaption

---------------------------

Description

A text field that contains a long description of an event.

  • Required: No
  • Format: Text
  • Use: The Description is also useful when creating rules. If, for example, you wanted to integrate a 3rd party system generating a long string of data, like a customer's officer filing a report for a truck inspection at the border, the Description would be the right place to put that data when sending an Event to WAVE to create a Bookmark after each successful inspection.

Example:

http://address:port/api/createEvent?timestamp=YYYY-MM-HHTHH:MM:SS&source=sourcename&caption=shorttextcaption&description=textdescriptionoftheevent

---------------------------

Metadata

Additional information associated with an event, in the form of a JSON object.

  • Required: No
  • Format: JSON Object
  • Use: Metadata allows developers to create events related to specific camera(s) using the “cameraRefs” API call. When a notification is received and displayed in the Notification panel (default System rule for HTTP Generic Events), it will display one or more video streams when clicked on. Also if an email generation is triggered by an event snapshots from all mentioned by the "cameraRefs" parameter, all will be added to the message.

Example:

http://address:port/api/createEvent?timestamp=YYYY-MM-HHTHH:MM:SS&source=sourcename&caption=shorttextcaption&description=textdescriptionoftheevent&metadata={"cameraRefs":["cameraIDforcamera1","cameraIDforcamera2"]}

Methods of Finding the CameraIDs:

  1. The Easy Way: In the WAVE Desktop Client, users can find the CameraID in the Camera Settings Dialog under the Advanced Tab.
  2. The Hard Way: Navigate to the browser and input the URL, authenticate, and then press CTRL+F to search all text for “ID” as shown. http://<serverIPaddress>:<port>/ec2/getCamerasEx?extraFormatting

---------------------------

Demo Video

Coming soon.

 

---------------------------

Quick API Generator

Coming soon.

 

 

Copyright © 2016 Hanwha Techwin America.
All rights reserved