Creating Event Types

Recap: What are Event Types?

Event types describe the types of information or insights you'd like to see in your Control Room. Click here to learn more about Event Types.

Creating Event Types - Using the interface

Event types can be created through the UI in four simple steps:

  1. Open the Control Room you created in the previous step (Heroes Flying Potion - Real-time Monitoring)

  2. In the side panel, click ‘Manage Event Types’

  3. Then click “Add New Event Type”

  4. Fill out the details for your Event Types

Here are the steps visually:

Event Types describe the types of alerts you want to receive. Our first Event Type could be letting us know that a Hero (Flying Potion customer) is flying in a given location.

So here’s how we’d fill out the Event Type details:

When we save the Event Type, we’re taken back to our ‘Manage Event Types’ section and can see our first Event Type “Customer Flying” in our Event Type Library:

Let’s unpack the Event Type we created:

  1. Name your event: This is a way for you to label your Event Types in a way that make sense to you as a business. You could choose to use a naming convention or simply give it a descriptive name so you know what it’s referring to. This is purely for organisational purposes and doesn’t appear in your Control Room or Event Stream.

  2. Title: This is the title that appears in your event stream. You want to keep this concise to convey what you’re after. Notice that location is written between curly braces {{location}}. This ensures that each event will be able to replace {{location}} with the actual location the event took place in. These are called “placeholders”, you can create any number of placeholders so that external systems can push different types of information into your events, giving you richer, event specific insights.

  3. Description: A bit more detail that appears under the title. Similar to the title, you can include placeholders here to give you specific insights. In this case we’re displaying our customer’s first name using {{customerFirstName}}

  4. Importance Level: Different Event Types can have different importance ratings. This allows you to specify a default, but external systems can override this (some events might need to be rated as critical, and others as low priority)

Creating Event Types - Using the API

Similar to what we did using the interface, we can create our Event Types via API. Here are a few Event Types (including the one we created previously) using API calls:

Creating Event Type - Customer Flying

POST api.skyledge.com/event-types

{  
   "name":"Customer Flying",
   "title":"Customer flying in {{location}}",
   "description":"{{customerFirstName}} successfully took off.",
   "locationType":"Point",
   "defaultImportanceLevel":0,
   "controlRooms":[  
      "CONTROL_ROOM_ID"
   ]
}
curl --location --request POST 'https://api.skyledge.com/event-types' \
--header 'X-Authorization: API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{  
   "name":"Customer Flying",
   "title":"Customer flying in {{location}}",
   "description":"{{customerFirstName}} successfully took off.",
   "locationType":"Point",
   "defaultImportanceLevel":0,
   "controlRooms":[  
      "CONTROL_ROOM_ID"
   ]
}'

Creating Event Type - Prohibited Airspace Intrusion

POST api.skyledge.com/event-types

{  
   "name":"Prohibited Airspace Intrusion",
   "title":"Flying Person Detected in {{location}} - Prohibited Airspace",
   "description":"A flying person has been detected in a prohibited airspace",
   "locationType":"Point",
   "defaultImportanceLevel":2,
   "controlRooms":[  
      "{controlRoomId}"
   ]
}
curl --location --request POST 'https://api.skyledge.com/event-types' \
--header 'X-Authorization: API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{  
   "name":"Prohibited Airspace Intrusion",
   "title":"Flying Person Detected in {{location}} - Prohibited Airspace",
   "description":"A flying person has been detected in a prohibited airspace",
   "locationType":"Point",
   "defaultImportanceLevel":2,
   "controlRooms":[  
      "CONTROL_ROOM_ID"
   ]
}'

Creating Event Type - Potion Ineffective

POST api.skyledge.com/event-types

{  
   "name":"Potion Ineffective",
   "title":"Potion ineffective on customer in {{location}}",
   "description":"A customer in {{location}} has consumed the potion with no effect",
   "locationType":"Point",
   "defaultImportanceLevel":2,
   "controlRooms":[  
      "{controlRoomId}"
   ]
}
curl --location --request POST 'https://api.skyledge.com/event-types' \
--header 'X-Authorization: API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{  
   "name":"Potion Ineffective",
   "title":"Potion ineffective on customer in {{location}}",
   "description":"A customer in {{location}} has consumed the potion with no effect",
   "locationType":"Point",
   "defaultImportanceLevel":2,
   "controlRooms":[  
      "CONTROL_ROOM_ID"
   ]
}'

3 Event Types created with 3 API calls!

Last updated