GET Events
Returns all traffic events.
Request Information
https://511.gov.pe.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. |
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: 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 |
IsFullClosure |
True if all lanes are blocked for this event. |
string |
Community |
Community is where the event occurred. |
string |
Response Formats
JSON
[ { "ID": "ERS--88", "Organization": "ERS", "RoadwayName": "HWY-120", "DirectionOfTravel": "Northbound", "Description": "Culvert washout on HWY-120 Northbound near HWY-2.", "Reported": 1651005600, "LastUpdated": 1651005670, "StartDate": 1651005600, "PlannedEndDate": null, "LanesAffected": "No Data", "Latitude": 46.41975, "Longitude": -63.71169, "LatitudeSecondary": 0.0, "LongitudeSecondary": 0.0, "EventType": "accidentsAndIncidents", "IsFullClosure": false, "Community": "Summerside" }, { "ID": "ERS--105", "Organization": "ERS", "RoadwayName": "HWY-2", "DirectionOfTravel": "Eastbound", "Description": "Vehicle collision on HWY-2 Eastbound at North Dr.", "Reported": 1652286120, "LastUpdated": 1652288672, "StartDate": 1652286120, "PlannedEndDate": null, "LanesAffected": "No Data", "Latitude": 46.424647, "Longitude": -63.810587, "LatitudeSecondary": 0.0, "LongitudeSecondary": 0.0, "EventType": "accidentsAndIncidents", "IsFullClosure": false, "Community": "Summerside" } ]
XML
<EventList> <Event> <ID>ERS--88</ID> <Organization>ERS</Organization> <RoadwayName>HWY-120</RoadwayName> <DirectionOfTravel>Northbound</DirectionOfTravel> <Description>Culvert washout on HWY-120 Northbound near HWY-2.</Description> <Reported>1651005600</Reported> <LastUpdated>1651005670</LastUpdated> <StartDate>1651005600</StartDate> <PlannedEndDate/> <LanesAffected>No Data</LanesAffected> <Latitude>46.41975</Latitude> <Longitude>-63.71169</Longitude> <LatitudeSecondary>0</LatitudeSecondary> <LongitudeSecondary>0</LongitudeSecondary> <EventType>accidentsAndIncidents</EventType> <IsFullClosure>false</IsFullClosure> <Community>Summerside</Community> </Event> <Event> <ID>ERS--105</ID> <Organization>ERS</Organization> <RoadwayName>HWY-2</RoadwayName> <DirectionOfTravel>Eastbound</DirectionOfTravel> <Description>Vehicle collision on HWY-2 Eastbound at North Dr.</Description> <Reported>1652286120</Reported> <LastUpdated>1652288672</LastUpdated> <StartDate>1652286120</StartDate> <PlannedEndDate/> <LanesAffected>No Data</LanesAffected> <Latitude>46.424647</Latitude> <Longitude>-63.810587</Longitude> <LatitudeSecondary>0</LatitudeSecondary> <LongitudeSecondary>0</LongitudeSecondary> <EventType>accidentsAndIncidents</EventType> <IsFullClosure>false</IsFullClosure> <Community>Summerside</Community> </Event> </EventList>