Alert data model


This entity models an alert and could be used to send alerts related to traffic jam, accidents, weather conditions, high level of pollutants and so on. The purpose of the model is to support the generation of notifications for a user or trigger other actions, based on such alerts.

An alert is generated by a specific situation. The main features of an alert is that it is not predictable and it is not a recurrent data. That means that an alert could be an accident or a high level of pollutants measure, additionally it could be the fall down of a patient or a car driving in the opposite direction.

Some examples of context data are: type of alert (traffic, weather, security, and pollution, etc.), severity, location and so on.

Data model

A JSON Schema corresponding to this data model can be found here.

  • id : Entity's unique identifier.

  • type : Entity type. It must be equal to Alert.

  • category : Define the category of alert (Traffic jam, accidents, weather conditions, high level of pollutants)

    • Attribute type: Text
    • Allowed values:
      • (traffic, naturalDisaster, weather, environment, health, security )
    • Mandatory
  • subCategory : Describe the sub category of alert.

    • Attribute type: Text
    • Allowed values:
      • (trafficJam, carAccident, carWrongDirection, carStopped, pothole, roadClosed, roadWorks, hazardOnRoad, injuredBiker) (for traffic category)
      • (flood, tsunami, coastalEvent, earthquake) (for naturalDisaster category)
      • (rainfall, highTemperature, lowTemperature, heatWave, coldWave, ice, snow, wind, fog, tornado, tropicalCyclone, hurricane, snow/ice, thunderstorms, fireRisk, avalancheRisk, floodRisk) (for weather category)
      • (airPollution, waterPollution, pollenConcentration) (for environment category)
      • (asthmaAttack, bumpedPatient, fallenPatient, heartAttack ) (for health category)
      • (suspiciousAction, robbery, assault, civilDisorder, buildingFire, forestFire) (for security category)
    • Optional
  • location : Location of alert represented by a GeoJSON geometry.

    • Attribute type: geo:json.
    • Normative References: rfc7946
    • Mandatory if address is not present
  • address : Civic address of Alert

    • Attribute type: Address
    • Mandatory if location is not present.
  • dateIssued : The date and time the alert was issued by the alert generator in ISO8601 UTC format.

  • validFrom : The start date of validity of the alert in ISO8601 UTC format.

  • validTo : The end date of validity of the alert in ISO8601 UTC format.

  • description : A description of alert (e.g. Traffic jam in Paseo de la Reforma. Emergency services at place).

  • alertSource : reference to the source of the alert. For example, it could be a user of an application, a device, or a service.

    • Attribute type: Text or URL
    • Mandatory.
  • data : used to carry additional data for the alert.

  • severity : define the level of gravity of a given alert.

    • Attribute type: Text
    • Allowed values:
      • (informational, low, medium, high, critical)
    • Optional.

Note: JSON Schemas only capture the NGSI simplified representation, this means that to test the JSON schema examples with a FIWARE NGSI version 2 API implementation, you need to use the keyValues mode (options=keyValues).

Examples of use (traffic)

  "id": "Alert:1",
  "type": "Alert",
  "category": "traffic",
  "subCategory": "trafficJam",
  "severity": "high",
  "location": {
    "type": "Point",
      "coordinates": [
  "dateIssued": "2017-01-02T09:25:55.00Z",
  "description": "The road is completely blocked for 3kms",
  "alertSource": ""

Examples of use (security)

  "id": "VisualEvent123",
  "type": "Alert",
  "category": "security",
  "subCategory": "robbery",
  "location": {
    "type": "Point",
    "coordinates": [
  "dateIssued": "2017-04-25T09:25:55.00Z",
  "description": "Potential robbery in main building",
  "alertSource": "Camera1234",
  "data": {
    "videoURL": "",
    "initialFrame": "80",
    "finalFrame": "120"
  "severity" : "informational"

Use it with a real service

The model has been defined to support different scenarios inside SmartSDK project.

Open Issues