Purpose

This document outlines the resource types, filters and fields supported by DriveBC's Open511 API. Use the tabs below to access information on what the API does, how to use it and the message formats you can expect in response to your queries. For further information please refer to our API Terms of Use. If you are using this API we suggest you request to be added to our Open511 API distribution list to stay informed of changes we may be making. Send your request to MOTIDriveBC@gov.bc.ca.

Overview

This API serves DriveBC's implementation of the Open511 Specification.

The tabs above give you access to documentation on five separate Open511 resources. Of these, only the 'Events' resource is truly dynamic, allowing you to select the subset of active events that should be returned. The other four resources return static content, the only exception being the dynamic inclusion of the DEU emergency message in the Jurisdiction resource output. All documents can be requested in XML or JSON format. The Open511 standard supports the provision of multiple languages, but the resources presented in this initial implementation are English only. Use of the Information provided by this API is governed by the Open Government Licence – British Columbia (“OGL-BC”).

Resource Descriptions

Discovery

The root (or discovery) resource is the single entry point of an open511 endpoint. By following links from the discovery resource, clients can find and gain access to all resources within an Open511 implementation. Access this resource at https://api.open511.gov.bc.ca/

Events

The event resource provides information about road events (accidents, construction, special events). The events resource is a list of event elements matching the filtering parameters if any are provided. See below for event filter usage cases https://api.open511.gov.bc.ca/events. By default 50 events are displayed. To display additional events (e.g., 100) use the following parameter - https://api.open511.gov.bc.ca/events?limit=100.


This API has a maximum request limit of 500. If more than 500 events are required, pagination is supported via the limit and offset parameters. Pagination can also be used with smaller limits to improve the API's performance. The following are pagination examples:

Get 300 records in 3 calls:

Jurisdiction

The jurisdiction represents a government entity (city, state/province department of transportation, agency, etc.) publishing Open511 data. Access this resource at https://api.open511.gov.bc.ca/jurisdiction

Jurisdiction Geography

The jurisdiction geography contains the boundaries of the jurisdiction. Access this resource at https://api.open511.gov.bc.ca/jurisdictiongeography

Areas

A geographical area: a city, district, neighbourhood, etc. These are represented by a jurisdiction id and an area number, e.g. drivebc.ca/3. In BC there are 11 areas. Access this resource at https://api.open511.gov.bc.ca/areas

Usage cases for the Events resource

The table below presents example urls for each of the supported event filters. Browsing the results of these queries will help newcomers understand how the API operates. These filters can be combined in the query string of a single GET request to further refine the search. For full documentation for the Events resource click on the 'Events' tab above.

FilterUsage Case
status

Returns all events with a status of ACTIVE.
https://api.open511.gov.bc.ca/events?status=ACTIVE.

severity

Returns all events with a severity of MAJOR.
https://api.open511.gov.bc.ca/events?severity=MAJOR

jurisdiction

Returns all events with the jurisdiction 'drivebc.ca'. As this is the only jurisdiction currently supported, this query returns all active events.
https://api.open511.gov.bc.ca/events?jurisdiction=drivebc.ca

event_type

Returns all events with the event_type 'WEATHER_CONDITION'.
https://api.open511.gov.bc.ca/events?event_type=WEATHER_CONDITION

event_subtype

Returns all events with the event_subtype 'ROAD_MAINTENANCE'.
https://api.open511.gov.bc.ca/events?event_subtype=ROAD_MAINTENANCE

created

Returns all events with a created date greater than the ISO 8601 date/time 2013-12-01T12:00:00Z.
https://api.open511.gov.bc.ca/events?created=>2013-12-01T12:00:00Z

updated

Returns all events with an updated date less than the ISO 8601 date/time 2013-12-01T12:00:00Z
https://api.open511.gov.bc.ca/events?updated=<2013-12-01T12:00:00Z

road_name

Returns all events that take place on Highway 1.
https://api.open511.gov.bc.ca/events?road_name=Highway 1

area_id

Returns all events that take place within the Rocky Mountain District.
https://api.open511.gov.bc.ca/events?area_id=drivebc.ca/3

bbox

Returns all events that fall within the geographical bounding box for the Greater Vancouver Regional Area (defined by four comma separated coordinates: xmin, ymin, xmax, ymax).
https://api.open511.gov.bc.ca/events?bbox=-123.45,48.99,-122.45,49.49

geography
&
tolerance

Returns all events that take place within 10km of the Lions Gate Bridge in Vancouver. (These two filters must be used together)
https://api.open511.gov.bc.ca/events?geography=POINT(49.315059 -123.138925)&tolerance=10000

Note: Requests exceeding a tolerance of 10,000 metres will be downgraded to 10,000 metres.

in_effect_on

Returns all events that take place between 2014-07-30 at Midnight and 2014-12-31 at 11:59pm.
https://api.open511.gov.bc.ca/events?in_effect_on=2014-07-30T00:00,2014-12-31T23:59