This is a procedural topic for administrators describing how to create custom real-time events for selection in the Real-time Events Selector. The events can then be displayed in any of the following real-time modules.
Creating custom events allows you to integrate real-time statistical data from your third-party tools into VIEW so that data from different sources can be seen in one place. You do this by setting up your events in VIEW and then sending real-time data update requests to a REST API endpoint in the ViewWebService application.
This topic also covers the following related tasks:
Prerequisites
Configuration
This is a two-stage procedure:
Create the Custom Events in VIEW
Call the ViewWebService Application to Update the Custom Events
Note: it can take up to 30 minutes for new custom events to appear in the events selector window.
The illustration below shows two custom events that have been added to a real-time List Module.
Note: the supported measurement types for custom events are Update Count and Current Value only.
You will need to create (or modify) an application for updating your new custom real-time events.
Your application |
PublishEvents |
Custom events (as seen in VIEW real-time modules) |
||||||
Update requests |
||||||||
VIEWWebService |
||||||||
storm VIEW |
Whenever you want to update a real-time module with particular values, your application must send an update request (containing those values) to the PublishEvents REST API endpoint in the ViewWebService application. Updates should typically be after every one second for real-time performance. The API uses the data in the request to update the custom events, responding to each update attempt with a success or failure. Failure is indicated by a result code and, where possible, a failure reason.
Region |
Endpoint |
United Kingdom |
https://www.timeforstorm.com/stormstudio/ViewWebService https://www.stormesp.com/stormstudio/ViewWebService (Emergency Services Platform customers only) |
United States |
https://www.stormportal.us/stormstudio/ViewWebService |
Europe |
https://www.timeforstorm.eu/stormstudio/ViewWebService |
Japan |
https://www.connectstorm.jp/stormstudio/ViewWebService |
Use the following code structure for the request:
{
"EventUpdates": [
{
"EventID": ID from Custom Events dialog,
"Value": "Value",
}
]
}
Where, ID from Custom Events dialog is the ID of the event that you want to update (one of the values you noted in step 7 of Create the Custom Events in VIEW), and Value is the update value enclosed in quotes.
For example, the following PUT request will update the two events created earlier with the values '20', and '7'.
{
"EventUpdates": [
{
"EventID": 8355,
"Value": "20",
},
{
"EventID": 8356,
"Value": "7",
}
]
}
Note: you can include updates for up to 100 events in a single PUT request.
Note: your application must not update a particular event within one second of its previous update. If this happens, only the first update will apply; subsequent updates in the one-second period will be ignored.
Failure Reason |
Description |
Request does not contain event values |
The request did not contain any event values. |
Too many events |
There were more than 100 events in the request. |
None of the supplied events have been updated. Each event cannot be updated more than once per second |
One or more requests attempted to update an event more than once within one second. |
All supplied event ids are invalid |
The event IDs in the request do not exist. |
None of the supplied events have been updated |
This is a general catch all reason where none of the events in the request were updated because of failures associated with some or all of the events in the request. |
For more details about the ViewWebService application, see the storm Web Services Reference Guide.
Related Tasks
This section describes how to add events to or remove events from an event group.
To delete an event, click its button.
Note: a deleted custom event will remain in any modules in which it was included, and it can still be updated with new values. Deleting a custom event prevents administrators from including it in real-time modules from this point onwards.
This deletes an entire set of custom events.
Click OK to confirm the deletion.
Note: deleted custom events will remain in any modules in which they were included, and they can still be updated with new values. Deleting an event group prevents administrators from including its events in real-time modules from this point onwards.