GET Events
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 |
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: None, 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
JSON
[
{
"ID":"ERS--7",
"Organization":"ERS",
"RoadwayName":"HWY-820",
"DirectionOfTravel":"Southbound",
"Description":"Road breakup on HWY-820 Southbound near Second Lake Rd. ",
"Reported":1652380620,
"LastUpdated":1660744965,
"StartDate":1652380620,
"PlannedEndDate":null,
"LanesAffected":"No Data",
"Latitude":45.399062,
"Longitude":-65.797492,
"LatitudeSecondary":0.0,
"LongitudeSecondary":0.0,
"EventType":"accidentsAndIncidents",
"IsFullClosure":false,
"Comment": null,
"Restrictions": {
"Width": null,
"Height": null,
"Length": null,
"Weight": null,
"Speed": null
},
"DetourPolyline": "mv{eItn{sTVAfF@?jHLh@PPVFP?y@ZKAII??HHJ@x@[Q?WGQQMi@?kHqEAU?W@?~V",
"DetourInstructions": {
"Instruction": "Head toward 111 Ave NW on 117 St NW. Go for 142 m.",
"Instruction": "Turn right onto 110A Ave NW. Go for 115 m.",
"Instruction": "Turn slightly left onto 118 St NW. Go for 35 m.",
"Instruction": "Turn sharp right onto 118 St NW. Go for 47 m.",
"Instruction": "Make a U-Turn onto 118 St NW. Go for 47 m.",
"Instruction": "Turn sharp left onto 118 St NW. Go for 35 m.",
"Instruction": "Turn slightly right onto 110A Ave NW. Go for 115 m.",
"Instruction": "Turn left onto 117 St NW. Go for 129 m.",
"Instruction": "Turn left onto 111 Ave NW. Go for 267 m.",
"Instruction": "Arrive at 111 Ave NW."
}
},
{
"ID":"ERS--8",
"Organization":"ERS",
"RoadwayName":"HWY-8",
"DirectionOfTravel":"Northbound",
"Description":"Paving on HWY-8 Northbound near A St. Lane Impassable / Closed. ",
"Reported":1654016100,
"LastUpdated":1652723639,
"StartDate":1654016100,
"PlannedEndDate":null,
"LanesAffected":"All Lanes Closed",
"Latitude":46.347268,
"Longitude":-66.565142,"LatitudeSecondary":0.0,
"LongitudeSecondary":0.0,
"EventType":"closures",
"IsFullClosure":true,
"Comment": "detour in effect",
"Restrictions": {
"Width": null,
"Height": null,
"Length": null,
"Weight": null,
"Speed": null
},
"DetourPolyline": "mv{eItn{sTVAfF@?jHLh@PPVFP?y@ZKAII??HHJ@x@[Q?WGQQMi@?kHqEAU?W@?~V",
"DetourInstructions": {
"Instruction": "Head toward 111 Ave NW on 117 St NW. Go for 142 m.",
"Instruction": "Turn right onto 110A Ave NW. Go for 115 m.",
"Instruction": "Turn slightly left onto 118 St NW. Go for 35 m.",
"Instruction": "Turn sharp right onto 118 St NW. Go for 47 m.",
"Instruction": "Make a U-Turn onto 118 St NW. Go for 47 m.",
"Instruction": "Turn sharp left onto 118 St NW. Go for 35 m.",
"Instruction": "Turn slightly right onto 110A Ave NW. Go for 115 m.",
"Instruction": "Turn left onto 117 St NW. Go for 129 m.",
"Instruction": "Turn left onto 111 Ave NW. Go for 267 m.",
"Instruction": "Arrive at 111 Ave NW."
}
}
]
XML
<EventList>
<Event>
<ID>ERS--7</ID>
<Organization>ERS</Organization>
<RoadwayName>HWY-820</RoadwayName>
<DirectionOfTravel>Southbound</DirectionOfTravel>
<Description>Road breakup on HWY-820 Southbound near Second Lake Rd. </Description>
<Reported>1652380620</Reported>
<LastUpdated>1660744965</LastUpdated>
<StartDate>1652380620</StartDate>
<PlannedEndDate/>
<LanesAffected>No Data</LanesAffected>
<Latitude>45.399062</Latitude>
<Longitude>-65.797492</Longitude>
<LatitudeSecondary>0</LatitudeSecondary>
<LongitudeSecondary>0</LongitudeSecondary>
<EventType>accidentsAndIncidents</EventType>
<IsFullClosure>false</IsFullClosure>
</Comment>
<Restrictions>
<Width/>
<Height/>
<Length/>
<Weight/>
<Speed/>
</Restrictions>
</Event>
<Event>
<ID>ERS--8</ID>
<Organization>ERS</Organization>
<RoadwayName>HWY-8</RoadwayName>
<DirectionOfTravel>Northbound</DirectionOfTravel>
<Description>Paving on HWY-8 Northbound near A St. Lane Impassable / Closed. </Description>
<Reported>1654016100</Reported>
<LastUpdated>1652723639</LastUpdated>
<StartDate>1654016100</StartDate>
<PlannedEndDate/>
<LanesAffected>All Lanes Closed</LanesAffected>
<Latitude>46.347268</Latitude>
<Longitude>-66.565142</Longitude>
<LatitudeSecondary>0</LatitudeSecondary>
<LongitudeSecondary>0</LongitudeSecondary>
<EventType>closures</EventType>
<IsFullClosure>true</IsFullClosure>
<Comment>detour in effect<Comment>
<Restrictions>
<Width/>
<Height/>
<Length/>
<Weight/>
<Speed/>
</Restrictions>
</Event>
</EventList>