GET Events API Documentation
Returns all traffic events.
Request Information
https://511.gnb.ca/api/v2/get/event
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| key |
Developer Key |
string |
Required |
| format |
Valid values are 'xml' or 'json', default 'json'. |
string |
Optional |
| lang |
Valid values are 'en' or 'fr', default 'en'. |
string |
Optional |
Response Information
Resource Description
| Name | Description | Type |
|---|---|---|
| ID |
A unique identifier. |
integer |
| SourceId |
The source id of the event. |
string |
| Organization |
The name of the organization that provided this event. |
string |
| RoadwayName |
The roadway on which the event occurred. |
string |
| DirectionOfTravel |
One of the following directions of travel: Unknown, All Directions, Northbound, Eastbound, Southbound, Westbound, Inbound, Outbound, Both Directions. |
string |
| Description |
A summary of the event details which often includes type of event, dates and lanes affected. |
string |
| Reported |
The date the event was reported in Unix time. More information |
integer |
| LastUpdated |
The date the event's details were last updated in Unix time. More information |
integer |
| StartDate |
The start date of the event in Unix time. More information |
integer |
| PlannedEndDate |
The date the event is expected to end in Unix time. More information |
integer |
| LanesAffected |
Describes the lane or number of lanes affected by the event. For example: all lanes. |
string |
| Latitude |
The latitude describing the location. Format: double between -90 and 90. |
double |
| Longitude |
The longitude describing the location. Format: double between -180 and 180. |
double |
| LatitudeSecondary |
Secondary latitude. |
double |
| LongitudeSecondary |
Secondary Longitude. |
double |
| EventType |
The type of event. One of the following: roadwork, closures or accidentsAndIncidents. |
string |
| EventSubType |
A more detailed and descriptive event type. No fixed list of sub types. |
string |
| IsFullClosure |
True if all lanes are blocked for this event. |
boolean |
| Severity |
Describes the severity of the event with default value of Unknown. |
string |
| Comment |
Extra information about the event |
string |
| EncodedPolyline |
A single string storing a series of coordinates. More information |
string |
| Restrictions |
Different types of restriction: Width (Feet), Height (Feet), Weight (Tons) and Speed (Mph). |
list |
| DetourPolyline |
Google Encoded Polyline for the detour |
string |
| DetourInstructions |
Turn by turn instructions for the detour |
string |
| Recurrence |
Describes the schedule of the event. |
string |
| RecurrenceSchedules |
More information about recurring events. Event start and end dates, times and day(s) of the week event is active. |
string |
Response Formats
[
{
"ID": 5,
"SourceId": "95",
"Organization": "ERS",
"RoadwayName": "HWY-102",
"DirectionOfTravel": "North",
"Description": "Flooding on HWY-102 Northbound 0.56 Km Before Glen Eyre Ct. Activities: Adjacent to road. ",
"Reported": 1664209980,
"LastUpdated": 1664567889,
"StartDate": 1664209980,
"PlannedEndDate": null,
"LanesAffected": "No Data",
"Latitude": 45.9653370633761,
"Longitude": -66.7443560444377,
"LatitudeSecondary": null,
"LongitudeSecondary": null,
"EventType": "flooding",
"EventSubType": "Flooding",
"IsFullClosure": false,
"Severity": "None",
"Comment": null,
"EncodedPolyline": null,
"Restrictions": {
"Width": null,
"Height": null,
"Length": null,
"Weight": null,
"Speed": null
},
"DetourPolyline": "",
"DetourInstructions": "",
"Recurrence": "",
"RecurrenceSchedules": ""
},
{
"ID": 6,
"SourceId": "96",
"Organization": "ERS",
"RoadwayName": "Mactaquac Rd",
"DirectionOfTravel": "Unknown",
"Description": "Bridge Restriction on Mactaquac Rd near Saint John River. Visibility: Visibility reduced in fog. Expect Delays: Under 30 minutes ",
"Reported": 1664210040,
"LastUpdated": 1664298657,
"StartDate": 1664210040,
"PlannedEndDate": null,
"LanesAffected": "No Data",
"Latitude": 45.9553831608503,
"Longitude": -66.8713347653979,
"LatitudeSecondary": null,
"LongitudeSecondary": null,
"EventType": "flooding",
"EventSubType": "Bridge Restriction",
"IsFullClosure": false,
"Severity": "Minor",
"Comment": null,
"EncodedPolyline": null,
"Restrictions": {
"Width": null,
"Height": null,
"Length": null,
"Weight": null,
"Speed": null
},
"DetourPolyline": "",
"DetourInstructions": "",
"Recurrence": "",
"RecurrenceSchedules": ""
}
]
<EventList>
<Event>
<ID>5</ID>
<SourceId>95</SourceId>
<Organization>ERS</Organization>
<RoadwayName>HWY-102</RoadwayName>
<DirectionOfTravel>North</DirectionOfTravel>
<Description>Flooding on HWY-102 Northbound 0.56 Km Before Glen Eyre Ct. Activities: Adjacent to road. </Description>
<Reported>1664209980</Reported>
<LastUpdated>1664567889</LastUpdated>
<StartDate>1664209980</StartDate>
<PlannedEndDate />
<LanesAffected>No Data</LanesAffected>
<Latitude>45.9653370633761</Latitude>
<Longitude>-66.7443560444377</Longitude>
<LatitudeSecondary />
<LongitudeSecondary />
<EventType>flooding</EventType>
<EventSubType>Flooding</EventSubType>
<IsFullClosure>false</IsFullClosure>
<Severity>None</Severity>
<Comment />
<EncodedPolyline />
<Restrictions>
<Width />
<Height />
<Length />
<Weight />
<Speed />
</Restrictions>
<DetourPolyline></DetourPolyline>
<DetourInstructions></DetourInstructions>
<Recurrence></Recurrence>
<RecurrenceSchedules></RecurrenceSchedules>
</Event>
<Event>
<ID>6</ID>
<SourceId>96</SourceId>
<Organization>ERS</Organization>
<RoadwayName>Mactaquac Rd</RoadwayName>
<DirectionOfTravel>Unknown</DirectionOfTravel>
<Description>Bridge Restriction on Mactaquac Rd near Saint John River. Visibility: Visibility reduced in fog. Expect Delays: Under 30 minutes </Description>
<Reported>1664210040</Reported>
<LastUpdated>1664298657</LastUpdated>
<StartDate>1664210040</StartDate>
<PlannedEndDate />
<LanesAffected>No Data</LanesAffected>
<Latitude>45.9553831608503</Latitude>
<Longitude>-66.8713347653979</Longitude>
<LatitudeSecondary />
<LongitudeSecondary />
<EventType>flooding</EventType>
<EventSubType>Bridge Restriction</EventSubType>
<IsFullClosure>false</IsFullClosure>
<Severity>Minor</Severity>
<Comment />
<EncodedPolyline />
<Restrictions>
<Width />
<Height />
<Length />
<Weight />
<Speed />
</Restrictions>
<DetourPolyline></DetourPolyline>
<DetourInstructions></DetourInstructions>
<Recurrence></Recurrence>
<RecurrenceSchedules></RecurrenceSchedules>
</Event>
</EventList>