# Schema Structure

Welcome to the Schema Structure page for the Incident Detection API. This section provides an in-depth overview of the data schema used to define and organize incident information. Here, you’ll find detailed descriptions of the data fields, their types, and the relationships between different elements within the incident reports.

Understanding the schema structure is crucial for effectively parsing, interpreting, and integrating the incident data into your systems. This page serves as a comprehensive guide to ensure that you can work with the API’s data models with confidence and precision.

## **Incident details**

<table data-full-width="true"><thead><tr><th width="304" align="center">Field name</th><th width="194" align="center">Type</th><th width="130.6468505859375" align="center">Mandatory</th><th align="center"> Description</th></tr></thead><tbody><tr><td align="center">id</td><td align="center">String</td><td align="center">Yes</td><td align="center">The unique identifier of the incident</td></tr><tr><td align="center"><a href="#incident-types">incidentType</a></td><td align="center">String</td><td align="center">Yes</td><td align="center">The Type of the Incident</td></tr><tr><td align="center"><a href="#incident-types">incidentSubType</a></td><td align="center">String</td><td align="center">No</td><td align="center">The Sub-Type of the Incident</td></tr><tr><td align="center"><a href="#description">Description</a></td><td align="center">Object</td><td align="center">No</td><td align="center">The description of the traffic incident event in English</td></tr><tr><td align="center">location</td><td align="center">Point</td><td align="center">Yes</td><td align="center">The location of the incident (point – long and lat)</td></tr><tr><td align="center">state</td><td align="center">String</td><td align="center">No</td><td align="center">The state which the incident located at</td></tr><tr><td align="center">county</td><td align="center">String</td><td align="center">No</td><td align="center">The county which the incident located at</td></tr><tr><td align="center">city</td><td align="center">String</td><td align="center">No</td><td align="center">The city which the incident located at</td></tr><tr><td align="center"><a href="#road-type">roadType</a></td><td align="center">String</td><td align="center">No</td><td align="center">Type of road the incident occurred on</td></tr><tr><td align="center">corridor</td><td align="center">String</td><td align="center">No</td><td align="center">The road/part of the road name</td></tr><tr><td align="center"><a href="#direction">direction</a></td><td align="center">String</td><td align="center">No</td><td align="center">The road direction of the incident</td></tr><tr><td align="center"><a href="#orientation">orientation</a></td><td align="center">String</td><td align="center">No</td><td align="center">The location of the incident along the corridor, relative to the crossroad</td></tr><tr><td align="center">crossroad</td><td align="center">String</td><td align="center">No</td><td align="center">The nearest intersection</td></tr><tr><td align="center">mileMarker</td><td align="center">String</td><td align="center">No</td><td align="center">Road mile marker lined to the specific corridor</td></tr><tr><td align="center">startTime</td><td align="center">String</td><td align="center">Yes</td><td align="center">The UTC start time and date of the incident</td></tr><tr><td align="center">confirmedTime</td><td align="center">String</td><td align="center">No</td><td align="center">The UTC time and date when the operator verified the incident</td></tr><tr><td align="center">updateTime</td><td align="center">String</td><td align="center">No</td><td align="center">The UTC time and date of the incident update</td></tr><tr><td align="center">endTime</td><td align="center">String</td><td align="center">No</td><td align="center">The UTC time and date the incident was completed</td></tr><tr><td align="center">affectedLanes</td><td align="center">List&#x3C;Lane></td><td align="center">Yes</td><td align="center">List of the affected lanes</td></tr><tr><td align="center">isFullClosure</td><td align="center">Boolean</td><td align="center">Yes</td><td align="center">Indication if all lanes are closed or not</td></tr><tr><td align="center"><a href="#severity">severity</a></td><td align="center">String</td><td align="center">No</td><td align="center">The severity of the incident</td></tr><tr><td align="center">estimatedEndTime</td><td align="center">String</td><td align="center">No</td><td align="center">The estimated end time of the incident</td></tr><tr><td align="center">estimatedDurationMin</td><td align="center">Int</td><td align="center">No</td><td align="center">Calculation of the interval between starting time and end time of the incident</td></tr><tr><td align="center"><a href="#impact-level">Impact</a></td><td align="center">Object</td><td align="center">No</td><td align="center">Details of the Incident impact on the roadways</td></tr><tr><td align="center"><a href="#incident-confidence-score">confidence</a></td><td align="center">Object</td><td align="center">Yes</td><td align="center">Enumeration string specifying the Incident Confidence Score </td></tr><tr><td align="center">atmsId</td><td align="center">String</td><td align="center">No</td><td align="center">The unique identifier of the ATMS</td></tr><tr><td align="center">createdBy</td><td align="center">String</td><td align="center">No</td><td align="center">The ID of the creator of the incident</td></tr><tr><td align="center">reportedBy</td><td align="center">String</td><td align="center">Yes</td><td align="center">The source of the report</td></tr><tr><td align="center">confirmedBy</td><td align="center">String</td><td align="center">No</td><td align="center">The source of confirmation of the incident</td></tr><tr><td align="center">updatedBy</td><td align="center">String</td><td align="center">No</td><td align="center">The source of update</td></tr><tr><td align="center">clearedBy</td><td align="center">String</td><td align="center">No</td><td align="center">The ID of the clearer of the incident</td></tr><tr><td align="center">clearedReason</td><td align="center">String</td><td align="center">No</td><td align="center">The resolution reasons</td></tr><tr><td align="center">injuries</td><td align="center">Int</td><td align="center">No</td><td align="center">Number of injuries reported  </td></tr><tr><td align="center">fatalities</td><td align="center">Int</td><td align="center">No</td><td align="center">Number of fatalities reported </td></tr><tr><td align="center">involvedVehicles</td><td align="center">List&#x3C;InvolvedVehicle></td><td align="center">Yes</td><td align="center">Number of reported vehicles involved in the incident</td></tr><tr><td align="center">notes</td><td align="center">List&#x3C;FeedNote></td><td align="center">Yes</td><td align="center">Additional information about the incident</td></tr><tr><td align="center">unitResponse</td><td align="center">List&#x3C;UnitResponse></td><td align="center">Yes</td><td align="center"><p></p><p>The status of the associated unit</p></td></tr><tr><td align="center">involvedVehiclesCount</td><td align="center">Int</td><td align="center">No</td><td align="center">The number of involved vehicles in the incident</td></tr></tbody></table>

## Incident types

The Incident Detection API provides comprehensive support for a diverse array of incident types, ensuring a robust and flexible framework for incident reporting and monitoring.

<table><thead><tr><th align="center">Type</th><th align="center">Sub-Type</th></tr></thead><tbody><tr><td align="center"><code>CRASH</code></td><td align="center"><p></p><pre><code>PRIMARY_SUB_TYPE
SECONDARY_CRASH
</code></pre></td></tr><tr><td align="center"><code>DEBRIS</code></td><td align="center"><p></p><pre><code>OIL_SPILL
DEBRIS_ON_LANE
CARGO_DISPERSAL
DEAD_ANIMAL
VEGETATION
NOT_IMPACTING_TRAFFIC
IMPACTING_TRAFFIC
</code></pre></td></tr><tr><td align="center"><a data-footnote-ref href="#user-content-fn-1"><code>STALLED_VEHICLE</code></a></td><td align="center"><p></p><pre><code>OVERHEATED
FLAT_TIRE
TOW_WAITING
ASSISTANCE_WAITING
OUT_OF_GAS
MECHANICAL_ISSUE
ON_PHONE
LOST_MOTORIST
RANDOM_STOP
CARGO_LOADING
ELECTRICAL
SICK_MOTORIST
MOTORIST_REFUSED_ASSISTANCE
WELLNESS_CHECK
MOTORIST_WAITING_FOR_OTHER
</code></pre></td></tr><tr><td align="center"><code>HAZARD</code></td><td align="center"><p></p><pre><code>PEDESTRIAN_ON_ROAD
CYCLIST_ON_ROAD
WATER_LEAK
ANIMAL_ON_ROAD
OVERWEIGHT_LOAD
HAZMAT
FIRE
SUICIDE
FLOODING_ON_ROAD
TREE_FALL
HAZARD_ON_ROAD
</code></pre></td></tr><tr><td align="center"><code>POLICE_ACTIVITY</code></td><td align="center"><p></p><pre><code>FELONY
PROTESTS
ROAD_BLOCK
BOMB_THREAT
SUSPICIOUS_PERSON
HOMELAND_SECURITY_INCIDENT
EXPLOSION
STREET_VIOLENCE
DOMESTIC_VIOLENCE
</code></pre></td></tr><tr><td align="center"><code>TRAFFIC_STOP</code></td><td align="center"><p></p><pre><code>MOTORIST_ASSIST
TRAFFIC_CONTROL
</code></pre></td></tr><tr><td align="center"><code>DAMAGE</code></td><td align="center"><p></p><pre><code>GRAFFITI
DAMAGED_SIGNS
STOLEN_EQUIPMENT
POTHOLE_DAMAGE
BARRIER_DAMAGE
BRIDGE_DAMAGE
DRAIN
FENCING
EQUIPMENT_FAILURE
GUARD_CABLE
GUIDE_RAIL
DAMAGED_LIGHT_POLE
DOWNED_POWER_LINES
SIGN_DOWN
TRAFFIC_LIGHTS_NOT_WORKING
GAS_LEAK
INFRASTRUCTURE_DAMAGE
<strong>DRAINAGE_OR_MANHOLE_COVER
</strong>STREET_LIGHT_NOT_WORKING
ENERGY_ABSORBING_BARRIER
</code></pre></td></tr><tr><td align="center"><code>ABANDONED_VEHICLE</code></td><td align="center"><p></p><pre><code>TAGGED
HP_TAGGED
</code></pre></td></tr><tr><td align="center"><code>LEFT_ON_ARRIVAL</code></td><td align="center"></td></tr><tr><td align="center"><code>VEHICLE_ON_FIRE</code></td><td align="center"></td></tr><tr><td align="center"><code>EMS</code></td><td align="center"></td></tr><tr><td align="center"><code>WRONG_WAY</code></td><td align="center"></td></tr><tr><td align="center"><code>UNIDENTIFIED</code></td><td align="center"></td></tr><tr><td align="center"><code>OTHER</code></td><td align="center"><ul><li>Communication alerts issued by authoritative sources (e.g., IOOs, DOTs)</li><li>Includes <a href="#traffic-anomaly-incident-type">Irregular slowdown detection</a> by Rekor AI anomaly detection </li></ul></td></tr></tbody></table>

## Description

AI-enhanced incident descriptions built on industry information-sharing best practices, available in two streamlined formats:​

* Short Description: Concise/Mobile-optimized​
* Description: Expanded/Full details

## Road type

```
FREEWAY
HIGHWAY
STREET
RAMP
ON_RAMP
OFF_RAMP
PRIMARY
SECONDARY
TRAIL
OTHER
BRIDGE
INTERSECTION
UNKNOWN_ROAD_TYPE
ROADWAY
CD_ROAD
TRANSITION_RAMP
```

## Direction

```
SB
NB
EB
WB
```

## Orientation

```
AT
BEFORE
AFTER
UNDER
OVER
TO
FROM
EXIT
EAST_OF
WEST_OF
NORTH_OF
SOUTH_OF
```

## Severity

```
MINOR_SEVERITY
INTERMEDIATE_SEVERITY
MAJOR_SEVERITY
CRITICAL_SEVERITY
```

## Irregular Traffic and Slowdown Detection&#x20;

Irregular Traffic and Slowdown (Other Event Type) are triggered by real-time Connected Vehicle data, which monitors traffic patterns to quickly detect traffic anomalies, such as abrupt slowdowns, often signaling potential incidents like crashes.

## Impact Level

Traffic impact level captures how much an incident disrupts travel time, spanning from “No Impact” to “High Impact,” and reflects the severity of delay imposed on expected traffic flow.

| Level                                   | Definition                     |
| --------------------------------------- | ------------------------------ |
| **No Impact**                           | No delay                       |
| **Negligible Impact** - Least impactful | 0-1 minute delay detecte       |
| **Low Impact**                          | 1-4 minutes delay detected​    |
| **Medium Impact**                       | 4-10 minutes delay detected    |
| **High Impact** - Most impactful        | Over 10 minutes delay detected |

## Incident Confidence Score

The Incident Confidence Score is an AI-driven insight that provides a quantifiable reliability metric for each detected incident. Generated by Rekor’s proprietary fusion algorithms, it provides a transparent and dynamic assessment of each event’s validity. The score evolves in real-time as new data is processed, ensuring timely and accurate insights for operational decision-making.

* **1 - IDENTIFIED**
* **2 - POSSIBLE**
* **3 - PROBABLE**
* **4 - VERIFIED**

## Customizations

The following filters can be used to customize Incident information:

* **Area** - Specify the preferred Polygons
* **State** - Specify the preferred States
* **County** - Specify the preferred county
* **Incident Type** - Supported [Incident Types](#types)
* **Incident Sub-Type** - Supported [Incident Sub-Types](#sub-types)
* **Incident Confidence Score -** Specify the preferred Incident Confidence Score level

## Event Restoration

Restoration of an event allows an event that was previously removed from the feed to be reinstated within 24 hours of its completion. The restored event retains its original ID, ensuring data continuity and avoiding disruptions in integrated systems.

* **Restoration Types**: Operator intervention or algorithmic decisions.
* **Time Limit**: Restoration is available only within 24 hours of event completion.
* **Consistency**: Restored events maintain their original ID for seamless integration.

## Incident JSON Schema

The JSON Schema below is the foundation for receiving and consuming comprehensive incident data. This JSON schema provides a structured format for incident information, allowing users to efficiently retrieve and integrate data into their systems.

The schema encompasses a range of essential parameters, including incident identification, type, and sub-type, along with critical details about the incident's location, timing, and affected lanes. Additionally, it captures pertinent information about involved vehicles, injuries, fatalities, unit responses, and mitigation efforts. The well-defined structure ensures clarity and consistency, facilitating a smooth and seamless process for users to parse and utilize incident data effectively.

```json
[
    {
        "id": String,
        "incidentType": String,
        "incidentSubType": String,
        "atmsId": String,
        "createdBy": String,
        "reportedBy": String,
        "confirmedBy": String,
        "updatedBy": String,
        "clearedBy": String,
        "clearedReason": String,
        "location": {
            "long": Double,
            "lat": Double
        },
        "state": String,
        "county": String,
        "city": String,
        "roadType": String,
        "corridor": String,
        "direction": String,
        "orientation": String,
        "crossroad": String,
        "mileMarker": String,
        "startTime": String,
        "confirmedTime": String,
        "updateTime": String,
        "endTime": String,
        "affectedLanes": [
            {
                "laneNumber": Int,
                "laneType": String,
                "isClosed": Boolean,
                "updatedTime": String
            }
        ],
        "isFullClosure": Boolean,
        "injuries": Int,
        "fatalities": Int,
        "estimatedEndTime": String,
        "estimatedDurationMin": Int,
        "involvedVehicles": [
            {
                "id": String,
                "state": String,
                "color": String,
                "make": String,
                "model": String,
                "type": String,
                "licensePlate": String
            }
        ],
        "notes": [
            {
                "note": String,
                "updateTime": String,
                "updateBy": String
            }
        ],
        "unitResponse": [
            {
                "respondedBy": String,
                 "unitType": String,
                 "unitId": String,
                 "status": String,
                 "updateTime": String,
                 "mitigationStartTime": String,
                 "mitigationEndTime": String,
                 "mitigationReasons": [String]
            }
        ],
        "involvedVehiclesCount": Int,
        "severity": String,
        "description": Object,
        "impact": Object,
        "confidence": Object
    }
]
```

[^1]:
